Added check for config for block break with pickaxe. Closes #1172
This commit is contained in:
parent
ffe13d0c79
commit
40e470629d
25 changed files with 188 additions and 121 deletions
|
@ -70,8 +70,8 @@ public class TileAssemblingMachine extends TilePowerAcceptor
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
public void update() {
|
||||
super.update();
|
||||
this.charge(3);
|
||||
}
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@ public class TilePump extends TilePowerAcceptor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
public void update() {
|
||||
super.update();
|
||||
if (!world.isRemote && world.getTotalWorldTime() % 10 == 0 && !tank.isFull() && tank.getCapacity() - tank.getFluidAmount() >= 1000 && canUseEnergy(pumpExtractEU)) {
|
||||
FluidStack fluidStack = drainBlock(world, pos.down(), false);
|
||||
if (fluidStack != null) {
|
||||
|
@ -167,6 +167,7 @@ public class TilePump extends TilePowerAcceptor {
|
|||
return super.hasCapability(capability, facing);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
|
||||
if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
|
||||
|
|
|
@ -91,8 +91,8 @@ public class TileQuantumTank extends TileLegacyMachineBase
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
public void update() {
|
||||
super.update();
|
||||
if (!this.world.isRemote) {
|
||||
if (FluidUtils.drainContainers(this.tank, this.inventory, 0, 1)
|
||||
|| FluidUtils.fillContainers(this.tank, this.inventory, 0, 1, this.tank.getFluidType()))
|
||||
|
@ -114,6 +114,7 @@ public class TileQuantumTank extends TileLegacyMachineBase
|
|||
return super.hasCapability(capability, facing);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> T getCapability(final Capability<T> capability, final EnumFacing facing) {
|
||||
if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
|
||||
|
|
|
@ -174,6 +174,7 @@ public abstract class TileBaseFluidGenerator extends TilePowerAcceptor implement
|
|||
return super.hasCapability(capability, facing);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
|
||||
if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
|
||||
|
|
|
@ -57,8 +57,8 @@ public class TileDragonEggSyphon extends TilePowerAcceptor implements IToolDrop,
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
public void update() {
|
||||
super.update();
|
||||
|
||||
if (!world.isRemote) {
|
||||
if (world.getBlockState(new BlockPos(getPos().getX(), getPos().getY() + 1, getPos().getZ()))
|
||||
|
|
|
@ -61,8 +61,8 @@ public class TileSolarPanel extends TilePowerAcceptor implements IToolDrop {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
public void update() {
|
||||
super.update();
|
||||
if (!this.world.isRemote) {
|
||||
if (this.world.getTotalWorldTime() % 60 == 0) {
|
||||
this.shouldMakePower = this.isSunOut();
|
||||
|
|
|
@ -73,8 +73,8 @@ public class TileSolidFuelGenerator extends TilePowerAcceptor implements IToolDr
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
public void update() {
|
||||
super.update();
|
||||
if (this.world.isRemote) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -57,8 +57,8 @@ public class TileWindMill extends TilePowerAcceptor implements IToolDrop {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
public void update() {
|
||||
super.update();
|
||||
if (this.pos.getY() > 64) {
|
||||
int actualPower = this.basePower;
|
||||
if (this.world.isThundering()) {
|
||||
|
|
|
@ -34,8 +34,8 @@ public class TileLSUStorage extends TileLegacyMachineBase {
|
|||
public LesuNetwork network;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
public void update() {
|
||||
super.update();
|
||||
if (network == null) {
|
||||
findAndJoinNetwork(world, getPos().getX(), getPos().getY(), getPos().getZ());
|
||||
} else {
|
||||
|
|
|
@ -25,19 +25,23 @@
|
|||
package techreborn.tiles.lesu;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import reborncore.api.IToolDrop;
|
||||
import reborncore.common.powerSystem.TilePowerAcceptor;
|
||||
import reborncore.common.registration.RebornRegistry;
|
||||
import reborncore.common.registration.impl.ConfigRegistry;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.blocks.storage.BlockLapotronicSU;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@RebornRegistry(modID = ModInfo.MOD_ID)
|
||||
public class TileLapotronicSU extends TilePowerAcceptor {// TODO wrench
|
||||
public class TileLapotronicSU extends TilePowerAcceptor implements IToolDrop{// TODO wrench
|
||||
|
||||
@ConfigRegistry(config = "machines", category = "lesu", key = "LesuMaxInput", comment = "LESU Max Input (Value in EU)")
|
||||
public static int maxInput = 8192;
|
||||
|
@ -62,8 +66,8 @@ public class TileLapotronicSU extends TilePowerAcceptor {// TODO wrench
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
public void update() {
|
||||
super.update();
|
||||
if (world.isRemote) {
|
||||
return;
|
||||
}
|
||||
|
@ -150,4 +154,9 @@ public class TileLapotronicSU extends TilePowerAcceptor {// TODO wrench
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getToolDrop(EntityPlayer p0) {
|
||||
return new ItemStack(ModBlocks.LAPOTRONIC_SU, 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,6 +156,7 @@ public class TileIndustrialGrinder extends TilePowerAcceptor implements IToolDro
|
|||
return super.hasCapability(capability, facing);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> T getCapability(final Capability<T> capability, final EnumFacing facing) {
|
||||
if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
|
||||
|
|
|
@ -195,6 +195,7 @@ public class TileIndustrialSawmill extends TilePowerAcceptor
|
|||
return super.hasCapability(capability, facing);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> T getCapability(final Capability<T> capability, final EnumFacing facing) {
|
||||
if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue