Jump to content

WildHeart

Members
  • Posts

    236
  • Joined

  • Last visited

Everything posted by WildHeart

  1. "There may be another way to do that." Example?
  2. Is it possible to register items or blocks during the game, and not during initialization?
  3. Hello, i have a gui, that gives things at the click of a button. I know I need to send packets, do so, but the subject is not given. public class SPacketGiveItem extends AbstractPacket<SPacketGiveItem> { public SPacketGiveItem(){} @Override public void handleClientSide(EntityPlayer player) { } @Override public void handleServerSide(EntityPlayerMP player) { player.inventory.addItemStackToInventory(new ItemStack(Items.apple)); } @Override public void fromBytes(ByteBuf buf) { } @Override public void toBytes(ByteBuf buf) { } } What could be wrong?
  4. Hello, i found this event LootingLevelEvent, but I don't know what it does?
  5. If that's the event then Yes, but if the normal registration no. Check the edit to my previous post.
  6. There is progress, put this code in the event and my items and variations began to appear. @SubscribeEvent public void model(ModelRegistryEvent e) { for(final EnumType type : EnumType.values()) { ModelLoader.setCustomModelResourceLocation(ItemsInit.GREEN, type.getMeta(), new ModelResourceLocation(ItemsInit.GREEN.getRegistryName() + "_" + type.getName(), "inventory")); } } About the new instance, I accidentally ordered new ItemGreen when I added the code here. And so I have everything as it should be, in a variable. Edit: But still for me the innovation in the form of adding models into the event as it is not very practical, I would like the old-fashioned register.
  7. By the way, another bug, does not display the text object(which was introduced in 1.11). The model uses variation
  8. Im not have a fml-client-latest.log Code in ItemsInit class: public void renderRegister() { for(final EnumType type : EnumType.values()) { this.setRender(new ItemGreen(), type.getMeta(), type.getName()); } } @SideOnly(Side.CLIENT) private void setRender(Item item, final int meta, final String name) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, meta, new ModelResourceLocation(item.getRegistryName() + "_" + name, "inventory")); ModelBakery.registerItemVariants(item, new ResourceLocation(item.getRegistryName() + "_" + name)); } Code in ClientProxy class: ItemsInit.INSTANCE.renderRegister(); Code in Main class: @Mod.EventHandler private void init(final FMLInitializationEvent e) { proxy.init(e); }
  9. So, i use my old code: Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, meta, new ModelResourceLocation(item.getRegistryName() + "_" + name, "inventory")); ModelBakery.registerItemVariants(item, new ResourceLocation(item.getRegistryName() + "_" + name)); And he not work. 1.11.2 in this code works and is already on 1.12 no. latest.log
  10. Hello, I encountered a problem when migrating to 1.12, something seems to have happened with the registration of the options the subject with metadata. I use: ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(item.getRegistryName() + "_" + name, "inventory")); ModelBakery.registerItemVariants(item, new ResourceLocation(Reference.MODID, item.getRegistryName() + "_" + name)); for register models. How to fix?
  11. Problem solved! I use CelientProxy extend ServerProxy. I also have one last question, sometimes entering the world of I have a problem with packages. Ie I have sent the package from the server to the client about how many now of the toxicity of the player. And throws error with NULL
  12. I have in the ClientProxy is the super class super.preinit();
  13. Register in ServerProxy -> preInit RenderRegister in ClientProxy -> init
  14. Hello, i created a Entity and took the model of the player. But the problem is that after registration, nothing has changed, the essence was as white cube and left. Here is the code: P.s. all of the code just for the test has been created!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.