Everything posted by MrBendelScrolls
-
[1.12] Item texture not working
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"?
-
[1.12] Item texture not working
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.12] Item texture not working
Please post your code. It'd be nice if you create a github project or at least post each file to gist.
-
[1.10+] Config sorting
Bump
-
[1.10+] Config sorting
Bump, I think...
-
[1.10+] Config sorting
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?
-
[1.10.2] Error loading Item texture/model
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"));
-
How to get other mod's tool material?
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?
-
How to get other mod's tool material?
Is it possible to get tool material from other mod, i.e. copper from Thermal Foundation?
-
[1.10.2] @Config categories
Is it possible to make categories in config file while using @Config annotation?
-
[1.10+] Is it necessary to put modid in unlocalized name?
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.
-
How do I get the block's side which player is breaking?
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?
-
How do I get the block's side which player is breaking?
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?
IPS spam blocked by CleanTalk.