Fixed creative mobe players can't break clouds blocks

This commit is contained in:
Sollace 2019-02-07 15:37:24 +02:00
parent 91109ba8bb
commit 43daaf0f6e
4 changed files with 10 additions and 6 deletions

View file

@ -29,6 +29,10 @@ public interface ICloudBlock {
if (world.isRemote) {
EntityPlayer player = UClient.instance().getPlayer();
if (player.capabilities.isCreativeMode) {
return false;
}
if (!getCanInteract(state, player)) {
return true;
}

View file

@ -21,8 +21,8 @@ public class UItemBlock extends UItemDecoration {
@Override
public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, EnumFacing side, EntityPlayer player, ItemStack stack) {
if (!abilityTest.test(player)) {
return player.capabilities.isCreativeMode;
if (!(player.capabilities.isCreativeMode || abilityTest.test(player))) {
return false;
}
return super.canPlaceBlockOnSide(worldIn, pos, side, player, stack);

View file

@ -22,8 +22,8 @@ public class UItemMultiTexture extends ItemMultiTexture {
@Override
public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, EnumFacing side, EntityPlayer player, ItemStack stack) {
if (!abilityTest.test(player)) {
return player.capabilities.isCreativeMode;
if (!(player.capabilities.isCreativeMode || abilityTest.test(player))) {
return false;
}
return super.canPlaceBlockOnSide(worldIn, pos, side, player, stack);

View file

@ -22,8 +22,8 @@ public class UItemSlab extends ItemSlab {
@Override
public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, EnumFacing side, EntityPlayer player, ItemStack stack) {
if (!abilityTest.test(player)) {
return player.capabilities.isCreativeMode;
if (!(player.capabilities.isCreativeMode || abilityTest.test(player))) {
return false;
}
return super.canPlaceBlockOnSide(worldIn, pos, side, player, stack);