Test
This commit is contained in:
parent
14b75deec0
commit
96d369b2f7
@ -86,6 +86,7 @@ public class BulletEntity extends PersistentProjectileEntity implements PolymerE
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onBlockHit(BlockHitResult blockHitResult) {
|
protected void onBlockHit(BlockHitResult blockHitResult) {
|
||||||
|
this.setPosition(blockHitResult.getPos());
|
||||||
if (blockHitResult.getType() == HitResult.Type.BLOCK) {
|
if (blockHitResult.getType() == HitResult.Type.BLOCK) {
|
||||||
BlockState block = this.getWorld().getBlockState(blockHitResult.getBlockPos());
|
BlockState block = this.getWorld().getBlockState(blockHitResult.getBlockPos());
|
||||||
|
|
||||||
@ -103,6 +104,7 @@ public class BulletEntity extends PersistentProjectileEntity implements PolymerE
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onEntityHit(EntityHitResult entityHitResult) {
|
protected void onEntityHit(EntityHitResult entityHitResult) {
|
||||||
|
this.setPosition(entityHitResult.getPos());
|
||||||
setSilent(false);
|
setSilent(false);
|
||||||
playSound(SoundEvents.BLOCK_BAMBOO_HIT, 4.0F, 1.0F);
|
playSound(SoundEvents.BLOCK_BAMBOO_HIT, 4.0F, 1.0F);
|
||||||
setSilent(true);
|
setSilent(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user