Fix Plastic Road
@@ -14,6 +14,7 @@ import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
+import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.IBlockAccess;
@@ -58,17 +59,15 @@ public class BlockPlastic extends Block
}
@Override
- public Vec3d modifyAcceleration(World world, BlockPos pos, Entity e, Vec3d motion)
+ public void onEntityWalk(World worldIn, BlockPos pos, Entity entityIn)
{
if(type == PlasticBlockType.ROAD)
{
double boost = 1.6;
-
- double a = Math.atan2(motion.xCoord, motion.zCoord);
- return new Vec3d(motion.xCoord + Math.sin(a) * boost * slipperiness, motion.yCoord, motion.zCoord + Math.cos(a) * boost * slipperiness);
+ double a = Math.atan2(entityIn.motionX, entityIn.motionZ);
+ entityIn.motionX += Math.sin(a) * boost * slipperiness;
+ entityIn.motionZ += Math.cos(a) * boost * slipperiness;
}
-
- return motion;
}
@Override
