Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


Forge Modder
  • Posts

  • Joined

  • Last visited

Everything posted by Kore

  1. no, but I think I found the problem.
  2. On Block Placed By Method if(par5EntityLiving.getEntityName()!=null){ te.setOwner(par5EntityLiving.getEntityName()); }else{ te.setOwner(" "); } } this returns a nullpointer exception, how do you get the username of the player w/out errors (Ive tried (EntityPlayer)par5EntityLiving.username
  3. to set the spawn egg to the creative tab you want to add onto your spawn egg code, .setCreativeTabs(Mod File w/ creative tab.spiritEgg)
  4. Alright, so I have my block that changes ID when you activate it, but I want it to retain the information without using a tileentity to reduce lag in the long run. Is there any way to do this(I share the class with 4 blocks, so I cant just do static)
  5. If you are trying to make a modular texture pack, heres the code: In clientside file(any of them) public static String azurite = "ModName:.png file name(no .png on end)"; place the texture in your src for MCP /src/mods/ModName/textures/file name.png then when exporting mod, put the /mods folder into the minecraft.jar to give textures In your block file: public void registerIcons(IconRegister iconRegister) { blockIcon = iconRegister.registerIcon(ClientsideFile.azurite); }
  6. to answer you, no you cant do that... you have to make a new furnace to do that as the smelt time for every item is the same in the regular furnace. If you would like the code to replace, just ask! Hope this helps!
  7. The best thing to do would be to file in to lex or overmind to ask for new methods, OR you could make a mod for the base code(A.K.A make a new class with the same name as other and change methods then recompile) then, rename that new class to the name of the class it is replacing, (for example, 3letters.class = blocks.java) then make sure you have that as your dependencies in your mod(in the @Mod area) Hope this helps!
  8. Nevermind, I found the problem...
  9. So what I mean is that when I call it: public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { if(this.active){ if(par5Entity instanceof EntityPlayer)System.out.println(this.killer); if(this.killer){ par5Entity.addVelocity(0.0, 100.0, 0.0); }else{ par5Entity.setFire(10); } } } Where it says if(par5Entity instanceof EntityPlayer)System.out.println(this.killer); I'm printing out if it is killer or not when you collide, but it always says false
  10. I have it in the contructor make the killer boolean true when I make the blocks, but when I try to use the killer variable, it only shows up as false.
  11. Okay, I have the names sorted out by setting the unlocalized names, but Im probably making a dumb mistake about the killer property... I have it sent into my constructor like so: Base Class //Blocks public static Block fencePistonOn = new BlockFencePiston(1537, Material.piston, true, false).setUnlocalizedName("FencePistonOn"); public static Block fencePistonOff = new BlockFencePiston(1538, Material.piston, false, false).setUnlocalizedName("FencePiston").setCreativeTab(CreativeTabs.tabRedstone); public static Block killFencePistonOn = new BlockFencePiston(1539, Material.piston, true, true).setUnlocalizedName("Killer Fence Piston On"); public static Block killFencePistonOff = new BlockFencePiston(1540, Material.piston, false, true).setUnlocalizedName("Killer Fence Piston").setCreativeTab(CreativeTabs.tabRedstone); And then my constructor: public boolean active; public boolean killer; public BlockFencePiston(int par1, Material par2Material, boolean isOn, boolean doesKill) { super(par1, par2Material); this.active = isOn; this.killer = doesKill; if (isOn) { this.setTickRandomly(true); } } But the code doesn't realize that the killer boolean is true.
  12. No I dont need to, because you are never going to have the on state block in your hand, but thats not my question, my question is why are they the same names
  13. Heres the base code you'll need //Blocks public static Block fencePistonOn = new BlockFencePiston(1537, Material.piston, true, false); public static Block fencePistonOff = new BlockFencePiston(1538, Material.piston, false, false).setCreativeTab(CreativeTabs.tabRedstone); public static Block killFencePistonOn = new BlockFencePiston(1539, Material.piston, true, true); public static Block killFencePistonOff = new BlockFencePiston(1540, Material.piston, false, true).setCreativeTab(CreativeTabs.tabRedstone); @Init public static void init(FMLInitializationEvent e){ GameRegistry.registerBlock(fencePistonOff, "Fence Piston"); GameRegistry.registerBlock(killFencePistonOff, "Killer Fence Piston"); LanguageRegistry.addName(fencePistonOff, "Fence Piston"); LanguageRegistry.addName(killFencePistonOff, "Killer Fence Piston"); } Alright, so the problem is that both blocks are named Killer Fence Piston, but neither have the killer effect... what did I do wrong, im new to 1.5 modding and a lot has changed. Thanks for your help
  14. Alright, so in my mod I am implementing a block that disappears for 5 secs then reappears(sorta like the portable hole) does anyone know how to make a Thread that can do this wwithout freezing the game?
  15. also, if you add it to that you can transmute it using the forge lexicon
  16. well then you dont have to offer... I wasnt saying you HAD to...
  17. alright, eloraam uses the tileentity to do: what block what type of microblock block bounds material type she puts this all in the write to NBT function in the tile class and then can use read from NBT to figure all the info out.
  18. the tile entity is a way that minecraft can store information in individual blocks, otherwise if you turned one furnace on then all furnaces would be linked to the same inventory and same with chests.
  19. Also, if you could make it easily acessable to other players by putting it in the tutorials section
  20. unrelated but why do you create new enum tool mats with the same as the regular enums?
  21. what lex is saying is that when you do the player.openGui it requires an ID value and in you guihandler you can do a switch(ID)
  22. Alright, I have copied a lot of code from the furnace classes but I have had difficulty getting it to work. I have looked in the tutorials but have only found how to make a chest. I am wondering if there are any machine(furnace-like) tutorials
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.