diff --git a/src/main/java/com/simibubi/create/content/equipment/potatoCannon/PotatoProjectileEntity.java b/src/main/java/com/simibubi/create/content/equipment/potatoCannon/PotatoProjectileEntity.java index 4875d4a30a..bb71455f03 100644 --- a/src/main/java/com/simibubi/create/content/equipment/potatoCannon/PotatoProjectileEntity.java +++ b/src/main/java/com/simibubi/create/content/equipment/potatoCannon/PotatoProjectileEntity.java @@ -228,12 +228,13 @@ public class PotatoProjectileEntity extends AbstractHurtingProjectile implements if (targetIsEnderman) return; - if (!projectileType.onEntityHit(stack, ray) && onServer) + if (!projectileType.onEntityHit(stack, ray) && onServer) { if (random.nextDouble() <= recoveryChance) { recoverItem(); + } else { + spawnAtLocation(projectileType.dropStack()); } - - spawnAtLocation(projectileType.dropStack()); + } if (!(target instanceof LivingEntity livingentity)) { playHitSound(level(), position()); @@ -295,11 +296,13 @@ public class PotatoProjectileEntity extends AbstractHurtingProjectile implements protected void onHitBlock(BlockHitResult ray) { Vec3 hit = ray.getLocation(); pop(hit); - if (!getProjectileType().onBlockHit(level(), stack, ray) && !level().isClientSide) - if (random.nextDouble() <= recoveryChance) + if (!getProjectileType().onBlockHit(level(), stack, ray) && !level().isClientSide) { + if (random.nextDouble() <= recoveryChance) { recoverItem(); - - spawnAtLocation(getProjectileType().dropStack()); + } else { + spawnAtLocation(getProjectileType().dropStack()); + } + } super.onHitBlock(ray); kill();