Jump to content

Venomous

Forge Modder
  • Posts

    9
  • Joined

  • Last visited

Everything posted by Venomous

  1. Maybe because your texture's name is itemRegenerationStone and unlocalized is ItemRegenerationStone? Not sure
  2. I can't seem to get my coords of the placed block on generate passed through a super to its super class. The superclass has a tick that prints the x, y ,z and they turn out 0, 0, 0. Any help is much appreciated! Regards, Venomous public class BlockHedge extends DoublePlantGeneration { private static int x; private static int y; private static int z; public BlockHedge() { super(1, x, y, z, Blocks.dirt); //x, y ,z aren't getting passed through they end up 0, 0 , 0 in DoublePlantGeneration class } @Override public void onBlockAdded(World world, int x, int y, int z) { this.x = x; this.y = y; this.z = z; System.out.println("x: " + x + " y: " + y + " z: " + z); //this gets the correct coords } }
  3. Because code looks complex you think someone can't code something similar? Sorry but thats some horrible advice there, why are you even trying if thats what you are going to give me. If I have to I'll code it the way you said, that way I do see it possible, It's just a shame since there is an actual class to handle doubleplants, I just can't make sense of how the icons work on double plants and there are no reference examples of how they are done.
  4. BlockDoublePlant class is pretty complex I'm not really sure how to start with that, and there aren't really any references about setting up doubleblockplants unfortunately. :l
  5. I'm trying to make a flower that is 2 blocks big. Much like the rosebushes in minecraft. And I have no idea what the best way would be to get a block to render 2 blocks as its height. Any advice and examples are more than welcome! Regards, Venomous
  6. Oh wow, you're right.. It works now. I didn't think it would affect it, thanks! [solved]
  7. You could however make a new block like a churn, and use an onclick event that returns you the cheese and an empty bucket, cooking milk to get cheese is a bit unrealistic Or you can use this Tutorial as a reference on how to make a multi input/output furnace: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571450-multi-input-output-furnace-with-variable-input
  8. Hello, I am having a little bit of trouble with the following code, I am trying to make a seed plantable on farmland which works fine if I specify which block is suppose to be placed directly in the main seedPlacement class however I would like to use this class as a reference for future seeds and so I wish to use a variable to assign the block. However the variable is never assigned because it is never called in my constructor. And I am currently out of ideas what to try. Any help will be much appreciated! Regards, Venomous The seed item class: public class ItemLettuceSeeds extends seedPlacement{ public ItemLettuceSeeds() { super(0, 0.3f, RealismMod.blockLettuceCrop, Blocks.farmland); } } The main seed class: public class seedPlacement extends ItemFood implements IPlantable { private final Block theBlockPlant; private final Block soilId; public seedPlacement(int parHealAmount, float parSaturationModifier, Block parBlockPlant, Block parSoilBlock) { super(parHealAmount, parSaturationModifier, false); theBlockPlant = parBlockPlant; //not getting assigned soilId = parSoilBlock; //not getting assigned } //constructor isn't even being called @Override public boolean onItemUse(ItemStack parItemStack, EntityPlayer parPlayer, World parWorld, int parX, int parY, int parZ, int par7, float par8, float par9, float par10) { // not sure what this parameter does, copied it from the potato class if (par7 != 1) { return false; } else if (parPlayer.canPlayerEdit(parX, parY+1, parZ, par7, parItemStack)) { System.out.println("Result: " + theBlockPlant + " and " + soilId); //Result: Null and Null if (parWorld.getBlock(parX, parY, parZ).canSustainPlant(parWorld, parX, parY, parZ, ForgeDirection.UP, this) && parWorld .isAirBlock(parX, parY+1, parZ)) { //crashes cause null pointer exception since theBlockPlant is never assigned. //parWorld.setBlock(parX, parY+1, parZ, theBlockPlant); --parItemStack.stackSize; return true; } else { return false; } } else { return false; } }
×
×
  • Create New...

Important Information

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