Skip to content

Commit

Permalink
Fixed everything lol (Version 4.11.2.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
MineDragonCZ committed Nov 7, 2023
1 parent 3cfda66 commit 78f1d62
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public void registerCustomModel(IRegistry<ModelResourceLocation, IBakedModel> re
public void setCustomModelLocation() {
ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName() + "_empty", "inventory"));
ModelLoader.setCustomModelResourceLocation(this, 1, new ModelResourceLocation(getRegistryName() + "_filled", "inventory"));
ModelLoader.setCustomModelResourceLocation(this, 2, new ModelResourceLocation(getRegistryName() + "_end", "inventory"));
}

@Nonnull
Expand Down Expand Up @@ -132,10 +133,13 @@ public TileEntityItemStackRenderer createTEISR() {
}

@Override
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) {
public void addInformation(ItemStack stack, World world, @Nonnull List<String> tooltip, @Nonnull ITooltipFlag flag) {
if (stack.getItemDamage() == 0) {
tooltip.add(JSG.proxy.localize("item.jsg.page_notebook.empty"));
}
else if (stack.getItemDamage() == 2) {
tooltip.add(JSG.proxy.localize("item.jsg.page_notebook.end"));
}

else {
if (stack.hasTagCompound()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import tauri.dev.jsg.JSG;
import tauri.dev.jsg.item.JSGItems;
import tauri.dev.jsg.item.linkable.dialer.UniverseDialerItem;
import tauri.dev.jsg.item.linkable.dialer.UniverseDialerMode;
Expand All @@ -29,6 +30,7 @@
import tauri.dev.jsg.util.BlockHelpers;

import java.nio.charset.StandardCharsets;
import java.util.Map;

public class EntryActionToServer implements IMessage {
private EnumHand hand;
Expand Down Expand Up @@ -300,6 +302,12 @@ public IMessage onMessage(EntryActionToServer message, MessageContext ctx) {
int originId;
if (message.index == 1) {
// gate is not generated - there is no tileEntity
StargateNetwork sgn = StargateNetwork.get(world);
Map<SymbolTypeEnum, StargateAddress> map = sgn.getMapNotGenerated().get(message.targetGatePos);
if(map == null){
JSG.info("Lol123");
continue;
}
address = StargateNetwork.get(world).getMapNotGenerated().get(message.targetGatePos).get(s);
originId = StargateClassicBaseTile.getOriginId(null, message.targetGatePos.dimensionID, -1);
} else {
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/assets/jsg/loot_tables/stronghold.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
{
"type": "item",
"name": "jsg:page_notebook",
"data": 1,
"data": 2,
"meta": 2,
"damage": 2,
"weight": 100,
"functions" : [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures": {
"layer0": "jsg:items/page_base",
"layer1": "jsg:items/notebook_page_end"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 78f1d62

Please sign in to comment.