Started by
Quentindray74
on
Topic category: Help with MCreator software
Hello everyone! Okay, here's my problem:
I'm trying to make a Super Mario Mod! I've created the question Block which is fine, but, when i check 'block is collidable", so I added an event result when the player colides the block, which is replace the actual block by another one, the fact is that, i want it IF the player has (for the moment, a diamond one) custom helmet, but, it generates an error when it compiles it, I'll show you in a video.
https://www.youtube.com/watch?v=6dqcPqLB65g&feature=youtu.be
Without any functions, it works, but I want to.
Thanks It works!!!
But now, My problem is, when i jump without the helmet, my player goes inside the block, Like it is not a block but an entity, any suggestions?
Just put super.onEntityCollidedWithBlock(world,pos,state,entity); before the if(entity instanceof EntityPlayer){
Ok, like that?
https://pastebin.com/3Pht7SeA
Okay nvm I found! Thank you so much it works, now I want that only the head of the player can change the block, not the entire body, How to I do?
Checking if the player is in the air could do the trick
No finally, It doesn't work, I still can go through the block without the helmet
Ok, I looked into the code and I am pretty sure that you ticked the option to make it "uncollidable" , because the returned collider is null.
The option "Isn't Collidable?" was unticked, i'll try tick it.
And It doesn't work...