Jump to content

MrBendelScrolls

Members
  • Posts

    115
  • Joined

  • Last visited

Everything posted by MrBendelScrolls

  1. 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"?
  2. 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.
  3. Please post your code. It'd be nice if you create a github project or at least post each file to gist.
  4. Bump, I think...
  5. 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?
  6. 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"));
  7. 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?
  8. Is it possible to get tool material from other mod, i.e. copper from Thermal Foundation?
  9. Is it possible to make categories in config file while using @Config annotation?
  10. 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.
  11. 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?
  12. 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?
×
×
  • Create New...

Important Information

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