Bugfixes 7
This commit is contained in:
parent
19062e1d36
commit
e85097319b
11 changed files with 403 additions and 551 deletions
|
@ -252,291 +252,282 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
|
||||||
long tTime = System.currentTimeMillis();
|
long tTime = System.currentTimeMillis();
|
||||||
int tCode = 0;
|
int tCode = 0;
|
||||||
|
|
||||||
try { for (tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) {
|
try {
|
||||||
//replace switch in if
|
for (tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) {
|
||||||
//switch (tCode) {
|
if (tCode == 0) {
|
||||||
//case 0:
|
tCode++;
|
||||||
if (tCode == 0) {
|
if (mTickTimer++ == 0) {
|
||||||
tCode++;
|
|
||||||
if (mTickTimer++ == 0) {
|
|
||||||
oX = xCoord;
|
|
||||||
oY = yCoord;
|
|
||||||
oZ = zCoord;
|
|
||||||
if (isServerSide()) for (byte i = 0; i < 6; i++)
|
|
||||||
if (getCoverIDAtSide(i) != 0)
|
|
||||||
if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
|
|
||||||
dropCover(i, i, true);
|
|
||||||
|
|
||||||
worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
|
|
||||||
|
|
||||||
mMetaTileEntity.onFirstTick(this);
|
|
||||||
if (!hasValidMetaTileEntity()) {
|
|
||||||
mRunningThroughTick = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
//case 1:
|
|
||||||
if (tCode == 1) {
|
|
||||||
tCode++;
|
|
||||||
if (isClientSide()) {
|
|
||||||
if (mColor != oColor) {
|
|
||||||
mMetaTileEntity.onColorChangeClient(oColor = mColor);
|
|
||||||
issueTextureUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mLightValue != oLightValueClient) {
|
|
||||||
worldObj.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, mLightValue);
|
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord);
|
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord + 1, yCoord, zCoord);
|
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord - 1, yCoord, zCoord);
|
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord + 1, zCoord);
|
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord - 1, zCoord);
|
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord + 1);
|
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord - 1);
|
|
||||||
oLightValueClient = mLightValue;
|
|
||||||
issueTextureUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mNeedsUpdate) {
|
|
||||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
|
||||||
//worldObj.func_147479_m(xCoord, yCoord, zCoord);
|
|
||||||
mNeedsUpdate = false;
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/*case 2:
|
|
||||||
case 3:
|
|
||||||
case 4:
|
|
||||||
case 5:
|
|
||||||
case 6:
|
|
||||||
case 7:*/
|
|
||||||
if (tCode >= 2 && tCode <= 7) {
|
|
||||||
if (isServerSide() && mTickTimer > 10) {
|
|
||||||
for (byte i = (byte) (tCode - 2); i < 6; i++)
|
|
||||||
if (getCoverIDAtSide(i) != 0) {
|
|
||||||
tCode++;
|
|
||||||
GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
|
|
||||||
int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
|
|
||||||
if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
|
|
||||||
mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
|
|
||||||
if (!hasValidMetaTileEntity()) {
|
|
||||||
mRunningThroughTick = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}}
|
|
||||||
//case 8:
|
|
||||||
if (tCode == 8) {
|
|
||||||
tCode = 9;
|
|
||||||
if (isServerSide()) {
|
|
||||||
if (++mAverageEUInputIndex >= mAverageEUInput.length) mAverageEUInputIndex = 0;
|
|
||||||
if (++mAverageEUOutputIndex >= mAverageEUOutput.length) mAverageEUOutputIndex = 0;
|
|
||||||
|
|
||||||
mAverageEUInput[mAverageEUInputIndex] = 0;
|
|
||||||
mAverageEUOutput[mAverageEUOutputIndex] = 0;
|
|
||||||
}}
|
|
||||||
//case 9:
|
|
||||||
if (tCode == 9) {
|
|
||||||
tCode++;
|
|
||||||
mMetaTileEntity.onPreTick(this, mTickTimer);
|
|
||||||
if (!hasValidMetaTileEntity()) {
|
|
||||||
mRunningThroughTick = false;
|
|
||||||
return;
|
|
||||||
}}
|
|
||||||
//case 10:
|
|
||||||
if (tCode == 10) {
|
|
||||||
tCode++;
|
|
||||||
if (isServerSide()) {
|
|
||||||
if (mRedstone != oRedstone || mTickTimer == 10) {
|
|
||||||
for (byte i = 0; i < 6; i++)
|
|
||||||
mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
|
|
||||||
oRedstone = mRedstone;
|
|
||||||
issueBlockUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (xCoord != oX || yCoord != oY || zCoord != oZ) {
|
|
||||||
oX = xCoord;
|
oX = xCoord;
|
||||||
oY = yCoord;
|
oY = yCoord;
|
||||||
oZ = zCoord;
|
oZ = zCoord;
|
||||||
issueClientUpdate();
|
if (isServerSide()) for (byte i = 0; i < 6; i++)
|
||||||
clearTileEntityBuffer();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mFacing != oFacing) {
|
|
||||||
oFacing = mFacing;
|
|
||||||
for (byte i = 0; i < 6; i++)
|
|
||||||
if (getCoverIDAtSide(i) != 0)
|
if (getCoverIDAtSide(i) != 0)
|
||||||
if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
|
if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
|
||||||
dropCover(i, i, true);
|
dropCover(i, i, true);
|
||||||
issueBlockUpdate();
|
|
||||||
|
worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
|
||||||
|
|
||||||
|
mMetaTileEntity.onFirstTick(this);
|
||||||
|
if (!hasValidMetaTileEntity()) {
|
||||||
|
mRunningThroughTick = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (mTickTimer > 20 && mMetaTileEntity.isElectric()) {
|
if (tCode == 1) {
|
||||||
mAcceptedAmperes = 0;
|
tCode++;
|
||||||
|
if (isClientSide()) {
|
||||||
if (getOutputVoltage() != oOutput) {
|
if (mColor != oColor) {
|
||||||
oOutput = getOutputVoltage();
|
mMetaTileEntity.onColorChangeClient(oColor = mColor);
|
||||||
|
issueTextureUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mMetaTileEntity.isEnetOutput() || mMetaTileEntity.isEnetInput()) {
|
if (mLightValue != oLightValueClient) {
|
||||||
for (byte i = 0; i < 6; i++) {
|
worldObj.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, mLightValue);
|
||||||
boolean
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord);
|
||||||
temp = isEnergyInputSide(i);
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord + 1, yCoord, zCoord);
|
||||||
if (temp != mActiveEUInputs[i]) {
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord - 1, yCoord, zCoord);
|
||||||
mActiveEUInputs[i] = temp;
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord + 1, zCoord);
|
||||||
}
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord - 1, zCoord);
|
||||||
temp = isEnergyOutputSide(i);
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord + 1);
|
||||||
if (temp != mActiveEUOutputs[i]) {
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord - 1);
|
||||||
mActiveEUOutputs[i] = temp;
|
oLightValueClient = mLightValue;
|
||||||
}
|
issueTextureUpdate();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mMetaTileEntity.isEnetOutput() && oOutput > 0) {
|
if (mNeedsUpdate) {
|
||||||
long tOutputVoltage = Math.max(oOutput, oOutput + (1 << GT_Utility.getTier(oOutput))), tUsableAmperage = Math.min(getOutputAmperage(), (getStoredEU() - mMetaTileEntity.getMinimumStoredEU()) / tOutputVoltage);
|
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||||
if (tUsableAmperage > 0) {
|
//worldObj.func_147479_m(xCoord, yCoord, zCoord);
|
||||||
long tEU = tOutputVoltage * IEnergyConnected.Util.emitEnergyToNetwork(oOutput, tUsableAmperage, this);
|
mNeedsUpdate = false;
|
||||||
mAverageEUOutput[mAverageEUOutputIndex] += tEU;
|
|
||||||
decreaseStoredEU(tEU, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (getEUCapacity() > 0) {
|
}
|
||||||
if (GregTech_API.sMachineFireExplosions && getRandomNumber(1000) == 0) {
|
}
|
||||||
Block tBlock = getBlockAtSide((byte) getRandomNumber(6));
|
if (tCode >= 2 && tCode <= 7) {
|
||||||
if (tBlock instanceof BlockFire) doEnergyExplosion();
|
if (isServerSide() && mTickTimer > 10) {
|
||||||
}
|
for (byte i = (byte) (tCode - 2); i < 6; i++)
|
||||||
|
if (getCoverIDAtSide(i) != 0) {
|
||||||
if (!hasValidMetaTileEntity()) {
|
tCode++;
|
||||||
mRunningThroughTick = false;
|
GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
|
||||||
return;
|
int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
|
||||||
}
|
if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
|
||||||
|
mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
|
||||||
if (getRandomNumber(1000) == 0) {
|
|
||||||
if ((getCoverIDAtSide((byte) 1) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord) - 2 < yCoord)
|
|
||||||
|| (getCoverIDAtSide((byte) 2) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord - 1) - 1 < yCoord)
|
|
||||||
|| (getCoverIDAtSide((byte) 3) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord + 1) - 1 < yCoord)
|
|
||||||
|| (getCoverIDAtSide((byte) 4) == 0 && worldObj.getPrecipitationHeight(xCoord - 1, zCoord) - 1 < yCoord)
|
|
||||||
|| (getCoverIDAtSide((byte) 5) == 0 && worldObj.getPrecipitationHeight(xCoord + 1, zCoord) - 1 < yCoord)) {
|
|
||||||
if (GregTech_API.sMachineRainExplosions && worldObj.isRaining() && getBiome().rainfall > 0) {
|
|
||||||
if (getRandomNumber(10) == 0) {
|
|
||||||
//try {
|
|
||||||
GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");
|
|
||||||
//} catch (Exception e) {
|
|
||||||
//}
|
|
||||||
doEnergyExplosion();
|
|
||||||
} else setOnFire();
|
|
||||||
}
|
|
||||||
if (!hasValidMetaTileEntity()) {
|
if (!hasValidMetaTileEntity()) {
|
||||||
mRunningThroughTick = false;
|
mRunningThroughTick = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (GregTech_API.sMachineThunderExplosions && worldObj.isThundering() && getBiome().rainfall > 0 && getRandomNumber(3) == 0) {
|
|
||||||
try {
|
|
||||||
GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");
|
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
|
||||||
doEnergyExplosion();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tCode == 8) {
|
||||||
|
tCode = 9;
|
||||||
|
if (isServerSide()) {
|
||||||
|
if (++mAverageEUInputIndex >= mAverageEUInput.length) mAverageEUInputIndex = 0;
|
||||||
|
if (++mAverageEUOutputIndex >= mAverageEUOutput.length) mAverageEUOutputIndex = 0;
|
||||||
|
|
||||||
|
mAverageEUInput[mAverageEUInputIndex] = 0;
|
||||||
|
mAverageEUOutput[mAverageEUOutputIndex] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tCode == 9) {
|
||||||
|
tCode++;
|
||||||
|
mMetaTileEntity.onPreTick(this, mTickTimer);
|
||||||
if (!hasValidMetaTileEntity()) {
|
if (!hasValidMetaTileEntity()) {
|
||||||
mRunningThroughTick = false;
|
mRunningThroughTick = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//case 11:
|
if (tCode == 10) {
|
||||||
if (tCode == 11) {
|
|
||||||
tCode++;
|
tCode++;
|
||||||
if (isServerSide()) {
|
if (isServerSide()) {
|
||||||
if (mMetaTileEntity.dechargerSlotCount() > 0 && getStoredEU() < getEUCapacity()) {
|
if (mRedstone != oRedstone || mTickTimer == 10) {
|
||||||
for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) {
|
for (byte i = 0; i < 6; i++)
|
||||||
if (mMetaTileEntity.mInventory[i] != null && getStoredEU() < getEUCapacity()) {
|
mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
|
||||||
dischargeItem(mMetaTileEntity.mInventory[i]);
|
oRedstone = mRedstone;
|
||||||
if (mMetaTileEntity.mInventory[i].stackSize <= 0)
|
issueBlockUpdate();
|
||||||
mMetaTileEntity.mInventory[i] = null;
|
}
|
||||||
mInventoryChanged = true;
|
|
||||||
|
if (xCoord != oX || yCoord != oY || zCoord != oZ) {
|
||||||
|
oX = xCoord;
|
||||||
|
oY = yCoord;
|
||||||
|
oZ = zCoord;
|
||||||
|
issueClientUpdate();
|
||||||
|
clearTileEntityBuffer();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mFacing != oFacing) {
|
||||||
|
oFacing = mFacing;
|
||||||
|
for (byte i = 0; i < 6; i++)
|
||||||
|
if (getCoverIDAtSide(i) != 0)
|
||||||
|
if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
|
||||||
|
dropCover(i, i, true);
|
||||||
|
issueBlockUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mTickTimer > 20 && mMetaTileEntity.isElectric()) {
|
||||||
|
mAcceptedAmperes = 0;
|
||||||
|
|
||||||
|
if (getOutputVoltage() != oOutput) {
|
||||||
|
oOutput = getOutputVoltage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mMetaTileEntity.isEnetOutput() || mMetaTileEntity.isEnetInput()) {
|
||||||
|
for (byte i = 0; i < 6; i++) {
|
||||||
|
boolean
|
||||||
|
temp = isEnergyInputSide(i);
|
||||||
|
if (temp != mActiveEUInputs[i]) {
|
||||||
|
mActiveEUInputs[i] = temp;
|
||||||
|
}
|
||||||
|
temp = isEnergyOutputSide(i);
|
||||||
|
if (temp != mActiveEUOutputs[i]) {
|
||||||
|
mActiveEUOutputs[i] = temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mMetaTileEntity.isEnetOutput() && oOutput > 0) {
|
||||||
|
long tOutputVoltage = Math.max(oOutput, oOutput + (1 << GT_Utility.getTier(oOutput))), tUsableAmperage = Math.min(getOutputAmperage(), (getStoredEU() - mMetaTileEntity.getMinimumStoredEU()) / tOutputVoltage);
|
||||||
|
if (tUsableAmperage > 0) {
|
||||||
|
long tEU = tOutputVoltage * IEnergyConnected.Util.emitEnergyToNetwork(oOutput, tUsableAmperage, this);
|
||||||
|
mAverageEUOutput[mAverageEUOutputIndex] += tEU;
|
||||||
|
decreaseStoredEU(tEU, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (getEUCapacity() > 0) {
|
||||||
|
if (GregTech_API.sMachineFireExplosions && getRandomNumber(1000) == 0) {
|
||||||
|
Block tBlock = getBlockAtSide((byte) getRandomNumber(6));
|
||||||
|
if (tBlock instanceof BlockFire) doEnergyExplosion();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!hasValidMetaTileEntity()) {
|
||||||
|
mRunningThroughTick = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getRandomNumber(1000) == 0) {
|
||||||
|
if ((getCoverIDAtSide((byte) 1) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord) - 2 < yCoord)
|
||||||
|
|| (getCoverIDAtSide((byte) 2) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord - 1) - 1 < yCoord)
|
||||||
|
|| (getCoverIDAtSide((byte) 3) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord + 1) - 1 < yCoord)
|
||||||
|
|| (getCoverIDAtSide((byte) 4) == 0 && worldObj.getPrecipitationHeight(xCoord - 1, zCoord) - 1 < yCoord)
|
||||||
|
|| (getCoverIDAtSide((byte) 5) == 0 && worldObj.getPrecipitationHeight(xCoord + 1, zCoord) - 1 < yCoord)) {
|
||||||
|
if (GregTech_API.sMachineRainExplosions && worldObj.isRaining() && getBiome().rainfall > 0) {
|
||||||
|
if (getRandomNumber(10) == 0) {
|
||||||
|
GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");
|
||||||
|
doEnergyExplosion();
|
||||||
|
} else setOnFire();
|
||||||
|
}
|
||||||
|
if (!hasValidMetaTileEntity()) {
|
||||||
|
mRunningThroughTick = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (GregTech_API.sMachineThunderExplosions && worldObj.isThundering() && getBiome().rainfall > 0 && getRandomNumber(3) == 0) {
|
||||||
|
try {
|
||||||
|
GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
doEnergyExplosion();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
|
||||||
//case 12:
|
if (!hasValidMetaTileEntity()) {
|
||||||
if (tCode == 12) {
|
mRunningThroughTick = false;
|
||||||
tCode++;
|
return;
|
||||||
if (isServerSide()) {
|
}
|
||||||
if (mMetaTileEntity.rechargerSlotCount() > 0 && getStoredEU() > 0) {
|
}
|
||||||
for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) {
|
if (tCode == 11) {
|
||||||
if (getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) {
|
tCode++;
|
||||||
chargeItem(mMetaTileEntity.mInventory[i]);
|
if (isServerSide()) {
|
||||||
if (mMetaTileEntity.mInventory[i].stackSize <= 0)
|
if (mMetaTileEntity.dechargerSlotCount() > 0 && getStoredEU() < getEUCapacity()) {
|
||||||
mMetaTileEntity.mInventory[i] = null;
|
for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) {
|
||||||
mInventoryChanged = true;
|
if (mMetaTileEntity.mInventory[i] != null && getStoredEU() < getEUCapacity()) {
|
||||||
|
dischargeItem(mMetaTileEntity.mInventory[i]);
|
||||||
|
if (mMetaTileEntity.mInventory[i].stackSize <= 0)
|
||||||
|
mMetaTileEntity.mInventory[i] = null;
|
||||||
|
mInventoryChanged = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
}
|
||||||
//case 13:
|
if (tCode == 12) {
|
||||||
if (tCode == 13) {
|
tCode++;
|
||||||
tCode++;
|
if (isServerSide()) {
|
||||||
updateStatus();
|
if (mMetaTileEntity.rechargerSlotCount() > 0 && getStoredEU() > 0) {
|
||||||
if (!hasValidMetaTileEntity()) {
|
for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) {
|
||||||
mRunningThroughTick = false;
|
if (getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) {
|
||||||
return;
|
chargeItem(mMetaTileEntity.mInventory[i]);
|
||||||
}}
|
if (mMetaTileEntity.mInventory[i].stackSize <= 0)
|
||||||
//case 14:
|
mMetaTileEntity.mInventory[i] = null;
|
||||||
if (tCode == 14) {
|
mInventoryChanged = true;
|
||||||
tCode++;
|
}
|
||||||
mMetaTileEntity.onPostTick(this, mTickTimer);
|
}
|
||||||
if (!hasValidMetaTileEntity()) {
|
|
||||||
mRunningThroughTick = false;
|
|
||||||
return;
|
|
||||||
}}
|
|
||||||
//case 15:
|
|
||||||
if (tCode == 15) {
|
|
||||||
tCode++;
|
|
||||||
if (isServerSide()) {
|
|
||||||
if (mTickTimer % 10 == 0) {
|
|
||||||
if (mSendClientData) {
|
|
||||||
NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0)), oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), oColor = mColor), xCoord, zCoord);
|
|
||||||
mSendClientData = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (tCode == 13) {
|
||||||
|
tCode++;
|
||||||
|
updateStatus();
|
||||||
|
if (!hasValidMetaTileEntity()) {
|
||||||
|
mRunningThroughTick = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tCode == 14) {
|
||||||
|
tCode++;
|
||||||
|
mMetaTileEntity.onPostTick(this, mTickTimer);
|
||||||
|
if (!hasValidMetaTileEntity()) {
|
||||||
|
mRunningThroughTick = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tCode == 15) {
|
||||||
|
tCode++;
|
||||||
|
if (isServerSide()) {
|
||||||
|
if (mTickTimer % 10 == 0) {
|
||||||
|
if (mSendClientData) {
|
||||||
|
NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0)), oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), oColor = mColor), xCoord, zCoord);
|
||||||
|
mSendClientData = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mTickTimer > 10) {
|
if (mTickTimer > 10) {
|
||||||
byte tData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0));
|
byte tData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0));
|
||||||
if (tData != oTextureData) sendBlockEvent((byte) 0, oTextureData = tData);
|
if (tData != oTextureData) sendBlockEvent((byte) 0, oTextureData = tData);
|
||||||
tData = mMetaTileEntity.getUpdateData();
|
tData = mMetaTileEntity.getUpdateData();
|
||||||
if (tData != oUpdateData) sendBlockEvent((byte) 1, oUpdateData = tData);
|
if (tData != oUpdateData) sendBlockEvent((byte) 1, oUpdateData = tData);
|
||||||
if (mColor != oColor) sendBlockEvent((byte) 2, oColor = mColor);
|
if (mColor != oColor) sendBlockEvent((byte) 2, oColor = mColor);
|
||||||
tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0));
|
tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0));
|
||||||
if (tData != oRedstoneData) sendBlockEvent((byte) 3, oRedstoneData = tData);
|
if (tData != oRedstoneData) sendBlockEvent((byte) 3, oRedstoneData = tData);
|
||||||
if (mLightValue != oLightValue) {
|
if (mLightValue != oLightValue) {
|
||||||
worldObj.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, mLightValue);
|
worldObj.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, mLightValue);
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord);
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord);
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord + 1, yCoord, zCoord);
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord + 1, yCoord, zCoord);
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord - 1, yCoord, zCoord);
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord - 1, yCoord, zCoord);
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord + 1, zCoord);
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord + 1, zCoord);
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord - 1, zCoord);
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord - 1, zCoord);
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord + 1);
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord + 1);
|
||||||
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord - 1);
|
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord - 1);
|
||||||
issueTextureUpdate();
|
issueTextureUpdate();
|
||||||
sendBlockEvent((byte) 7, oLightValue = mLightValue);
|
sendBlockEvent((byte) 7, oLightValue = mLightValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mNeedsBlockUpdate) {
|
||||||
|
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
|
||||||
|
mNeedsBlockUpdate = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (mNeedsBlockUpdate) {
|
if (tCode > 15) {
|
||||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
|
tCode = -1;
|
||||||
mNeedsBlockUpdate = false;
|
break;
|
||||||
}
|
}
|
||||||
}}
|
}
|
||||||
//default:
|
}
|
||||||
if (tCode > 15) {
|
|
||||||
tCode = -1;
|
|
||||||
break;}
|
|
||||||
}}
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
gregtech.api.util.GT_Log.err.println("Encountered Exception while ticking MetaTileEntity in Step " + (tCode - 1) + ". The Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
|
gregtech.api.util.GT_Log.err.println("Encountered Exception while ticking MetaTileEntity in Step " + (tCode - 1) + ". The Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
|
||||||
e.printStackTrace(GT_Log.err);
|
e.printStackTrace(GT_Log.err);
|
||||||
|
|
|
@ -259,7 +259,7 @@ public class GT_OreDictUnificator {
|
||||||
|
|
||||||
public static ItemStack getGem(Materials aMaterial, long aMaterialAmount) {
|
public static ItemStack getGem(Materials aMaterial, long aMaterialAmount) {
|
||||||
ItemStack rStack = null;
|
ItemStack rStack = null;
|
||||||
if (((aMaterialAmount >= M)/* || aMaterialAmount >= M * 32*/))
|
if (((aMaterialAmount >= M)))
|
||||||
rStack = get(OrePrefixes.gem, aMaterial, aMaterialAmount / M);
|
rStack = get(OrePrefixes.gem, aMaterial, aMaterialAmount / M);
|
||||||
if (rStack == null) {
|
if (rStack == null) {
|
||||||
if ((((aMaterialAmount * 2) % M == 0) || aMaterialAmount >= M * 16))
|
if ((((aMaterialAmount * 2) % M == 0) || aMaterialAmount >= M * 16))
|
||||||
|
|
|
@ -176,7 +176,7 @@ public class GT_RecipeRegistrator {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerReverseArcSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03) {
|
public static void registerReverseArcSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03) {
|
||||||
registerReverseArcSmelting(aStack, new ItemData(/*aMaterial == null ? null : */new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03));
|
registerReverseArcSmelting(aStack, new ItemData(new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerReverseArcSmelting(ItemStack aStack, ItemData aData) {
|
public static void registerReverseArcSmelting(ItemStack aStack, ItemData aData) {
|
||||||
|
@ -234,7 +234,7 @@ public class GT_RecipeRegistrator {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerReverseMacerating(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03, boolean aAllowHammer) {
|
public static void registerReverseMacerating(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03, boolean aAllowHammer) {
|
||||||
registerReverseMacerating(aStack, new ItemData(/*aMaterial == null ? null : */new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03), aAllowHammer);
|
registerReverseMacerating(aStack, new ItemData(new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03), aAllowHammer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerReverseMacerating(ItemStack aStack, ItemData aData, boolean aAllowHammer) {
|
public static void registerReverseMacerating(ItemStack aStack, ItemData aData, boolean aAllowHammer) {
|
||||||
|
|
|
@ -325,13 +325,6 @@ public class GT_Client extends GT_Proxy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//dead event
|
|
||||||
/*@*//*SubscribeEvent*/
|
|
||||||
/*@SubscribeEvent
|
|
||||||
public void receiveRenderSpecialsEvent(net.minecraftforge.client.event.RenderPlayerEvent.Specials.Pre aEvent) {
|
|
||||||
mCapeRenderer.receiveRenderSpecialsEvent(aEvent);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onClientTickEvent(cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent aEvent) {
|
public void onClientTickEvent(cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent aEvent) {
|
||||||
if (aEvent.phase == cpw.mods.fml.common.gameevent.TickEvent.Phase.END) {
|
if (aEvent.phase == cpw.mods.fml.common.gameevent.TickEvent.Phase.END) {
|
||||||
|
|
|
@ -987,79 +987,64 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
|
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
|
||||||
}
|
}
|
||||||
this.mRegisteredOres.add(aEvent.Ore);
|
this.mRegisteredOres.add(aEvent.Ore);
|
||||||
if ((aEvent.Name.startsWith("item")) && (this.mIgnoredItems.contains(aEvent.Name))) {
|
if ((this.mIgnoredItems.contains(aEvent.Name))) {
|
||||||
GT_Log.ore.println(tModToName);
|
if ((aEvent.Name.startsWith("item"))) {
|
||||||
if (aEvent.Name.equals("itemCopperWire")) {
|
GT_Log.ore.println(tModToName);
|
||||||
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
|
if (aEvent.Name.equals("itemCopperWire")) {
|
||||||
|
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
|
||||||
|
} else if (aEvent.Name.equals("itemRubber")) {
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Rubber, aEvent.Ore);
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (aEvent.Name.equals("itemRubber")) {
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Rubber, aEvent.Ore);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.mIgnoredNames.contains(aEvent.Name)) {
|
|
||||||
GT_Log.ore.println(tModToName + " is getting ignored via hardcode.");
|
GT_Log.ore.println(tModToName + " is getting ignored via hardcode.");
|
||||||
return;
|
return;
|
||||||
}
|
} else if (aEvent.Name.equals("stone")) {
|
||||||
if (aEvent.Name.equals("stone")) {
|
|
||||||
GT_OreDictUnificator.registerOre("stoneSmooth", aEvent.Ore);
|
GT_OreDictUnificator.registerOre("stoneSmooth", aEvent.Ore);
|
||||||
return;
|
return;
|
||||||
}
|
} else if (aEvent.Name.equals("cobblestone")) {
|
||||||
if (aEvent.Name.equals("cobblestone")) {
|
|
||||||
GT_OreDictUnificator.registerOre("stoneCobble", aEvent.Ore);
|
GT_OreDictUnificator.registerOre("stoneCobble", aEvent.Ore);
|
||||||
return;
|
return;
|
||||||
}
|
} else if ((aEvent.Name.contains("|")) || (aEvent.Name.contains("*")) || (aEvent.Name.contains(":")) || (aEvent.Name.contains("."))
|
||||||
if ((aEvent.Name.contains("|")) || (aEvent.Name.contains("*")) || (aEvent.Name.contains(":")) || (aEvent.Name.contains("."))
|
|
||||||
|| (aEvent.Name.contains("$"))) {
|
|| (aEvent.Name.contains("$"))) {
|
||||||
GT_Log.ore.println(tModToName + " is using a private Prefix and is therefor getting ignored properly.");
|
GT_Log.ore.println(tModToName + " is using a private Prefix and is therefor getting ignored properly.");
|
||||||
return;
|
return;
|
||||||
}
|
} else if (aEvent.Name.equals("copperWire")) {
|
||||||
if (aEvent.Name.equals("copperWire")) {
|
|
||||||
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
|
||||||
}
|
} else if (aEvent.Name.equals("oreHeeEndrium")) {
|
||||||
if (aEvent.Name.equals("oreHeeEndrium")) {
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.ore, Materials.Endium, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OrePrefixes.ore, Materials.Endium, aEvent.Ore);
|
||||||
}
|
} else if (aEvent.Name.equals("sheetPlastic")) {
|
||||||
if (aEvent.Name.equals("sheetPlastic")) {
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.plate, Materials.Plastic, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OrePrefixes.plate, Materials.Plastic, aEvent.Ore);
|
||||||
}
|
} else if (aEvent.Name.startsWith("shard")) {
|
||||||
if (aEvent.Name.equals("shardAir")) {
|
if (aEvent.Name.equals("shardAir")) {
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedAir, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedAir, aEvent.Ore);
|
||||||
return;
|
return;
|
||||||
}
|
} else if (aEvent.Name.equals("shardWater")) {
|
||||||
if (aEvent.Name.equals("shardWater")) {
|
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedWater, aEvent.Ore);
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedWater, aEvent.Ore);
|
return;
|
||||||
return;
|
} else if (aEvent.Name.equals("shardFire")) {
|
||||||
}
|
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedFire, aEvent.Ore);
|
||||||
if (aEvent.Name.equals("shardFire")) {
|
return;
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedFire, aEvent.Ore);
|
} else if (aEvent.Name.equals("shardEarth")) {
|
||||||
return;
|
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEarth, aEvent.Ore);
|
||||||
}
|
return;
|
||||||
if (aEvent.Name.equals("shardEarth")) {
|
} else if (aEvent.Name.equals("shardOrder")) {
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEarth, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedOrder, aEvent.Ore);
|
||||||
return;
|
return;
|
||||||
}
|
} else if (aEvent.Name.equals("shardEntropy")) {
|
||||||
if (aEvent.Name.equals("shardOrder")) {
|
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEntropy, aEvent.Ore);
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedOrder, aEvent.Ore);
|
return;
|
||||||
return;
|
}
|
||||||
}
|
} else if (aEvent.Name.equals("fieryIngot")) {
|
||||||
if (aEvent.Name.equals("shardEntropy")) {
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEntropy, aEvent.Ore);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (aEvent.Name.equals("fieryIngot")) {
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.FierySteel, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.FierySteel, aEvent.Ore);
|
||||||
return;
|
return;
|
||||||
}
|
} else if (aEvent.Name.equals("ironwood")) {
|
||||||
if (aEvent.Name.equals("ironwood")) {
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.IronWood, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.IronWood, aEvent.Ore);
|
||||||
return;
|
return;
|
||||||
}
|
} else if (aEvent.Name.equals("steeleaf")) {
|
||||||
if (aEvent.Name.equals("steeleaf")) {
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Steeleaf, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Steeleaf, aEvent.Ore);
|
||||||
return;
|
return;
|
||||||
}
|
} else if (aEvent.Name.equals("knightmetal")) {
|
||||||
if (aEvent.Name.equals("knightmetal")) {
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Knightmetal, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Knightmetal, aEvent.Ore);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1083,12 +1068,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
if (aEvent.Name.toLowerCase().equals(aEvent.Name)) {
|
if (aEvent.Name.toLowerCase().equals(aEvent.Name)) {
|
||||||
GT_Log.ore.println(tModToName + " is invalid due to being solely lowercased.");
|
GT_Log.ore.println(tModToName + " is invalid due to being solely lowercased.");
|
||||||
return;
|
return;
|
||||||
}
|
} else if (aEvent.Name.toUpperCase().equals(aEvent.Name)) {
|
||||||
if (aEvent.Name.toUpperCase().equals(aEvent.Name)) {
|
|
||||||
GT_Log.ore.println(tModToName + " is invalid due to being solely uppercased.");
|
GT_Log.ore.println(tModToName + " is invalid due to being solely uppercased.");
|
||||||
return;
|
return;
|
||||||
}
|
} else if (Character.isUpperCase(aEvent.Name.charAt(0))) {
|
||||||
if (Character.isUpperCase(aEvent.Name.charAt(0))) {
|
|
||||||
GT_Log.ore.println(tModToName + " is invalid due to the first character being uppercased.");
|
GT_Log.ore.println(tModToName + " is invalid due to the first character being uppercased.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1142,48 +1125,32 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case gem:
|
case gem:
|
||||||
switch (aMaterial) {
|
if (aMaterial == Materials.Lapis || aMaterial == Materials.Sodalite) {
|
||||||
case Lapis:
|
GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
|
||||||
case Sodalite:
|
} else if (aMaterial == Materials.Lazurite) {
|
||||||
GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
|
||||||
break;
|
} else if (aMaterial == Materials.InfusedAir || aMaterial == Materials.InfusedWater || aMaterial == Materials.InfusedFire || aMaterial == Materials.InfusedEarth || aMaterial == Materials.InfusedOrder || aMaterial == Materials.InfusedEntropy) {
|
||||||
case Lazurite:
|
GT_OreDictUnificator.registerOre(aMaterial.name().replaceFirst("Infused", "shard"), aEvent.Ore);
|
||||||
GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
|
} else if (aMaterial == Materials.Chocolate) {
|
||||||
break;
|
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
|
||||||
case InfusedAir:
|
} else if (aMaterial == Materials.CertusQuartz || aMaterial == Materials.NetherQuartz) {
|
||||||
case InfusedWater:
|
GT_OreDictUnificator.registerOre(OrePrefixes.item.get(aMaterial), aEvent.Ore);
|
||||||
case InfusedFire:
|
//Java (?) logic, redundant code
|
||||||
case InfusedEarth:
|
GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
|
||||||
case InfusedOrder:
|
GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
|
||||||
case InfusedEntropy:
|
} else if (aMaterial == Materials.Fluix || aMaterial == Materials.Quartz || aMaterial == Materials.Quartzite) {
|
||||||
GT_OreDictUnificator.registerOre(aMaterial.name().replaceFirst("Infused", "shard"), aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
|
||||||
break;
|
GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
|
||||||
case Chocolate:
|
|
||||||
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
|
|
||||||
break;
|
|
||||||
case CertusQuartz:
|
|
||||||
case NetherQuartz:
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.item.get(aMaterial), aEvent.Ore);
|
|
||||||
case Fluix:
|
|
||||||
case Quartz:
|
|
||||||
case Quartzite:
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
|
|
||||||
GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case cableGt01:
|
case cableGt01:
|
||||||
if (aMaterial == Materials.Tin) {
|
if (aMaterial == Materials.Tin) {
|
||||||
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireTin, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireTin, aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.AnyCopper) {
|
||||||
if (aMaterial == Materials.AnyCopper) {
|
|
||||||
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.Gold) {
|
||||||
if (aMaterial == Materials.Gold) {
|
|
||||||
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireGold, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireGold, aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.AnyIron) {
|
||||||
if (aMaterial == Materials.AnyIron) {
|
|
||||||
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireIron, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireIron, aEvent.Ore);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1195,11 +1162,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
case plate:
|
case plate:
|
||||||
if ((aMaterial == Materials.Plastic) || (aMaterial == Materials.Rubber)) {
|
if ((aMaterial == Materials.Plastic) || (aMaterial == Materials.Rubber)) {
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.sheet, aMaterial, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OrePrefixes.sheet, aMaterial, aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.Silicon) {
|
||||||
if (aMaterial == Materials.Silicon) {
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.item, aMaterial, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OrePrefixes.item, aMaterial, aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.Wood) {
|
||||||
if (aMaterial == Materials.Wood) {
|
|
||||||
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
|
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.plank, aMaterial, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OrePrefixes.plank, aMaterial, aEvent.Ore);
|
||||||
}
|
}
|
||||||
|
@ -1215,64 +1180,48 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
case stick:
|
case stick:
|
||||||
if (!GT_RecipeRegistrator.sRodMaterialList.contains(aMaterial)) {
|
if (!GT_RecipeRegistrator.sRodMaterialList.contains(aMaterial)) {
|
||||||
GT_RecipeRegistrator.sRodMaterialList.add(aMaterial);
|
GT_RecipeRegistrator.sRodMaterialList.add(aMaterial);
|
||||||
}
|
} else if (aMaterial == Materials.Wood) {
|
||||||
if (aMaterial == Materials.Wood) {
|
|
||||||
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
|
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
|
||||||
}
|
} else if ((aMaterial == Materials.Tin) || (aMaterial == Materials.Lead) || (aMaterial == Materials.SolderingAlloy)) {
|
||||||
if ((aMaterial == Materials.Tin) || (aMaterial == Materials.Lead) || (aMaterial == Materials.SolderingAlloy)) {
|
|
||||||
GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolSolderingMetal, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolSolderingMetal, aEvent.Ore);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case dust:
|
case dust:
|
||||||
if (aMaterial == Materials.Salt) {
|
if (aMaterial == Materials.Salt) {
|
||||||
GT_OreDictUnificator.registerOre("itemSalt", aEvent.Ore);
|
GT_OreDictUnificator.registerOre("itemSalt", aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.Wood) {
|
||||||
if (aMaterial == Materials.Wood) {
|
|
||||||
GT_OreDictUnificator.registerOre("pulpWood", aEvent.Ore);
|
GT_OreDictUnificator.registerOre("pulpWood", aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.Wheat) {
|
||||||
if (aMaterial == Materials.Wheat) {
|
|
||||||
GT_OreDictUnificator.registerOre("foodFlour", aEvent.Ore);
|
GT_OreDictUnificator.registerOre("foodFlour", aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.Lapis) {
|
||||||
if (aMaterial == Materials.Lapis) {
|
|
||||||
GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.Lazurite) {
|
||||||
if (aMaterial == Materials.Lazurite) {
|
|
||||||
GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.Sodalite) {
|
||||||
if (aMaterial == Materials.Sodalite) {
|
|
||||||
GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.Cocoa) {
|
||||||
if (aMaterial == Materials.Cocoa) {
|
|
||||||
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
|
||||||
GT_OreDictUnificator.registerOre("foodCocoapowder", aEvent.Ore);
|
GT_OreDictUnificator.registerOre("foodCocoapowder", aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.Coffee) {
|
||||||
if (aMaterial == Materials.Coffee) {
|
|
||||||
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.BrownLimonite) {
|
||||||
if (aMaterial == Materials.BrownLimonite) {
|
|
||||||
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.YellowLimonite) {
|
||||||
if (aMaterial == Materials.YellowLimonite) {
|
|
||||||
GT_OreDictUnificator.registerOre(Dyes.dyeYellow, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(Dyes.dyeYellow, aEvent.Ore);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ingot:
|
case ingot:
|
||||||
if (aMaterial == Materials.Rubber) {
|
if (aMaterial == Materials.Rubber) {
|
||||||
GT_OreDictUnificator.registerOre("itemRubber", aEvent.Ore);
|
GT_OreDictUnificator.registerOre("itemRubber", aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.FierySteel) {
|
||||||
if (aMaterial == Materials.FierySteel) {
|
|
||||||
GT_OreDictUnificator.registerOre("fieryIngot", aEvent.Ore);
|
GT_OreDictUnificator.registerOre("fieryIngot", aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.IronWood) {
|
||||||
if (aMaterial == Materials.IronWood) {
|
|
||||||
GT_OreDictUnificator.registerOre("ironwood", aEvent.Ore);
|
GT_OreDictUnificator.registerOre("ironwood", aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.Steeleaf) {
|
||||||
if (aMaterial == Materials.Steeleaf) {
|
|
||||||
GT_OreDictUnificator.registerOre("steeleaf", aEvent.Ore);
|
GT_OreDictUnificator.registerOre("steeleaf", aEvent.Ore);
|
||||||
}
|
} else if (aMaterial == Materials.Knightmetal) {
|
||||||
if (aMaterial == Materials.Knightmetal) {
|
|
||||||
GT_OreDictUnificator.registerOre("knightmetal", aEvent.Ore);
|
GT_OreDictUnificator.registerOre("knightmetal", aEvent.Ore);
|
||||||
}
|
} else if ((aMaterial == Materials.Brass) && (aEvent.Ore.getItemDamage() == 2)
|
||||||
if ((aMaterial == Materials.Brass) && (aEvent.Ore.getItemDamage() == 2)
|
|
||||||
&& (aEvent.Ore.getUnlocalizedName().equals("item.ingotBrass"))
|
&& (aEvent.Ore.getUnlocalizedName().equals("item.ingotBrass"))
|
||||||
&& (new ItemStack(aEvent.Ore.getItem(), 1, 0).getUnlocalizedName().contains("red"))) {
|
&& (new ItemStack(aEvent.Ore.getItem(), 1, 0).getUnlocalizedName().contains("red"))) {
|
||||||
GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.RedAlloy, new ItemStack(aEvent.Ore.getItem(), 1, 0));
|
GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.RedAlloy, new ItemStack(aEvent.Ore.getItem(), 1, 0));
|
||||||
|
@ -1304,6 +1253,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
}
|
}
|
||||||
// System.out.println("Material Name: "+aEvent.Name+ " !!!Unknown Material detected!!! 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.");
|
// System.out.println("Material Name: "+aEvent.Name+ " !!!Unknown Material detected!!! 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.");
|
||||||
// GT_Log.ore.println(tModToName + " uses an unknown Material. Report this to GregTech.");
|
// GT_Log.ore.println(tModToName + " uses an unknown Material. Report this to GregTech.");
|
||||||
|
GT_Log.ore.println(tModToName + " uses an unknown Material.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1350,11 +1300,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
case crafting:
|
case crafting:
|
||||||
if (tName.equals("ToolSolderingMetal")) {
|
if (tName.equals("ToolSolderingMetal")) {
|
||||||
GregTech_API.registerSolderingMetal(aEvent.Ore);
|
GregTech_API.registerSolderingMetal(aEvent.Ore);
|
||||||
}
|
} else if (tName.equals("IndustrialDiamond")) {
|
||||||
if (tName.equals("IndustrialDiamond")) {
|
|
||||||
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
|
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
|
||||||
}
|
} else if (tName.equals("WireCopper")) {
|
||||||
if (tName.equals("WireCopper")) {
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.wire, Materials.Copper, aEvent.Ore);
|
GT_OreDictUnificator.registerOre(OrePrefixes.wire, Materials.Copper, aEvent.Ore);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1455,7 +1403,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPlayerTickEventServer(TickEvent.PlayerTickEvent aEvent) {
|
public void onPlayerTickEventServer(TickEvent.PlayerTickEvent aEvent) {
|
||||||
if ((!aEvent.player.isDead) && (aEvent.phase == TickEvent.Phase.END) && (aEvent.side.isServer())) {
|
if ((aEvent.side.isServer()) && (aEvent.phase == TickEvent.Phase.END) && (!aEvent.player.isDead)) {
|
||||||
if ((aEvent.player.ticksExisted % 200 == 0) && (aEvent.player.capabilities.allowEdit) && (!aEvent.player.capabilities.isCreativeMode)
|
if ((aEvent.player.ticksExisted % 200 == 0) && (aEvent.player.capabilities.allowEdit) && (!aEvent.player.capabilities.isCreativeMode)
|
||||||
&& (this.mSurvivalIntoAdventure)) {
|
&& (this.mSurvivalIntoAdventure)) {
|
||||||
aEvent.player.setGameType(GameType.ADVENTURE);
|
aEvent.player.setGameType(GameType.ADVENTURE);
|
||||||
|
@ -1615,149 +1563,101 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
}
|
}
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemSodium")) {
|
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemSodium")) {
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 4000);
|
rFuelValue = (short) Math.max(rFuelValue, 4000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedSodium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedSodium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 4000);
|
rFuelValue = (short) Math.max(rFuelValue, 4000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureSodium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureSodium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 4000);
|
rFuelValue = (short) Math.max(rFuelValue, 4000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSodium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSodium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 4000);
|
rFuelValue = (short) Math.max(rFuelValue, 4000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallSodium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallSodium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 1000);
|
rFuelValue = (short) Math.max(rFuelValue, 1000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinySodium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinySodium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 444);
|
rFuelValue = (short) Math.max(rFuelValue, 444);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemLithium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemLithium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedLithium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedLithium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureLithium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureLithium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustLithium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustLithium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallLithium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallLithium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 2000);
|
rFuelValue = (short) Math.max(rFuelValue, 2000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyLithium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyLithium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 888);
|
rFuelValue = (short) Math.max(rFuelValue, 888);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCaesium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCaesium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCaesium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCaesium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCaesium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCaesium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCaesium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCaesium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
rFuelValue = (short) Math.max(rFuelValue, 6000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCaesium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCaesium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 2000);
|
rFuelValue = (short) Math.max(rFuelValue, 2000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCaesium")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCaesium")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 888);
|
rFuelValue = (short) Math.max(rFuelValue, 888);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemLignite")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemLignite")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 1200);
|
rFuelValue = (short) Math.max(rFuelValue, 1200);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedLignite")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedLignite")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 1200);
|
rFuelValue = (short) Math.max(rFuelValue, 1200);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureLignite")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureLignite")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 1200);
|
rFuelValue = (short) Math.max(rFuelValue, 1200);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustLignite")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustLignite")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 1200);
|
rFuelValue = (short) Math.max(rFuelValue, 1200);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallLignite")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallLignite")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 375);
|
rFuelValue = (short) Math.max(rFuelValue, 375);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyLignite")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyLignite")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 166);
|
rFuelValue = (short) Math.max(rFuelValue, 166);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCoal")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCoal")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCoal")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCoal")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCoal")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCoal")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCoal")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCoal")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCoal")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCoal")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 400);
|
rFuelValue = (short) Math.max(rFuelValue, 400);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCoal")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCoal")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 177);
|
rFuelValue = (short) Math.max(rFuelValue, 177);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCharcoal")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCharcoal")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCharcoal")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCharcoal")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCharcoal")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCharcoal")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCharcoal")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCharcoal")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
rFuelValue = (short) Math.max(rFuelValue, 1600);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCharcoal")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCharcoal")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 400);
|
rFuelValue = (short) Math.max(rFuelValue, 400);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCharcoal")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCharcoal")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 177);
|
rFuelValue = (short) Math.max(rFuelValue, 177);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustWood")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustWood")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 100);
|
rFuelValue = (short) Math.max(rFuelValue, 100);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallWood")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallWood")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 25);
|
rFuelValue = (short) Math.max(rFuelValue, 25);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyWood")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyWood")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 11);
|
rFuelValue = (short) Math.max(rFuelValue, 11);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "plateWood")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "plateWood")) {
|
|
||||||
rFuelValue = (short) Math.min(rFuelValue, 300);
|
rFuelValue = (short) Math.min(rFuelValue, 300);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "blockLignite")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "blockLignite")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 12000);
|
rFuelValue = (short) Math.max(rFuelValue, 12000);
|
||||||
}
|
} else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "blockCharcoal")) {
|
||||||
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "blockCharcoal")) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 16000);
|
rFuelValue = (short) Math.max(rFuelValue, 16000);
|
||||||
}
|
} else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.wooden_button, 1))) {
|
||||||
if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.wooden_button, 1))) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 150);
|
rFuelValue = (short) Math.max(rFuelValue, 150);
|
||||||
}
|
} else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.ladder, 1))) {
|
||||||
if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.ladder, 1))) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 100);
|
rFuelValue = (short) Math.max(rFuelValue, 100);
|
||||||
}
|
} else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.sign, 1))) {
|
||||||
if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.sign, 1))) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 600);
|
rFuelValue = (short) Math.max(rFuelValue, 600);
|
||||||
}
|
} else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) {
|
||||||
if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) {
|
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 600);
|
rFuelValue = (short) Math.max(rFuelValue, 600);
|
||||||
}
|
} else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1, new Object[0]))) {
|
||||||
if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1, new Object[0]))) {
|
|
||||||
rFuelValue = Math.max(rFuelValue, 150000);
|
rFuelValue = Math.max(rFuelValue, 150000);
|
||||||
}
|
} else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1, new Object[0]))) {
|
||||||
if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1, new Object[0]))) {
|
|
||||||
rFuelValue = Math.max(rFuelValue, 100000);
|
rFuelValue = Math.max(rFuelValue, 100000);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rFuelValue;
|
return rFuelValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ public abstract class GT_Cover_RedstoneWirelessBase
|
||||||
}
|
}
|
||||||
|
|
||||||
public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
|
public int onCoverScrewdriverclick(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)) || ((((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));
|
||||||
float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
|
float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
|
||||||
switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + 2 * (byte) (int) (tCoords[1] * 2.0F))) {
|
switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + 2 * (byte) (int) (tCoords[1] * 2.0F))) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import java.util.Iterator;
|
||||||
|
|
||||||
public class GT_Container_Boiler
|
public class GT_Container_Boiler
|
||||||
extends GT_ContainerMetaTile_Machine {
|
extends GT_ContainerMetaTile_Machine {
|
||||||
private final int mSteamCapacity;
|
private int mSteamCapacity = 0;//FB: UR - UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR
|
||||||
public int mWaterAmount = 0;
|
public int mWaterAmount = 0;
|
||||||
public int mSteamAmount = 0;
|
public int mSteamAmount = 0;
|
||||||
public int mProcessingEnergy = 0;
|
public int mProcessingEnergy = 0;
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class GT_Container_Regulator
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if ((aSlotIndex >= 9) && (aSlotIndex < 18)) {
|
if ((aSlotIndex > 8) && (aSlotIndex < 18)) {
|
||||||
ItemStack tStack = aPlayer.inventory.getItemStack();
|
ItemStack tStack = aPlayer.inventory.getItemStack();
|
||||||
if (tStack != null) {
|
if (tStack != null) {
|
||||||
tSlot.putStack(GT_Utility.copy(new Object[]{tStack}));
|
tSlot.putStack(GT_Utility.copy(new Object[]{tStack}));
|
||||||
|
@ -96,7 +96,7 @@ public class GT_Container_Regulator
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if ((aSlotIndex >= 18) && (aSlotIndex < 27)) {
|
if ((aSlotIndex > 17) && (aSlotIndex < 27)) {
|
||||||
((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).mTargetSlots[(aSlotIndex - 18)] = Math.min(99, Math.max(0, ((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).mTargetSlots[(aSlotIndex - 18)] + (aMouseclick == 0 ? -1 : 1) * (aShifthold == 0 ? 1 : 16)));
|
((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).mTargetSlots[(aSlotIndex - 18)] = Math.min(99, Math.max(0, ((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).mTargetSlots[(aSlotIndex - 18)] + (aMouseclick == 0 ? -1 : 1) * (aShifthold == 0 ? 1 : 16)));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,8 @@
|
||||||
package gregtech.common.render;
|
package gregtech.common.render;
|
||||||
|
|
||||||
import gregtech.api.enums.GT_Values;
|
|
||||||
import gregtech.api.util.GT_Log;
|
|
||||||
import gregtech.api.util.GT_Utility;
|
|
||||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
|
||||||
import net.minecraft.client.model.ModelBiped;
|
|
||||||
import net.minecraft.client.renderer.entity.RenderManager;
|
import net.minecraft.client.renderer.entity.RenderManager;
|
||||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||||
import net.minecraft.potion.Potion;
|
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
|
@ -27,7 +18,8 @@ public class GT_CapeRenderer
|
||||||
setRenderManager(RenderManager.instance);
|
setRenderManager(RenderManager.instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void receiveRenderSpecialsEvent(RenderPlayerEvent.Specials.Pre aEvent) {
|
//always off in BMPL
|
||||||
|
/*public void receiveRenderSpecialsEvent(RenderPlayerEvent.Specials.Pre aEvent) {
|
||||||
AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer;
|
AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer;
|
||||||
if (GT_Utility.getFullInvisibility(aPlayer)) {
|
if (GT_Utility.getFullInvisibility(aPlayer)) {
|
||||||
aEvent.setCanceled(true);
|
aEvent.setCanceled(true);
|
||||||
|
@ -66,9 +58,9 @@ public class GT_CapeRenderer
|
||||||
float var2f = f6 * 3.141593F / 180.0F;
|
float var2f = f6 * 3.141593F / 180.0F;
|
||||||
float d3 = MathHelper.sin(var2f);
|
float d3 = MathHelper.sin(var2f);
|
||||||
float d4 = -MathHelper.cos(var2f);
|
float d4 = -MathHelper.cos(var2f);
|
||||||
float f7 = /*(float) */d1 * 10.0F;
|
float f7 = d1 * 10.0F;
|
||||||
float f8 = /*(float) */(d0 * d3 + d2 * d4) * 100.0F;
|
float f8 = (d0 * d3 + d2 * d4) * 100.0F;
|
||||||
float f9 = /*(float) */(d0 * d4 - d2 * d3) * 100.0F;
|
float f9 = (d0 * d4 - d2 * d3) * 100.0F;
|
||||||
if (f7 < -6.0F) {
|
if (f7 < -6.0F) {
|
||||||
f7 = -6.0F;
|
f7 = -6.0F;
|
||||||
}
|
}
|
||||||
|
@ -95,5 +87,5 @@ public class GT_CapeRenderer
|
||||||
e.printStackTrace(GT_Log.err);
|
e.printStackTrace(GT_Log.err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,23 +103,17 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
|
||||||
&& (addIfInjector(xCenter - 6, yCenter - 1, zCenter + 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter - 1, zCenter + 1, aBaseMetaTileEntity))
|
&& (addIfInjector(xCenter - 6, yCenter - 1, zCenter + 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter - 1, zCenter + 1, aBaseMetaTileEntity))
|
||||||
&& (addIfInjector(xCenter - 6, yCenter - 1, zCenter - 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter - 1, zCenter - 1, aBaseMetaTileEntity))
|
&& (addIfInjector(xCenter - 6, yCenter - 1, zCenter - 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter - 1, zCenter - 1, aBaseMetaTileEntity))
|
||||||
&& (this.mEnergyHatches.size() >= 1) && (this.mOutputHatches.size() >= 1) && (this.mInputHatches.size() >= 2)) {
|
&& (this.mEnergyHatches.size() >= 1) && (this.mOutputHatches.size() >= 1) && (this.mInputHatches.size() >= 2)) {
|
||||||
if (this.mEnergyHatches != null) {
|
for (int i = 0; i < this.mEnergyHatches.size(); i++) {
|
||||||
for (int i = 0; i < this.mEnergyHatches.size(); i++) {
|
if (this.mEnergyHatches.get(i).mTier < tier())
|
||||||
if (this.mEnergyHatches.get(i).mTier < tier())
|
return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (this.mOutputHatches != null) {
|
for (int i = 0; i < this.mOutputHatches.size(); i++) {
|
||||||
for (int i = 0; i < this.mOutputHatches.size(); i++) {
|
if (this.mOutputHatches.get(i).mTier < tier())
|
||||||
if (this.mOutputHatches.get(i).mTier < tier())
|
return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (this.mInputHatches != null) {
|
for (int i = 0; i < this.mInputHatches.size(); i++) {
|
||||||
for (int i = 0; i < this.mInputHatches.size(); i++) {
|
if (this.mInputHatches.get(i).mTier < tier())
|
||||||
if (this.mInputHatches.get(i).mTier < tier())
|
return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
mWrench = true;
|
mWrench = true;
|
||||||
mScrewdriver = true;
|
mScrewdriver = true;
|
||||||
|
@ -272,16 +266,14 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
|
||||||
this.mLastRecipe = null;
|
this.mLastRecipe = null;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) {
|
this.mLastRecipe = tRecipe;
|
||||||
this.mLastRecipe = tRecipe;
|
this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue));
|
||||||
this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue));
|
this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue);
|
||||||
this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue);
|
this.mEfficiencyIncrease = 10000;
|
||||||
this.mEfficiencyIncrease = 10000;
|
this.mOutputFluids = this.mLastRecipe.mFluidOutputs;
|
||||||
this.mOutputFluids = this.mLastRecipe.mFluidOutputs;
|
turnCasingActive(true);
|
||||||
turnCasingActive(true);
|
mRunningOnLoad = false;
|
||||||
mRunningOnLoad = false;
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,9 +47,6 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
|
||||||
ItemStack tCleaned = GT_OreDictUnificator.get(OrePrefixes.crushedPurified, tMaterial, tDust, 1L);
|
ItemStack tCleaned = GT_OreDictUnificator.get(OrePrefixes.crushedPurified, tMaterial, tDust, 1L);
|
||||||
ItemStack tCrushed = GT_OreDictUnificator.get(OrePrefixes.crushed, tMaterial, aMaterial.mOreMultiplier * aMultiplier);
|
ItemStack tCrushed = GT_OreDictUnificator.get(OrePrefixes.crushed, tMaterial, aMaterial.mOreMultiplier * aMultiplier);
|
||||||
ItemStack tPrimaryByProduct = null;
|
ItemStack tPrimaryByProduct = null;
|
||||||
ItemStack tPrimaryByProductSmall = null;
|
|
||||||
ItemStack tSecondaryByProduct = null;
|
|
||||||
ItemStack tSecondaryByProductSmall = null;
|
|
||||||
|
|
||||||
if (tCrushed == null) {
|
if (tCrushed == null) {
|
||||||
tCrushed = GT_OreDictUnificator.get(OrePrefixes.dustImpure, tMaterial, GT_Utility.copyAmount(aMaterial.mOreMultiplier * aMultiplier, new Object[]{tCleaned, tDust, tGem}), aMaterial.mOreMultiplier * aMultiplier);
|
tCrushed = GT_OreDictUnificator.get(OrePrefixes.dustImpure, tMaterial, GT_Utility.copyAmount(aMaterial.mOreMultiplier * aMultiplier, new Object[]{tCleaned, tDust, tGem}), aMaterial.mOreMultiplier * aMultiplier);
|
||||||
|
@ -63,17 +60,12 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
|
||||||
if (tPrimaryByProduct == null) {
|
if (tPrimaryByProduct == null) {
|
||||||
tPrimaryByMaterial = tMat;
|
tPrimaryByMaterial = tMat;
|
||||||
tPrimaryByProduct = GT_OreDictUnificator.get(OrePrefixes.dust, tMat, 1L);
|
tPrimaryByProduct = GT_OreDictUnificator.get(OrePrefixes.dust, tMat, 1L);
|
||||||
tPrimaryByProductSmall = GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L);
|
if (GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L) == null)
|
||||||
if (tPrimaryByProductSmall == null)
|
GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L);
|
||||||
tPrimaryByProductSmall = GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L);
|
|
||||||
}
|
}
|
||||||
if ((tSecondaryByProduct == null) || (tSecondaryByMaterial == tPrimaryByMaterial)) {
|
GT_OreDictUnificator.get(OrePrefixes.dust, tMat, 1L);
|
||||||
tSecondaryByMaterial = tMat;
|
if (GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L) == null) {
|
||||||
tSecondaryByProduct = GT_OreDictUnificator.get(OrePrefixes.dust, tMat, 1L);
|
GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L);
|
||||||
tSecondaryByProductSmall = GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L);
|
|
||||||
if (tSecondaryByProductSmall == null) {
|
|
||||||
tSecondaryByProductSmall = GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((!tByProductStacks.isEmpty()) && (!this.mAlreadyListedOres.contains(aMaterial))) {
|
if ((!tByProductStacks.isEmpty()) && (!this.mAlreadyListedOres.contains(aMaterial))) {
|
||||||
|
@ -83,14 +75,6 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
|
||||||
|
|
||||||
if (tPrimaryByMaterial == null) tPrimaryByMaterial = tMaterial;
|
if (tPrimaryByMaterial == null) tPrimaryByMaterial = tMaterial;
|
||||||
if (tPrimaryByProduct == null) tPrimaryByProduct = tDust;
|
if (tPrimaryByProduct == null) tPrimaryByProduct = tDust;
|
||||||
if (tPrimaryByProductSmall == null) {
|
|
||||||
tPrimaryByProductSmall = tSmall;
|
|
||||||
}
|
|
||||||
//if (tSecondaryByMaterial == null) tSecondaryByMaterial = tPrimaryByMaterial;//dead code?
|
|
||||||
//if (tSecondaryByProduct == null) tSecondaryByProduct = tPrimaryByProduct;//dead code?
|
|
||||||
//if (tSecondaryByProductSmall == null) {
|
|
||||||
//tSecondaryByProductSmall = tPrimaryByProductSmall;//dead code?
|
|
||||||
//}
|
|
||||||
boolean tHasSmelting = false;
|
boolean tHasSmelting = false;
|
||||||
|
|
||||||
if (tSmeltInto != null) {
|
if (tSmeltInto != null) {
|
||||||
|
|
Loading…
Reference in a new issue