aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/tileentities
diff options
context:
space:
mode:
authorAlkalus <Draknyte1@hotmail.com>2020-05-26 15:14:52 +0100
committerAlkalus <Draknyte1@hotmail.com>2020-05-26 15:14:52 +0100
commit8eb236fd8cc8189ccd0783aa4a6d2fbc48c319e2 (patch)
treec1c0076d14180d9ba836425be0acbf25dd9c5c30 /src/Java/gtPlusPlus/core/tileentities
parentce84ae027d07500fd91f5b5708d885e4447eceab (diff)
downloadGT5-Unofficial-8eb236fd8cc8189ccd0783aa4a6d2fbc48c319e2.tar.gz
GT5-Unofficial-8eb236fd8cc8189ccd0783aa4a6d2fbc48c319e2.tar.bz2
GT5-Unofficial-8eb236fd8cc8189ccd0783aa4a6d2fbc48c319e2.zip
$ Fixed shaped recipe creation.
$ Minor adjustments to the Volumetric Flask GUI.
Diffstat (limited to 'src/Java/gtPlusPlus/core/tileentities')
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/general/TileEntityVolumetricFlaskSetter.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityVolumetricFlaskSetter.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityVolumetricFlaskSetter.java
index 9ca9730330..1aede47096 100644
--- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityVolumetricFlaskSetter.java
+++ b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityVolumetricFlaskSetter.java
@@ -4,6 +4,7 @@ import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.core.container.Container_VolumetricFlaskSetter;
import gtPlusPlus.core.inventories.Inventory_VolumetricFlaskSetter;
+import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper;
import net.minecraft.entity.player.EntityPlayer;
@@ -24,21 +25,21 @@ public class TileEntityVolumetricFlaskSetter extends TileEntity implements ISide
public int locationY;
public int locationZ;
private int aCurrentMode = 0;
- private int aCustomValue = 1000;
+ private short aCustomValue = 1000;
public TileEntityVolumetricFlaskSetter() {
this.inventoryContents = new Inventory_VolumetricFlaskSetter();
this.setTileLocation();
}
- public int getCustomValue() {
- Logger.INFO("Value: "+this.aCustomValue);
+ public short getCustomValue() {
+ //Logger.INFO("Value: "+this.aCustomValue);
return this.aCustomValue;
}
public void setCustomValue(int aVal) {
Logger.INFO("Old Value: "+this.aCustomValue);
- this.aCustomValue = aVal;
+ this.aCustomValue = (short) MathUtils.balance(aVal, 1, Short.MAX_VALUE);
Logger.INFO("New Value: "+this.aCustomValue);
markDirty();
}
@@ -198,7 +199,7 @@ public class TileEntityVolumetricFlaskSetter extends TileEntity implements ISide
final NBTTagCompound chestData = new NBTTagCompound();
this.inventoryContents.writeToNBT(chestData);
nbt.setTag("ContentsChest", chestData);
- nbt.setInteger("aCustomValue", aCustomValue);
+ nbt.setShort("aCustomValue", aCustomValue);
if (this.hasCustomInventoryName()) {
nbt.setString("CustomName", this.getCustomName());
}
@@ -210,7 +211,7 @@ public class TileEntityVolumetricFlaskSetter extends TileEntity implements ISide
super.readFromNBT(nbt);
// Utils.LOG_WARNING("Trying to read NBT data from TE.");
this.inventoryContents.readFromNBT(nbt.getCompoundTag("ContentsChest"));
- this.aCustomValue = nbt.getInteger("aCustomValue");
+ this.aCustomValue = nbt.getShort("aCustomValue");
if (nbt.hasKey("CustomName", 8)) {
this.setCustomName(nbt.getString("CustomName"));
}