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.
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
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?
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
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
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?
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
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))
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 )