Jump to content

Nicba1010

Forge Modder
  • Posts

    90
  • Joined

  • Last visited

Everything posted by Nicba1010

  1. i've seen sth about dual hashmaps. any1 know how that would go
  2. Im not on my pc currently but I think that the enderman model has a block but does not render it while the enderman has no blocks. Look at the enderman model. If I helped give me a thank you.
  3. Hi fellow modders, me and my friend Dautor are making a mod, and it needs to include a custom furnace with 2,3 and 4 outputs. All different ones to be clear. We have made the code for the basic 1 output furnace, and have experimented with the 2. output slot but could not get it to work. The 1 output works great! Container TileEntity Thanks for reading this!(And if u help, for helping too OFC ) Sincerely Dautor and Nicba1010
  4. Draco thank you so much. This worked great. And thank you others.
  5. Hi fellow modders, me and my friend Dautor have run into a bit of a problem today. We are trying to register all of the 118 elements in one id. But we have tried many solutions, and only the one where we put every element in its own id worked. So we came here to find out if you can help us how to solve this problem. It is not practical to have each element in its own id because we are going to use the same system for the chemical compounds. This is the code we currently have Item registering public static Item element[] = new Element[baseVariables.elementNum]; public static void initializeItems() { for (int i = 0; i < BaseVariables.elementNum; i++) { element[i] = new Element(i); } } Item class package core.base.item; import java.util.List; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraftforge.oredict.OreDictionary; import core.base.Core; import core.base.util.BaseVariables; import core.base.util.IDs; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class Element extends Item { // private static String name[] = new String[baseVariables.elementNum]; private int Z; public Element(int i) { super(IDs.elementID + i); setHasSubtypes(true); setMaxDamage(0); // for (int i = 0; i < BaseVariables.elementNum; i++) { Z = i; this.setUnlocalizedName(BaseVariables.elementSymbol[Z]); OreDictionary.registerOre("element" + BaseVariables.elementName[Z], this); LanguageRegistry.addName(this, BaseVariables.elementSymbol[Z]); this.setCreativeTab(Core.creativeTab); // } } public static String getName(int i) { return BaseVariables.elementSymbol[i]; } @Override public Icon getIconFromDamage(int i) { return this.itemIcon; } public String getItemNameIS(ItemStack stack) { return BaseVariables.elementName[stack.getItemDamage()]; } @SideOnly(Side.CLIENT) public void getSubBlocks(int unknown, CreativeTabs tab, List subItems) { for (int i = 0; i < BaseVariables.elementNum; i++) { subItems.add(new ItemStack(this, 1, i)); } } public void registerIcons(IconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon(BaseVariables.modId + ":" + BaseVariables.elementSymbol[this.getMetadata(itemID)]); } public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { list.add(BaseVariables.elementName[Z] + " (" + (Z+1) + ")"); } } BaseVariables.java package core.base.util; public class BaseVariables { public static final String modId = "DaNi"; public static final String modName = "DaNi++"; public static final String modVersion = "FR-0.0"; public static final String clientProxy = "core.base.ClientProxy"; public static final String commonProxy = "core.base.CommonProxy"; public static final int elementNum = 118; public static String elementName[] = { "Hydrogen", "Helium", "Lithium", "Berilium", "Bohrium", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminium", "Silicon", "Phosphorus", "Sulphur", "Chlorine", "Argon", "Potassium", "Calcium", "Scandium", "Titanium", "Vanadium", "Chromium", "Manganese", "Iron", "Cobalt", "Nickel", "Copper", "Zinc", "Galium", "Germanium", "Arsenic", "Selenium", "Bromine", "Krypton", "Rubidium", "Strontium", "Yttrium", "Zirconium", "Niobium", "Molybdenum", "Technetium", "Ruthenium", "Rhodium", "Palladium", "Silver", "Cadmium", "Indium", "Tin", "Antimony", "Tellurium", "Iodine", "Xenon", "Caesium", "Barium", "Lanthanum", "Cerium", "Praseodymium", "Neodymium", "Promethium", "Samarium", "Europium", "Gadolinium", "Terbium", "Dysprosium", "Holmium", "Erbium", "Thulium", "Ytterbium", "Lutetium", "Hafnium", "Tantalum", "Tungsten", "Rhenium", "Osmiums", "Iridium", "Platium", "Gold", "Mercury", "Thallium", "Lead", "Bismuth", "Polonium", "Astatine", "Radon", "Francium", "Radium", "Actinium", "Thorium", "Protactinium", "Uranium", "Neptunium", "Plutonium", "Americium", "Curium", "Berkelium", "Californium", "Einsteinium", "Fermium", "Mendelevium", "Nobelium", "Lawrencium", "Rutherfordium", "Dubnium", "Seaborgium", "Bohrium", "Hassium", "Meitnerium", "Darmstadtium", "Roentgenium", "Copernicium", "Ununtrium", "Flerovium", "Ununpentium", "Livermorium", "Ununseptium", "Ununoctium" }; public static String elementSymbol[] = { "H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne", "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge", "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr", "Nb", "Mo", "Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn", "Sb", "Te", "I", "Xe", "Cs", "Ba", "La", "Ce", "Pr", "Nd", "Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb", "Lu", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg", "Ti", "Pb", "Bi", "Po", "At", "Rn", "Fr", "Ra", "Ac", "Th", "Pa", "U", "Np", "Pu", "Am", "Cm", "Bk", "Cf", "Es", "Fm", "Md", "No", "Lr", "Rf", "Db", "Sg", "Bh", "Hs", "Mt", "Ds", "Rg", "Cn", "Uut", "Fl", "Uup", "Lv", "Uus", "Uuo" }; } We would really appreciate your help. Sincerely Dautor and Nicba1010
  6. GOOGLE IT! Check out Ichuns render tut. Some functions have changed
  7. the wiki says this @Override public void updateTick(World world, int x, int y, int z, Random random) { if (world.getBlockMetadata(x, y, z) == 1) { return; } if (world.getBlockLightValue(x, y + 1, z) < 9) { return; } if (random.nextInt(isFertile(world, x, y - 1, z) ? 12 : 25) != 0) { return; } world.setBlockMetadata(x, y, z, 1); }
  8. How would i go about making my block do something on a random tick. For example spawn in an item
  9. Oh Goto thank you so much, and thank you all. I wasn't calling the InitRendering, somehow my f****** brain thought that it would be called by itself.
  10. What do u mean Goto?
  11. But how, i didn't find any model tutorial that doesn't use a TE
  12. Thx for the advice, im currently on my phone but i'll try it for 20 mins when i get home(in the bus)
  13. Hi, me and my friend are currently developing a mod called:mod Basically it's just a framework, we have auto textures (me), and auto-ores-dusts-blocks-ingots-nuggets(by him) So we were trying to make our version of the treetap. he idea is, you put it on our custom tree(code 70% done) and whack it with a hammer, and it starts spewing out resin, so the problem is, we can't get our model to render. It's a fairly simple model, like 1 cuboid in techne and thats it. If you guys could help we would be very greatfull! If u need more files just say, we'll do anything to make it work. Core Tile Entity Renderer Block Client proxy Model
  14. So how wold i go with that? I know how to send em but which and where?
  15. Okay so this is the problem. I made a custom furnace by modifying the furnace code. The problem is that some functions are not working! Mostly because of the bunsenBurnerBurningTime int not properly updating! If you could please help me I would be very thankful. This is the code https://github.com/Nicba1010/Chemistryzation/ These are the textures https://www.dropbox.com/sh/wbe96f1mv95ixvm/siwpBsY9mH You can submit a pull request of the invalid code(I think so, haven't played with pull requests a lot)! You will be credited for any useful info!
  16. so can you tell me how to sync them please
  17. So... I have one problem. It is that while i am playing the nbt data is temporary saved, but when i exit it's deleted and i dont know why! If you could help me that would be nice. Here is the source: https://www.dropbox.com/sh/7pj70z3mbbdde38/BAz6Zvq7Gw Thank you!
  18. so... could any1 eplain this to me: i have thepackethandler but what does he mean by saying:
  19. could you please explain how to cast it
  20. you mean i create EntityPlayerMP playerMP; ?
  21. but how to call it server side
  22. ok so you send packets to the server but how do i save the data? is there a specific piece of code? PS I made the packet handler
  23. pls tell me how do you do that
  24. O snap why doesn't it save on logout
×
×
  • Create New...

Important Information

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