Removed legacy air

This commit is contained in:
Unknown 2018-07-18 12:18:04 +02:00 committed by unknown
parent f98ac2d516
commit d075b6f1ef
3 changed files with 2 additions and 29 deletions

View file

@ -56,7 +56,7 @@ public class BreathingManager {
}
public static boolean isAirBlock(final Block block) {
return block == WarpDrive.blockAir || block == WarpDrive.blockAirSource || block == WarpDrive.blockAirFlow;
return block == WarpDrive.blockAirSource || block == WarpDrive.blockAirFlow;
}
public static boolean onLivingJoinEvent(final EntityLivingBase entityLivingBase, final int x, final int y, final int z) {
@ -97,7 +97,7 @@ public class BreathingManager {
final VectorI vPosition = new VectorI(x + vOffset.x, y + vOffset.y, z + vOffset.z);
blockState = vPosition.getBlockState(entityLivingBase.world);
block = blockState.getBlock();
if (block == WarpDrive.blockAir || block == WarpDrive.blockAirSource || block == WarpDrive.blockAirFlow) {
if (block == WarpDrive.blockAirSource || block == WarpDrive.blockAirFlow) {
vAirBlock = vPosition;
break;
} else if (block != Blocks.AIR) {
@ -118,13 +118,6 @@ public class BreathingManager {
entity_airBlock.put(uuidEntity, AIR_BLOCK_TICKS);
} else if (air <= 1) {// time elapsed => consume air block
entity_airBlock.put(uuidEntity, AIR_BLOCK_TICKS);
if (block == WarpDrive.blockAir) {
final int metadata = blockState.getBlock().getMetaFromState(blockState);
if (metadata > 0 && metadata < 15) {
entityLivingBase.world.setBlockState(vAirBlock.getBlockPos(), WarpDrive.blockAir.getStateFromMeta(metadata - 1), 2);
}
}
} else {
entity_airBlock.put(uuidEntity, air - 1);
}

View file

@ -286,12 +286,6 @@ public class JumpBlock {
final IBlockState blockState = block.getStateFromMeta(newBlockMeta);
setBlockNoLight(targetWorld, target, blockState, 2);
// Re-schedule air blocks update
if (block == WarpDrive.blockAir) {
targetWorld.notifyBlockUpdate(target, blockState, blockState, 3);
targetWorld.scheduleBlockUpdate(target, block, 40 + targetWorld.rand.nextInt(20), 0);
}
if (nbtToDeploy != null) {
nbtToDeploy.setInteger("x", target.getX());
nbtToDeploy.setInteger("y", target.getY());

View file

@ -1,14 +0,0 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:cube_all",
"textures": {
"all": "warpdrive:blocks/breathing/air"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}]
}
}