GT5-Unofficial/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java

88 lines
3.3 KiB
Java
Raw Normal View History

2015-06-23 22:29:05 +00:00
package gregtech.common.covers;
import gregtech.api.interfaces.tileentity.ICoverable;
import gregtech.api.interfaces.tileentity.IMachineProgress;
import gregtech.api.util.GT_CoverBehavior;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fluids.Fluid;
public class GT_Cover_EnergyOnly
2015-10-22 02:15:09 +00:00
extends GT_CoverBehavior {
public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
aCoverVariable = (aCoverVariable + 1) % 3;
if (aCoverVariable == 0) {
GT_Utility.sendChatToPlayer(aPlayer, "Allow");
}
if (aCoverVariable == 1) {
GT_Utility.sendChatToPlayer(aPlayer, "Allow (conditional)");
}
if (aCoverVariable == 2) {
GT_Utility.sendChatToPlayer(aPlayer, "Disallow (conditional)");
}
return aCoverVariable;
2015-06-23 22:29:05 +00:00
}
2015-10-22 02:15:09 +00:00
public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
return 20.0F;
2015-06-23 22:29:05 +00:00
}
2015-10-22 02:15:09 +00:00
public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
return false;
2015-06-23 22:29:05 +00:00
}
2015-10-22 02:15:09 +00:00
public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
2015-06-23 22:29:05 +00:00
return false;
}
2015-10-22 02:15:09 +00:00
public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable < 2) {
return false;
}
}
return true;
}
public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable < 2) {
return false;
}
}
return true;
}
public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
return false;
}
public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
return false;
}
public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
2015-06-23 22:29:05 +00:00
return false;
}
2015-10-22 02:15:09 +00:00
public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
return false;
}
public boolean isGUIClickable(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
return false;
}
public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
return false;
}
public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
return false;
}
public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) {
return true;
}
2015-06-23 22:29:05 +00:00
}