Everything posted by ImaFool
-
An issue of potential Harrassement being supported by some moderators here
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.
-
[1.7.10] Structure Spawn Problems
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
-
smaller pariticles
Why does customization always have to be complicated?
-
smaller pariticles
So iv got to make custom particles? was using world.spawnParticle("smoke",..); for now Or can how else would i go on rendering them?
-
smaller pariticles
Is there a way to create smaller particles?
-
[1.7.10] What do the four int parameters in placeDoorBlock method
Probably the metadata Edit: and yeah x,y,z
-
Food that can place reed
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?
- refreshing tileEntity data
-
refreshing tileEntity data
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
-
Container help
You can also take a look at vanilla code for example the furnace
-
Items disappearing in a custom inventory
ahh ok don't know what else is causing the problem then
-
Items disappearing in a custom inventory
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
-
Items disappearing in a custom inventory
the parameter where u have this.getEntityId() is supposed to be the x coord, isnt it?
-
Light emitting looking weird after relog
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?
-
Items disappearing in a custom inventory
Where do you open your inventory? make sure to do that on server (!world.isRemote)
-
Right click event that triggers after block interaction
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
-
Right click event that triggers after block interaction
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..
-
Right click event that triggers after block interaction
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))
-
Light emitting looking weird after relog
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 )
IPS spam blocked by CleanTalk.