-
Posts
115 -
Joined
-
Last visited
Posts posted by MrBendelScrolls
-
-
- Register methods must be static.
- You put what you register . You can create new items right in that event and then take them from @ObjectHolder class later, or do some form of storage (array, separate instances).
- To keep code clean, it's better to move your model registries into the model RegisterHandler and completely get rid of _Items class.
- 1
-
Please post your code. It'd be nice if you create a github project or at least post each file to gist.
- 1
-
Bump
-
Bump, I think...
-
I am using config annotations. When creating a config, forge sorts fields and changes their order in some unknown to me way.
How do I set the order manually? -
new ModelResourceLocation(new ResourceLocation(...))?
ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(new ResourceLocation(item.getRegistryName().toString()), "inventory"));
It should be
ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
-
Well, I want to make a hammers mod. And I need to make tools with every existing in installed mods tool material. I could probably create my own ones for default materials, but is there no another way?
-
Is it possible to get tool material from other mod, i.e. copper from Thermal Foundation?
-
Is it possible to make categories in config file while using @Config annotation?
-
Do I have to put modid in unlocalized name of an item? Would there be any conflicts if I don't?
For example:
this.setUnlocalizedName("name") this.setUnlocalizedName(modid + ".name")
I find the second line in many tutorials, but I don't really think it's necessary.
-
I tried 2nd way and looks like it works fine. So, is this code okay in performance?
@Override public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player) { if (!player.isSneaking()) { RayTraceResult rayTrace = rayTrace(player.getEntityWorld(), player, false); switch (rayTrace.sideHit.getAxis()) { case X: break; case Y: break; case Z: break; } } return super.onBlockStartBreak(itemstack, pos, player); }
And do I have to check the side to run it on the server only?
-
I'm kinda new at modding and I don't understand some aspects.
I'm developing Hammers mod (tools that break blocks in a specified radius, usually 3x3). There's overrided onBlockStartBreak(ItemStack, BlockPos, EntityPlayer) method withing the ItemHammer class. How do I get the side of a block which player are pointing at while breaking?
[1.12] Item texture not working
in Modder Support
Posted · Edited by MrBendelScrolls
Isn't forge smart enough to call the method with ModelRegistryEvent on the client only?
I didn't have any problems with this being in the common class.
And, isn't @SideOnly kind of... "forbidden"?