aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2022-07-26 08:53:19 +0700
committerGitHub <noreply@github.com>2022-07-26 08:53:19 +0700
commit348f3744d863feaa9de9f9ba3e8fe8af19576aca (patch)
tree621a6caee166636373958dc89646f6ee07189234 /src/main/java
parente929e85717c2f523323f2afe7b1e7a42721669f1 (diff)
parentd972393f858cfc079ab8e3266a7f1bca8e54b782 (diff)
downloadGT5-Unofficial-348f3744d863feaa9de9f9ba3e8fe8af19576aca.tar.gz
GT5-Unofficial-348f3744d863feaa9de9f9ba3e8fe8af19576aca.tar.bz2
GT5-Unofficial-348f3744d863feaa9de9f9ba3e8fe8af19576aca.zip
Merge pull request #58 from minecraft7771/ParametrizerX_Bugfix
Parametrizer X Bugfix
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java16
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamAdv.java12
2 files changed, 14 insertions, 14 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java
index d53e0683cd..60d2d8738a 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java
@@ -157,15 +157,15 @@ public class GT_MetaTileEntity_Hatch_Param extends GT_MetaTileEntity_Hatch {
aNBT.hasKey("eInput1i")){
boolean usesFloat = aNBT.getBoolean("eFloats");
if(usesFloat){
- value0D=Float.intBitsToFloat(aNBT.getInteger("eValue0i"));
- value1D=Float.intBitsToFloat(aNBT.getInteger("eValue1i"));
- input0D=Float.intBitsToFloat(aNBT.getInteger("eInput0i"));
- input1D=Float.intBitsToFloat(aNBT.getInteger("eInput1i"));
+ value0D=Double.longBitsToDouble(aNBT.getLong("eValue0i"));
+ value1D=Double.longBitsToDouble(aNBT.getLong("eValue1i"));
+ input0D=Double.longBitsToDouble(aNBT.getLong("eInput0i"));
+ input1D=Double.longBitsToDouble(aNBT.getLong("eInput1i"));
}else {
- value0D=aNBT.getInteger("eValue0i");
- value1D=aNBT.getInteger("eValue1i");
- input0D=aNBT.getInteger("eInput0i");
- input1D=aNBT.getInteger("eInput1i");
+ value0D=aNBT.getLong("eValue0i");
+ value1D=aNBT.getLong("eValue1i");
+ input0D=aNBT.getLong("eInput0i");
+ input1D=aNBT.getLong("eInput1i");
}
}else{
value0D=aNBT.getDouble("eValue0D");
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamAdv.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamAdv.java
index 44608ec204..0ed9c2d3b6 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamAdv.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamAdv.java
@@ -92,11 +92,11 @@ public class GT_Container_ParamAdv extends GT_ContainerMetaTile_Machine {
} else {
if (secondRow) {
long temp=Double.doubleToLongBits(paramH.value1D);
- temp |= 1 << columnPointer;
+ temp |= 1L << (long)columnPointer;
paramH.value1D=Double.longBitsToDouble(temp);
} else {
long temp=Double.doubleToLongBits(paramH.value0D);
- temp |= 1 << columnPointer;
+ temp |= 1L << (long)columnPointer;
paramH.value0D=Double.longBitsToDouble(temp);
}
}
@@ -128,11 +128,11 @@ public class GT_Container_ParamAdv extends GT_ContainerMetaTile_Machine {
} else {
if (secondRow) {
long temp=Double.doubleToLongBits(paramH.value1D);
- temp &= ~(1 << columnPointer);
+ temp &= ~(1L << (long)columnPointer);
paramH.value1D=Double.longBitsToDouble(temp);
} else {
long temp=Double.doubleToLongBits(paramH.value0D);
- temp &= ~(1 << columnPointer);
+ temp &= ~(1L << (long)columnPointer);
paramH.value0D=Double.longBitsToDouble(temp);
}
}
@@ -185,11 +185,11 @@ public class GT_Container_ParamAdv extends GT_ContainerMetaTile_Machine {
} else {
if (secondRow) {
long temp=Double.doubleToLongBits(paramH.value1D);
- temp ^= 1 << columnPointer;
+ temp ^= 1L << (long)columnPointer;
paramH.value1D=Double.longBitsToDouble(temp);
} else {
long temp=Double.doubleToLongBits(paramH.value0D);
- temp ^= 1 << columnPointer;
+ temp ^= 1L << (long)columnPointer;
paramH.value0D=Double.longBitsToDouble(temp);
}
}