Updated Networking code (still broken on Client Side only)
This commit is contained in:
@@ -11,11 +11,9 @@ import net.minecraft.world.World;
|
|||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import net.yseven.findyourway.item.ItemCompassBase;
|
import net.yseven.findyourway.item.ItemCompassBase;
|
||||||
import net.yseven.findyourway.item.ModItems;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import javax.annotation.ParametersAreNonnullByDefault;
|
import javax.annotation.ParametersAreNonnullByDefault;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class AngleGetter implements IItemPropertyGetter {
|
public class AngleGetter implements IItemPropertyGetter {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@@ -71,7 +69,12 @@ public class AngleGetter implements IItemPropertyGetter {
|
|||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private double getAngle(World world, Entity entity, ItemStack stack) {
|
private double getAngle(World world, Entity entity, ItemStack stack) {
|
||||||
return Math.atan2((double) blockPos.getZ() - entity.posZ, (double) blockPos.getX() - entity.posX);
|
if(blockPos != null) {
|
||||||
|
return Math.atan2((double) blockPos.getZ() - entity.posZ, (double) blockPos.getX() - entity.posX);
|
||||||
|
} else {
|
||||||
|
return (double) 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
@@ -18,7 +18,6 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
|||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
import net.yseven.findyourway.CommonProxy;
|
import net.yseven.findyourway.CommonProxy;
|
||||||
import net.yseven.findyourway.FindYourWay;
|
import net.yseven.findyourway.FindYourWay;
|
||||||
import net.yseven.findyourway.Network.PacketHandler;
|
import net.yseven.findyourway.Network.PacketHandler;
|
||||||
@@ -51,10 +50,6 @@ public class ClientProxy extends CommonProxy {
|
|||||||
compassBase.setStructurePos(pos);
|
compassBase.setStructurePos(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BlockPos getStructurePos(ItemCompassBase compassBase) {
|
|
||||||
return compassBase.getStructurePos();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void resetStructurePos(ItemCompassBase compass) {
|
public static void resetStructurePos(ItemCompassBase compass) {
|
||||||
compass.setStructurePos(null);
|
compass.setStructurePos(null);
|
||||||
compass.setStructureWorld(getWorld());
|
compass.setStructureWorld(getWorld());
|
||||||
@@ -78,16 +73,23 @@ public class ClientProxy extends CommonProxy {
|
|||||||
super.postInit(event);
|
super.postInit(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Mod.EventBusSubscriber
|
||||||
public void registerItemRenderer(Item item, int meta, String id) {
|
public static class RegistrationHandler {
|
||||||
ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(FindYourWay.modId + ":" + id, "inventory"));
|
@SubscribeEvent
|
||||||
|
public static void registerModels(ModelRegistryEvent event) {
|
||||||
|
ModItems.registerModels();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onModelRegistry(ModelRegistryEvent event) {
|
public void onModelRegistry(ModelRegistryEvent event) {
|
||||||
ModItems.ENDER_COMPASS.addPropertyOverride(new ResourceLocation(ModItems.ENDER_COMPASS.assetTag), new AngleGetter(ModItems.ENDER_COMPASS));
|
registerModel(ModItems.ENDER_COMPASS);
|
||||||
ModelLoader.setCustomModelResourceLocation(ModItems.ENDER_COMPASS, 0, new ModelResourceLocation("findyourway:ender_compass", "inventory"));
|
registerModel(ModItems.VILLAGE_COMPASS);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void registerModel(ItemCompassBase compass) {
|
||||||
|
compass.addPropertyOverride(new ResourceLocation(compass.assetTag), new AngleGetter(compass));
|
||||||
|
ModelLoader.setCustomModelResourceLocation(compass, 0, new ModelResourceLocation(FindYourWay.modId + ":" + compass.getUnlocalizedName(), "inventory"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
@@ -3,12 +3,15 @@ package net.yseven.findyourway;
|
|||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.event.RegistryEvent;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import net.yseven.findyourway.Network.PacketHandler;
|
import net.yseven.findyourway.Network.PacketHandler;
|
||||||
import net.yseven.findyourway.item.ItemCompassBase;
|
import net.yseven.findyourway.item.ItemCompassBase;
|
||||||
|
import net.yseven.findyourway.item.ModItems;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@@ -18,7 +21,8 @@ public class CommonProxy {
|
|||||||
public static ArrayList<ItemCompassBase> compassList = new ArrayList<>();
|
public static ArrayList<ItemCompassBase> compassList = new ArrayList<>();
|
||||||
|
|
||||||
public void preInit(FMLPreInitializationEvent event) {
|
public void preInit(FMLPreInitializationEvent event) {
|
||||||
PacketHandler.registerMessages("findyourway");
|
ModItems.init();
|
||||||
|
PacketHandler.registerMessages(FindYourWay.modId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(FMLInitializationEvent event) {
|
public void init(FMLInitializationEvent event) {
|
||||||
@@ -29,7 +33,12 @@ public class CommonProxy {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerItemRenderer(Item item, int meta, String id) {
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public static void registerItems(RegistryEvent.Register<Item> event) {
|
||||||
|
event.getRegistry().registerAll(
|
||||||
|
ModItems.ENDER_COMPASS
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean containsCompass(IInventory inventory, ItemCompassBase compass) {
|
public static boolean containsCompass(IInventory inventory, ItemCompassBase compass) {
|
||||||
@@ -41,4 +50,22 @@ public class CommonProxy {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int setCompassId(ItemCompassBase compass) {
|
||||||
|
switch (compass.getStructureType()){
|
||||||
|
case "Stronghold": return 1;
|
||||||
|
case "Village": return 2;
|
||||||
|
default: return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ItemCompassBase getCompassId(int id) {
|
||||||
|
switch (id) {
|
||||||
|
case 1: return ModItems.ENDER_COMPASS;
|
||||||
|
case 2: return ModItems.VILLAGE_COMPASS;
|
||||||
|
default:
|
||||||
|
ItemCompassBase ERROR_COMPASS = new ItemCompassBase("error", "");
|
||||||
|
return ERROR_COMPASS;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,21 +1,12 @@
|
|||||||
package net.yseven.findyourway;
|
package net.yseven.findyourway;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
|
||||||
import net.minecraftforge.event.RegistryEvent;
|
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.SidedProxy;
|
import net.minecraftforge.fml.common.SidedProxy;
|
||||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|
||||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
|
||||||
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.yseven.findyourway.Network.PacketSendKey;
|
|
||||||
import net.yseven.findyourway.item.ModItems;
|
|
||||||
|
|
||||||
@Mod(modid = FindYourWay.modId, name = FindYourWay.name, version = FindYourWay.version)
|
@Mod(modid = FindYourWay.modId, name = FindYourWay.name, version = FindYourWay.version)
|
||||||
public class FindYourWay {
|
public class FindYourWay {
|
||||||
@@ -33,6 +24,7 @@ public class FindYourWay {
|
|||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent event) {
|
public void preInit(FMLPreInitializationEvent event) {
|
||||||
System.out.println(name + " is loading!");
|
System.out.println(name + " is loading!");
|
||||||
|
System.out.println("FIND YOUR WAY TEST LINE -------------------------------------- TEST");
|
||||||
|
|
||||||
proxy.preInit(event);
|
proxy.preInit(event);
|
||||||
}
|
}
|
||||||
@@ -46,17 +38,4 @@ public class FindYourWay {
|
|||||||
public void postInit(FMLPostInitializationEvent event) {
|
public void postInit(FMLPostInitializationEvent event) {
|
||||||
proxy.postInit(event);
|
proxy.postInit(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.EventBusSubscriber
|
|
||||||
public static class RegistrationHandler {
|
|
||||||
@SubscribeEvent
|
|
||||||
public static void registerItems(RegistryEvent.Register<Item> event) {
|
|
||||||
ModItems.register(event.getRegistry());
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public static void registerModels(ModelRegistryEvent event) {
|
|
||||||
ModItems.registerModels();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -6,6 +6,7 @@ import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
|||||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
||||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||||
import net.yseven.findyourway.Client.ClientProxy;
|
import net.yseven.findyourway.Client.ClientProxy;
|
||||||
|
import net.yseven.findyourway.CommonProxy;
|
||||||
import net.yseven.findyourway.item.ItemCompassBase;
|
import net.yseven.findyourway.item.ItemCompassBase;
|
||||||
|
|
||||||
public class PacketGetKey implements IMessage, IMessageHandler<PacketGetKey, IMessage> {
|
public class PacketGetKey implements IMessage, IMessageHandler<PacketGetKey, IMessage> {
|
||||||
@@ -14,19 +15,21 @@ public class PacketGetKey implements IMessage, IMessageHandler<PacketGetKey, IMe
|
|||||||
|
|
||||||
public PacketGetKey() {}
|
public PacketGetKey() {}
|
||||||
|
|
||||||
public PacketGetKey(BlockPos pos, ItemCompassBase compassBase) {
|
public PacketGetKey(BlockPos pos, int id) {
|
||||||
structurePos = pos;
|
structurePos = pos;
|
||||||
compass = compassBase;
|
compass = CommonProxy.getCompassId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void toBytes(ByteBuf buf) {
|
public void toBytes(ByteBuf buf) {
|
||||||
buf.writeLong(structurePos.toLong());
|
buf.writeLong(structurePos.toLong());
|
||||||
|
buf.writeInt(CommonProxy.setCompassId(compass));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fromBytes(ByteBuf buf) {
|
public void fromBytes(ByteBuf buf) {
|
||||||
structurePos = BlockPos.fromLong(buf.readLong());
|
structurePos = BlockPos.fromLong(buf.readLong());
|
||||||
|
compass = CommonProxy.getCompassId(buf.readInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -4,10 +4,10 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.WorldServer;
|
import net.minecraft.world.WorldServer;
|
||||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
|
||||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
||||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||||
|
import net.yseven.findyourway.CommonProxy;
|
||||||
import net.yseven.findyourway.item.ItemCompassBase;
|
import net.yseven.findyourway.item.ItemCompassBase;
|
||||||
|
|
||||||
public class PacketSendKey implements IMessage {
|
public class PacketSendKey implements IMessage {
|
||||||
@@ -15,14 +15,10 @@ public class PacketSendKey implements IMessage {
|
|||||||
private final ItemCompassBase compass;
|
private final ItemCompassBase compass;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fromBytes(ByteBuf buf) {
|
public void fromBytes(ByteBuf buf) {}
|
||||||
structurePos = BlockPos.fromLong(buf.readLong());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void toBytes(ByteBuf buf) {
|
public void toBytes(ByteBuf buf) {}
|
||||||
buf.writeLong(structurePos.toLong());
|
|
||||||
}
|
|
||||||
|
|
||||||
public PacketSendKey(ItemCompassBase compassBase) {
|
public PacketSendKey(ItemCompassBase compassBase) {
|
||||||
compass = compassBase;
|
compass = compassBase;
|
||||||
@@ -31,20 +27,22 @@ public class PacketSendKey implements IMessage {
|
|||||||
public static class Handler implements IMessageHandler<PacketSendKey, IMessage> {
|
public static class Handler implements IMessageHandler<PacketSendKey, IMessage> {
|
||||||
@Override
|
@Override
|
||||||
public IMessage onMessage(PacketSendKey message, MessageContext ctx) {
|
public IMessage onMessage(PacketSendKey message, MessageContext ctx) {
|
||||||
FMLCommonHandler.instance().getWorldThread(ctx.netHandler).addScheduledTask(() -> handle(message, ctx));
|
final EntityPlayerMP player = ctx.getServerHandler().player;
|
||||||
return null;
|
if (CommonProxy.containsCompass(player.inventory, message.compass)) {
|
||||||
}
|
final WorldServer world = (WorldServer) player.world;
|
||||||
|
final int compassId = CommonProxy.setCompassId(message.compass);
|
||||||
private void handle(PacketSendKey message, MessageContext ctx) {
|
final String structureType = message.compass.getStructureType();
|
||||||
//server code
|
world.addScheduledTask(new Runnable() {
|
||||||
EntityPlayerMP player = ctx.getServerHandler().player;
|
@Override
|
||||||
WorldServer world = (WorldServer) player.world;
|
public void run() {
|
||||||
if (message.compass != null) {
|
BlockPos pos = world.getChunkProvider().getNearestStructurePos(world, structureType, new BlockPos(player), true);
|
||||||
message.structurePos = world.getChunkProvider().getNearestStructurePos(world, message.compass.getStructureType(), new BlockPos(player), false);
|
if (pos != null) {
|
||||||
if (message.structurePos != null) {
|
PacketHandler.INSTANCE.sendTo(new PacketGetKey(message.structurePos, compassId), player);
|
||||||
PacketHandler.INSTANCE.sendTo(message, player);
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
package net.yseven.findyourway.item;
|
package net.yseven.findyourway.item;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
@@ -9,6 +10,9 @@ import net.minecraft.util.EnumActionResult;
|
|||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.client.model.ModelLoader;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import net.yseven.findyourway.Client.ClientProxy;
|
import net.yseven.findyourway.Client.ClientProxy;
|
||||||
import net.yseven.findyourway.CommonProxy;
|
import net.yseven.findyourway.CommonProxy;
|
||||||
import net.yseven.findyourway.FindYourWay;
|
import net.yseven.findyourway.FindYourWay;
|
||||||
@@ -21,13 +25,13 @@ public class ItemCompassBase extends Item {
|
|||||||
private World structureWorld;
|
private World structureWorld;
|
||||||
public final String assetTag;
|
public final String assetTag;
|
||||||
|
|
||||||
ItemCompassBase(String name, String structureType, CreativeTabs tab) {
|
public ItemCompassBase(String name, String structureName) {
|
||||||
this.setUnlocalizedName(name);
|
setUnlocalizedName(FindYourWay.modId + "." + name);
|
||||||
this.setRegistryName(name);
|
setRegistryName(name);
|
||||||
this.structureType = structureType;
|
structureType = structureName;
|
||||||
this.setCreativeTab(tab);
|
setCreativeTab(CreativeTabs.TOOLS);
|
||||||
this.setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
this.assetTag = name + "_angle";
|
assetTag = name + "_angle";
|
||||||
CommonProxy.compassList.add(this);
|
CommonProxy.compassList.add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,7 +56,7 @@ public class ItemCompassBase extends Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void registerItemModel() {
|
public void registerItemModel() {
|
||||||
FindYourWay.proxy.registerItemRenderer(this, 0, this.getUnlocalizedName());
|
ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -1,20 +1,20 @@
|
|||||||
package net.yseven.findyourway.item;
|
package net.yseven.findyourway.item;
|
||||||
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import net.minecraftforge.registries.IForgeRegistry;
|
|
||||||
|
|
||||||
public class ModItems {
|
public class ModItems {
|
||||||
|
public static ItemCompassBase ENDER_COMPASS;
|
||||||
|
public static ItemCompassBase VILLAGE_COMPASS;
|
||||||
|
|
||||||
public static ItemCompassBase ENDER_COMPASS = new ItemCompassBase("ender_compass", "Stronghold", CreativeTabs.TOOLS);
|
public static void init(){
|
||||||
|
ENDER_COMPASS = new ItemCompassBase("ender_compass", "Stronghold");
|
||||||
public static void register(IForgeRegistry<Item> registry) {
|
VILLAGE_COMPASS = new ItemCompassBase("village_compass", "Village");
|
||||||
registry.registerAll(
|
|
||||||
ENDER_COMPASS
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public static void registerModels() {
|
public static void registerModels() {
|
||||||
ENDER_COMPASS.registerItemModel();
|
ENDER_COMPASS.registerItemModel();
|
||||||
|
VILLAGE_COMPASS.registerItemModel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
"description": "Provides compasses to structures",
|
"description": "Provides compasses to structures",
|
||||||
"version": "1.0.0.0-beta",
|
"version": "1.0.0.0-beta",
|
||||||
"mcversion": "1.12.2",
|
"mcversion": "1.12.2",
|
||||||
"logoFile": "assets/endercompass/textures/logo.png",
|
"logoFile": "assets/findyourway/textures/logo.png",
|
||||||
"url": "minecraftforge.net/",
|
"url": "minecraftforge.net/",
|
||||||
"updateJSON": "minecraftforge.net/versions.json",
|
"updateJSON": "minecraftforge.net/versions.json",
|
||||||
"authorList": ["Yavin7"],
|
"authorList": ["Yavin7"],
|
||||||
|
Reference in New Issue
Block a user