diff options
Diffstat (limited to 'src/Java/gtPlusPlus/core')
6 files changed, 11 insertions, 24 deletions
diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java index 7c67df905b..7c71f09302 100644 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java +++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java @@ -17,7 +17,7 @@ import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; @SideOnly(Side.CLIENT) public class GUI_TradeTable extends GuiContainer { - + TileEntityTradeTable mThisTable; String mOwnerName; @@ -25,18 +25,10 @@ public class GUI_TradeTable extends GuiContainer { public GUI_TradeTable(final InventoryPlayer player_inventory, final TileEntityTradeTable te, final String mOwnerName){ super(new Container_TradeTable(player_inventory, te)); - - if (te == null){ - this.mThisTable = null; - this.mOwnerName = mOwnerName; - Logger.INFO("Set invalid TE in GUI"); - } - else { - if (te.isServerSide()){ + if (te.isServerSide()){ mThisTable = te; this.mOwnerName = mOwnerName; Logger.INFO("Set valid TE in GUI"); - } } } @@ -45,7 +37,7 @@ public class GUI_TradeTable extends GuiContainer { this.fontRendererObj.drawString(I18n.format("Owner - "+this.mOwnerName, new Object[0]), 28, 66, 4210752); //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); } - + @Override protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); diff --git a/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java b/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java index 4ac42eaeb3..688483b831 100644 --- a/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java +++ b/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java @@ -19,7 +19,7 @@ public class BaseItemCell extends BaseItemComponent{ public BaseItemCell(final Material material) { super(material, BaseItemComponent.ComponentTypes.CELL); - this.fluidColour = (short[]) ((material == null) ? this.extraData : material.getRGBA()); + this.fluidColour = (short[]) material.getRGBA(); //FluidContainerRegistry.registerFluidContainer(material.getFluid(1000), ItemUtils.getSimpleStack(this), Ic2Items.cell.copy()); } diff --git a/src/Java/gtPlusPlus/core/item/base/cell/BaseItemPlasmaCell.java b/src/Java/gtPlusPlus/core/item/base/cell/BaseItemPlasmaCell.java index e216a21796..23d1d022fa 100644 --- a/src/Java/gtPlusPlus/core/item/base/cell/BaseItemPlasmaCell.java +++ b/src/Java/gtPlusPlus/core/item/base/cell/BaseItemPlasmaCell.java @@ -26,7 +26,7 @@ public class BaseItemPlasmaCell extends BaseItemComponent{ public BaseItemPlasmaCell(final Material material) { super(material, ComponentTypes.PLASMACELL); - this.fluidColour = (short[]) ((material == null) ? this.extraData : material.getRGBA()); + this.fluidColour = (short[]) material.getRGBA(); } @Override diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java index 3d31f6c0a5..6923cb545e 100644 --- a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java +++ b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java @@ -71,9 +71,7 @@ public class BaseOreComponent extends Item{ @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - - if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("") && (this.componentMaterial != null)){ - + if (this.materialName != null && !this.materialName.equals("")){ if (this.componentMaterial != null){ if (!this.componentMaterial.vChemicalFormula.equals("??") && !this.componentMaterial.vChemicalFormula.equals("?") && this.componentMaterial.getState() != MaterialState.PURE_LIQUID) { list.add(Utils.sanitizeStringKeepBrackets(this.componentMaterial.vChemicalFormula)); diff --git a/src/Java/gtPlusPlus/core/tileentities/base/TileEntityBase.java b/src/Java/gtPlusPlus/core/tileentities/base/TileEntityBase.java index e4f1576565..90c37e140a 100644 --- a/src/Java/gtPlusPlus/core/tileentities/base/TileEntityBase.java +++ b/src/Java/gtPlusPlus/core/tileentities/base/TileEntityBase.java @@ -17,7 +17,6 @@ public abstract class TileEntityBase extends TileEntity implements ISidedInvento public String mOwnerUUID = "null"; private boolean mIsOwnerOP = false; - @SuppressWarnings("static-method") public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag){ if(!nbt.hasKey(tag)) { @@ -105,8 +104,7 @@ public abstract class TileEntityBase extends TileEntity implements ISidedInvento public boolean processRecipe(){ return true; - } - + } @Override public boolean canUpdate() { @@ -130,8 +128,7 @@ public abstract class TileEntityBase extends TileEntity implements ISidedInvento public void setOwnerInformation(String mName, String mUUID, boolean mOP){ if (isServerSide()){ - if (this.mOwnerName.equals("null") || this.mOwnerUUID.equals("null") - || this.mOwnerName == null || this.mOwnerUUID == null){ + if (this.mOwnerName == null || this.mOwnerUUID == null || this.mOwnerName.equals("null") || this.mOwnerUUID.equals("null")){ this.mOwnerName = mName; this.mOwnerUUID = mUUID; this.mIsOwnerOP = mOP; @@ -158,7 +155,7 @@ public abstract class TileEntityBase extends TileEntity implements ISidedInvento @Override public String getInventoryName() { - return this.hasCustomInventoryName() ? this.customName : "container.fishrap"; + return this.hasCustomInventoryName() ? this.customName : "container.tileentity.name"; } @Override diff --git a/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java index 5767e91c78..10d14d3d34 100644 --- a/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java +++ b/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java @@ -86,12 +86,12 @@ public class EntityUtils { /** * Static Version of the method used in {@code doFireDamage(entity, int)} to save memory. */ - private static Method dealFireDamage = null; + private volatile static Method dealFireDamage = null; /** * Reflective Call to do Fire Damage to an entity (Does not set entity on fire though) */ - public static boolean doFireDamage(Entity entity, int amount){ + public synchronized static boolean doFireDamage(Entity entity, int amount){ if (dealFireDamage == null){ try { dealFireDamage = Entity.class.getDeclaredMethod("dealFireDamage", int.class); |