Bugfixes 6
This commit is contained in:
parent
bfccecf87b
commit
19062e1d36
14 changed files with 32 additions and 31 deletions
|
@ -124,7 +124,7 @@ public class GT_Container extends Container {
|
||||||
|
|
||||||
if ((aShifthold == 0 || aShifthold == 1) && (aMouseclick == 0 || aMouseclick == 1)) {
|
if ((aShifthold == 0 || aShifthold == 1) && (aMouseclick == 0 || aMouseclick == 1)) {
|
||||||
if (aSlotIndex == -999) {
|
if (aSlotIndex == -999) {
|
||||||
if (aPlayerInventory.getItemStack() != null && aSlotIndex == -999) {
|
if (aPlayerInventory.getItemStack() != null/* && aSlotIndex == -999*/) {
|
||||||
if (aMouseclick == 0) {
|
if (aMouseclick == 0) {
|
||||||
aPlayer.dropPlayerItemWithRandomChoice(aPlayerInventory.getItemStack(), true);
|
aPlayer.dropPlayerItemWithRandomChoice(aPlayerInventory.getItemStack(), true);
|
||||||
aPlayerInventory.setItemStack(null);
|
aPlayerInventory.setItemStack(null);
|
||||||
|
|
|
@ -207,7 +207,7 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci
|
||||||
if (tStats[3] == -2 && tCharge <= 0) {
|
if (tStats[3] == -2 && tCharge <= 0) {
|
||||||
aList.add(EnumChatFormatting.AQUA + "Empty. You should recycle it properly." + EnumChatFormatting.GRAY);
|
aList.add(EnumChatFormatting.AQUA + "Empty. You should recycle it properly." + EnumChatFormatting.GRAY);
|
||||||
} else {
|
} else {
|
||||||
aList.add(EnumChatFormatting.AQUA + "" + GT_Utility.formatNumbers(tCharfge) + " / " + GT_Utility.formatNumbers(Math.abs(tStats[0])) + " EU - Voltage: " + V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 : 1)] + EnumChatFormatting.GRAY);
|
aList.add(EnumChatFormatting.AQUA + "" + GT_Utility.formatNumbers(tCharge) + " / " + GT_Utility.formatNumbers(Math.abs(tStats[0])) + " EU - Voltage: " + V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 : 1)] + EnumChatFormatting.GRAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,7 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci
|
||||||
chargeFromArmor(aStack, aPlayer);
|
chargeFromArmor(aStack, aPlayer);
|
||||||
if (aPlayer instanceof EntityPlayer && ((EntityPlayer) aPlayer).capabilities.isCreativeMode) return true;
|
if (aPlayer instanceof EntityPlayer && ((EntityPlayer) aPlayer).capabilities.isCreativeMode) return true;
|
||||||
double tTransfer = discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, true);
|
double tTransfer = discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, true);
|
||||||
if (tTransfer == aAmount) {
|
if (/*tTransfer == aAmount*/Math.abs(tTransfer - aAmount) < .0000001) {
|
||||||
discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false);
|
discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false);
|
||||||
chargeFromArmor(aStack, aPlayer);
|
chargeFromArmor(aStack, aPlayer);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -159,13 +159,13 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
|
||||||
if (aID <= 0 || aID >= GregTech_API.METATILEENTITIES.length || GregTech_API.METATILEENTITIES[aID] == null) {
|
if (aID <= 0 || aID >= GregTech_API.METATILEENTITIES.length || GregTech_API.METATILEENTITIES[aID] == null) {
|
||||||
GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!");
|
GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!");
|
||||||
} else {
|
} else {
|
||||||
if (aID != 0) {
|
//if (aID != 0) {
|
||||||
if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
|
if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
|
||||||
GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
|
GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
|
||||||
mTickTimer = 0;
|
mTickTimer = 0;
|
||||||
mID = aID;
|
mID = aID;
|
||||||
return true;
|
return true;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,13 +206,13 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
|
||||||
if (aID <= 0 || aID >= GregTech_API.METATILEENTITIES.length || GregTech_API.METATILEENTITIES[aID] == null) {
|
if (aID <= 0 || aID >= GregTech_API.METATILEENTITIES.length || GregTech_API.METATILEENTITIES[aID] == null) {
|
||||||
GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!");
|
GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!");
|
||||||
} else {
|
} else {
|
||||||
if (aID != 0) {
|
//if (aID != 0) {
|
||||||
if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
|
if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
|
||||||
GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
|
GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
|
||||||
mTickTimer = 0;
|
mTickTimer = 0;
|
||||||
mID = aID;
|
mID = aID;
|
||||||
return true;
|
return true;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,10 +261,12 @@ public class GT_OreDictUnificator {
|
||||||
ItemStack rStack = null;
|
ItemStack rStack = null;
|
||||||
if (((aMaterialAmount >= M)/* || aMaterialAmount >= M * 32*/))
|
if (((aMaterialAmount >= M)/* || aMaterialAmount >= M * 32*/))
|
||||||
rStack = get(OrePrefixes.gem, aMaterial, aMaterialAmount / M);
|
rStack = get(OrePrefixes.gem, aMaterial, aMaterialAmount / M);
|
||||||
if (rStack == null && (((aMaterialAmount * 2) % M == 0) || aMaterialAmount >= M * 16))
|
if (rStack == null) {
|
||||||
rStack = get(OrePrefixes.gemFlawed, aMaterial, (aMaterialAmount * 2) / M);
|
if ((((aMaterialAmount * 2) % M == 0) || aMaterialAmount >= M * 16))
|
||||||
if (rStack == null && (((aMaterialAmount * 4) >= M)))
|
rStack = get(OrePrefixes.gemFlawed, aMaterial, (aMaterialAmount * 2) / M);
|
||||||
rStack = get(OrePrefixes.gemChipped, aMaterial, (aMaterialAmount * 4) / M);
|
if ((((aMaterialAmount * 4) >= M)))
|
||||||
|
rStack = get(OrePrefixes.gemChipped, aMaterial, (aMaterialAmount * 4) / M);
|
||||||
|
}
|
||||||
return rStack;
|
return rStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,10 @@ public class GT_Item_Machines
|
||||||
if ((tDamage <= 0) || (tDamage >= GregTech_API.METATILEENTITIES.length)) {
|
if ((tDamage <= 0) || (tDamage >= GregTech_API.METATILEENTITIES.length)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (tDamage == 0) {
|
//if (tDamage == 0) {
|
||||||
aList.add("WARNING, THE EXISTENCE OF THIS ITEM IS A BUG");
|
//aList.add("WARNING, THE EXISTENCE OF THIS ITEM IS A BUG");
|
||||||
aList.add("IF YOU GOT IT IN SURVIVAL THEN PLEASE REPORT IT");
|
//aList.add("IF YOU GOT IT IN SURVIVAL THEN PLEASE REPORT IT");
|
||||||
} else {
|
//} else {
|
||||||
TileEntity temp = GregTech_API.sBlockMachines.createTileEntity(aPlayer == null ? GT_Values.DW : aPlayer.worldObj, GregTech_API.METATILEENTITIES[tDamage] == null ? 0 : GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType());
|
TileEntity temp = GregTech_API.sBlockMachines.createTileEntity(aPlayer == null ? GT_Values.DW : aPlayer.worldObj, GregTech_API.METATILEENTITIES[tDamage] == null ? 0 : GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType());
|
||||||
//if (temp != null) {
|
//if (temp != null) {
|
||||||
temp.setWorldObj(aPlayer == null ? GT_Values.DW : aPlayer.worldObj);
|
temp.setWorldObj(aPlayer == null ? GT_Values.DW : aPlayer.worldObj);
|
||||||
|
@ -68,7 +68,7 @@ public class GT_Item_Machines
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
}
|
//}
|
||||||
NBTTagCompound aNBT = aStack.getTagCompound();
|
NBTTagCompound aNBT = aStack.getTagCompound();
|
||||||
if (aNBT != null) {
|
if (aNBT != null) {
|
||||||
if (aNBT.getBoolean("mMuffler")) {
|
if (aNBT.getBoolean("mMuffler")) {
|
||||||
|
|
|
@ -72,8 +72,8 @@ public class GT_Cover_Drain
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
|
public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
|
||||||
if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
|
//if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
|
||||||
}
|
//}
|
||||||
return ((IMachineProgress) aTileEntity).isAllowedToWork() == aCoverVariable < 2;
|
return ((IMachineProgress) aTileEntity).isAllowedToWork() == aCoverVariable < 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class GT_Cover_EnergyOnly
|
||||||
|
|
||||||
public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
|
public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
|
||||||
if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
|
if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
|
||||||
if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable < 2) {
|
if (((IMachineProgress) aTileEntity).isAllowedToWork()/* != aCoverVariable < 2*/) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ public class GT_Cover_EnergyOnly
|
||||||
|
|
||||||
public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
|
public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
|
||||||
if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
|
if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
|
||||||
if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable < 2) {
|
if (((IMachineProgress) aTileEntity).isAllowedToWork()/* != aCoverVariable < 2*/) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ public abstract class GT_Cover_RedstoneWirelessBase
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
|
public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
|
||||||
if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide > 3) && (((aY > 0.375D) && (aY < 0.625D)) || ((aSide < 2) && (((aZ > 0.375D) && (aZ < 0.625D)) || (aSide == 2) || (aSide == 3)))))) {
|
if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide > 3) && /*(*/((aY > 0.375D) && (aY < 0.625D))/* || ((aSide < 2) && (((aZ > 0.375D) && (aZ < 0.625D)) || (aSide == 2) || (aSide == 3))))*/)) {
|
||||||
GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0));
|
GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0));
|
||||||
aCoverVariable = GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem());
|
aCoverVariable = GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem());
|
||||||
aTileEntity.setCoverDataAtSide(aSide, aCoverVariable);
|
aTileEntity.setCoverDataAtSide(aSide, aCoverVariable);
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class GT_GUIContainer_BronzeBlastFurnace
|
||||||
drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
|
drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
|
||||||
if ((this.mContainer != null) &&
|
if ((this.mContainer != null) &&
|
||||||
(this.mContainer.mProgressTime > 0)) {
|
(this.mContainer.mProgressTime > 0)) {
|
||||||
drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, (this.mContainer.mProgressTime > 0 ? 1 : 0) + this.mContainer.mProgressTime * 20 / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime))), 11);
|
drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, (/*this.mContainer.mProgressTime > 0 ? */1/* : 0*/) + this.mContainer.mProgressTime * 20 / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime))), 11);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package gregtech.common.items.behaviors;
|
package gregtech.common.items.behaviors;
|
||||||
|
|
||||||
import gregtech.api.GregTech_API;
|
|
||||||
import gregtech.api.enums.GT_Values;
|
import gregtech.api.enums.GT_Values;
|
||||||
import gregtech.api.interfaces.IItemBehaviour;
|
import gregtech.api.interfaces.IItemBehaviour;
|
||||||
import gregtech.api.items.GT_MetaBase_Item;
|
import gregtech.api.items.GT_MetaBase_Item;
|
||||||
|
@ -98,8 +97,8 @@ public class Behaviour_Sonictron
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
|
public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
|
||||||
if ((!aWorld.isRemote) && (aWorld.getBlock(aX, aY, aZ) == GregTech_API.sBlockMachines) && (aWorld.getBlockMetadata(aX, aY, aZ) == 6)) {
|
//if ((!aWorld.isRemote) && (aWorld.getBlock(aX, aY, aZ) == GregTech_API.sBlockMachines) && (aWorld.getBlockMetadata(aX, aY, aZ) == 6)) {
|
||||||
}
|
//}
|
||||||
setCurrentIndex(aStack, -1);
|
setCurrentIndex(aStack, -1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@ public class GT_MetaGenerated_Item_Renderer
|
||||||
GT_MetaGenerated_Item tItem;
|
GT_MetaGenerated_Item tItem;
|
||||||
for (Iterator i$ = GT_MetaGenerated_Item.sInstances.values().iterator(); i$.hasNext(); MinecraftForgeClient.registerItemRenderer(tItem, this)) {
|
for (Iterator i$ = GT_MetaGenerated_Item.sInstances.values().iterator(); i$.hasNext(); MinecraftForgeClient.registerItemRenderer(tItem, this)) {
|
||||||
tItem = (GT_MetaGenerated_Item) i$.next();
|
tItem = (GT_MetaGenerated_Item) i$.next();
|
||||||
if ((tItem == null) || (!tItem.useStandardMetaItemRenderer())) {
|
//if ((tItem == null) || (!tItem.useStandardMetaItemRenderer())) {
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,8 +86,8 @@ public class GT_MetaTileEntity_Replicator
|
||||||
Materials tMaterial;
|
Materials tMaterial;
|
||||||
for (Iterator i$ = Materials.VALUES.iterator(); i$.hasNext(); sHeaviestElementMass = Math.max(sHeaviestElementMass, (int) tMaterial.getMass())) {
|
for (Iterator i$ = Materials.VALUES.iterator(); i$.hasNext(); sHeaviestElementMass = Math.max(sHeaviestElementMass, (int) tMaterial.getMass())) {
|
||||||
tMaterial = (Materials) i$.next();
|
tMaterial = (Materials) i$.next();
|
||||||
if ((tMaterial.mElement == null) || (tMaterial.mElement.mIsIsotope)) {
|
//if ((tMaterial.mElement == null) || (tMaterial.mElement.mIsIsotope)) {
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sHeaviestElementMass;
|
return sHeaviestElementMass;
|
||||||
|
|
|
@ -340,8 +340,8 @@ public class GT_MetaTileEntity_BronzeBlastFurnace
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||||
if (aIndex < 2) {
|
//if (aIndex < 2) {
|
||||||
}
|
//}
|
||||||
return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]);
|
return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue