Merge branch 'unstable' into odp_speed_improving
This commit is contained in:
commit
9ece29b94e
22 changed files with 3433 additions and 2451 deletions
|
@ -598,6 +598,7 @@ public class GT_Mod implements IGT_Mod {
|
|||
new GT_CropLoader().run();
|
||||
new GT_Worldgenloader().run();
|
||||
new GT_CoverLoader().run();
|
||||
new GT_AE2EnergyTunnelLoader().run();
|
||||
LoadArmorComponents.init();
|
||||
|
||||
GT_RecipeRegistrator.registerUsagesForMaterials(new ItemStack(Blocks.planks, 1), null, false);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,84 +1,85 @@
|
|||
package gregtech.api.gui;
|
||||
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.util.GT_LanguageManager;
|
||||
import gregtech.api.util.GT_ModHandler;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import gregtech.common.items.GT_MetaGenerated_Tool_01;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
|
||||
|
||||
/**
|
||||
* NEVER INCLUDE THIS FILE IN YOUR MOD!!!
|
||||
* <p/>
|
||||
* The GUI-Container I use for all my Basic Machines
|
||||
* <p/>
|
||||
* As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class
|
||||
*/
|
||||
public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machine {
|
||||
|
||||
String mName = "";
|
||||
|
||||
public GT_GUIContainer_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) {
|
||||
super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "multimachines/" + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile));
|
||||
mName = aName;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
fontRendererObj.drawString(mName, 10, 8, 16448255);
|
||||
|
||||
if (mContainer != null) {
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 1) != 0)
|
||||
fontRendererObj.drawString(trans("132", "Pipe is loose."), 10, 16, 16448255);
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 2) != 0)
|
||||
fontRendererObj.drawString(trans("133", "Screws are missing."), 10, 24, 16448255);
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 4) != 0)
|
||||
fontRendererObj.drawString(trans("134", "Something is stuck."), 10, 32, 16448255);
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 8) != 0)
|
||||
fontRendererObj.drawString(trans("135", "Platings are dented."), 10, 40, 16448255);
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 16) != 0)
|
||||
fontRendererObj.drawString(trans("136", "Circuitry burned out."), 10, 48, 16448255);
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 32) != 0)
|
||||
fontRendererObj.drawString(trans("137", "That doesn't belong there."), 10, 56, 16448255);
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 64) != 0)
|
||||
fontRendererObj.drawString(trans("138", "Incomplete Structure."), 10, 64, 16448255);
|
||||
|
||||
if (((GT_Container_MultiMachine) mContainer).mDisplayErrorCode == 0) {
|
||||
if (((GT_Container_MultiMachine) mContainer).mActive == 0) {
|
||||
fontRendererObj.drawString(trans("139", "Hit with Soft Hammer"), 10, 16, 16448255);
|
||||
fontRendererObj.drawString(trans("140", "to (re-)start the Machine"), 10, 24, 16448255);
|
||||
fontRendererObj.drawString(trans("141", "if it doesn't start."), 10, 32, 16448255);
|
||||
} else {
|
||||
fontRendererObj.drawString(trans("142", "Running perfectly."), 10, 16, 16448255);
|
||||
}
|
||||
int id = mContainer.mTileEntity.getMetaTileID();
|
||||
if (id == 1157 || id == 1158 || id == 1177 || id == 1178 || id == 1179) {
|
||||
ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1);
|
||||
if (tItem == null || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L))) {
|
||||
fontRendererObj.drawString(trans("143", "Missing Mining Pipe"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255);
|
||||
}
|
||||
} else if (id == 1131 || id == 1151 || id == 1152 || id == 1153) {
|
||||
ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1);
|
||||
if (tItem == null || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE && tItem.getItemDamage() >= 170 && tItem.getItemDamage() <= 177)) {
|
||||
fontRendererObj.drawString(trans("144", "Missing Turbine Rotor"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String trans(String aKey, String aEnglish) {
|
||||
return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
int x = (width - xSize) / 2;
|
||||
int y = (height - ySize) / 2;
|
||||
drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
|
||||
}
|
||||
}
|
||||
package gregtech.api.gui;
|
||||
|
||||
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
|
||||
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.util.GT_LanguageManager;
|
||||
import gregtech.api.util.GT_ModHandler;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import gregtech.common.items.GT_MetaGenerated_Tool_01;
|
||||
import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_DrillerBase;
|
||||
import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* NEVER INCLUDE THIS FILE IN YOUR MOD!!!
|
||||
* <p/>
|
||||
* The GUI-Container I use for all my Basic Machines
|
||||
* <p/>
|
||||
* As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class
|
||||
*/
|
||||
public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machine {
|
||||
|
||||
String mName = "";
|
||||
|
||||
public GT_GUIContainer_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) {
|
||||
super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "multimachines/" + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile));
|
||||
mName = aName;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
fontRendererObj.drawString(mName, 10, 8, 16448255);
|
||||
|
||||
if (mContainer != null) {
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 1) != 0)
|
||||
fontRendererObj.drawString(trans("132", "Pipe is loose."), 10, 16, 16448255);
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 2) != 0)
|
||||
fontRendererObj.drawString(trans("133", "Screws are missing."), 10, 24, 16448255);
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 4) != 0)
|
||||
fontRendererObj.drawString(trans("134", "Something is stuck."), 10, 32, 16448255);
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 8) != 0)
|
||||
fontRendererObj.drawString(trans("135", "Platings are dented."), 10, 40, 16448255);
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 16) != 0)
|
||||
fontRendererObj.drawString(trans("136", "Circuitry burned out."), 10, 48, 16448255);
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 32) != 0)
|
||||
fontRendererObj.drawString(trans("137", "That doesn't belong there."), 10, 56, 16448255);
|
||||
if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 64) != 0)
|
||||
fontRendererObj.drawString(trans("138", "Incomplete Structure."), 10, 64, 16448255);
|
||||
|
||||
if (((GT_Container_MultiMachine) mContainer).mDisplayErrorCode == 0) {
|
||||
if (((GT_Container_MultiMachine) mContainer).mActive == 0) {
|
||||
fontRendererObj.drawString(trans("139", "Hit with Soft Hammer"), 10, 16, 16448255);
|
||||
fontRendererObj.drawString(trans("140", "to (re-)start the Machine"), 10, 24, 16448255);
|
||||
fontRendererObj.drawString(trans("141", "if it doesn't start."), 10, 32, 16448255);
|
||||
} else {
|
||||
fontRendererObj.drawString(trans("142", "Running perfectly."), 10, 16, 16448255);
|
||||
}
|
||||
if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_DrillerBase) {
|
||||
ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1);
|
||||
if (tItem == null || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L))) {
|
||||
fontRendererObj.drawString(trans("143", "Missing Mining Pipe"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255);
|
||||
}
|
||||
} else if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine) {
|
||||
ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1);
|
||||
if (tItem == null || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE && tItem.getItemDamage() >= 170 && tItem.getItemDamage() <= 177)) {
|
||||
fontRendererObj.drawString(trans("144", "Missing Turbine Rotor"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String trans(String aKey, String aEnglish) {
|
||||
return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
int x = (width - xSize) / 2;
|
||||
int y = (height - ySize) / 2;
|
||||
drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,101 +1,106 @@
|
|||
package gregtech.api.metatileentity.implementations;
|
||||
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.gui.*;
|
||||
import gregtech.api.interfaces.ITexture;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.metatileentity.MetaTileEntity;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class GT_MetaTileEntity_Hatch_DataAccess extends GT_MetaTileEntity_Hatch {
|
||||
public GT_MetaTileEntity_Hatch_DataAccess(int aID, String aName, String aNameRegional, int aTier) {
|
||||
super(aID, aName, aNameRegional, aTier, 16, new String[]{
|
||||
"Data Access for Multiblocks",
|
||||
"Adds " + (aTier == 4 ? 4 : 16) + " extra slots for Data Sticks"});
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Hatch_DataAccess(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aTier == 4 ? 4 : 16, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Hatch_DataAccess(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aTier == 4 ? 4 : 16, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
|
||||
return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DATA_ACCESS)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
|
||||
return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DATA_ACCESS)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSimpleMachine() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFacingValid(byte aFacing) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAccessAllowed(EntityPlayer aPlayer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidSlot(int aIndex) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_Hatch_DataAccess(mName, mTier, mDescriptionArray, mTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
|
||||
if (aBaseMetaTileEntity.isClientSide()) return true;
|
||||
aBaseMetaTileEntity.openGUI(aPlayer);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
switch (mTier) {
|
||||
case 4:
|
||||
return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity);
|
||||
default:
|
||||
return new GT_Container_4by4(aPlayerInventory, aBaseMetaTileEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
switch (mTier) {
|
||||
case 4:
|
||||
return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess");
|
||||
case 6:
|
||||
return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess");
|
||||
default:
|
||||
return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
package gregtech.api.metatileentity.implementations;
|
||||
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.gui.*;
|
||||
import gregtech.api.interfaces.ITexture;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.metatileentity.MetaTileEntity;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class GT_MetaTileEntity_Hatch_DataAccess extends GT_MetaTileEntity_Hatch {
|
||||
public GT_MetaTileEntity_Hatch_DataAccess(int aID, String aName, String aNameRegional, int aTier) {
|
||||
super(aID, aName, aNameRegional, aTier, 16, new String[]{
|
||||
"Data Access for Multiblocks",
|
||||
"Adds " + (aTier == 4 ? 4 : 16) + " extra slots for Data Sticks"});
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Hatch_DataAccess(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aTier == 4 ? 4 : 16, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Hatch_DataAccess(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aTier == 4 ? 4 : 16, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
|
||||
return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DATA_ACCESS)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
|
||||
return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DATA_ACCESS)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSimpleMachine() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFacingValid(byte aFacing) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAccessAllowed(EntityPlayer aPlayer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidSlot(int aIndex) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_Hatch_DataAccess(mName, mTier, mDescriptionArray, mTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
|
||||
if (aBaseMetaTileEntity.isClientSide()) return true;
|
||||
aBaseMetaTileEntity.openGUI(aPlayer);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
switch (mTier) {
|
||||
case 4:
|
||||
return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity);
|
||||
default:
|
||||
return new GT_Container_4by4(aPlayerInventory, aBaseMetaTileEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
switch (mTier) {
|
||||
case 4:
|
||||
return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess");
|
||||
case 6:
|
||||
return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess");
|
||||
default:
|
||||
return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 1;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -138,7 +138,7 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
|
|||
}
|
||||
|
||||
public boolean hasDimensionalTeleportCapability() {
|
||||
return (this.mDebug) || (this.hasEgg) || (mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000);
|
||||
return (this.mDebug) || (this.hasEgg) || (mFluid != null && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000);
|
||||
}
|
||||
|
||||
public boolean isDimensionalTeleportAvailable() {
|
||||
|
|
|
@ -232,7 +232,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
|
|||
}
|
||||
|
||||
public boolean hasDimensionalTeleportCapability() {
|
||||
return (this.mDebug) || (this.hasEgg) || (mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 10);
|
||||
return (this.mDebug) || (this.hasEgg) || (mFluid != null && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 10);
|
||||
}
|
||||
|
||||
public boolean isDimensionalTeleportAvailable() {
|
||||
|
|
|
@ -1,377 +1,377 @@
|
|||
package gregtech.common.tileentities.machines.multi;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.gui.GT_GUIContainer_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_Hatch;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import gregtech.api.util.GT_Recipe;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class GT_MetaTileEntity_AssemblyLine
|
||||
extends GT_MetaTileEntity_MultiBlockBase {
|
||||
|
||||
public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches = new ArrayList<GT_MetaTileEntity_Hatch_DataAccess>();
|
||||
|
||||
public GT_MetaTileEntity_AssemblyLine(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_AssemblyLine(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_AssemblyLine(this.mName);
|
||||
}
|
||||
|
||||
public String[] getDescription() {
|
||||
return new String[]{"Assembly Line",
|
||||
"Size: 3x(5-16)x4, variable length",
|
||||
"Bottom: Steel Machine Casing(or Maintenance or Input Hatch),",
|
||||
"Input Bus (Last Output Bus), Steel Machine Casing",
|
||||
"Middle: Reinforced Glass, Assembly Line, Reinforced Glass",
|
||||
"UpMiddle: Grate Machine Casing,",
|
||||
" Assembler Machine Casing,",
|
||||
" Grate Machine Casing (or Controller or Data Access Hatch)",
|
||||
"Top: Steel Casing(or Energy Hatch)",
|
||||
"Up to 16 repeating slices, last is Output Bus",
|
||||
"Optional 1x Data Access Hatch next to the Controller"};
|
||||
}
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
if (aSide == aFacing) {
|
||||
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE)};
|
||||
}
|
||||
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]};
|
||||
}
|
||||
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "AssemblyLine.png");
|
||||
}
|
||||
|
||||
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isCorrectMachinePart(ItemStack aStack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isFacingValid(byte aFacing) {
|
||||
return aFacing > 1;
|
||||
}
|
||||
|
||||
public boolean checkRecipe(ItemStack aStack) {
|
||||
if(GT_Values.D1)System.out.println("Start ALine recipe check");
|
||||
ArrayList<ItemStack> tDataStickList = getDataItems(2);
|
||||
if (tDataStickList.size() == 0) return false;
|
||||
if(GT_Values.D1)System.out.println("Stick accepted, " + tDataStickList.size() + " Data Sticks found");
|
||||
|
||||
ItemStack tStack[] = new ItemStack[15];
|
||||
FluidStack[] tFluids = new FluidStack[4];
|
||||
boolean recipeNA = false;
|
||||
boolean findRecipe = false;
|
||||
for (ItemStack tDataStick : tDataStickList){
|
||||
recipeNA = false;
|
||||
NBTTagCompound tTag = tDataStick.getTagCompound();
|
||||
if (tTag == null) continue;
|
||||
for (int i = 0; i < 15; i++) {
|
||||
if (!tTag.hasKey("" + i)) continue;
|
||||
if (mInputBusses.get(i) == null) {
|
||||
recipeNA = true;
|
||||
break;
|
||||
}
|
||||
tStack[i] = GT_Utility.loadItem(tTag, "" + i);
|
||||
if (tStack[i] == null) continue;
|
||||
if(GT_Values.D1)System.out.println("Item "+i+" : "+tStack[i].getUnlocalizedName());
|
||||
ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0);
|
||||
if (!GT_Utility.areStacksEqual(tStack[i], stackInSlot, true) || tStack[i].stackSize > stackInSlot.stackSize) {
|
||||
if(GT_Values.D1)System.out.println(i +" not accepted");
|
||||
recipeNA = true;
|
||||
break;
|
||||
}
|
||||
if(GT_Values.D1)System.out.println(i+" accepted");
|
||||
}
|
||||
if (recipeNA) continue;
|
||||
|
||||
if(GT_Values.D1)System.out.println("All Items done, start fluid check");
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (!tTag.hasKey("f" + i)) continue;
|
||||
tFluids[i] = GT_Utility.loadFluid(tTag, "f" + i);
|
||||
if (tFluids[i] == null) continue;
|
||||
if(GT_Values.D1)System.out.println("Fluid "+i+" "+tFluids[i].getUnlocalizedName());
|
||||
if (mInputHatches.get(i) == null) {
|
||||
recipeNA = true;
|
||||
break;
|
||||
}
|
||||
FluidStack fluidInHatch = mInputHatches.get(i).mFluid;
|
||||
if (fluidInHatch == null || !GT_Utility.areFluidsEqual(fluidInHatch, tFluids[i], true) || fluidInHatch.amount < tFluids[i].amount) {
|
||||
if(GT_Values.D1)System.out.println(i+" not accepted");
|
||||
recipeNA = true;
|
||||
break;
|
||||
}
|
||||
if(GT_Values.D1)System.out.println(i+" accepted");
|
||||
}
|
||||
if (recipeNA) continue;
|
||||
|
||||
if(GT_Values.D1)System.out.println("Input accepted, check other values");
|
||||
if (!tTag.hasKey("output")) continue;
|
||||
mOutputItems = new ItemStack[]{GT_Utility.loadItem(tTag, "output")};
|
||||
if (mOutputItems[0] == null || !GT_Utility.isStackValid(mOutputItems[0]))
|
||||
continue;
|
||||
|
||||
if (!tTag.hasKey("time")) continue;
|
||||
mMaxProgresstime = tTag.getInteger("time");
|
||||
if (mMaxProgresstime <= 0) continue;
|
||||
|
||||
if (!tTag.hasKey("eu")) continue;
|
||||
mEUt = tTag.getInteger("eu");
|
||||
|
||||
if(GT_Values.D1)System.out.println("Find avaiable recipe");
|
||||
findRecipe = true;
|
||||
break;
|
||||
}
|
||||
if (!findRecipe) return false;
|
||||
|
||||
if(GT_Values.D1)System.out.println("All checked start consuming inputs");
|
||||
for (int i = 0; i < 15; i++) {
|
||||
if (tStack[i] == null) continue;
|
||||
ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0);
|
||||
stackInSlot.stackSize -= tStack[i].stackSize;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (tFluids[i] == null) continue;
|
||||
mInputHatches.get(i).mFluid.amount -= tFluids[i].amount;
|
||||
if (mInputHatches.get(i).mFluid.amount <= 0) {
|
||||
mInputHatches.get(i).mFluid = null;
|
||||
}
|
||||
}
|
||||
if(GT_Values.D1)System.out.println("Check overclock");
|
||||
|
||||
byte tTier = (byte) Math.max(1, GT_Utility.getTier(getMaxInputVoltage()));
|
||||
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
|
||||
this.mEfficiencyIncrease = 10000;
|
||||
if (mEUt <= 16) {
|
||||
this.mEUt = (mEUt * (1 << tTier - 1) * (1 << tTier - 1));
|
||||
this.mMaxProgresstime = (mMaxProgresstime / (1 << tTier - 1));
|
||||
} else {
|
||||
while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
|
||||
this.mEUt *= 4;
|
||||
this.mMaxProgresstime /= 2;
|
||||
}
|
||||
}
|
||||
if (this.mEUt > 0) {
|
||||
this.mEUt = -this.mEUt;
|
||||
}
|
||||
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
|
||||
updateSlots();
|
||||
if(GT_Values.D1)System.out.println("Recipe sucessfull");
|
||||
return true;
|
||||
}
|
||||
|
||||
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
|
||||
super.startSoundLoop(aIndex, aX, aY, aZ);
|
||||
if (aIndex == 20) {
|
||||
GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(212), 10, 1.0F, aX, aY, aZ);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
|
||||
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
|
||||
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
|
||||
if (xDir != 0) {
|
||||
for (int r = 0; r <= 16; r++) {
|
||||
int i = r * xDir;
|
||||
|
||||
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, 0, i);
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(0, 0, i) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(0, 0, i) == 10)) {
|
||||
if(r == 1 && !addDataAccessToMachineList(tTileEntity, 16)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!aBaseMetaTileEntity.getBlockOffset(0, -1, i).getUnlocalizedName().equals("blockAlloyGlass")) {
|
||||
return false;
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, -2, i);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(0, -2, i) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(0, -2, i) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 1, i);
|
||||
if (!addEnergyInputToMachineList(tTileEntity, 16)) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir, 1, i) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(xDir, 1, i) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(xDir, 0, i) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(xDir, 0, i) == 9)) {
|
||||
return false;
|
||||
}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(xDir, -1, i) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(xDir, -1, i) == 5)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (!(aBaseMetaTileEntity.getBlockOffset(xDir * 2, 0, i) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(xDir * 2, 0, i) == 10)) {
|
||||
return false;
|
||||
}
|
||||
if (!aBaseMetaTileEntity.getBlockOffset(xDir * 2, -1, i).getUnlocalizedName().equals("blockAlloyGlass")) {
|
||||
return false;
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir * 2, -2, i);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir * 2, -2, i) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(xDir * 2, -2, i) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, -2, i);
|
||||
if (!addInputToMachineList(tTileEntity, 16) && addOutputToMachineList(tTileEntity, 16)) {
|
||||
return r > 0 && mEnergyHatches.size() > 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int r = 0; r <= 16; r++) {
|
||||
int i = r * -zDir;
|
||||
|
||||
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, 0, 0);
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, 0, 0) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0) == 10)) {
|
||||
if(r == 1 && !addDataAccessToMachineList(tTileEntity, 16)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!aBaseMetaTileEntity.getBlockOffset(i, -1, 0).getUnlocalizedName().equals("blockAlloyGlass")) {
|
||||
return false;
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, 0);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(i, -2, 0) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(i, -2, 0) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, 1, zDir);
|
||||
if (!addEnergyInputToMachineList(tTileEntity, 16)) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(i, 1, zDir) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(i, 1, zDir) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir) == 9)) {
|
||||
return false;
|
||||
}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, -1, zDir) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(i, -1, zDir) == 5)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (!(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir * 2) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir * 2) == 10)) {
|
||||
return false;
|
||||
}
|
||||
if (!aBaseMetaTileEntity.getBlockOffset(i, -1, zDir * 2).getUnlocalizedName().equals("blockAlloyGlass")) {
|
||||
return false;
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir * 2);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(i, -2, zDir * 2) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(i, -2, zDir * 2) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir);
|
||||
if (!addInputToMachineList(tTileEntity, 16) && addOutputToMachineList(tTileEntity, 16)) {
|
||||
return r > 0 && mEnergyHatches.size() > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
|
||||
*/
|
||||
private boolean isCorrectDataItem(ItemStack aStack, int state){
|
||||
if ((state & 1) != 0 && ItemList.Circuit_Integrated.isStackEqual(aStack, false, true)) return true;
|
||||
if ((state & 2) != 0 && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) return true;
|
||||
if ((state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
|
||||
*/
|
||||
public ArrayList<ItemStack> getDataItems(int state) {
|
||||
ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
|
||||
if (GT_Utility.isStackValid(mInventory[1]) && isCorrectDataItem(mInventory[1], state)) {
|
||||
rList.add(mInventory[1]);
|
||||
}
|
||||
for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) {
|
||||
if (isValidMetaTileEntity(tHatch)) {
|
||||
for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
|
||||
if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null
|
||||
&& isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state))
|
||||
rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
return rList;
|
||||
}
|
||||
|
||||
public boolean addDataAccessToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
|
||||
if (aTileEntity == null) return false;
|
||||
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
|
||||
if (aMetaTileEntity == null) return false;
|
||||
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess) {
|
||||
((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
|
||||
return mDataAccessHatches.add((GT_MetaTileEntity_Hatch_DataAccess) aMetaTileEntity);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getMaxEfficiency(ItemStack aStack) {
|
||||
return 10000;
|
||||
}
|
||||
|
||||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getDamageToComponent(ItemStack aStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
package gregtech.common.tileentities.machines.multi;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.gui.GT_GUIContainer_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_Hatch;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import gregtech.api.util.GT_Recipe;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class GT_MetaTileEntity_AssemblyLine
|
||||
extends GT_MetaTileEntity_MultiBlockBase {
|
||||
|
||||
//public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches = new ArrayList<GT_MetaTileEntity_Hatch_DataAccess>();
|
||||
|
||||
public GT_MetaTileEntity_AssemblyLine(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_AssemblyLine(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_AssemblyLine(this.mName);
|
||||
}
|
||||
|
||||
public String[] getDescription() {
|
||||
return new String[]{"Assembly Line",
|
||||
"Size: 3x(5-16)x4, variable length",
|
||||
"Bottom: Steel Machine Casing(or Maintenance or Input Hatch),",
|
||||
"Input Bus (Last Output Bus), Steel Machine Casing",
|
||||
"Middle: Reinforced Glass, Assembly Line, Reinforced Glass",
|
||||
"UpMiddle: Grate Machine Casing,",
|
||||
" Assembler Machine Casing,",
|
||||
" Grate Machine Casing (or Controller or Data Access Hatch)",
|
||||
"Top: Steel Casing(or Energy Hatch)",
|
||||
"Up to 16 repeating slices, last is Output Bus",
|
||||
"Optional 1x Data Access Hatch next to the Controller"};
|
||||
}
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
if (aSide == aFacing) {
|
||||
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE)};
|
||||
}
|
||||
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]};
|
||||
}
|
||||
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "AssemblyLine.png");
|
||||
}
|
||||
|
||||
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isCorrectMachinePart(ItemStack aStack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isFacingValid(byte aFacing) {
|
||||
return aFacing > 1;
|
||||
}
|
||||
|
||||
public boolean checkRecipe(ItemStack aStack) {
|
||||
if(GT_Values.D1)System.out.println("Start ALine recipe check");
|
||||
ArrayList<ItemStack> tDataStickList = getDataItems(2);
|
||||
if (tDataStickList.size() == 0) return false;
|
||||
if(GT_Values.D1)System.out.println("Stick accepted, " + tDataStickList.size() + " Data Sticks found");
|
||||
|
||||
ItemStack tStack[] = new ItemStack[15];
|
||||
FluidStack[] tFluids = new FluidStack[4];
|
||||
boolean recipeNA = false;
|
||||
boolean findRecipe = false;
|
||||
for (ItemStack tDataStick : tDataStickList){
|
||||
recipeNA = false;
|
||||
NBTTagCompound tTag = tDataStick.getTagCompound();
|
||||
if (tTag == null) continue;
|
||||
for (int i = 0; i < 15; i++) {
|
||||
if (!tTag.hasKey("" + i)) continue;
|
||||
if (mInputBusses.get(i) == null) {
|
||||
recipeNA = true;
|
||||
break;
|
||||
}
|
||||
tStack[i] = GT_Utility.loadItem(tTag, "" + i);
|
||||
if (tStack[i] == null) continue;
|
||||
if(GT_Values.D1)System.out.println("Item "+i+" : "+tStack[i].getUnlocalizedName());
|
||||
ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0);
|
||||
if (!GT_Utility.areStacksEqual(tStack[i], stackInSlot, true) || tStack[i].stackSize > stackInSlot.stackSize) {
|
||||
if(GT_Values.D1)System.out.println(i +" not accepted");
|
||||
recipeNA = true;
|
||||
break;
|
||||
}
|
||||
if(GT_Values.D1)System.out.println(i+" accepted");
|
||||
}
|
||||
if (recipeNA) continue;
|
||||
|
||||
if(GT_Values.D1)System.out.println("All Items done, start fluid check");
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (!tTag.hasKey("f" + i)) continue;
|
||||
tFluids[i] = GT_Utility.loadFluid(tTag, "f" + i);
|
||||
if (tFluids[i] == null) continue;
|
||||
if(GT_Values.D1)System.out.println("Fluid "+i+" "+tFluids[i].getUnlocalizedName());
|
||||
if (mInputHatches.get(i) == null) {
|
||||
recipeNA = true;
|
||||
break;
|
||||
}
|
||||
FluidStack fluidInHatch = mInputHatches.get(i).mFluid;
|
||||
if (fluidInHatch == null || !GT_Utility.areFluidsEqual(fluidInHatch, tFluids[i], true) || fluidInHatch.amount < tFluids[i].amount) {
|
||||
if(GT_Values.D1)System.out.println(i+" not accepted");
|
||||
recipeNA = true;
|
||||
break;
|
||||
}
|
||||
if(GT_Values.D1)System.out.println(i+" accepted");
|
||||
}
|
||||
if (recipeNA) continue;
|
||||
|
||||
if(GT_Values.D1)System.out.println("Input accepted, check other values");
|
||||
if (!tTag.hasKey("output")) continue;
|
||||
mOutputItems = new ItemStack[]{GT_Utility.loadItem(tTag, "output")};
|
||||
if (mOutputItems[0] == null || !GT_Utility.isStackValid(mOutputItems[0]))
|
||||
continue;
|
||||
|
||||
if (!tTag.hasKey("time")) continue;
|
||||
mMaxProgresstime = tTag.getInteger("time");
|
||||
if (mMaxProgresstime <= 0) continue;
|
||||
|
||||
if (!tTag.hasKey("eu")) continue;
|
||||
mEUt = tTag.getInteger("eu");
|
||||
|
||||
if(GT_Values.D1)System.out.println("Find avaiable recipe");
|
||||
findRecipe = true;
|
||||
break;
|
||||
}
|
||||
if (!findRecipe) return false;
|
||||
|
||||
if(GT_Values.D1)System.out.println("All checked start consuming inputs");
|
||||
for (int i = 0; i < 15; i++) {
|
||||
if (tStack[i] == null) continue;
|
||||
ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0);
|
||||
stackInSlot.stackSize -= tStack[i].stackSize;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (tFluids[i] == null) continue;
|
||||
mInputHatches.get(i).mFluid.amount -= tFluids[i].amount;
|
||||
if (mInputHatches.get(i).mFluid.amount <= 0) {
|
||||
mInputHatches.get(i).mFluid = null;
|
||||
}
|
||||
}
|
||||
if(GT_Values.D1)System.out.println("Check overclock");
|
||||
|
||||
byte tTier = (byte) Math.max(1, GT_Utility.getTier(getMaxInputVoltage()));
|
||||
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
|
||||
this.mEfficiencyIncrease = 10000;
|
||||
if (mEUt <= 16) {
|
||||
this.mEUt = (mEUt * (1 << tTier - 1) * (1 << tTier - 1));
|
||||
this.mMaxProgresstime = (mMaxProgresstime / (1 << tTier - 1));
|
||||
} else {
|
||||
while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
|
||||
this.mEUt *= 4;
|
||||
this.mMaxProgresstime /= 2;
|
||||
}
|
||||
}
|
||||
if (this.mEUt > 0) {
|
||||
this.mEUt = -this.mEUt;
|
||||
}
|
||||
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
|
||||
updateSlots();
|
||||
if(GT_Values.D1)System.out.println("Recipe sucessfull");
|
||||
return true;
|
||||
}
|
||||
|
||||
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
|
||||
super.startSoundLoop(aIndex, aX, aY, aZ);
|
||||
if (aIndex == 20) {
|
||||
GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(212), 10, 1.0F, aX, aY, aZ);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
|
||||
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
|
||||
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
|
||||
if (xDir != 0) {
|
||||
for (int r = 0; r <= 16; r++) {
|
||||
int i = r * xDir;
|
||||
|
||||
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, 0, i);
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(0, 0, i) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(0, 0, i) == 10)) {
|
||||
if(r == 1 && !addDataAccessToMachineList(tTileEntity, 16)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!aBaseMetaTileEntity.getBlockOffset(0, -1, i).getUnlocalizedName().equals("blockAlloyGlass")) {
|
||||
return false;
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, -2, i);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(0, -2, i) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(0, -2, i) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 1, i);
|
||||
if (!addEnergyInputToMachineList(tTileEntity, 16)) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir, 1, i) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(xDir, 1, i) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(xDir, 0, i) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(xDir, 0, i) == 9)) {
|
||||
return false;
|
||||
}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(xDir, -1, i) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(xDir, -1, i) == 5)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (!(aBaseMetaTileEntity.getBlockOffset(xDir * 2, 0, i) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(xDir * 2, 0, i) == 10)) {
|
||||
return false;
|
||||
}
|
||||
if (!aBaseMetaTileEntity.getBlockOffset(xDir * 2, -1, i).getUnlocalizedName().equals("blockAlloyGlass")) {
|
||||
return false;
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir * 2, -2, i);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir * 2, -2, i) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(xDir * 2, -2, i) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, -2, i);
|
||||
if (!addInputToMachineList(tTileEntity, 16) && addOutputToMachineList(tTileEntity, 16)) {
|
||||
return r > 0 && mEnergyHatches.size() > 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int r = 0; r <= 16; r++) {
|
||||
int i = r * -zDir;
|
||||
|
||||
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, 0, 0);
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, 0, 0) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0) == 10)) {
|
||||
if(r == 1 && !addDataAccessToMachineList(tTileEntity, 16)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!aBaseMetaTileEntity.getBlockOffset(i, -1, 0).getUnlocalizedName().equals("blockAlloyGlass")) {
|
||||
return false;
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, 0);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(i, -2, 0) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(i, -2, 0) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, 1, zDir);
|
||||
if (!addEnergyInputToMachineList(tTileEntity, 16)) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(i, 1, zDir) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(i, 1, zDir) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir) == 9)) {
|
||||
return false;
|
||||
}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, -1, zDir) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(i, -1, zDir) == 5)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (!(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir * 2) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir * 2) == 10)) {
|
||||
return false;
|
||||
}
|
||||
if (!aBaseMetaTileEntity.getBlockOffset(i, -1, zDir * 2).getUnlocalizedName().equals("blockAlloyGlass")) {
|
||||
return false;
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir * 2);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(i, -2, zDir * 2) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(i, -2, zDir * 2) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir);
|
||||
if (!addInputToMachineList(tTileEntity, 16) && addOutputToMachineList(tTileEntity, 16)) {
|
||||
return r > 0 && mEnergyHatches.size() > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
|
||||
*/
|
||||
private boolean isCorrectDataItem(ItemStack aStack, int state){
|
||||
if ((state & 1) != 0 && ItemList.Circuit_Integrated.isStackEqual(aStack, true, true)) return true;
|
||||
if ((state & 2) != 0 && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) return true;
|
||||
if ((state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
|
||||
*/
|
||||
public ArrayList<ItemStack> getDataItems(int state) {
|
||||
ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
|
||||
if (GT_Utility.isStackValid(mInventory[1]) && isCorrectDataItem(mInventory[1], state)) {
|
||||
rList.add(mInventory[1]);
|
||||
}
|
||||
for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) {
|
||||
if (isValidMetaTileEntity(tHatch)) {
|
||||
for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
|
||||
if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null
|
||||
&& isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state))
|
||||
rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
return rList;
|
||||
}
|
||||
|
||||
public boolean addDataAccessToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
|
||||
if (aTileEntity == null) return false;
|
||||
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
|
||||
if (aMetaTileEntity == null) return false;
|
||||
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess) {
|
||||
((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
|
||||
return mDataAccessHatches.add((GT_MetaTileEntity_Hatch_DataAccess) aMetaTileEntity);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getMaxEfficiency(ItemStack aStack) {
|
||||
return 10000;
|
||||
}
|
||||
|
||||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getDamageToComponent(ItemStack aStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
package gregtech.common.tileentities.machines.multi;
|
||||
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
|
||||
public class GT_MetaTileEntity_ConcreteBackfiller1 extends GT_MetaTileEntity_ConcreteBackfillerBase {
|
||||
public GT_MetaTileEntity_ConcreteBackfiller1(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_ConcreteBackfiller1(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
return getDescriptionInternal("");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_ConcreteBackfiller1(mName);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemList getCasingBlockItem() {
|
||||
return ItemList.Casing_SolidSteel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Materials getFrameMaterial() {
|
||||
return Materials.Steel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCasingTextureIndex() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getRadius() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMinTier() {
|
||||
return 2;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package gregtech.common.tileentities.machines.multi;
|
||||
|
||||
import static gregtech.api.enums.GT_Values.VN;
|
||||
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
|
||||
public class GT_MetaTileEntity_ConcreteBackfiller2 extends GT_MetaTileEntity_ConcreteBackfillerBase {
|
||||
public GT_MetaTileEntity_ConcreteBackfiller2(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_ConcreteBackfiller2(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
String casings = getCasingBlockItem().get(0).getDisplayName();
|
||||
return new String[]{
|
||||
"Controller Block for the Advanced Concrete Backfiller",
|
||||
"Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)",
|
||||
"3x1x3 Base of " + casings,
|
||||
"1x3x1 " + casings + " pillar (Center of base)",
|
||||
"1x3x1 " + getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)",
|
||||
"1x Input Hatch (One of base casings)",
|
||||
"1x Maintenance Hatch (One of base casings)",
|
||||
"1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)",
|
||||
"Put Programmed Circuits into Data Access to config radius",
|
||||
"Radius = (total config value)x2 blocks",
|
||||
"Default 64, Maximum 128",};
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_ConcreteBackfiller2(mName);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemList getCasingBlockItem() {
|
||||
return ItemList.Casing_StableTitanium;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Materials getFrameMaterial() {
|
||||
return Materials.Titanium;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCasingTextureIndex() {
|
||||
return 50;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getRadius() {
|
||||
int tConfig = getTotalConfigValue() * 2;
|
||||
return tConfig >= 128 ? 128 : tConfig <= 0 ? 64 : tConfig;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMinTier() {
|
||||
return 4;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
package gregtech.common.tileentities.machines.multi;
|
||||
|
||||
import static gregtech.api.enums.GT_Values.V;
|
||||
import static gregtech.api.enums.GT_Values.VN;
|
||||
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTileEntity_DrillerBase {
|
||||
|
||||
private int mLastXOff = 0, mLastZOff = 0;
|
||||
|
||||
public GT_MetaTileEntity_ConcreteBackfillerBase(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_ConcreteBackfillerBase(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
||||
protected String[] getDescriptionInternal(String tierSuffix) {
|
||||
String casings = getCasingBlockItem().get(0).getDisplayName();
|
||||
return new String[]{
|
||||
"Controller Block for the Concrete Backfiller " + (tierSuffix != null ? tierSuffix : ""),
|
||||
"Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)",
|
||||
"3x1x3 Base of " + casings,
|
||||
"1x3x1 " + casings + " pillar (Center of base)",
|
||||
"1x3x1 " + getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)",
|
||||
"1x Input Hatch (One of base casings)",
|
||||
"1x Maintenance Hatch (One of base casings)",
|
||||
"1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)",
|
||||
"Radius is " + getRadius() + " blocks"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DrillingRig.png");
|
||||
}
|
||||
|
||||
protected abstract int getRadius();
|
||||
|
||||
@Override
|
||||
protected boolean checkHatches() {
|
||||
return !mMaintenanceHatches.isEmpty() && !mInputHatches.isEmpty() && !mEnergyHatches.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setElectricityStats() {
|
||||
this.mEfficiency = getCurrentEfficiency(null);
|
||||
this.mEfficiencyIncrease = 10000;
|
||||
//T1 = 48; T2 = 192; T3 = 768; T4 = 3072
|
||||
this.mEUt = 12 * (1 << (getMinTier() << 1));
|
||||
this.mMaxProgresstime = (isPickingPipes ? 240: 80) / (1 << getMinTier());
|
||||
|
||||
long voltage = getMaxInputVoltage();
|
||||
long overclockEu = V[Math.max(1, GT_Utility.getTier(voltage)) - 1];
|
||||
while (this.mEUt <= overclockEu) {
|
||||
this.mEUt *= 4;
|
||||
this.mMaxProgresstime /= 2;
|
||||
}
|
||||
|
||||
this.mEUt = -this.mEUt;
|
||||
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) {
|
||||
if (isRefillableBlock(xPipe, yHead - 1, zPipe))
|
||||
return tryRefillBlock(xPipe, yHead - 1, zPipe);
|
||||
int radius = getRadius();
|
||||
if (mLastXOff == 0 && mLastZOff == 0) {
|
||||
mLastXOff = - radius;
|
||||
mLastZOff = - radius;
|
||||
}
|
||||
if (yHead != yDrill) {
|
||||
for (int i = mLastXOff; i <= radius; i++) {
|
||||
for (int j = (i == mLastXOff ? mLastZOff : - radius); j <= radius; j++) {
|
||||
if (isRefillableBlock(xPipe + i, yHead, zPipe + j)){
|
||||
mLastXOff = i;
|
||||
mLastZOff = j;
|
||||
return tryRefillBlock(xPipe + i, yHead, zPipe + j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tryPickPipe()) {
|
||||
mLastXOff = 0;
|
||||
mLastZOff = 0;
|
||||
return true;
|
||||
} else {
|
||||
isPickingPipes = false;
|
||||
stopMachine();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isRefillableBlock(int aX, int aY, int aZ){
|
||||
if (getBaseMetaTileEntity().getTileEntity(aX, aY, aZ) != null) return false;
|
||||
if (getBaseMetaTileEntity().getAir(aX, aY, aZ) || !getBaseMetaTileEntity().getBlock(aX, aY, aZ).getMaterial().isSolid())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean tryRefillBlock(int aX, int aY, int aZ) {
|
||||
if (!tryConsumeFluid())
|
||||
return false;
|
||||
getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, GregTech_API.sBlockConcretes, 8, 3);
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean tryConsumeFluid() {
|
||||
if (!depleteInput(Materials.Concrete.getMolten(144L))){
|
||||
mMaxProgresstime = 0;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,357 @@
|
|||
package gregtech.common.tileentities.machines.multi;
|
||||
|
||||
import static gregtech.api.enums.GT_Values.W;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.interfaces.ITexture;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import gregtech.api.util.GT_ModHandler;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_MultiBlockBase {
|
||||
private static final ItemStack miningPipe = GT_ModHandler.getIC2Item("miningPipe", 0);
|
||||
private static final ItemStack miningPipeTip = GT_ModHandler.getIC2Item("miningPipeTip", 0);
|
||||
private static final Block miningPipeBlock = GT_Utility.getBlockFromStack(miningPipe);
|
||||
private static final Block miningPipeTipBlock = GT_Utility.getBlockFromStack(miningPipeTip);
|
||||
|
||||
private Block casingBlock;
|
||||
private int casingMeta;
|
||||
private int frameMeta;
|
||||
private int casingTextureIndex;
|
||||
|
||||
private ForgeDirection back;
|
||||
|
||||
private int xDrill, yDrill, zDrill, xPipe, zPipe, yHead;
|
||||
protected boolean isPickingPipes;
|
||||
|
||||
public GT_MetaTileEntity_DrillerBase(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
initFields();
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_DrillerBase(String aName) {
|
||||
super(aName);
|
||||
initFields();
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
casingBlock = getCasingBlockItem().getBlock();
|
||||
casingMeta = getCasingBlockItem().get(0).getItemDamage();
|
||||
int frameId = 4096 + getFrameMaterial().mMetaItemSubID;
|
||||
frameMeta = GregTech_API.METATILEENTITIES[frameId] != null ? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType() : W;
|
||||
casingTextureIndex = getCasingTextureIndex();
|
||||
isPickingPipes = false;
|
||||
}
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
if (aSide == aFacing)
|
||||
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[casingTextureIndex],new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL)};
|
||||
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[casingTextureIndex]};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNBTData(NBTTagCompound aNBT) {
|
||||
super.saveNBTData(aNBT);
|
||||
aNBT.setBoolean("isPickingPipe", isPickingPipes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadNBTData(NBTTagCompound aNBT) {
|
||||
super.loadNBTData(aNBT);
|
||||
isPickingPipes = aNBT.getBoolean("isPickingPipes");
|
||||
}
|
||||
|
||||
protected boolean tryPickPipe() {
|
||||
if (yHead == yDrill) return false;
|
||||
if (tryOutputPipe()){
|
||||
if (checkBlockAndMeta(xPipe, yHead + 1, zPipe, miningPipeBlock, W))
|
||||
getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead + 1, zPipe, miningPipeTipBlock);
|
||||
getBaseMetaTileEntity().getWorld().setBlockToAir(xPipe, yHead, zPipe);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean tryLowerPipe() {
|
||||
if (!isHasMiningPipes()) return false;
|
||||
|
||||
if (yHead <= 0) return false;
|
||||
if (!canLowerPipe()) return false;
|
||||
|
||||
getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead - 1, zPipe, miningPipeTipBlock);
|
||||
if (yHead != yDrill) getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeBlock);
|
||||
|
||||
getBaseMetaTileEntity().decrStackSize(1, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void putMiningPipesFromInputsInController() {
|
||||
int maxPipes = miningPipe.getMaxStackSize();
|
||||
if (isHasMiningPipes(maxPipes)) return;
|
||||
|
||||
ItemStack pipes = getStackInSlot(1);
|
||||
for (ItemStack storedItem : getStoredInputs()) {
|
||||
if (!storedItem.isItemEqual(miningPipe)) continue;
|
||||
|
||||
if (pipes == null) {
|
||||
setInventorySlotContents(1, GT_Utility.copy(miningPipe));
|
||||
pipes = getStackInSlot(1);
|
||||
}
|
||||
|
||||
if (pipes.stackSize == maxPipes) break;
|
||||
|
||||
int needPipes = maxPipes - pipes.stackSize;
|
||||
int transferPipes = storedItem.stackSize < needPipes ? storedItem.stackSize : needPipes;
|
||||
|
||||
pipes.stackSize += transferPipes;
|
||||
storedItem.stackSize -= transferPipes;
|
||||
}
|
||||
updateSlots();
|
||||
}
|
||||
|
||||
private boolean tryOutputPipe(){
|
||||
if (!getBaseMetaTileEntity().addStackToSlot(1, GT_Utility.copyAmount(1, miningPipe)))
|
||||
mOutputItems = new ItemStack[] {GT_Utility.copyAmount(1, miningPipe)};
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean canLowerPipe(){
|
||||
return yHead > 0 && !checkBlockAndMeta(xPipe, yHead - 1, zPipe, Blocks.bedrock, W);
|
||||
}
|
||||
|
||||
private boolean isHasMiningPipes() {
|
||||
return isHasMiningPipes(1);
|
||||
}
|
||||
|
||||
private boolean isHasMiningPipes(int minCount) {
|
||||
ItemStack pipe = getStackInSlot(1);
|
||||
return pipe != null && pipe.stackSize > minCount - 1 && pipe.isItemEqual(miningPipe);
|
||||
}
|
||||
|
||||
private boolean isEnergyEnough() {
|
||||
long requiredEnergy = 512 + getMaxInputVoltage() * 4;
|
||||
for (GT_MetaTileEntity_Hatch_Energy energyHatch : mEnergyHatches) {
|
||||
requiredEnergy -= energyHatch.getEUVar();
|
||||
if (requiredEnergy <= 0) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean workingDownward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead){
|
||||
if(!tryLowerPipe())
|
||||
if(waitForPipes()) return false;
|
||||
isPickingPipes = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) {
|
||||
if (tryPickPipe()) {
|
||||
return true;
|
||||
} else {
|
||||
isPickingPipes = false;
|
||||
stopMachine();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRecipe(ItemStack aStack) {
|
||||
//Public pipe actions
|
||||
setElectricityStats();
|
||||
int oldYHead = yHead;
|
||||
if (!checkPipesAndSetYHead() || !isEnergyEnough()) {
|
||||
stopMachine();
|
||||
return false;
|
||||
}
|
||||
putMiningPipesFromInputsInController();
|
||||
if (!isPickingPipes)
|
||||
return workingDownward(aStack, xDrill, yDrill, zDrill, xPipe, zPipe, yHead, oldYHead);
|
||||
else
|
||||
return workingUpward(aStack, xDrill, yDrill, zDrill, xPipe, zPipe, yHead, oldYHead);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
|
||||
updateCoordinates();
|
||||
//check base layer
|
||||
for (int xOff = -1 + back.offsetX; xOff <= 1 + back.offsetX; xOff++) {
|
||||
for (int zOff = -1 + back.offsetZ; zOff <= 1 + back.offsetZ; zOff++) {
|
||||
if (xOff == 0 && zOff == 0) continue;
|
||||
|
||||
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xOff, 0, zOff);
|
||||
if (!checkCasingBlock(xOff, 0, zOff)
|
||||
&& !addMaintenanceToMachineList(tTileEntity, casingTextureIndex)
|
||||
&& !addInputToMachineList(tTileEntity, casingTextureIndex)
|
||||
&& !addOutputToMachineList(tTileEntity, casingTextureIndex)
|
||||
&& !addEnergyInputToMachineList(tTileEntity, casingTextureIndex)
|
||||
&& !addDataAccessToMachineList(tTileEntity, casingTextureIndex))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(!checkHatches()) return false;
|
||||
if (GT_Utility.getTier(getMaxInputVoltage()) < getMinTier()) return false;
|
||||
//check tower
|
||||
for (int yOff = 1; yOff < 4; yOff++) {
|
||||
if (!checkCasingBlock(back.offsetX, yOff, back.offsetZ)
|
||||
|| !checkFrameBlock(back.offsetX + 1, yOff, back.offsetZ)
|
||||
|| !checkFrameBlock(back.offsetX - 1, yOff, back.offsetZ)
|
||||
|| !checkFrameBlock(back.offsetX, yOff, back.offsetZ + 1)
|
||||
|| !checkFrameBlock(back.offsetX, yOff, back.offsetZ - 1)
|
||||
|| !checkFrameBlock(back.offsetX, yOff + 3, back.offsetZ))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void updateCoordinates() {
|
||||
xDrill = getBaseMetaTileEntity().getXCoord();
|
||||
yDrill = getBaseMetaTileEntity().getYCoord();
|
||||
zDrill = getBaseMetaTileEntity().getZCoord();
|
||||
back = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing());
|
||||
xPipe = xDrill + back.offsetX;
|
||||
zPipe = zDrill + back.offsetZ;
|
||||
}
|
||||
|
||||
private boolean checkPipesAndSetYHead() {
|
||||
yHead = yDrill - 1;
|
||||
while (checkBlockAndMeta(xPipe, yHead, zPipe, miningPipeBlock, W)) yHead--; //skip pipes
|
||||
//is pipe tip OR is controller layer
|
||||
if (checkBlockAndMeta(xPipe, yHead, zPipe, miningPipeTipBlock, W) || ++yHead == yDrill) return true;
|
||||
//pipe column is broken - try fix
|
||||
getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeTipBlock);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean checkCasingBlock(int xOff, int yOff, int zOff) {
|
||||
return checkBlockAndMetaOffset(xOff, yOff, zOff, casingBlock, casingMeta);
|
||||
}
|
||||
//meta of frame is getTileEntityBaseType; frame should be checked using its drops (possible a high weight operation)
|
||||
protected boolean checkFrameBlock(int xOff, int yOff, int zOff) {
|
||||
return checkBlockAndMetaOffset(xOff, yOff, zOff, GregTech_API.sBlockMachines, frameMeta);
|
||||
}
|
||||
|
||||
protected boolean checkBlockAndMetaOffset(int xOff, int yOff, int zOff, Block block, int meta) {
|
||||
return checkBlockAndMeta(xDrill + xOff, yDrill + yOff, zDrill + zOff, block, meta);
|
||||
}
|
||||
|
||||
private boolean checkBlockAndMeta(int x, int y, int z, Block block, int meta) {
|
||||
return (meta == W || getBaseMetaTileEntity().getMetaID(x, y, z) == meta)
|
||||
&& getBaseMetaTileEntity().getBlock(x, y, z) == block;
|
||||
}
|
||||
|
||||
protected boolean waitForPipes(){
|
||||
if (canLowerPipe()) {
|
||||
mMaxProgresstime = 0;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCorrectMachinePart(ItemStack aStack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEfficiency(ItemStack aStack) {
|
||||
return 10000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDamageToComponent(ItemStack aStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity);
|
||||
|
||||
protected abstract ItemList getCasingBlockItem();
|
||||
|
||||
protected abstract Materials getFrameMaterial();
|
||||
|
||||
protected abstract int getCasingTextureIndex();
|
||||
|
||||
protected abstract int getMinTier();
|
||||
|
||||
protected abstract boolean checkHatches();
|
||||
|
||||
protected abstract void setElectricityStats();
|
||||
|
||||
public int getTotalConfigValue(){
|
||||
int config = 0;
|
||||
ArrayList<ItemStack> tCircuitList = getDataItems(1);
|
||||
for (ItemStack tCircuit : tCircuitList)
|
||||
config += tCircuit.getItemDamage();
|
||||
return config;
|
||||
}
|
||||
|
||||
public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches = new ArrayList<GT_MetaTileEntity_Hatch_DataAccess>();
|
||||
|
||||
/**
|
||||
* @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
|
||||
*/
|
||||
private boolean isCorrectDataItem(ItemStack aStack, int state){
|
||||
if ((state & 1) != 0 && ItemList.Circuit_Integrated.isStackEqual(aStack, true, true)) return true;
|
||||
if ((state & 2) != 0 && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) return true;
|
||||
if ((state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
|
||||
*/
|
||||
public ArrayList<ItemStack> getDataItems(int state) {
|
||||
ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
|
||||
if (GT_Utility.isStackValid(mInventory[1]) && isCorrectDataItem(mInventory[1], state)) {
|
||||
rList.add(mInventory[1]);
|
||||
}
|
||||
for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) {
|
||||
if (isValidMetaTileEntity(tHatch)) {
|
||||
for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
|
||||
if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null
|
||||
&& isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state))
|
||||
rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
return rList;
|
||||
}
|
||||
|
||||
public boolean addDataAccessToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
|
||||
if (aTileEntity == null) return false;
|
||||
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
|
||||
if (aMetaTileEntity == null) return false;
|
||||
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess) {
|
||||
((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
|
||||
return mDataAccessHatches.add((GT_MetaTileEntity_Hatch_DataAccess) aMetaTileEntity);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,231 +0,0 @@
|
|||
package gregtech.common.tileentities.machines.multi;
|
||||
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.gui.GT_GUIContainer_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_MultiBlockBase;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import gregtech.api.util.GT_ModHandler;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static gregtech.common.GT_UndergroundOil.undergroundOil;
|
||||
|
||||
public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase {
|
||||
|
||||
private boolean completedCycle = false;
|
||||
|
||||
public GT_MetaTileEntity_OilDrill(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_OilDrill(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
||||
public String[] getDescription() {
|
||||
return new String[]{
|
||||
"Controller Block for the Oil Drilling Rig",
|
||||
"Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)",
|
||||
"3x1x3 Base of Solid Steel Machine Casings",
|
||||
"1x3x1 Solid Steel Machine Casing pillar (Center of base)",
|
||||
"1x3x1 Steel Frame Boxes (Each Steel pillar side and on top)",
|
||||
"1x Output Hatch (One of base casings)",
|
||||
"1x Maintenance Hatch (One of base casings)",
|
||||
"1x Energy Hatch (One of base casings)"};
|
||||
}
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
if (aSide == aFacing) {
|
||||
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL)};
|
||||
}
|
||||
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]};
|
||||
}
|
||||
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DrillingRig.png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRecipe(ItemStack aStack) {
|
||||
if (mInventory[1] == null || (mInventory[1].isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L)) && mInventory[1].stackSize < mInventory[1].getMaxStackSize())) {
|
||||
ArrayList<ItemStack> tItems = getStoredInputs();
|
||||
for (ItemStack tStack : tItems) {
|
||||
if (tStack.isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
|
||||
if (tStack.stackSize < 2) {
|
||||
tStack = null;
|
||||
} else {
|
||||
tStack.stackSize--;
|
||||
}
|
||||
|
||||
}
|
||||
if (mInventory[1] == null) {
|
||||
mInventory[1] = GT_ModHandler.getIC2Item("miningPipe", 1L);
|
||||
} else {
|
||||
mInventory[1].stackSize++;
|
||||
}
|
||||
}
|
||||
}
|
||||
FluidStack tFluid = undergroundOil(getBaseMetaTileEntity(),.5F+(getInputTier()*.25F));
|
||||
if (tFluid == null) {
|
||||
stopMachine();
|
||||
return false;
|
||||
}
|
||||
if (getYOfPumpHead() > 0 && getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX, getYOfPumpHead() - 1 - getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock) {
|
||||
if (completedCycle) {
|
||||
moveOneDown();
|
||||
}
|
||||
tFluid = null;
|
||||
if (mEnergyHatches.size() > 0 && mEnergyHatches.get(0).getEUVar() > (512 + getMaxInputVoltage() * 4))
|
||||
completedCycle = true;
|
||||
}
|
||||
long tVoltage = getMaxInputVoltage();
|
||||
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
|
||||
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
|
||||
this.mEfficiencyIncrease = 10000;
|
||||
int tEU = 24;
|
||||
int tDuration = 160;
|
||||
if (tEU <= 16) {
|
||||
this.mEUt = (tEU * (1 << tTier - 1) * (1 << tTier - 1));
|
||||
this.mMaxProgresstime = (tDuration / (1 << tTier - 1));
|
||||
} else {
|
||||
this.mEUt = tEU;
|
||||
this.mMaxProgresstime = tDuration;
|
||||
while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
|
||||
this.mEUt *= 4;
|
||||
this.mMaxProgresstime /= 2;
|
||||
}
|
||||
}
|
||||
if (this.mEUt > 0) {
|
||||
this.mEUt = (-this.mEUt);
|
||||
}
|
||||
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
|
||||
this.mOutputFluids = new FluidStack[]{tFluid};
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean moveOneDown() {
|
||||
if ((this.mInventory[1] == null) || (this.mInventory[1].stackSize < 1)
|
||||
|| (!GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L)))) {
|
||||
return false;
|
||||
}
|
||||
int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
|
||||
int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
|
||||
int yHead = getYOfPumpHead();
|
||||
if (yHead < 1) {
|
||||
return false;
|
||||
}
|
||||
if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir) == Blocks.bedrock) {
|
||||
return false;
|
||||
}
|
||||
if (!(getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))))) {
|
||||
return false;
|
||||
}
|
||||
if (yHead != getBaseMetaTileEntity().getYCoord()) {
|
||||
getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L)));
|
||||
}
|
||||
getBaseMetaTileEntity().decrStackSize(1, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
private int getYOfPumpHead() {
|
||||
int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
|
||||
int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
|
||||
int y = getBaseMetaTileEntity().getYCoord() - 1;
|
||||
while (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) == GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
|
||||
y--;
|
||||
}
|
||||
if (y == getBaseMetaTileEntity().getYCoord() - 1) {
|
||||
if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))) {
|
||||
return y + 1;
|
||||
}
|
||||
} else if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility
|
||||
.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)) && this.mInventory[1] != null && this.mInventory[1].stackSize > 0 && GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L))) {
|
||||
getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir,
|
||||
GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)));
|
||||
getBaseMetaTileEntity().decrStackSize(0, 1);
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
|
||||
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
|
||||
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
|
||||
for (int i = -1; i < 2; i++) {
|
||||
for (int j = -1; j < 2; j++) {
|
||||
if ((xDir + i != 0) || (zDir + j != 0)) {
|
||||
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16)) && (!addOutputToMachineList(tTileEntity, 16)) && (!addEnergyInputToMachineList(tTileEntity, 16))) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int y = 1; y < 4; y++) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) != GregTech_API.sBlockMachines) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir - 1, y, zDir) != GregTech_API.sBlockMachines) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir + 1) != GregTech_API.sBlockMachines) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir - 1) != GregTech_API.sBlockMachines) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir, y + 3, zDir) != GregTech_API.sBlockMachines) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCorrectMachinePart(ItemStack aStack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEfficiency(ItemStack aStack) {
|
||||
return 10000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDamageToComponent(ItemStack aStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_OilDrill(this.mName);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package gregtech.common.tileentities.machines.multi;
|
||||
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
|
||||
public class GT_MetaTileEntity_OilDrill1 extends GT_MetaTileEntity_OilDrillBase {
|
||||
public GT_MetaTileEntity_OilDrill1(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_OilDrill1(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
return getDescriptionInternal("I");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_OilDrill1(mName);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemList getCasingBlockItem() {
|
||||
return ItemList.Casing_SolidSteel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Materials getFrameMaterial() {
|
||||
return Materials.Steel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCasingTextureIndex() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getRangeInChunks() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMinTier() {
|
||||
return 2;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package gregtech.common.tileentities.machines.multi;
|
||||
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
|
||||
public class GT_MetaTileEntity_OilDrill2 extends GT_MetaTileEntity_OilDrillBase {
|
||||
public GT_MetaTileEntity_OilDrill2(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_OilDrill2(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
return getDescriptionInternal("II");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_OilDrill2(mName);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemList getCasingBlockItem() {
|
||||
return ItemList.Casing_StableTitanium;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Materials getFrameMaterial() {
|
||||
return Materials.Titanium;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCasingTextureIndex() {
|
||||
return 50;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getRangeInChunks() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMinTier() {
|
||||
return 3;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package gregtech.common.tileentities.machines.multi;
|
||||
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
|
||||
public class GT_MetaTileEntity_OilDrill3 extends GT_MetaTileEntity_OilDrillBase {
|
||||
public GT_MetaTileEntity_OilDrill3(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_OilDrill3(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
return getDescriptionInternal("III");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_OilDrill3(mName);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemList getCasingBlockItem() {
|
||||
return ItemList.Casing_RobustTungstenSteel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Materials getFrameMaterial() {
|
||||
return Materials.TungstenSteel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCasingTextureIndex() {
|
||||
return 48;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getRangeInChunks() {
|
||||
return 6;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMinTier() {
|
||||
return 4;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,152 @@
|
|||
package gregtech.common.tileentities.machines.multi;
|
||||
|
||||
import static gregtech.api.enums.GT_Values.V;
|
||||
import static gregtech.api.enums.GT_Values.VN;
|
||||
import static gregtech.common.GT_UndergroundOil.undergroundOil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_DrillerBase {
|
||||
|
||||
private boolean completedCycle = false;
|
||||
|
||||
private ArrayList<Chunk> mOilFieldChunks = new ArrayList<Chunk>();
|
||||
private int mOilId = 0;
|
||||
|
||||
public GT_MetaTileEntity_OilDrillBase(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_OilDrillBase(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNBTData(NBTTagCompound aNBT) {
|
||||
super.saveNBTData(aNBT);
|
||||
aNBT.setInteger("mOilId", mOilId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadNBTData(NBTTagCompound aNBT) {
|
||||
super.loadNBTData(aNBT);
|
||||
mOilId = aNBT.getInteger("mOilId");
|
||||
}
|
||||
|
||||
protected String[] getDescriptionInternal(String tierSuffix) {
|
||||
String casings = getCasingBlockItem().get(0).getDisplayName();
|
||||
return new String[]{
|
||||
"Controller Block for the Oil Drilling Rig " + (tierSuffix != null ? tierSuffix : ""),
|
||||
"Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)",
|
||||
"3x1x3 Base of " + casings,
|
||||
"1x3x1 " + casings + " pillar (Center of base)",
|
||||
"1x3x1 " + getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)",
|
||||
"1x Output Hatch (One of base casings)",
|
||||
"1x Maintenance Hatch (One of base casings)",
|
||||
"1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)",
|
||||
"Working on " + getRangeInChunks() + " * " + getRangeInChunks() + " chunks",
|
||||
"Use Programmed Circuits to ignore near exhausted oil field"};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DrillingRig.png");
|
||||
}
|
||||
|
||||
protected int getRangeInChunks(){
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkHatches() {
|
||||
return !mMaintenanceHatches.isEmpty() && !mOutputHatches.isEmpty() && !mEnergyHatches.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setElectricityStats() {
|
||||
this.mEfficiency = getCurrentEfficiency(null);
|
||||
this.mEfficiencyIncrease = 10000;
|
||||
//T1 = 24; T2 = 96; T3 = 384
|
||||
this.mEUt = 6 * (1 << (getMinTier() << 1));
|
||||
//160 per chunk in MV
|
||||
this.mMaxProgresstime = (isPickingPipes ? 80 : 640 * getRangeInChunks() * getRangeInChunks()) / (1 << getMinTier());
|
||||
|
||||
long voltage = getMaxInputVoltage();
|
||||
long overclockEu = V[Math.max(1, GT_Utility.getTier(voltage)) - 1];
|
||||
while (this.mEUt <= overclockEu) {
|
||||
this.mEUt *= 4;
|
||||
this.mMaxProgresstime /= 2;
|
||||
}
|
||||
|
||||
this.mEUt = -this.mEUt;
|
||||
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean workingDownward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead){
|
||||
if (!tryLowerPipe()){
|
||||
if (waitForPipes()) return false;
|
||||
if (tryFillChunkList()) {
|
||||
float speed = .5F+(GT_Utility.getTier(getMaxInputVoltage()) - getMinTier()) *.25F;
|
||||
FluidStack tFluid = pumpOil(speed);
|
||||
if (tFluid != null && tFluid.amount > getTotalConfigValue()){
|
||||
this.mOutputFluids = new FluidStack[]{tFluid};
|
||||
return true;
|
||||
}
|
||||
}
|
||||
isPickingPipes = true;
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean tryFillChunkList(){
|
||||
FluidStack tFluid, tOil;
|
||||
if (mOilId <= 0) {
|
||||
tFluid = undergroundOil(getBaseMetaTileEntity(), -1);
|
||||
if (tFluid == null) return false;
|
||||
mOilId = tFluid.getFluidID();
|
||||
}
|
||||
tOil = new FluidStack(FluidRegistry.getFluid(mOilId), 0);
|
||||
|
||||
if (mOilFieldChunks.isEmpty()) {
|
||||
Chunk tChunk = getBaseMetaTileEntity().getWorld().getChunkFromBlockCoords(getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord());
|
||||
int range = getRangeInChunks();
|
||||
int xChunk = (tChunk.xPosition / range) * range, zChunk = (tChunk.zPosition / range) * range;
|
||||
int xDir = tChunk.xPosition < 0 ? -1 : 1, zDir = tChunk.zPosition < 0 ? -1 : 1;
|
||||
for (int i = 0; i < range; i++) {
|
||||
for (int j = 0; j < range; j++) {
|
||||
tChunk = getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords(xChunk + i * xDir, zChunk + j * zDir);
|
||||
tFluid = undergroundOil(tChunk, -1);
|
||||
if (tOil.isFluidEqual(tFluid))
|
||||
mOilFieldChunks.add(tChunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mOilFieldChunks.isEmpty()) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private FluidStack pumpOil(float speed){
|
||||
if (mOilId <= 0) return null;
|
||||
FluidStack tFluid, tOil;
|
||||
tOil = new FluidStack(FluidRegistry.getFluid(mOilId), 0);
|
||||
for (Chunk tChunk : mOilFieldChunks) {
|
||||
tFluid = undergroundOil(getBaseMetaTileEntity(),speed);
|
||||
if (tFluid == null) mOilFieldChunks.remove(tChunk);
|
||||
if (tOil.isFluidEqual(tFluid)) tOil.amount += tFluid.amount;
|
||||
}
|
||||
return tOil.amount == 0 ? null : tOil;
|
||||
}
|
||||
}
|
|
@ -414,4 +414,4 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
|
|||
"1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)",
|
||||
"Radius is " + (getRadiusInChunks() << 4) + " blocks"};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package gregtech.loaders.postload;
|
||||
|
||||
import appeng.items.parts.PartType;
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.util.GT_Log;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public class GT_AE2EnergyTunnelLoader implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
if (GT_Mod.gregtechproxy.mAE2Integration) {
|
||||
try {
|
||||
load();
|
||||
} catch (Throwable e) {
|
||||
GT_Log.out.println("Failed to load P2P tunnel for GT electricity");
|
||||
e.printStackTrace(GT_Log.out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void load() throws Throwable {
|
||||
Field f = PartType.class.getDeclaredField("myPart");
|
||||
f.setAccessible(true);
|
||||
f.set(PartType.P2PTunnelEU, PartP2PGTPower.class);
|
||||
}
|
||||
}
|
||||
|
84
src/main/java/gregtech/loaders/postload/PartP2PGTPower.java
Normal file
84
src/main/java/gregtech/loaders/postload/PartP2PGTPower.java
Normal file
|
@ -0,0 +1,84 @@
|
|||
package gregtech.loaders.postload;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.ticking.IGridTickable;
|
||||
import appeng.api.networking.ticking.TickRateModulation;
|
||||
import appeng.api.networking.ticking.TickingRequest;
|
||||
import appeng.parts.p2p.PartP2PIC2Power;
|
||||
import gregtech.api.interfaces.tileentity.IEnergyConnected;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class PartP2PGTPower extends PartP2PIC2Power implements IGridTickable {
|
||||
public PartP2PGTPower(ItemStack is) {
|
||||
super(is);
|
||||
}
|
||||
|
||||
public final World getWorld() {
|
||||
return tile.getWorldObj();
|
||||
}
|
||||
|
||||
public final int getXCoord() {
|
||||
return tile.xCoord;
|
||||
}
|
||||
|
||||
public final short getYCoord() {
|
||||
return (short) tile.yCoord;
|
||||
}
|
||||
|
||||
public final int getZCoord() {
|
||||
return tile.zCoord;
|
||||
}
|
||||
|
||||
public final int getOffsetX(byte aSide, int aMultiplier) {
|
||||
return getXCoord() + ForgeDirection.getOrientation(aSide).offsetX * aMultiplier;
|
||||
}
|
||||
|
||||
public final short getOffsetY(byte aSide, int aMultiplier) {
|
||||
return (short) (getYCoord() + ForgeDirection.getOrientation(aSide).offsetY * aMultiplier);
|
||||
}
|
||||
|
||||
public final int getOffsetZ(byte aSide, int aMultiplier) {
|
||||
return getZCoord() + ForgeDirection.getOrientation(aSide).offsetZ * aMultiplier;
|
||||
}
|
||||
|
||||
public final TileEntity getTileEntity(int aX, int aY, int aZ) {
|
||||
return getWorld().getTileEntity(aX, aY, aZ);
|
||||
}
|
||||
|
||||
public final TileEntity getTileEntityAtSide(byte aSide) {
|
||||
int tX = getOffsetX(aSide, 1), tY = getOffsetY(aSide, 1), tZ = getOffsetZ(aSide, 1);
|
||||
return getWorld().getTileEntity(tX, tY, tZ);
|
||||
}
|
||||
|
||||
public boolean outputEnergy() {
|
||||
if (getOfferedEnergy() == 0) {
|
||||
return false;
|
||||
}
|
||||
TileEntity t = getTileEntityAtSide((byte) side.ordinal());
|
||||
if (t instanceof IEnergyConnected) {
|
||||
long voltage = 8 << (getSourceTier() * 2);
|
||||
if (voltage > getOfferedEnergy()) {
|
||||
voltage = (long) getOfferedEnergy();
|
||||
}
|
||||
if (((IEnergyConnected) t).injectEnergyUnits(GT_Utility.getOppositeSide(side.ordinal()), voltage, 1) > 0) {
|
||||
drawEnergy(voltage);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TickingRequest getTickingRequest(IGridNode iGridNode) {
|
||||
return new TickingRequest(1, 20, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TickRateModulation tickingRequest(IGridNode iGridNode, int i) {
|
||||
return outputEnergy() ? TickRateModulation.FASTER : TickRateModulation.SLOWER;
|
||||
}
|
||||
}
|
|
@ -357,8 +357,8 @@ public class GT_Loader_MetaTileEntities implements Runnable {
|
|||
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Hatch_AutoMaintenance.get(1L, new Object[0]), bitsd, new Object[]{"CHC", "AMA", "CHC", 'M', ItemList.Hull_IV,'H',ItemList.Hatch_Maintenance,'A',ItemList.Robot_Arm_IV,'C',OrePrefixes.circuit.get(Materials.Master)});
|
||||
|
||||
ItemList.Hatch_DataAccess_EV.set(new GT_MetaTileEntity_Hatch_DataAccess(131, "hatch.dataaccess", "Data Access Hatch", 4).getStackForm(1L));
|
||||
ItemList.Hatch_DataAccess_LuV.set(new GT_MetaTileEntity_Hatch_DataAccess(132, "hatch.dataaccess.adv", "Advanced Data Access Hatch", 6).getStackForm(1L));
|
||||
ItemList.Hatch_DataAccess_EV.set(new GT_MetaTileEntity_Hatch_DataAccess(131, "hatch.dataaccess", "Data Access Hatch", 4).getStackForm(1L));
|
||||
ItemList.Hatch_DataAccess_LuV.set(new GT_MetaTileEntity_Hatch_DataAccess(132, "hatch.dataaccess.adv", "Advanced Data Access Hatch", 6).getStackForm(1L));
|
||||
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Hatch_DataAccess_EV.get(1L, new Object[0]), bitsd, new Object[]{"COC", "OMO", "COC", 'M', ItemList.Hull_EV, 'O', ItemList.Tool_DataStick , 'C' ,OrePrefixes.circuit.get(Materials.Elite)});
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Hatch_DataAccess_LuV.get(1L, new Object[0]), bitsd, new Object[]{"COC", "OMO", "COC", 'M', ItemList.Hull_LuV, 'O', ItemList.Tool_DataOrb , 'C' ,OrePrefixes.circuit.get(Materials.Ultimate)});
|
||||
|
@ -1231,8 +1231,17 @@ public class GT_Loader_MetaTileEntities implements Runnable {
|
|||
GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.Hull_Steel, 'W', OrePrefixes.plateDouble.get(Materials.Steel), 'E', OrePrefixes.circuit.get(Materials.Basic), 'C', ItemList.Sensor_LV});
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector_Adv.get(1L, new Object[0]), bitsd, new Object[] { "WWW", "EME", "CCC", 'M', ItemList.Hull_EV, 'W', OrePrefixes.plateDouble.get(Materials.VanadiumSteel),'E', OrePrefixes.circuit.get(Materials.Data), 'C', ItemList.Sensor_EV });
|
||||
|
||||
ItemList.OilDrill.set(new GT_MetaTileEntity_OilDrill(1157, "multimachine.oildrill", "Oil Drilling Rig").getStackForm(1));
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.OilDrill.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.Hull_MV, 'W', OrePrefixes.frameGt.get(Materials.Steel), 'E', OrePrefixes.circuit.get(Materials.Good), 'C', ItemList.Electric_Motor_MV});
|
||||
ItemList.OilDrill1.set(new GT_MetaTileEntity_OilDrill1(1157, "multimachine.oildrill1", "Oil Drilling Rig").getStackForm(1));
|
||||
ItemList.OilDrill2.set(new GT_MetaTileEntity_OilDrill2(133, "multimachine.oildrill2", "Oil Drilling Rig II").getStackForm(1));
|
||||
ItemList.OilDrill3.set(new GT_MetaTileEntity_OilDrill3(134, "multimachine.oildrill3", "Oil Drilling Rig III").getStackForm(1));
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.OilDrill1.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.Hull_MV, 'W', OrePrefixes.frameGt.get(Materials.Steel), 'E', OrePrefixes.circuit.get(Materials.Good), 'C', ItemList.Electric_Motor_MV});
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.OilDrill1.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.OilDrill1, 'W', OrePrefixes.frameGt.get(Materials.Titanium), 'E', OrePrefixes.circuit.get(Materials.Advanced), 'C', ItemList.Electric_Motor_HV});
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.OilDrill1.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.OilDrill2, 'W', OrePrefixes.frameGt.get(Materials.TungstenSteel), 'E', OrePrefixes.circuit.get(Materials.Data), 'C', ItemList.Electric_Motor_EV});
|
||||
|
||||
ItemList.ConcreteBackfiller1.set(new GT_MetaTileEntity_ConcreteBackfiller1(135, "multimachine.concretebackfiller1", "Concrete Backfiller").getStackForm(1));
|
||||
ItemList.ConcreteBackfiller2.set(new GT_MetaTileEntity_ConcreteBackfiller2(136, "multimachine.concretebackfiller3", "Advanced Concrete Backfiller").getStackForm(1));
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.ConcreteBackfiller1.get(1L, new Object[0]), bitsd, new Object[]{"WPW", "EME", "CQC", 'M', ItemList.Hull_MV, 'W', OrePrefixes.frameGt.get(Materials.Steel), 'E', OrePrefixes.circuit.get(Materials.Good), 'C', ItemList.Electric_Motor_MV, 'P', OrePrefixes.pipeLarge.get(Materials.Steel), 'Q', ItemList.Electric_Pump_MV});
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.ConcreteBackfiller2.get(1L, new Object[0]), bitsd, new Object[]{"WPW", "EME", "CQC", 'M', ItemList.ConcreteBackfiller1, 'W', OrePrefixes.frameGt.get(Materials.Titanium), 'E', OrePrefixes.circuit.get(Materials.Data), 'C', ItemList.Electric_Motor_EV, 'P', OrePrefixes.pipeLarge.get(Materials.Steel), 'Q', ItemList.Electric_Pump_EV});
|
||||
|
||||
ItemList.OreDrill1.set(new GT_MetaTileEntity_OreDrillingPlant1(1158, "multimachine.oredrill1", "Ore Drilling Plant").getStackForm(1));
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.OreDrill1.get(1L), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.Hull_EV, 'W', OrePrefixes.frameGt.get(Materials.Titanium), 'E', OrePrefixes.circuit.get(Materials.Data), 'C', ItemList.Electric_Motor_EV});
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
item.gregtech:modulararmor_helmet.name=基础模块化装甲头盔
|
||||
item.gregtech:modulararmor_chestplate.name=基础模块化装甲胸甲
|
||||
item.gregtech:modulararmor_leggings.name=基础模块化装甲护腿
|
||||
item.gregtech:modulararmor_boots.name=基础模块化装甲靴子
|
||||
item.gregtech:modularelectric1_helmet.name=模块化外骨骼头盔
|
||||
item.gregtech:modularelectric1_chestplate.name=模块化外骨骼胸甲
|
||||
item.gregtech:modularelectric1_leggings.name=模块化外骨骼护腿
|
||||
item.gregtech:modularelectric1_boots.name=模块化外骨骼靴子
|
||||
item.gregtech:modularelectric2_helmet.name=模块化纳米头盔
|
||||
item.gregtech:modularelectric2_chestplate.name=模块化纳米胸甲
|
||||
item.gregtech:modularelectric2_leggings.name=模块化纳米护腿
|
||||
item.gregtech:modularelectric2_boots.name=模块化纳米靴子
|
||||
|
||||
achievement.Naquadah=找到硅岩矿石
|
||||
achievement.Naquadah.desc=高度: 10-60, 几率: 10, //末地
|
||||
achievement.NaquadahEnriched=找到浓缩硅岩矿石
|
||||
|
@ -90,8 +103,6 @@ achievement.Uranium=找到铀矿石
|
|||
achievement.Uranium.desc=高度: 10-40, 几率: 40, 主世界//
|
||||
achievement.Uraninite=找到晶质铀矿矿石
|
||||
achievement.Uraninite.desc=高度: 10-40, 几率: 40, 主世界//
|
||||
achievement.Plutonium=找到钚矿石
|
||||
achievement.Plutonium.desc=高度: 20-30, 几率: 10, 主世界//
|
||||
achievement.Bastnasite=找到氟碳铈矿矿石
|
||||
achievement.Bastnasite.desc=高度: 20-40, 几率: 30, 主世界//
|
||||
achievement.Monazite=找到独居石矿石
|
||||
|
@ -136,7 +147,7 @@ achievement.CertusQuartz=找到赛特斯石英矿石
|
|||
achievement.CertusQuartz.desc=高度: 40-80, 几率: 60, 主世界//
|
||||
achievement.Graphite=找到石墨矿石
|
||||
achievement.Graphite.desc=高度: 5-20, 几率: 40, 主世界//
|
||||
achievement.Diamond=找到Diamond
|
||||
achievement.Diamond=找到钻石矿石
|
||||
achievement.Diamond.desc=高度: 5-20, 几率: 40, 主世界//
|
||||
achievement.Bentonite=找到膨润土
|
||||
achievement.Bentonite.desc=高度: 10-40, 几率: 60, 主世界//末地
|
||||
|
@ -170,6 +181,8 @@ achievement.Emerald=找到绿宝石矿石
|
|||
achievement.Emerald.desc=高度: 5-30, 几率: 30, 主世界//末地
|
||||
achievement.Thorium=找到钍矿石
|
||||
achievement.Thorium.desc=高度: 5-30, 几率: 30, 主世界//末地
|
||||
achievement.Oilsands=找到油砂矿石
|
||||
achievement.Oilsands.desc=高度: 50-80, 几率: 80, 主世界
|
||||
|
||||
achievement.flintpick=第一把工具
|
||||
achievement.flintpick.desc=制造一把燧石镐
|
||||
|
@ -233,14 +246,32 @@ achievement.macerator=研磨
|
|||
achievement.macerator.desc=制造一台蒸汽研磨机
|
||||
achievement.extract=提取
|
||||
achievement.extract.desc=制造一台蒸汽提取机
|
||||
achievement.smallparts=小部件
|
||||
achievement.smallparts.desc=制造存储芯片
|
||||
achievement.bettercircuits=更好的电路
|
||||
achievement.bettercircuits.desc=得到进阶电子电路
|
||||
achievement.stepforward=更进一步
|
||||
achievement.stepforward.desc=制造高级电路
|
||||
achievement.energyflow=能量流
|
||||
achievement.energyflow.desc=得到能量流电路
|
||||
achievement.smallparts=管
|
||||
achievement.smallparts.desc=制造一个真空管
|
||||
achievement.gtbasiccircuit=基础电路板
|
||||
achievement.gtbasiccircuit.desc=制造一个电路板
|
||||
achievement.bettercircuits=更好的电路板
|
||||
achievement.bettercircuits.desc=获得优质电子电路板
|
||||
achievement.stepforward=向前一步
|
||||
achievement.stepforward.desc=制造高级电路板
|
||||
achievement.gtmonosilicon=单晶硅
|
||||
achievement.gtmonosilicon.desc=制造一个单晶硅
|
||||
achievement.gtlogicwafer=集成逻辑电路芯片(晶圆)
|
||||
achievement.gtlogicwafer.desc=制造一个集成逻辑电路芯片(晶圆)
|
||||
achievement.gtlogiccircuit=集成逻辑电路芯片
|
||||
achievement.gtlogiccircuit.desc=制造一个集成逻辑电路芯片
|
||||
achievement.gtcleanroom=超净间
|
||||
achievement.gtcleanroom.desc=制造一个超净间控制器
|
||||
achievement.gtquantumprocessor=量子处理器
|
||||
achievement.gtquantumprocessor.desc=量子处理器
|
||||
achievement.energyflow=纳米处理器
|
||||
achievement.energyflow.desc=获得纳米处理器
|
||||
achievement.gtcrystalprocessor=晶体处理器
|
||||
achievement.gtcrystalprocessor.desc=获得晶体处理器
|
||||
achievement.gtwetware=湿件处理器
|
||||
achievement.gtwetware.desc=获得湿件处理器
|
||||
achievement.gtwetmain=湿件主机
|
||||
achievement.gtwetmain.desc=获得一个湿件主机
|
||||
achievement.orbs=球
|
||||
achievement.orbs.desc=得到一个兰波顿能量球
|
||||
achievement.thatspower=这就是能量
|
||||
|
@ -311,6 +342,8 @@ achievement.upgradeebf=升级你的能量网
|
|||
achievement.upgradeebf.desc=制造一个MV级能源输入舱
|
||||
achievement.maintainance=维护
|
||||
achievement.maintainance.desc=修理一台机器的所有维护问题
|
||||
achievement.upgrade=升级你的线圈
|
||||
achievement.upgrade.desc=制造一个铁铬铝合金线圈
|
||||
achievement.titan=钛
|
||||
achievement.titan.desc=制造一块钛锭
|
||||
achievement.magic=魔法?
|
||||
|
@ -323,10 +356,12 @@ achievement.muchsteam=如此多的蒸汽
|
|||
achievement.muchsteam.desc=启动一台大型涡轮机
|
||||
achievement.efficientsteam=高效蒸汽
|
||||
achievement.efficientsteam.desc=在大型涡轮机里使用过热蒸汽
|
||||
achievement.upgrade=升级你的线圈
|
||||
achievement.upgrade.desc=制造一个铁铬铝合金线圈
|
||||
achievement.upgrade2=升级你的线圈 (二级)
|
||||
achievement.upgrade2.desc=制造一个镍铬合金线圈方块
|
||||
achievement.tungsten=钨
|
||||
achievement.tungsten.desc=冷却一块炙热的钨锭
|
||||
achievement.tungsten.desc=冷却一块热钨锭
|
||||
achievement.osmium=锇
|
||||
achievement.osmium.desc=冷却一块热锇锭
|
||||
achievement.hightech=高科技
|
||||
achievement.hightech.desc=制造一台力场产生器(LV)
|
||||
achievement.amplifier=增幅器
|
||||
|
@ -339,23 +374,169 @@ achievement.universal=通用的
|
|||
achievement.universal.desc=制造一台质量加工器
|
||||
achievement.replication=复制
|
||||
achievement.replication.desc=制造一台复制器
|
||||
achievement.upgrade2=升级你的线圈 (再次)
|
||||
achievement.upgrade2.desc=制造一个镍铬合金线圈
|
||||
achievement.tungstensteel=钨钢
|
||||
achievement.tungstensteel.desc=冷却一块炙热的钨钢锭
|
||||
achievement.tungstensteel.desc=冷却一块热钨钢锭
|
||||
achievement.upgrade3=升级你的线圈(三级)
|
||||
achievement.upgrade3.desc=制造一个钨钢合金线圈方块
|
||||
achievement.hssg=高速钢-G
|
||||
achievement.hssg.desc=冷却一块热高速钢-G锭
|
||||
achievement.upgrade4=升级你的线圈(四级)
|
||||
achievement.upgrade4.desc=制造一个高速钢-G线圈方块
|
||||
achievement.stargatematerial=星际之门材料
|
||||
achievement.stargatematerial.desc=冷却一块热硅岩锭
|
||||
achievement.conducting=超导
|
||||
achievement.conducting.desc=制造一个超导线圈
|
||||
achievement.conducting.desc=制造一个超导线圈方块
|
||||
achievement.fusion=聚合
|
||||
achievement.fusion.desc=制作氦离子
|
||||
achievement.higherefficency=更高的效率
|
||||
achievement.higherefficency.desc=制作氮离子
|
||||
achievement.advancing=超前
|
||||
achievement.advancing.desc=制作铕
|
||||
achievement.stargateliquid=液体的星际之门材料
|
||||
achievement.stargateliquid.desc=生产硅岩
|
||||
achievement.tothelimit=寻求极限
|
||||
achievement.tothelimit.desc=制作镅
|
||||
achievement.denseaspossible=尽可能致密
|
||||
achievement.denseaspossible.desc=制作0号元素
|
||||
achievement.fullefficiency=满负荷效率
|
||||
chievement.fullefficiency=满负荷效率
|
||||
achievement.fullefficiency.desc=制造一台离子发电机Mk.III
|
||||
achievement.upgrade5=升级你的线圈(五级)
|
||||
achievement.upgrade5.desc=制造一个硅岩线圈方块
|
||||
achievement.alienmetallurgy=外星冶金术
|
||||
achievement.alienmetallurgy.desc=冷却一个热硅岩锭
|
||||
achievement.over9000=战斗力超过9000!
|
||||
achievement.over9000.desc=制造一个硅岩合金线圈方块
|
||||
achievement.finalpreparations=最终准备
|
||||
achievement.finalpreparations.desc=冷却一个热硅岩瑞亚锭
|
||||
achievement.denseaspossible=尽可能致密
|
||||
achievement.denseaspossible.desc=制作中子素
|
||||
achievement.whatnow=接下来呢?
|
||||
achievement.whatnow.desc=制作一个终极电池
|
||||
|
||||
achievement.gt.metaitem.01.32606=LuV级电动马达
|
||||
achievement.gt.metaitem.01.32606.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32607=ZPM级电力马达
|
||||
achievement.gt.metaitem.01.32607.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32608=UV级电力马达
|
||||
achievement.gt.metaitem.01.32608.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
achievement.gt.metaitem.01.32615=LuV级电力泵
|
||||
achievement.gt.metaitem.01.32615.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32616=ZPM级电力泵
|
||||
achievement.gt.metaitem.01.32616.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32617=UV级电力泵
|
||||
achievement.gt.metaitem.01.32617.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
achievement.gt.metaitem.01.32635=LuV级传送带
|
||||
achievement.gt.metaitem.01.32635.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32636=ZPM级传送带
|
||||
achievement.gt.metaitem.01.32636.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32637=UV级传送带
|
||||
achievement.gt.metaitem.01.32637.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
achievement.gt.metaitem.01.32645=LuV级电力活塞
|
||||
achievement.gt.metaitem.01.32645.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32646=ZPM级电力活塞
|
||||
achievement.gt.metaitem.01.32646.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32647=UV级电力活塞
|
||||
achievement.gt.metaitem.01.32647.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
achievement.gt.metaitem.01.32655=LuV级机械臂
|
||||
achievement.gt.metaitem.01.32655.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32656=ZPM级机械臂
|
||||
achievement.gt.metaitem.01.32656.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32657=UV级机械臂
|
||||
achievement.gt.metaitem.01.32657.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
achievement.gt.metaitem.01.32675=LuV级力场发生器
|
||||
achievement.gt.metaitem.01.32675.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32676=ZPM级力场发生器
|
||||
achievement.gt.metaitem.01.32676.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32677=UV级力场发生器
|
||||
achievement.gt.metaitem.01.32677.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
achievement.gt.metaitem.01.32685=LuV级发射器
|
||||
achievement.gt.metaitem.01.32685.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32686=ZPM级发射器
|
||||
achievement.gt.metaitem.01.32686.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32687=UV级发射器
|
||||
achievement.gt.metaitem.01.32687.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
achievement.gt.metaitem.01.32695=LuV级传感器
|
||||
achievement.gt.metaitem.01.32695.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32696=ZPM级传感器
|
||||
achievement.gt.metaitem.01.32696.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32697=UV级传感器
|
||||
achievement.gt.metaitem.01.32697.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
achievement.gt.blockmachines.fusioncomputer.tier.06=核聚变反应堆控制电脑Mk I
|
||||
achievement.gt.blockmachines.fusioncomputer.tier.06.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.blockmachines.fusioncomputer.tier.07=核聚变反应堆控制电脑Mk II
|
||||
achievement.gt.blockmachines.fusioncomputer.tier.07.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.blockmachines.fusioncomputer.tier.08=核聚变反应堆控制电脑Mk III
|
||||
achievement.gt.blockmachines.fusioncomputer.tier.08.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
achievement.gt.metaitem.03.32072=神经元处理器
|
||||
achievement.gt.metaitem.03.32072.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.03.32095=湿件主机
|
||||
achievement.gt.metaitem.03.32095.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
achievement.item.NanoCircuit=Nano Circuit
|
||||
achievement.item.NanoCircuit.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.item.PikoCircuit=Piko Circuit
|
||||
achievement.item.PikoCircuit.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.item.QuantumCircuit=Quantum Circuit
|
||||
achievement.item.QuantumCircuit.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
achievement.gt.metaitem.01.32605=终极电池
|
||||
achievement.gt.metaitem.01.32605.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32609=真正的终极电池
|
||||
achievement.gt.metaitem.01.32609.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32736=能量模块
|
||||
achievement.gt.metaitem.01.32736.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.gt.metaitem.01.32737=能量簇
|
||||
achievement.gt.metaitem.01.32737.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
achievement.ic2.itemArmorQuantumHelmet=量子头盔
|
||||
achievement.ic2.itemArmorQuantumHelmet.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.ic2.itemArmorQuantumChestplate=量子胸甲
|
||||
achievement.ic2.itemArmorQuantumChestplate.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.ic2.itemArmorQuantumLegs=量子护腿
|
||||
achievement.ic2.itemArmorQuantumLegs.desc=捡起这个物品来在NEI里看它的合成表
|
||||
achievement.ic2.itemArmorQuantumBoots=量子靴子
|
||||
achievement.ic2.itemArmorQuantumBoots.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
achievement.item.graviChestPlate=重力胸甲
|
||||
achievement.item.graviChestPlate.desc=捡起这个物品来在NEI里看它的合成表
|
||||
|
||||
for.bees.species.clay=粘土
|
||||
for.bees.species.slimeball=史莱姆球
|
||||
for.bees.species.peat=褐煤
|
||||
for.bees.species.stickyresin=粘性树脂
|
||||
for.bees.species.coal=煤炭
|
||||
for.bees.species.oil=石油
|
||||
for.bees.species.redstone=红石
|
||||
for.bees.species.lapis=青金石
|
||||
for.bees.species.certus=下界石英
|
||||
for.bees.species.ruby=红宝石
|
||||
for.bees.species.sapphire=蓝宝石
|
||||
for.bees.species.diamond=钻石
|
||||
for.bees.species.olivine=橄榄石
|
||||
for.bees.species.emerald=绿宝石
|
||||
for.bees.species.copper=铜
|
||||
for.bees.species.tin=锡
|
||||
for.bees.species.lead=铅
|
||||
for.bees.species.iron=铁
|
||||
for.bees.species.steel=钢
|
||||
for.bees.species.nickel=镍
|
||||
for.bees.species.zinc=锌
|
||||
for.bees.species.silver=银
|
||||
for.bees.species.gold=金
|
||||
for.bees.species.aluminium=铝
|
||||
for.bees.species.titanium=钛
|
||||
for.bees.species.chrome=铬
|
||||
for.bees.species.manganese=锰
|
||||
for.bees.species.tungsten=钨
|
||||
for.bees.species.platinum=铂
|
||||
for.bees.species.iridium=铱
|
||||
for.bees.species.uranium=铀
|
||||
for.bees.species.plutonium=钚
|
||||
for.bees.species.naquadah=硅岩
|
||||
|
|
Loading…
Reference in a new issue