Changes

Jump to navigation Jump to search
public class TrampolineBlock : Block
{
public override void onEntityCollideOnEntityCollide(IWorldAccessor world, Entity entity, BlockPos pos, BlockFacing facing, Vec3d collideSpeed, bool isImpact)
{
if (isImpact && facing.Axis == EnumAxis.Y)
{
world.PlaySoundAt(tickSound, entity.Pos.X, entity.Pos.Y, entity.Pos.Z);
entity.Pos.Motion.Y *= -0.8;
}
public AssetLocation tickSound = new AssetLocation("game", "tick");
public override void OnEntityCollide(IWorldAccessor world, Entity entity, BlockPos pos, BlockFacing facing, Vec3d collideSpeed, bool isImpact)
{
if (isImpact && facing.Axis == EnumAxis.Y)
Confirmedusers, Administrators
886

edits

Navigation menu