Jump to content

Koopamillion

Forge Modder
  • Posts

    102
  • Joined

  • Last visited

Everything posted by Koopamillion

  1. Thanks, however I can't find a way to use "keyBindJump". E.G GameSettings.isKeyDown(whatever.keyBindJump)
  2. Is there anyway to find out if the: "JUMP" key is pressed, not necessarily the space bar as I don't use the space bar.. Thanks!
  3. I do mind about weather effects though... Is there any way?
  4. I changed: What I had before in the GUI to: (Ill add isDesert() later) I changed the tileentity to:
  5. look for the Gradle panel in the IDE, open desktop -> Tasks -> other and then double click on run.
  6. So I do !world.isRemote? If so it dosen't work when I wrap the gen sees sun method in it. I did this though and it still dosent work: public boolean genSeesSun(){ if(!worldObj.isRemote){ if(worldObj.isDaytime()){ return (((!worldObj.isRaining() && !worldObj.isThundering() && worldObj.isDaytime()) || isDesert()) && !worldObj.provider.hasNoSky && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)); } }else{ return ( worldObj.isDaytime() && ((!worldObj.isRaining() && !worldObj.isThundering() && worldObj.isDaytime()) || isDesert()) && !worldObj.provider.hasNoSky && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)); } return ( worldObj.isDaytime() && ((!worldObj.isRaining() && !worldObj.isThundering() && worldObj.isDaytime()) || isDesert()) && !worldObj.provider.hasNoSky && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)); }
  7. So, I have a solar panel with a GUI. Everything is working apart from one thing, theres a blank space for a sun in the GUI. That blank space is ment to go yellow when it can see the sun. Well, if there is a block covering it, it will go blank and visa versa. However, if it's nighttime, it will stay yellow. Is there any fixes? !isRemote just makes it go blank completely. TileEntitySolar: GUISolar:
  8. The things is, i've found one: new ItemStack(<item>, meta, count) Excepi it dosent work
  9. OK... But there is no itemstack.getMetadata, if you meant item.getmetadata(itemstack) it just errors saying int, so I think you meant the itemstack version (if there is one)... This is my code so far using 2/3 possible check list items: if(itemstack != null && itemstack.getItem() == item){ It crashes upon placing the tile entity, so I think by the "right item" you didn't mean the variable (Itemstack.getitem()) I made? Or did you mean the Mitems.basicBattery? I'm not that good at understanding code. But Thanks for not just saying "go learn java".
  10. I'm so sorry for wasting your time, but I kind of understand what you're saying yet I don't know how to type it out... I've done this: ERROR if(itemstack != null && itemstack = new ItemStack(Mitems.basicBattery, 1, 1)) ^ You said to do only one. Should I tell it to get the item like this? Item item = itemstack.getItem(); NO ERROR BUT IT DOSENT WORK if(itemstack != null && item == Mitems.basicBattery){ Or should I plus the meta (what I need): ERROR Item item = itemstack.getItem(); int meta = item.getMetadata(0); if(itemstack != null && item == Mitems.basicBattery.getMetadata(meta)) Thanks!
  11. OHHHHHHHHHHHHHHHHHHHHHH POOPS! lol thanks! i keep trying to upgrade by coding!
  12. OK, but I'm a bit of a noob with coding, but you said to get the item? So I did .getItem() and it asks for != null check, infact, it asks for that if I just do 1 =... Do you know anyway of fixing this? All I want to do is have it check if the item has the correct metadata.
  13. What do the words, under someones name mean. E.G: Newbie, World Shaper? How do you change it?
  14. EDIT: Use: V finds meta data if(itemstack != null && itemstack.getItem() == Items.whatever && itemstack.getItemDamage() == 0){ } This is my method to check for charge levels of a battery... Unfortunately, it dosen't detects ANY item, no matter the meta data/count. If you can fix this, thanks in advance! private void updateBattery() { ItemStack itemstack = this.getStackInSlot(1); if(itemstack == new ItemStack(Mitems.basicBattery, 1, 1)){ System.out.println(itemstack); }else{ System.out.println("fail"); }
  15. So, I've added electricity and stuff. Anyway, the generator generates power fine, just like the solar panel, however, when I plug the generator's electricity into a machine, the energy bar on the side goes up, and when I put in something to smelt, the progress shows fine. BUT!!! When I plug in the solar panels electricity, it dosen't increase the energy bar, (IN THE GUI, IT IS ACTUALLY ADDING POWER BUT JUST NOT SHOWING), the progress dosen't show at all, however it still smelts items. This isn't just the machines, the energy storage's gui dosen't update either unless it's connected to a generator. Is it the gui not updating? A method i've done wrong? Thanks In advance: The solar panel has no gui/container btw. ALL CODE: Generator TileEntity: Solar Tileentity: Machine TileEntity: The machine's gui + container:
  16. When I use my item (IICopperCable), it places the block perfectly, but, It requires me to place a block next to it(block update) to actually see the block. In other words, when I right click with it, it places a block cable (custom model) with only a hit box.... Code: public class IItemCopperCable extends Item { public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { if (world.getBlock(x, y, z) != Blocks.snow_layer) { if (side == 0) { --y; } if (side == 1) { ++y; } if (side == 2) { --z; } if (side == 3) { ++z; } if (side == 4) { --x; } if (side == 5) { ++x; } if (!world.isAirBlock(x, y, z)) { return false; } } if (!player.canPlayerEdit(x, y, z, side, stack)) { return false; } else { if (MBlocks.CABLE.canPlaceBlockAt(world, x, y, z)) { --stack.stackSize; world.setBlock(x, y, z, MBlocks.CABLE, 1, 0); } return true; } } }
  17. No, I don't want to update because someone said the renders bug out... And I have a lot of models and renders on some of my blocks..
×
×
  • Create New...

Important Information

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