Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
{
entity.setInWeb();
}
public void setInWeb()
{
this.isInWeb = true;
this.fallDistance = 0.0F;
}
if (this.isInWeb)
{
this.isInWeb = false;
x *= 0.25D;
y *= 0.05000000074505806D;
z *= 0.25D;
this.motionX = 0.0D;
this.motionY = 0.0D;
this.motionZ = 0.0D;
}
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
{
entity.setInWeb();
}
public void setInWeb()
{
this.isInWeb = true;
this.fallDistance = 0.0F;
}
if (this.isInWeb)
{
this.isInWeb = false;
x *= 0.25D;
y *= 0.05000000074505806D;
z *= 0.25D;
this.motionX = 0.0D;
this.motionY = 0.0D;
this.motionZ = 0.0D;
}
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity) {
entity.motionX *= 0.25D;
entity.motionY *= 0.05000000074505806D;
entity.motionZ *= 0.25D;
}
Player#motionX, Player#motionY и Player#motionZ