Everything posted by WildHeart
-
[1.11] Register items in game, not initialization.
Hrm. Okay, thank you.
-
[1.11] Register items in game, not initialization.
"There may be another way to do that." Example?
-
[1.11] Register items in game, not initialization.
Is it possible to register items or blocks during the game, and not during initialization?
-
[1.11.2] How to give item from gui?
Solved, my fail...
-
[1.11.2] How to give item from gui?
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?
-
[1.12] What makes this event?
Thank you! Solved.
-
[1.12] What makes this event?
Hello, i found this event LootingLevelEvent, but I don't know what it does?
-
[1.12] How to register models for items with meta?
Maybe...
-
[1.12] How to register models for items with meta?
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?
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?
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?
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?
What if you the old-fashioned way?
-
[1.12] How to register models for items with meta?
In init method. Yes the code is runs.
-
[1.12] How to register models for items with meta?
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
-
[1.12] How to register models for items with meta?
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?
-
[1.11.2] Entity render problem.
Thank you! Topic can be closed.
-
[1.11.2] Entity render problem.
- [1.11.2] Entity render problem.
Code:- [1.11.2] Entity render problem.
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- [1.11.2] Entity render problem.
I have in the ClientProxy is the super class super.preinit();- [1.11.2] Entity render problem.
Register in ServerProxy -> preInit RenderRegister in ClientProxy -> init- [1.11.2] Entity render problem.
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][1.11] Block Variants.
Solved- [Solved][1.11] Block Variants.
Pls, example. - [1.11.2] Entity render problem.
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.