update 5.08.12
- Added config to enable TCon in unification. - Added Teleporter. - Added Needs Maintainance Cover. - Changed Ultimate Battery Textures. - Changed Pump area (8(2^tier) -> 10(1.6^tier).
|
@ -645,7 +645,7 @@ public enum ItemList implements IItemContainer {
|
|||
Energy_LapotronicOrb2,
|
||||
ZPM2, Quantum_Tank_LV,Quantum_Tank_MV,Quantum_Tank_HV,Quantum_Tank_EV,Quantum_Tank_IV, Quantum_Chest_LV, Quantum_Chest_MV, Quantum_Chest_HV, Quantum_Chest_EV, Quantum_Chest_IV,
|
||||
|
||||
NULL, Cover_RedstoneTransmitterExternal,Cover_RedstoneTransmitterInternal,Cover_RedstoneReceiverExternal,Cover_RedstoneReceiverInternal, LargeTurbine, Ingot_Heavy1,Ingot_Heavy2,Ingot_Heavy3, Pump_LV, Pump_MV, Pump_HV, Pump_EV, Pump_IV, Teleporter;
|
||||
NULL, Cover_RedstoneTransmitterExternal,Cover_RedstoneTransmitterInternal,Cover_RedstoneReceiverExternal,Cover_RedstoneReceiverInternal, LargeTurbine, Ingot_Heavy1,Ingot_Heavy2,Ingot_Heavy3, Pump_LV, Pump_MV, Pump_HV, Pump_EV, Pump_IV, Teleporter, Cover_NeedsMaintainance;
|
||||
|
||||
public static final ItemList[]
|
||||
DYE_ONLY_ITEMS = {Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15}
|
||||
|
|
|
@ -25,6 +25,7 @@ public class GT_Container extends Container {
|
|||
public InventoryPlayer mPlayerInventory;
|
||||
|
||||
public GT_Container (InventoryPlayer aPlayerInventory, IGregTechTileEntity aTileEntityInventory) {
|
||||
|
||||
mTileEntity = aTileEntityInventory;
|
||||
mPlayerInventory = aPlayerInventory;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ public class GT_ContainerMetaTile_Machine extends GT_Container {
|
|||
|
||||
public GT_ContainerMetaTile_Machine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
|
||||
super(aInventoryPlayer, aTileEntity);
|
||||
|
||||
mTileEntity = aTileEntity;
|
||||
|
||||
if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) {
|
||||
|
|
|
@ -148,6 +148,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
|||
public boolean mHardRock = false;
|
||||
public boolean mHungerEffect = true;
|
||||
public boolean mOnline = true;
|
||||
public boolean mIgnoreTcon = true;
|
||||
public int mSkeletonsShootGTArrows = 16;
|
||||
public int mMaxEqualEntitiesAtOneSpot = 3;
|
||||
public int mFlintChance = 30;
|
||||
|
@ -199,7 +200,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
|||
"naturalAluminum", "naturalAluminium", "antimatterMilligram", "antimatterGram", "strangeMatter", "coalGenerator", "electricFurnace",
|
||||
"unfinishedTank", "valvePart", "aquaRegia", "leatherSeal", "leatherSlimeSeal", "hambone", "slimeball", "clay", "enrichedUranium", "camoPaste",
|
||||
"antiBlock", "burntQuartz", "salmonRaw","blockHopper" ,"blockEnderObsidian","blockIcestone","blockMagicWood","blockEnderCore","blockHeeEndium",
|
||||
"oreHeeEndium","oreHeeEndPowder","oreHeeStardust","oreHeeIgneousRock","oreHeeInstabilityOrb","crystalPureFluix","shardNether","gemFluorite"}));
|
||||
"oreHeeEndium","oreHeeEndPowder","oreHeeStardust","oreHeeIgneousRock","oreHeeInstabilityOrb","crystalPureFluix","shardNether","gemFluorite",
|
||||
"stickObsidian","caveCrystal","shardCrystal","dyeCrystal"}));
|
||||
private final Collection<String> mInvalidNames = new HashSet(Arrays.asList(new String[] { "diamondShard", "redstoneRoot", "obsidianStick", "bloodstoneOre",
|
||||
"universalCable", "bronzeTube", "ironTube", "netherTube", "obbyTube", "infiniteBattery", "eliteBattery", "advancedBattery", "10kEUStore",
|
||||
"blueDye", "MonazitOre", "quartzCrystal", "whiteLuminiteCrystal", "darkStoneIngot", "invisiumIngot", "demoniteOrb", "enderGem", "starconiumGem",
|
||||
|
@ -237,6 +239,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
|||
GT_Log.ore.println("GT_Mod: Preload-Phase started!");
|
||||
|
||||
GregTech_API.sPreloadStarted = true;
|
||||
this.mIgnoreTcon = GregTech_API.sOPStuff.get(ConfigCategories.general, "ignoreTConstruct", true);
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(GT_Values.GT, this);
|
||||
for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
|
||||
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
|
||||
|
@ -996,13 +999,14 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
|||
}
|
||||
try {
|
||||
aEvent.Ore.stackSize = 1;
|
||||
if(this.mIgnoreTcon){
|
||||
if ((aOriginalMod.toLowerCase().contains("xycraft")) || (aOriginalMod.toLowerCase().contains("tconstruct"))
|
||||
|| ((aOriginalMod.toLowerCase().contains("natura")) && (!aOriginalMod.toLowerCase().contains("natural")))) {
|
||||
if (GT_Values.D1) {
|
||||
GT_Log.ore.println(aMod + " -> " + aEvent.Name + " is getting ignored, because of racism. :P");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}}
|
||||
String tModToName = aMod + " -> " + aEvent.Name;
|
||||
if ((this.mOreDictActivated) || (GregTech_API.sPostloadStarted) || ((this.mSortToTheEnd) && (GregTech_API.sLoadFinished))) {
|
||||
tModToName = aOriginalMod + " --Late--> " + aEvent.Name;
|
||||
|
|
120
main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java
Normal file
|
@ -0,0 +1,120 @@
|
|||
package gregtech.common.covers;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.ICoverable;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
|
||||
import gregtech.api.util.GT_CoverBehavior;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
|
||||
public class GT_Cover_NeedMaintainance extends GT_CoverBehavior{
|
||||
|
||||
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer)
|
||||
{
|
||||
boolean needsRepair = false;
|
||||
if(aTileEntity instanceof IGregTechTileEntity){
|
||||
IGregTechTileEntity tTileEntity = (IGregTechTileEntity) aTileEntity;
|
||||
IMetaTileEntity mTileEntity = tTileEntity.getMetaTileEntity();
|
||||
if(mTileEntity instanceof GT_MetaTileEntity_MultiBlockBase){
|
||||
GT_MetaTileEntity_MultiBlockBase multi = (GT_MetaTileEntity_MultiBlockBase) mTileEntity;
|
||||
int ideal = multi.getIdealStatus();
|
||||
int real = multi.getRepairStatus();
|
||||
if((aCoverVariable ==0||aCoverVariable==1)&&(ideal-real>0)){
|
||||
needsRepair=true;
|
||||
}
|
||||
if((aCoverVariable ==2||aCoverVariable==3)&&(ideal-real>1)){
|
||||
needsRepair=true;
|
||||
}if((aCoverVariable ==4||aCoverVariable==5)&&(ideal-real>2)){
|
||||
needsRepair=true;
|
||||
}if((aCoverVariable ==6||aCoverVariable==7)&&(ideal-real>3)){
|
||||
needsRepair=true;
|
||||
}
|
||||
}}
|
||||
if(aCoverVariable % 2 == 0){
|
||||
needsRepair = !needsRepair;
|
||||
}
|
||||
|
||||
aTileEntity.setOutputRedstoneSignal(aSide, (byte)(needsRepair ? 0 : 15));
|
||||
return aCoverVariable;
|
||||
}
|
||||
|
||||
public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ)
|
||||
/* 64: */ {
|
||||
/* 65: 54 */ aCoverVariable = (aCoverVariable + 1) % 10;
|
||||
/* 66: 55 */ if (aCoverVariable == 0) {
|
||||
/* 67: 55 */ GT_Utility.sendChatToPlayer(aPlayer, "Emit if 1 Maintainance Needed");
|
||||
/* 68: */ }
|
||||
/* 69: 56 */ if (aCoverVariable == 1) {
|
||||
/* 70: 56 */ GT_Utility.sendChatToPlayer(aPlayer, "Emit if 1 Maintainance Needed(inverted)");
|
||||
/* 71: */ }
|
||||
/* 72: 57 */ if (aCoverVariable == 2) {
|
||||
/* 73: 57 */ GT_Utility.sendChatToPlayer(aPlayer, "Emit if 2 Maintainance Needed");
|
||||
/* 74: */ }
|
||||
/* 75: 58 */ if (aCoverVariable == 3) {
|
||||
/* 76: 58 */ GT_Utility.sendChatToPlayer(aPlayer, "Emit if 2 Maintainance Needed(inverted)");
|
||||
/* 77: */ }
|
||||
/* 78: 59 */ if (aCoverVariable == 4) {
|
||||
/* 79: 59 */ GT_Utility.sendChatToPlayer(aPlayer, "Emit if 3 Maintainance Needed");
|
||||
/* 80: */ }
|
||||
/* 81: 60 */ if (aCoverVariable == 5) {
|
||||
/* 82: 60 */ GT_Utility.sendChatToPlayer(aPlayer, "Emit if 3 Maintainance Needed(inverted)");
|
||||
/* 83: */ }
|
||||
/* 84: 61 */ if (aCoverVariable == 6) {
|
||||
/* 85: 61 */ GT_Utility.sendChatToPlayer(aPlayer, "Emit if 4 Maintainance Needed");
|
||||
/* 86: */ }
|
||||
/* 87: 62 */ if (aCoverVariable == 7) {
|
||||
/* 88: 62 */ GT_Utility.sendChatToPlayer(aPlayer, "Emit if 4 Maintainance Needed(inverted)");
|
||||
/* 89: */ }
|
||||
/* 90: 63 */ if (aCoverVariable == 8) {
|
||||
/* 91: 63 */ GT_Utility.sendChatToPlayer(aPlayer, "Emit if 5 Maintainance Needed");
|
||||
/* 92: */ }
|
||||
/* 93: 64 */ if (aCoverVariable == 9) {
|
||||
/* 94: 64 */ GT_Utility.sendChatToPlayer(aPlayer, "Emit if 5 Maintainance Needed(inverted)");
|
||||
/* 95: */ }
|
||||
/* 96: 65 */ return aCoverVariable;
|
||||
/* 97: */ }
|
||||
/* 98: */
|
||||
/* 99: */ public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity)
|
||||
/* 100: */ {
|
||||
/* 101: 70 */ return true;
|
||||
/* 102: */ }
|
||||
/* 103: */
|
||||
/* 104: */ public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity)
|
||||
/* 105: */ {
|
||||
/* 106: 75 */ return true;
|
||||
/* 107: */ }
|
||||
/* 108: */
|
||||
/* 109: */ public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity)
|
||||
/* 110: */ {
|
||||
/* 111: 80 */ return true;
|
||||
/* 112: */ }
|
||||
/* 113: */
|
||||
/* 114: */ public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity)
|
||||
/* 115: */ {
|
||||
/* 116: 85 */ return true;
|
||||
/* 117: */ }
|
||||
/* 118: */
|
||||
/* 119: */ public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity)
|
||||
/* 120: */ {
|
||||
/* 121: 90 */ return true;
|
||||
/* 122: */ }
|
||||
/* 123: */
|
||||
/* 124: */ public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity)
|
||||
/* 125: */ {
|
||||
/* 126: 95 */ return true;
|
||||
/* 127: */ }
|
||||
/* 128: */
|
||||
/* 129: */ public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity)
|
||||
/* 130: */ {
|
||||
/* 131:100 */ return true;
|
||||
/* 132: */ }
|
||||
/* 133: */
|
||||
/* 134: */ public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity)
|
||||
/* 135: */ {
|
||||
/* 136:105 */ return 60;
|
||||
/* 137: */ }
|
||||
|
||||
}
|
177
main/java/gregtech/common/gui/GT_Container_Teleporter.java
Normal file
|
@ -0,0 +1,177 @@
|
|||
package gregtech.common.gui;
|
||||
|
||||
import gregtech.api.gui.GT_ContainerMetaTile_Machine;
|
||||
import gregtech.api.gui.GT_Container_BasicMachine;
|
||||
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
|
||||
import gregtech.api.gui.GT_Slot_Holo;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Teleporter;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class GT_Container_Teleporter
|
||||
extends GT_ContainerMetaTile_Machine
|
||||
{
|
||||
public GT_Container_Teleporter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity)
|
||||
{
|
||||
super(aInventoryPlayer, aTileEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addSlots(InventoryPlayer aInventoryPlayer)
|
||||
{
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 8, 5, false, false, 1));
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 8, 23, false, false, 1));
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 8, 41, false, false, 1));
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 8, 59, false, false, 1));
|
||||
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 26, 5, false, false, 1));
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 26, 23, false, false, 1));
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 26, 41, false, false, 1));
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 26, 59, false, false, 1));
|
||||
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 152, 5, false, false, 1));
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 152, 23, false, false, 1));
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 152, 41, false, false, 1));
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 152, 59, false, false, 1));
|
||||
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 134, 5, false, false, 1));
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 134, 23, false, false, 1));
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 134, 41, false, false, 1));
|
||||
addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 134, 59, false, false, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer)
|
||||
{
|
||||
if (aSlotIndex < 0) {
|
||||
return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
|
||||
}
|
||||
Slot tSlot = (Slot)this.inventorySlots.get(aSlotIndex);
|
||||
if ((tSlot != null) && (this.mTileEntity.getMetaTileEntity() != null)) {
|
||||
switch (aSlotIndex)
|
||||
{
|
||||
case 0:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetX -= (aShifthold == 1 ? 512 : 64);
|
||||
return null;
|
||||
case 1:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetY -= (aShifthold == 1 ? 512 : 64);
|
||||
return null;
|
||||
case 2:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetZ -= (aShifthold == 1 ? 512 : 64);
|
||||
return null;
|
||||
case 3:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetD -= (aShifthold == 1 ? 16 : 8);
|
||||
return null;
|
||||
case 4:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetX -= (aShifthold == 1 ? 16 : 1);
|
||||
return null;
|
||||
case 5:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetY -= (aShifthold == 1 ? 16 : 1);
|
||||
return null;
|
||||
case 6:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetZ -= (aShifthold == 1 ? 16 : 1);
|
||||
return null;
|
||||
case 7:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetD -= (aShifthold == 1 ? 4 : 1);
|
||||
return null;
|
||||
case 8:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetX += (aShifthold == 1 ? 512 : 64);
|
||||
return null;
|
||||
case 9:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetY += (aShifthold == 1 ? 512 : 64);
|
||||
return null;
|
||||
case 10:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetZ += (aShifthold == 1 ? 512 : 64);
|
||||
return null;
|
||||
case 11:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetD += (aShifthold == 1 ? 16 : 8);
|
||||
return null;
|
||||
case 12:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetX += (aShifthold == 1 ? 16 : 1);
|
||||
return null;
|
||||
case 13:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetY += (aShifthold == 1 ? 16 : 1);
|
||||
return null;
|
||||
case 14:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetZ += (aShifthold == 1 ? 16 : 1);
|
||||
return null;
|
||||
case 15:
|
||||
((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetD += (aShifthold == 1 ? 4 : 1);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
|
||||
}
|
||||
|
||||
public int mEgg = 0;
|
||||
public int mTargetD = 0;
|
||||
public int mTargetZ = 0;
|
||||
public int mTargetY = 0;
|
||||
public int mTargetX = 0;
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
super.detectAndSendChanges();
|
||||
if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) {
|
||||
return;
|
||||
}
|
||||
this.mTargetX = ((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetX;
|
||||
this.mTargetY = ((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetY;
|
||||
this.mTargetZ = ((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetZ;
|
||||
this.mTargetD = ((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).mTargetD;
|
||||
this.mEgg = (((GT_MetaTileEntity_Teleporter)this.mTileEntity.getMetaTileEntity()).hasDimensionalTeleportCapability() ? 1 : 0);
|
||||
|
||||
Iterator var2 = this.crafters.iterator();
|
||||
while (var2.hasNext())
|
||||
{
|
||||
ICrafting var1 = (ICrafting)var2.next();
|
||||
var1.sendProgressBarUpdate(this, 100, this.mTargetX & 0xFFFF);
|
||||
var1.sendProgressBarUpdate(this, 101, this.mTargetX >>> 16);
|
||||
var1.sendProgressBarUpdate(this, 102, this.mTargetY & 0xFFFF);
|
||||
var1.sendProgressBarUpdate(this, 103, this.mTargetY >>> 16);
|
||||
var1.sendProgressBarUpdate(this, 104, this.mTargetZ & 0xFFFF);
|
||||
var1.sendProgressBarUpdate(this, 105, this.mTargetZ >>> 16);
|
||||
var1.sendProgressBarUpdate(this, 106, this.mTargetD & 0xFFFF);
|
||||
var1.sendProgressBarUpdate(this, 107, this.mTargetD >>> 16);
|
||||
var1.sendProgressBarUpdate(this, 108, this.mEgg);
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateProgressBar(int par1, int par2)
|
||||
{
|
||||
super.updateProgressBar(par1, par2);
|
||||
switch (par1)
|
||||
{
|
||||
case 100:
|
||||
this.mTargetX = (this.mTargetX & 0xFFFF0000 | par2); break;
|
||||
case 101:
|
||||
this.mTargetX = (this.mTargetX & 0xFFFF | par2 << 16); break;
|
||||
case 102:
|
||||
this.mTargetY = (this.mTargetY & 0xFFFF0000 | par2); break;
|
||||
case 103:
|
||||
this.mTargetY = (this.mTargetY & 0xFFFF | par2 << 16); break;
|
||||
case 104:
|
||||
this.mTargetZ = (this.mTargetZ & 0xFFFF0000 | par2); break;
|
||||
case 105:
|
||||
this.mTargetZ = (this.mTargetZ & 0xFFFF | par2 << 16); break;
|
||||
case 106:
|
||||
this.mTargetD = (this.mTargetD & 0xFFFF0000 | par2); break;
|
||||
case 107:
|
||||
this.mTargetD = (this.mTargetD & 0xFFFF | par2 << 16); break;
|
||||
case 108:
|
||||
this.mEgg = par2;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package gregtech.common.gui;
|
||||
|
||||
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
|
||||
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
|
||||
import gregtech.api.gui.GT_GUIContainer_BasicTank;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import gregtech.common.gui.GT_Container_Teleporter;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
public class GT_GUIContainer_Teleporter
|
||||
extends GT_GUIContainerMetaTile_Machine
|
||||
{
|
||||
public GT_GUIContainer_Teleporter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity)
|
||||
{
|
||||
super(new GT_Container_Teleporter(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "Teleporter.png");
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
||||
{
|
||||
this.fontRendererObj.drawString("Teleporter", 46, 8, 16448255);
|
||||
if (this.mContainer != null)
|
||||
{
|
||||
this.fontRendererObj.drawString("X: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter)this.mContainer).mTargetX), 46, 16, 16448255);
|
||||
this.fontRendererObj.drawString("Y: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter)this.mContainer).mTargetY), 46, 24, 16448255);
|
||||
this.fontRendererObj.drawString("Z: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter)this.mContainer).mTargetZ), 46, 32, 16448255);
|
||||
if (((GT_Container_Teleporter)this.mContainer).mEgg > 0) {
|
||||
this.fontRendererObj.drawString("Dim: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter)this.mContainer).mTargetD), 46, 40, 16448255);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
|
||||
{
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
int x = (this.width - this.xSize) / 2;
|
||||
int y = (this.height - this.ySize) / 2;
|
||||
drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
}
|
|
@ -41,6 +41,7 @@ import gregtech.api.util.GT_Utility;
|
|||
/* 37: */ import gregtech.common.covers.GT_Cover_EUMeter;
|
||||
/* 38: */ import gregtech.common.covers.GT_Cover_ItemMeter;
|
||||
/* 39: */ import gregtech.common.covers.GT_Cover_LiquidMeter;
|
||||
import gregtech.common.covers.GT_Cover_NeedMaintainance;
|
||||
/* 40: */ import gregtech.common.covers.GT_Cover_Pump;
|
||||
import gregtech.common.covers.GT_Cover_RedstoneReceiverExternal;
|
||||
import gregtech.common.covers.GT_Cover_RedstoneReceiverInternal;
|
||||
|
@ -790,6 +791,9 @@ import net.minecraftforge.common.ForgeModContainer;
|
|||
GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneTransmitterExternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneTransmitterInternal.get(1L, new Object[0])});
|
||||
GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneReceiverInternal.get(1L, new Object[0])});
|
||||
|
||||
ItemList.Cover_NeedsMaintainance.set(addItem(tLastID = 748, "Needs Maintainance Cover", "Emits Redstone Signal if Multiblock Machine needs Maintainance", new Object[] { new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L) }));
|
||||
GregTech_API.registerCover(ItemList.Cover_NeedsMaintainance.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR) }), new GT_Cover_NeedMaintainance());
|
||||
GT_Values.RA.addAssemblerRecipe(ItemList.Emitter_MV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L),ItemList.Cover_NeedsMaintainance.get(1L, new Object[0]) , 600, 24);
|
||||
}
|
||||
/* 745: */
|
||||
/* 746: */ public boolean onEntityItemUpdate(EntityItem aItemEntity)
|
||||
|
|
|
@ -142,7 +142,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
|
|||
this.mPumpList.clear();
|
||||
int y = getBaseMetaTileEntity().getYCoord() - 1;
|
||||
for (int yHead = getYOfPumpHead(); (this.mPumpList.isEmpty()) && (y >= yHead); y--) {
|
||||
scanForFluid(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord(), this.mPumpList, getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord(), 8*((int)Math.pow(2, this.mTier)));
|
||||
scanForFluid(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord(), this.mPumpList, getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord(), 10*((int)Math.pow(1.6, this.mTier)));
|
||||
}
|
||||
}
|
||||
if ((!tMovedOneDown) && (this.mPumpTimer <= 0)) {
|
||||
|
|
|
@ -17,6 +17,7 @@ import net.minecraft.entity.item.EntityMinecart;
|
|||
import net.minecraft.entity.item.EntityTNTPrimed;
|
||||
import net.minecraft.entity.item.EntityXPOrb;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.entity.projectile.EntityFireball;
|
||||
import net.minecraft.entity.projectile.EntityFishHook;
|
||||
|
@ -26,21 +27,25 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import gregtech.api.enums.ConfigCategories;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.gui.GT_Container_MultiMachine;
|
||||
import gregtech.api.interfaces.ITexture;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import gregtech.api.util.GT_Config;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import gregtech.common.gui.GT_Container_Teleporter;
|
||||
import gregtech.common.gui.GT_GUIContainer_FusionReactor;
|
||||
import gregtech.common.gui.GT_GUIContainer_Teleporter;
|
||||
|
||||
public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_Hatch{
|
||||
public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank{
|
||||
|
||||
public int mTargetX = 0;
|
||||
public int mTargetY = 0;
|
||||
public int mTargetZ = 0;
|
||||
public int mTargetD = 0;
|
||||
public int mCharge = 0;
|
||||
public boolean mDebug = false;
|
||||
public boolean hasEgg = false;
|
||||
public static boolean sInterDimensionalTeleportAllowed = true;
|
||||
|
@ -53,7 +58,24 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_Hatch{
|
|||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {return true;}
|
||||
@Override
|
||||
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
|
||||
if (aBaseMetaTileEntity.isClientSide()) return true;
|
||||
this.hasEgg = checkForEgg();
|
||||
aBaseMetaTileEntity.openGUI(aPlayer);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_Container_Teleporter(aPlayerInventory, aBaseMetaTileEntity);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_Teleporter(aPlayerInventory, aBaseMetaTileEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
|
@ -62,14 +84,12 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_Hatch{
|
|||
|
||||
public String[] getInfoData()
|
||||
{
|
||||
return new String[] { "Charge:", this.mCharge + " EU", "Coordinates:", "X: " + this.mTargetX, "Y: " + this.mTargetY, "Z: " + this.mTargetZ, "Dimension: " + this.mTargetD };
|
||||
return new String[] { "Coordinates:", "X: " + this.mTargetX, "Y: " + this.mTargetY, "Z: " + this.mTargetZ, "Dimension: " + this.mTargetD };
|
||||
}
|
||||
|
||||
@Override public ITexture[] getTexturesActive(ITexture aBaseTexture) {return null;}
|
||||
@Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) {return null;}
|
||||
@Override
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1], (aSide !=1) ? null : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER) };
|
||||
return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1], (aSide !=this.getBaseMetaTileEntity().getFrontFacing()) ? null : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER) };
|
||||
}
|
||||
|
||||
|
||||
|
@ -79,7 +99,6 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_Hatch{
|
|||
aNBT.setInteger("mTargetY", this.mTargetY);
|
||||
aNBT.setInteger("mTargetZ", this.mTargetZ);
|
||||
aNBT.setInteger("mTargetD", this.mTargetD);
|
||||
aNBT.setInteger("mCharge", this.mCharge);
|
||||
aNBT.setBoolean("mDebug", this.mDebug);
|
||||
}
|
||||
|
||||
|
@ -89,7 +108,6 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_Hatch{
|
|||
this.mTargetY = aNBT.getInteger("mTargetY");
|
||||
this.mTargetZ = aNBT.getInteger("mTargetZ");
|
||||
this.mTargetD = aNBT.getInteger("mTargetD");
|
||||
this.mCharge = aNBT.getInteger("mCharge");
|
||||
this.mDebug = aNBT.getBoolean("mDebug");
|
||||
}
|
||||
|
||||
|
@ -137,8 +155,9 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_Hatch{
|
|||
return (this.mDebug) || ((hasDimensionalTeleportCapability()) && (GT_Utility.isRealDimension(this.mTargetD)) && (GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId)));
|
||||
}
|
||||
|
||||
public void onPostTick()
|
||||
{
|
||||
@Override
|
||||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||
super.onPostTick(aBaseMetaTileEntity, aTick);
|
||||
if (getBaseMetaTileEntity().isServerSide())
|
||||
{
|
||||
if (getBaseMetaTileEntity().getTimer() % 100L == 50L) {
|
||||
|
@ -146,20 +165,14 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_Hatch{
|
|||
}
|
||||
if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().getRedstone()))
|
||||
{
|
||||
this.mCharge -= 8192;
|
||||
if (this.mCharge < 0) {
|
||||
this.mCharge = 0;
|
||||
}
|
||||
int tDistance = distanceCalculation();int tCost = 0;
|
||||
if(getBaseMetaTileEntity().decreaseStoredEnergyUnits(8192, false)){
|
||||
int tDistance = distanceCalculation();
|
||||
for (Object tObject : getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) + 2))) {
|
||||
if (((tObject instanceof Entity)) && (!((Entity)tObject).isDead))
|
||||
{
|
||||
Entity tEntity = (Entity)tObject;
|
||||
if (((this.mCharge >= (tCost = (int)(tDistance * tDistance * weightCalculation(tEntity)))) && (tCost >= 0)) || (this.mDebug))
|
||||
if (getBaseMetaTileEntity().decreaseStoredEnergyUnits((int)(tDistance * tDistance * weightCalculation(tEntity)), false))
|
||||
{
|
||||
if (!this.mDebug) {
|
||||
this.mCharge -= tCost;
|
||||
}
|
||||
if (tEntity.ridingEntity != null) {
|
||||
tEntity.mountEntity(null);
|
||||
}
|
||||
|
@ -168,23 +181,14 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_Hatch{
|
|||
}
|
||||
if ((this.mTargetD == getBaseMetaTileEntity().getWorld().provider.dimensionId) || (!isDimensionalTeleportAvailable()) || (!GT_Utility.moveEntityToDimensionAtCoords(tEntity, this.mTargetD, this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D))) {
|
||||
if ((tEntity instanceof EntityLivingBase)) {
|
||||
((EntityLivingBase)tEntity).setPosition(this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D);
|
||||
((EntityLivingBase)tEntity).setPositionAndUpdate(this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D);
|
||||
} else {
|
||||
tEntity.setPosition(this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
long tCharge = getBaseMetaTileEntity().getUniversalEnergyStored();
|
||||
if ((tCharge > 0) && (this.mCharge + tCharge > 0))
|
||||
{
|
||||
this.mCharge += tCharge;
|
||||
getBaseMetaTileEntity().decreaseStoredEnergyUnits(tCharge, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
getBaseMetaTileEntity().setActive(true);
|
||||
}
|
||||
else
|
||||
|
@ -298,4 +302,39 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_Hatch{
|
|||
@Override public int getStackDisplaySlot() {return 2;}
|
||||
@Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
|
||||
|
||||
@Override
|
||||
public boolean doesFillContainers() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesEmptyContainers() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTankBeFilled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTankBeEmptied() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean displaysItemStack() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean displaysStackSize() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -997,7 +997,7 @@ import net.minecraftforge.oredict.OreDictionary;
|
|||
GT_ModHandler.addCraftingRecipe(ItemList.Pump_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "CPC", "PMP", "BPB", 'M', ItemList.Hull_IV, 'B', OrePrefixes.pipeLarge.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Elite), 'P', ItemList.Electric_Pump_IV});
|
||||
|
||||
ItemList.Teleporter.set(new GT_MetaTileEntity_Teleporter(1145, "basicmachine.teleporter", "Teleporter",6).getStackForm(1L));
|
||||
// GT_ModHandler.addCraftingRecipe(ItemList.Teleporter.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "CPC", "PMP", "BPB", 'M', ItemList.Hull_LuV, 'B', OrePrefixes.pipeLarge.get(Materials.Bronze), 'C', OrePrefixes.circuit.get(Materials.Basic), 'P', ItemList.Electric_Pump_LV});
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Teleporter.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "CPC", "PMP", "BCB", 'M', ItemList.Hull_LuV, 'B', ItemList.Tool_DataOrb, 'C', OrePrefixes.circuit.get(Materials.Master), 'P', ItemList.Field_Generator_EV});
|
||||
|
||||
}
|
||||
/* 981: */
|
||||
|
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 357 B |