
WildHeart
Members-
Posts
236 -
Joined
-
Last visited
Everything posted by WildHeart
-
[1.11] Register items in game, not initialization.
WildHeart replied to WildHeart's topic in Modder Support
Hrm. Okay, thank you. -
[1.11] Register items in game, not initialization.
WildHeart replied to WildHeart's topic in Modder Support
"There may be another way to do that." Example? -
Is it possible to register items or blocks during the game, and not during initialization?
-
Solved, my fail...
-
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?
-
Thank you! Solved.
-
Hello, i found this event LootingLevelEvent, but I don't know what it does?
-
[1.12] How to register models for items with meta?
WildHeart replied to WildHeart's topic in Modder Support
Maybe... -
[1.12] How to register models for items with meta?
WildHeart replied to WildHeart's topic in Modder Support
If that's the event then Yes, but if the normal registration no. Check the edit to my previous post. -
[1.12] How to register models for items with meta?
WildHeart replied to WildHeart's topic in Modder Support
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. -
[1.12] How to register models for items with meta?
WildHeart replied to WildHeart's topic in Modder Support
By the way, another bug, does not display the text object(which was introduced in 1.11). The model uses variation -
[1.12] How to register models for items with meta?
WildHeart replied to WildHeart's topic in Modder Support
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); } -
[1.12] How to register models for items with meta?
WildHeart replied to WildHeart's topic in Modder Support
What if you the old-fashioned way? -
[1.12] How to register models for items with meta?
WildHeart replied to WildHeart's topic in Modder Support
In init method. Yes the code is runs. -
[1.12] How to register models for items with meta?
WildHeart replied to WildHeart's topic in Modder Support
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 -
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?
-
Thank you! Topic can be closed.
-
Code:
-
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
-
I have in the ClientProxy is the super class super.preinit();
-
Register in ServerProxy -> preInit RenderRegister in ClientProxy -> init
-
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!
-
Solved
-
Pls, example.