How would I make a gravity system that the player can turn on and off? The gravity system includes walking on the roof, jumping on the roof, etc. You can't do this by just adding upwards velocity to the player, because then they don't run as fast or jump at all.
Thanks in advance!
Ok the player is now sinking about halfway into the water, but is moving a little faster. Any more solutions?
if(world.getBlockState(player.getPosition().down()).getBlock() == Blocks.water){
if(!world.isRemote){
if(player.motionY < 0){
player.onGround = true;
player.posY += -player.motionY;
player.motionY = 0.09;
player.fallDistance = 0;
((EntityPlayerMP)player ).playerNetServerHandler.sendPacket(new S12PacketEntityVelocity(player));
}
}
}
So I made the player able to walk on water
(Runs every tick)
if(world.getBlockState(player.getPosition().down()).getBlock() == Blocks.water){
if(player.motionY < 0){
player.posY += -player.motionY;
player.motionY = 0.09;
player.fallDistance = 0;
((EntityPlayerMP)player ).playerNetServerHandler.sendPacket(new S12PacketEntityVelocity(player));
}
}
But the player is very slow and can't jump. How do I fix this?
My Entity is sinking into the ground about halfway. I also can't collide with it (i.e. push it). It seems like the bounding box is shrunken even though the setSize is big.
Entity:
Please help!
I'm confused as to a) where do I retrieve the correct models based on nbt? B) how do I make my own bakedmodels for the different nbt values? C) do I use lista.addAll(listb) to combine lists?
I have an item with nbt and multiple render passes. Basically there are parts of the sword that can be randomized. Each part has a different texture. I want the sword to render all the correct textures based on its parts (which are stored in the NBT). How do I do that with the new 1.8 rendering system?