Kore
Forge Modder-
Posts
239 -
Joined
-
Last visited
Converted
-
Gender
Male
-
URL
http://www.minecraftforge.net/forum/index.php/board,99.0.html
-
Location
California
-
Personal Text
Korecraft Mod Programmer
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Kore's Achievements
Creeper Killer (4/8)
23
Reputation
-
no, but I think I found the problem.
-
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
-
How do you get a spawn egg into a custom creative tab?
Kore replied to Jacknoshima's topic in Modder Support
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) -
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)
-
[UNSOLVED] Adding a new method to a base class, without changing it?
Kore replied to HydroBane's topic in Modder Support
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); } -
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!
-
[UNSOLVED] Adding a new method to a base class, without changing it?
Kore replied to HydroBane's topic in Modder Support
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! -
Nevermind, I found the problem...
-
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
-
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.
-
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.
-
how could i do this?
-
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
-
Please Help, Thanks!
-
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