Some random fixes, 959 errors

This commit is contained in:
modmuss50 2019-02-21 18:11:55 +00:00
parent 0975b4353b
commit f6a79ce579
37 changed files with 131 additions and 186 deletions

View file

@ -83,8 +83,8 @@ public class TileAlarm extends TileEntity
// ITickable
@Override
public void update() {
if (!world.isRemote && world.getTotalWorldTime() % 25 == 0 && world.isBlockPowered(getPos())) {
public void tick() {
if (!world.isRemote && world.getGameTime() % 25 == 0 && world.isBlockPowered(getPos())) {
BlockAlarm.setActive(true, world, pos);
switch (selectedSound) {
case 1:
@ -98,7 +98,7 @@ public class TileAlarm extends TileEntity
break;
}
} else if (!world.isRemote && world.getTotalWorldTime() % 25 == 0) {
} else if (!world.isRemote && world.getGameTime() % 25 == 0) {
BlockAlarm.setActive(false, world, pos);
}
}

View file

@ -59,8 +59,8 @@ public class TileChargeOMat extends TilePowerAcceptor
// TilePowerAcceptor
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if(world.isRemote){
return;

View file

@ -44,13 +44,13 @@ public class TileEntityFlare extends TileEntity implements ITickable {
@Override
public void update() {
EnumDyeColor color = world.getBlockState(pos).getValue(BlockFlare.COLOR);
EnumDyeColor color = world.getBlockState(pos).get(BlockFlare.COLOR);
if (world.isRemote && world.isAirBlock(getPos().up())) {
ParticleSmoke particleSmokeLarge = new ParticleSmoke(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 0, 0.0D, 0);
particleSmokeLarge.setMaxAge(250);
if (color != EnumDyeColor.WHITE) {
float[] rgb = EntitySheep.getDyeRgb(color);
particleSmokeLarge.setRBGColorF(rgb[0] + (random.nextFloat() / 20), rgb[1] + (random.nextFloat() / 20), rgb[2] + (random.nextFloat() / 20));
particleSmokeLarge.setColor(rgb[0] + (random.nextFloat() / 20), rgb[1] + (random.nextFloat() / 20), rgb[2] + (random.nextFloat() / 20));
}
particleSmokeLarge.multipleParticleScaleBy(0.5F);

View file

@ -75,8 +75,8 @@ public abstract class TileGenericMachine extends TilePowerAcceptor
// TilePowerAcceptor
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if (!world.isRemote) {
charge(energySlot);
}

View file

@ -81,7 +81,7 @@ public class TileMachineCasing extends RectangularMultiblockTileEntityBase {
}
@Override
public void update() {
public void tick() {
}
}

View file

@ -133,12 +133,12 @@ public class TileMatterFabricator extends TilePowerAcceptor
// TilePowerAcceptor
@Override
public void update() {
public void tick() {
if (world.isRemote) {
return;
}
super.update();
super.tick();
this.charge(11);
for (int i = 0; i < 6; i++) {

View file

@ -62,9 +62,9 @@ public class TilePump extends TilePowerAcceptor {
}
@Override
public void update() {
super.update();
if (!world.isRemote && world.getTotalWorldTime() % 10 == 0 && !tank.isFull() && tank.getCapacity() - tank.getFluidAmount() >= 1000 && canUseEnergy(pumpExtractEU)) {
public void tick() {
super.tick();
if (!world.isRemote && world.getGameTime() % 10 == 0 && !tank.isFull() && tank.getCapacity() - tank.getFluidAmount() >= 1000 && canUseEnergy(pumpExtractEU)) {
FluidStack fluidStack = drainBlock(world, pos.down(), false);
if (fluidStack != null) {
tank.fill(drainBlock(world, pos.down(), true), true);
@ -102,7 +102,7 @@ public class TilePump extends TilePowerAcceptor {
return null;
}
if (doDrain) {
world.setBlockToAir(pos);
world.removeBlock(pos);
}
return new FluidStack(fluid, 1000);
}

View file

@ -77,8 +77,8 @@ public class TileQuantumTank extends TileMachineBase
// TileMachineBase
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if (!world.isRemote) {
if (FluidUtils.drainContainers(tank, inventory, 0, 1)
|| FluidUtils.fillContainers(tank, inventory, 0, 1, tank.getFluidType()))

View file

@ -128,8 +128,8 @@ public class TileTechStorageBase extends TileMachineBase
// TileMachineBase
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if (!world.isRemote) {
ItemStack outputStack = ItemStack.EMPTY;
if (!inventory.getStackInSlot(1).isEmpty()) {

View file

@ -115,7 +115,7 @@ public class TileCable extends TileEntity
public void read(NBTTagCompound compound) {
super.read(compound);
if (compound.hasKey("TileCable")) {
power = compound.getCompoundTag("TileCable").getInt("power");
power = compound.getCompound("TileCable").getInt("power");
}
}
@ -153,7 +153,7 @@ public class TileCable extends TileEntity
}
ArrayList<IEnergyStorage> acceptors = new ArrayList<IEnergyStorage>();
for (EnumFacing face : EnumFacing.VALUES) {
for (EnumFacing face : EnumFacing.values()) {
TileEntity tile = world.getTileEntity(pos.offset(face));
if (tile == null) {

View file

@ -199,15 +199,15 @@ public class TileFusionControlComputer extends TilePowerAcceptor
// TilePowerAcceptor
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if (world.isRemote) {
return;
}
// Force check every second
if (world.getTotalWorldTime() % 20 == 0) {
if (world.getGameTime() % 20 == 0) {
checkCoils();
inventory.setChanged();
}

View file

@ -68,8 +68,8 @@ public abstract class TileBaseFluidGenerator extends TilePowerAcceptor implement
}
@Override
public void update() {
super.update();
public void tick() {
super.tick();
ticksSinceLastChange++;
if(world.isRemote){
@ -102,15 +102,15 @@ public abstract class TileBaseFluidGenerator extends TilePowerAcceptor implement
final int currentWithdraw = (int) pendingWithdraw;
pendingWithdraw -= currentWithdraw;
tank.drain(currentWithdraw, true);
lastOutput = world.getTotalWorldTime();
lastOutput = world.getGameTime();
}
}
}
if (world.getTotalWorldTime() - lastOutput < 30 && !isActive()) {
if (world.getGameTime() - lastOutput < 30 && !isActive()) {
world.setBlockState(pos, world.getBlockState(pos).with(BlockMachineBase.ACTIVE, true));
}
else if (world.getTotalWorldTime() - lastOutput > 30 && isActive()) {
else if (world.getGameTime() - lastOutput > 30 && isActive()) {
world.setBlockState(pos, world.getBlockState(pos).with(BlockMachineBase.ACTIVE, false));
}
}

View file

@ -58,15 +58,15 @@ public class TileLightningRod extends TilePowerAcceptor implements IToolDrop {
}
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if (onStatusHoldTicks > 0)
--onStatusHoldTicks;
if (onStatusHoldTicks == 0 || getEnergy() <= 0) {
if (getBlockType() instanceof BlockMachineBase)
((BlockMachineBase) getBlockType()).setActive(false, world, pos);
if (getBlockState().getBlock() instanceof BlockMachineBase)
((BlockMachineBase) getBlockState().getBlock()).setActive(false, world, pos);
onStatusHoldTicks = -1;
}

View file

@ -53,8 +53,8 @@ public class TileSolarPanel extends TilePowerAcceptor implements IToolDrop {
// TilePowerAcceptor
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if (world.isRemote) {
return;
}
@ -62,7 +62,7 @@ public class TileSolarPanel extends TilePowerAcceptor implements IToolDrop {
setEnergy(Integer.MAX_VALUE);
return;
}
if (world.getTotalWorldTime() % 20 == 0) {
if (world.getGameTime() % 20 == 0) {
canSeeSky = world.canBlockSeeSky(pos.up());
if (lastState != isSunOut()) {
world.setBlockState(pos, world.getBlockState(pos).with(BlockSolarPanel.ACTIVE, isSunOut()));

View file

@ -70,19 +70,19 @@ public class TileDragonEggSyphon extends TilePowerAcceptor
// TilePowerAcceptor
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if (!world.isRemote) {
if (world.getBlockState(new BlockPos(pos.getX(), pos.getY() + 1, pos.getZ()))
.getBlock() == Blocks.DRAGON_EGG) {
if (tryAddingEnergy(energyPerTick))
lastOutput = world.getTotalWorldTime();
lastOutput = world.getGameTime();
}
if (world.getTotalWorldTime() - lastOutput < 30 && !isActive()) {
if (world.getGameTime() - lastOutput < 30 && !isActive()) {
world.setBlockState(pos, world.getBlockState(pos).with(BlockMachineBase.ACTIVE, true));
} else if (world.getTotalWorldTime() - lastOutput > 30 && isActive()) {
} else if (world.getGameTime() - lastOutput > 30 && isActive()) {
world.setBlockState(pos, world.getBlockState(pos).with(BlockMachineBase.ACTIVE, false));
}
}

View file

@ -73,8 +73,8 @@ public class TileSolidFuelGenerator extends TilePowerAcceptor implements IToolDr
}
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if (world.isRemote) {
return;
}
@ -114,7 +114,7 @@ public class TileSolidFuelGenerator extends TilePowerAcceptor implements IToolDr
final IBlockState BlockStateContainer = world.getBlockState(pos);
if (BlockStateContainer.getBlock() instanceof BlockMachineBase) {
final BlockMachineBase blockMachineBase = (BlockMachineBase) BlockStateContainer.getBlock();
if (BlockStateContainer.getValue(BlockMachineBase.ACTIVE) != burnTime > 0) {
if (BlockStateContainer.get(BlockMachineBase.ACTIVE) != burnTime > 0) {
blockMachineBase.setActive(burnTime > 0, world, pos);
}
}

View file

@ -57,9 +57,9 @@ public class TileWaterMill extends TilePowerAcceptor implements IToolDrop {
}
@Override
public void update() {
super.update();
if (world.getTotalWorldTime() % 20 == 0) {
public void tick() {
super.tick();
if (world.getGameTime() % 20 == 0) {
checkForWater();
}
if (waterblocks > 0) {

View file

@ -55,8 +55,8 @@ public class TileWindMill extends TilePowerAcceptor implements IToolDrop {
}
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if (pos.getY() > 64) {
int actualPower = baseEnergy;
if (world.isThundering()) {

View file

@ -40,8 +40,8 @@ public class TileLamp extends TilePowerAcceptor
// TilePowerAcceptor
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if (world == null || world.isRemote) {
return;
}

View file

@ -128,8 +128,8 @@ public class TileIronAlloyFurnace extends TileMachineBase
}
@Override
public void update() {
super.update();
public void tick() {
super.tick();
final boolean flag = this.burnTime > 0;
boolean flag1 = false;
if (this.burnTime > 0) {

View file

@ -68,8 +68,8 @@ public class TileIronFurnace extends TileMachineBase
}
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if(world.isRemote){
return;
}

View file

@ -63,8 +63,8 @@ public class TileEnergyStorage extends TilePowerAcceptor
// TilePowerAcceptor
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if (!inventory.getStackInSlot(0).isEmpty()) {
ItemStack stack = inventory.getStackInSlot(0);

View file

@ -79,8 +79,8 @@ public class TileLSUStorage extends TileMachineBase
// TileMachineBase
@Override
public void update() {
super.update();
public void tick() {
super.tick();
if (network == null) {
findAndJoinNetwork(world, pos.getX(), pos.getY(), pos.getZ());
} else {