mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Spells should not affect bedrock. Fixes #103
This commit is contained in:
parent
0bcf2e7ada
commit
46cfa01a6a
2 changed files with 5 additions and 0 deletions
|
@ -65,6 +65,10 @@ public interface Caster<E extends Entity> extends
|
|||
default boolean canModifyAt(BlockPos pos, ModificationType mod) {
|
||||
|
||||
if (mod.checkPhysical()) {
|
||||
if (asWorld().getBlockState(pos).getHardness(asWorld(), pos) < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (getMaster() instanceof PlayerEntity player) {
|
||||
if (!asWorld().canPlayerModifyAt(player, pos)) {
|
||||
return false;
|
||||
|
|
|
@ -12,6 +12,7 @@ import com.minelittlepony.unicopia.mixin.MixinFallingBlockEntity;
|
|||
import com.minelittlepony.unicopia.projectile.MagicProjectileEntity;
|
||||
import com.minelittlepony.unicopia.projectile.ProjectileDelegate;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.FallingBlockEntity;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
|
|
Loading…
Reference in a new issue