mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Fixed creative mobe players can't break clouds blocks
This commit is contained in:
parent
91109ba8bb
commit
43daaf0f6e
4 changed files with 10 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue