Jump to content

ImaFool

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by ImaFool

  1. int myVariable if(myvariable = null) {} This is a spelling mistake, fixed by a cup of coffee, and has nothing to do with java knowledge static EntityWolf wolf; @SubscribeEvent public static void onEntityLivingDeath(LivingDeathEvent event) { if (event.entityLiving instanceof EntityWolf && wolf.isTamed()) { System.out.println("YOU KILLED A WOLF!!"); } } } this is only a logical error cuz how would a dog you just created ever be tamed? it does not even excist? instead you use the parameter you get wich is the event that contains the EntityLiving that got killed, after checking if its a instance of a EntityWolf you can cast it to EntityWolf and check if its tamed. This is really basic java and you cant expect to get too much help in a MODDER support with java questions.
  2. So, the problem is vanilla sturcture is generated in your structure or the other way around? In the first case it may be enaugh you set the parameter (think its called generation weight) where you register your generator to a high value so the generation of other stuff takes place first
  3. Why does customization always have to be complicated?
  4. So iv got to make custom particles? was using world.spawnParticle("smoke",..); for now Or can how else would i go on rendering them?
  5. Is there a way to create smaller particles?
  6. Probably the metadata Edit: and yeah x,y,z
  7. Well, I aint 100% sure what ur trying to do You want the item to be eatable and working like a seed: extend ItemSeedFood only eatable: extend ItemFood only seed: extend ItemSeeds Or is that not the problem at all?
  8. thanks
  9. Hey guys, rlly quick description: I have a block changing variables of its TE in onNeighborBlockChange and onBlockAdded, To get the variables in my renderer i use the methods getDescriptionPacket and onDataPacket in my TE, however these methods are only called after the block is added and not when a neighbor block changes.. So, how can i tell MC that my variables changed and i want a update for that methods? Tell me if you need any code
  10. You can also take a look at vanilla code for example the furnace
  11. ahh ok don't know what else is causing the problem then
  12. I aint sure about that, but I think the code works like it opens the GUI and the container and connects a TileEntity or inventory or something at the given location to it. So use x,y,z and dont use Math.ceil but Math.floor
  13. the parameter where u have this.getEntityId() is supposed to be the x coord, isnt it?
  14. still buggy not every single one, but > 0! is the getLightValue causing the problem? Can i maybe do something like updating the light level for the first time the block gets ticked ater relog or sth?
  15. Where do you open your inventory? make sure to do that on server (!world.isRemote)
  16. Alright, the only other ways I can think of are listing all blocks that have a interaction and check if its the clicked block, wich wouldnt work with other mods adding blocks with interactions.. The other one beeing to fake the world and the player so its not going to have a impact on the game, dont know if/how this is possible but that would also fail if the block has a interaction but still doesnt return true in onBlockActivated guess you can never get a 100% sure
  17. I'm somewhat new to events, but cant you just cancel it so the method is only called once? So for the player its not goin to make a change..
  18. So, if i get u right your trying to find out if the block that is clicked has an interraction, Then, maybe using this code would be a good idea (probably isnt tho): if(!e.world.getBlock(e.x, e.y, e.z).onBlockActivated(e.world, e.x, e.y, e.y, e.entityPlayer, e.face, 0F, 0F, 0F))
  19. Thats the Block class Actually working, but when i relog into the world the candels still emit light, but it looks buggy (only with a really small range) when i place a torch and remove it the light updates and its normal again (sry some names deobfuscated )
×
×
  • Create New...

Important Information

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