Jump to content

teratogenytale

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by teratogenytale

  1. I am kinda new to the mod community, and so far it has been awesome. I am working on a small mod with plants and plant processing, so I was wondering is there any list of coding standards or naming conventions (that are not common sense Java, like packages and instance with a lowercase, classes with uppercase...) that I have to follow just to not make myself look like a dumbass. Any links or explanations would be greatly appreciated.
  2. Thank you, I thougt it migt cause some illogical problems.
  3. I have seen that whenever a new block is created, people create a whole new class. That seems like a lot of useless classes and code must be copy-pasted every time. So I created only two classes, one for creating blocks, and one for creating items, and I just pass arguments to a constructor, and inside it runs methods: setMaxStackSize(), setUnlocalizedName() and a few more. That saves me from creating a new class every time I need to create a new block. So, since I haven't seen that aproach used anywhere, I just wonder is there something wrong with it? Does it create lag, or conflicts with some rules or conventions? package packageName; import cpw.mods.fml.common.registry.LanguageRegistry; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class className extends Item{ public className(int itemID, int stackSize, String name, CreativeTabs tab, String texture) { super(itemID); setMaxStackSize(stackSize); setUnlocalizedName(name); setCreativeTab(tab); setTextureName("intercraft:"+texture); } public className(int itemID, int stackSize, String name, CreativeTabs tab) { super(itemID); setMaxStackSize(stackSize); setUnlocalizedName(name); setCreativeTab(tab); } }
×
×
  • Create New...

Important Information

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