aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/GT_Proxy.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common/GT_Proxy.java')
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java64
1 files changed, 34 insertions, 30 deletions
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index f99d4083c9..6b98488ee5 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -21,7 +21,10 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.items.GT_MetaGenerated_Item;
import gregtech.api.items.GT_MetaGenerated_Tool;
import gregtech.api.net.GT_Packet_Pollution;
-import gregtech.api.objects.*;
+import gregtech.api.objects.GT_Fluid;
+import gregtech.api.objects.GT_FluidStack;
+import gregtech.api.objects.GT_UO_DimensionList;
+import gregtech.api.objects.ItemData;
import gregtech.api.util.*;
import gregtech.common.entities.GT_Entity_Arrow;
import gregtech.common.gui.GT_ContainerVolumetricFlask;
@@ -171,6 +174,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public boolean mHideRecyclingRecipes = true;
public boolean mPollution = true;
public boolean mExplosionItemDrop = false;
+ public boolean mUseGreatlyShrukenReplacementList = true;
public int mSkeletonsShootGTArrows = 16;
public int mMaxEqualEntitiesAtOneSpot = 3;
public int mFlintChance = 30;
@@ -246,7 +250,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
if (aOre.mPrefix != null) {
if (!aOre.mPrefix.isIgnored(aOre.mMaterial)) {
aOre.mPrefix.processOre(aOre.mMaterial == null ? Materials._NULL : aOre.mMaterial, aOre.mEvent.Name, aOre.mModID,
- GT_Utility.copyAmount(1L, new Object[]{aOre.mEvent.Ore}));
+ GT_Utility.copyAmount(1L, aOre.mEvent.Ore));
}
} else {
// GT_FML_LOGGER.info("Thingy Name: "+ aOre.mEvent.Name+ " !!!Unknown 'Thingy' detected!!! This Object seems to probably not follow a valid OreDictionary Convention, or I missed a Convention. Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
@@ -344,7 +348,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
ItemList.IC2_Hops.set(GT_ModHandler.getIC2Item("hops", 1L));
ItemList.IC2_Resin.set(GT_ModHandler.getIC2Item("resin", 1L));
ItemList.IC2_Plantball.set(GT_ModHandler.getIC2Item("plantBall", 1L));
- ItemList.IC2_PlantballCompressed.set(GT_ModHandler.getIC2Item("compressedPlantBall", 1L, ItemList.IC2_Plantball.get(1L, new Object[0])));
+ ItemList.IC2_PlantballCompressed.set(GT_ModHandler.getIC2Item("compressedPlantBall", 1L, ItemList.IC2_Plantball.get(1L)));
ItemList.IC2_Crop_Seeds.set(GT_ModHandler.getIC2Item("cropSeed", 1L));
ItemList.IC2_Grin_Powder.set(GT_ModHandler.getIC2Item("grinPowder", 1L));
ItemList.IC2_Energium_Dust.set(GT_ModHandler.getIC2Item("energiumDust", 1L));
@@ -393,11 +397,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
ItemList.Food_Baked_Potato.set(new ItemStack(Items.baked_potato, 1, 0));
ItemList.Food_Poisonous_Potato.set(new ItemStack(Items.poisonous_potato, 1, 0));
- OrePrefixes.bottle.mContainerItem = ItemList.Bottle_Empty.get(1L, new Object[0]);
+ OrePrefixes.bottle.mContainerItem = ItemList.Bottle_Empty.get(1L);
OrePrefixes.bucket.mContainerItem = new ItemStack(Items.bucket, 1);
- OrePrefixes.cellPlasma.mContainerItem = ItemList.Cell_Empty.get(1L, new Object[0]);
- OrePrefixes.cellMolten.mContainerItem = ItemList.Cell_Empty.get(1L, new Object[0]);
- OrePrefixes.cell.mContainerItem = ItemList.Cell_Empty.get(1L, new Object[0]);
+ OrePrefixes.cellPlasma.mContainerItem = ItemList.Cell_Empty.get(1L);
+ OrePrefixes.cellMolten.mContainerItem = ItemList.Cell_Empty.get(1L);
+ OrePrefixes.cell.mContainerItem = ItemList.Cell_Empty.get(1L);
GregTech_API.sFrostHazmatList.add(GT_ModHandler.getIC2Item("hazmatHelmet", 1L, 32767));
GregTech_API.sFrostHazmatList.add(GT_ModHandler.getIC2Item("hazmatChestplate", 1L, 32767));
@@ -435,8 +439,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
GT_ModHandler.sNonReplaceableItems.add(new ItemStack(Items.bow, 1, 32767));
GT_ModHandler.sNonReplaceableItems.add(new ItemStack(Items.fishing_rod, 1, 32767));
- GT_ModHandler.sNonReplaceableItems.add(ItemList.IC2_ForgeHammer.getWithDamage(1L, 32767L, new Object[0]));
- GT_ModHandler.sNonReplaceableItems.add(ItemList.IC2_WireCutter.getWithDamage(1L, 32767L, new Object[0]));
+ GT_ModHandler.sNonReplaceableItems.add(ItemList.IC2_ForgeHammer.getWithDamage(1L, 32767L));
+ GT_ModHandler.sNonReplaceableItems.add(ItemList.IC2_WireCutter.getWithDamage(1L, 32767L));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("painter", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("blackPainter", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("redPainter", 1L, 32767));
@@ -528,8 +532,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
new Thread(new GT_PlayerActivityLogger()).start();
}
GregTech_API.sPostloadStarted = true;
- GT_OreDictUnificator.addItemData(new ItemStack(Items.iron_door, 1), new ItemData(Materials.Iron, 21772800L, new MaterialStack[0]));
- GT_OreDictUnificator.addItemData(new ItemStack(Items.wooden_door, 1, 32767), new ItemData(Materials.Wood, 21772800L, new MaterialStack[0]));
+ GT_OreDictUnificator.addItemData(new ItemStack(Items.iron_door, 1), new ItemData(Materials.Iron, 21772800L));
+ GT_OreDictUnificator.addItemData(new ItemStack(Items.wooden_door, 1, 32767), new ItemData(Materials.Wood, 21772800L));
for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
tData.fluid.amount = 0;
@@ -728,7 +732,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
if ((this.mSkeletonsShootGTArrows > 0) && (aEvent.entity.getClass() == EntityArrow.class)
&& (aEvent.entity.worldObj.rand.nextInt(this.mSkeletonsShootGTArrows) == 0)
&& ((((EntityArrow) aEvent.entity).shootingEntity instanceof EntitySkeleton))) {
- aEvent.entity.worldObj.spawnEntityInWorld(new GT_Entity_Arrow((EntityArrow) aEvent.entity, (ItemStack) OrePrefixes.arrowGtWood.mPrefixedItems
+ aEvent.entity.worldObj.spawnEntityInWorld(new GT_Entity_Arrow((EntityArrow) aEvent.entity, OrePrefixes.arrowGtWood.mPrefixedItems
.get(aEvent.entity.worldObj.rand.nextInt(OrePrefixes.arrowGtWood.mPrefixedItems.size()))));
aEvent.entity.setDead();
}
@@ -928,7 +932,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
}
else if (aEvent.Name.contains(" ")) {
GT_Log.ore.println(tModToName + " is getting re-registered because the OreDict Name containing invalid spaces.");
- GT_OreDictUnificator.registerOre(aEvent.Name.replaceAll(" ", ""), GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ GT_OreDictUnificator.registerOre(aEvent.Name.replaceAll(" ", ""), GT_Utility.copyAmount(1L, aEvent.Ore));
aEvent.Ore.setStackDisplayName("Invalid OreDictionary Tag");
return;
}
@@ -979,7 +983,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
return;
}
if (!aPrefix.isIgnored(aMaterial)) {
- aPrefix.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ aPrefix.add(GT_Utility.copyAmount(1L, aEvent.Ore));
}
if (aMaterial != Materials._NULL) {
Materials tReRegisteredMaterial;
@@ -987,7 +991,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
tReRegisteredMaterial, aEvent.Ore)) {
tReRegisteredMaterial = (Materials) i$.next();
}
- aMaterial.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ aMaterial.add(GT_Utility.copyAmount(1L, aEvent.Ore));
if (GregTech_API.sThaumcraftCompat != null && aPrefix.doGenerateItem(aMaterial) && !aPrefix.isIgnored(aMaterial)) {
List<TC_AspectStack> tAspects = new ArrayList<TC_AspectStack>();
@@ -1133,11 +1137,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
return;
}
} else {
- aPrefix.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ aPrefix.add(GT_Utility.copyAmount(1L, aEvent.Ore));
}
}
} else if (aPrefix.mIsSelfReferencing) {
- aPrefix.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ aPrefix.add(GT_Utility.copyAmount(1L, aEvent.Ore));
} else {
GT_Log.ore.println(tModToName + " uses a Prefix as full OreDict Name, and is therefor invalid.");
aEvent.Ore.setStackDisplayName("Invalid OreDictionary Tag");
@@ -1157,12 +1161,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
break;
case plank:
if (tName.equals("Wood")) {
- GT_OreDictUnificator.addItemData(aEvent.Ore, new ItemData(Materials.Wood, 3628800L, new MaterialStack[0]));
+ GT_OreDictUnificator.addItemData(aEvent.Ore, new ItemData(Materials.Wood, 3628800L));
}
break;
case slab:
if (tName.equals("Wood")) {
- GT_OreDictUnificator.addItemData(aEvent.Ore, new ItemData(Materials.Wood, 1814400L, new MaterialStack[0]));
+ GT_OreDictUnificator.addItemData(aEvent.Ore, new ItemData(Materials.Wood, 1814400L));
}
break;
case sheet:
@@ -1262,7 +1266,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
if (((tEntity instanceof EntityItem)) && (this.mItemDespawnTime != 6000) && (((EntityItem) tEntity).lifespan == 6000)) {
((EntityItem) tEntity).lifespan = this.mItemDespawnTime;
} else if (((tEntity instanceof EntityLivingBase)) && (this.mMaxEqualEntitiesAtOneSpot > 0) && (!(tEntity instanceof EntityPlayer))
- && (((EntityLivingBase) tEntity).canBePushed()) && (((EntityLivingBase) tEntity).getHealth() > 0.0F)) {
+ && (tEntity.canBePushed()) && (((EntityLivingBase) tEntity).getHealth() > 0.0F)) {
List tList = tEntity.worldObj.getEntitiesWithinAABBExcludingEntity(tEntity,
tEntity.boundingBox.expand(0.20000000298023224D, 0.0D, 0.20000000298023224D));
Class tClass = tEntity.getClass();
@@ -1571,7 +1575,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
}
int rFuelValue = 0;
if ((aFuel.getItem() instanceof GT_MetaGenerated_Item)) {
- Short tFuelValue = (Short) ((GT_MetaGenerated_Item) aFuel.getItem()).mBurnValues.get(Short.valueOf((short) aFuel.getItemDamage()));
+ Short tFuelValue = ((GT_MetaGenerated_Item) aFuel.getItem()).mBurnValues.get(Short.valueOf((short) aFuel.getItemDamage()));
if (tFuelValue != null) {
rFuelValue = Math.max(rFuelValue, tFuelValue.shortValue());
}
@@ -1674,10 +1678,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
rFuelValue = Math.max(rFuelValue, 600);
} else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) {
rFuelValue = Math.max(rFuelValue, 600);
- } else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1, new Object[0]))) {
+ } else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1))) {
rFuelValue = Math.max(rFuelValue, 150000);
}
- if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1, new Object[0]))) {
+ if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1))) {
rFuelValue = Math.max(rFuelValue, 100000);
}
@@ -1685,28 +1689,28 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
}
public Fluid addAutoGeneratedCorrespondingFluid(Materials aMaterial){
- return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), "molten.autogenerated", aMaterial.mDefaultLocalName, aMaterial,
- aMaterial.mRGBa, 1, aMaterial.getLiquidTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), "molten.autogenerated", aMaterial.mDefaultLocalName, aMaterial,
+ aMaterial.mRGBa, 1, aMaterial.getLiquidTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000);
}
public Fluid addAutoGeneratedCorrespondingGas(Materials aMaterial) {
- return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), "molten.autogenerated", aMaterial.mDefaultLocalName, aMaterial,
- aMaterial.mRGBa, 2, aMaterial.getGasTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), "molten.autogenerated", aMaterial.mDefaultLocalName, aMaterial,
+ aMaterial.mRGBa, 2, aMaterial.getGasTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000);
}
public Fluid addAutogeneratedMoltenFluid(Materials aMaterial) {
return addFluid("molten." + aMaterial.mName.toLowerCase(Locale.ENGLISH), "molten.autogenerated", "Molten " + aMaterial.mDefaultLocalName, aMaterial,
- aMaterial.mMoltenRGBa, 4, aMaterial.mMeltingPoint <= 0 ? 1000 : aMaterial.mMeltingPoint, GT_OreDictUnificator.get(OrePrefixes.cellMolten, aMaterial, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 144);
+ aMaterial.mMoltenRGBa, 4, aMaterial.mMeltingPoint <= 0 ? 1000 : aMaterial.mMeltingPoint, GT_OreDictUnificator.get(OrePrefixes.cellMolten, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 144);
}
public Fluid addAutogeneratedWetFluid(Materials aMaterial) {
return addFluid("wet." + aMaterial.mName.toLowerCase(Locale.ENGLISH), "wet.autogenerated", "Wet " + aMaterial.mDefaultLocalName, aMaterial,
- aMaterial.mMoltenRGBa, 4, aMaterial.mMeltingPoint <= 0 ? 1000 : aMaterial.mMeltingPoint, GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 144);
+ aMaterial.mMoltenRGBa, 4, aMaterial.mMeltingPoint <= 0 ? 1000 : aMaterial.mMeltingPoint, GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 144);
}
public Fluid addAutogeneratedPlasmaFluid(Materials aMaterial) {
return addFluid("plasma." + aMaterial.mName.toLowerCase(Locale.ENGLISH), "plasma.autogenerated", aMaterial.mDefaultLocalName + " Plasma", aMaterial,
- aMaterial.mMoltenRGBa, 3, 10000, GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ aMaterial.mMoltenRGBa, 3, 10000, GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000);
}
public void addAutoGeneratedHydroCrackedFluids(Materials aMaterial){