mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
pretty important fix where crane consoles would move 4x faster than possible
This commit is contained in:
parent
533c87eb1a
commit
c86e52f5c0
@ -10,12 +10,14 @@ import com.hbm.inventory.fluid.Fluids;
|
|||||||
* Mostly just functions used across many TEs.
|
* Mostly just functions used across many TEs.
|
||||||
*/
|
*/
|
||||||
public class CompatHandler {
|
public class CompatHandler {
|
||||||
|
|
||||||
public static Object[] steamTypeToInt(FluidType type) {
|
public static Object[] steamTypeToInt(FluidType type) {
|
||||||
if(type == Fluids.STEAM) {return new Object[] {0};}
|
if(type == Fluids.STEAM) {return new Object[] {0};} //switches break because objects
|
||||||
else if(type == Fluids.HOTSTEAM) {return new Object[] {1};}
|
else if(type == Fluids.HOTSTEAM) {return new Object[] {1};}
|
||||||
else if(type == Fluids.SUPERHOTSTEAM) {return new Object[] {2};}
|
else if(type == Fluids.SUPERHOTSTEAM) {return new Object[] {2};}
|
||||||
return new Object[] {3};
|
return new Object[] {3};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FluidType intToSteamType(int arg) {
|
public static FluidType intToSteamType(int arg) {
|
||||||
switch(arg) {
|
switch(arg) {
|
||||||
default:
|
default:
|
||||||
@ -28,4 +30,5 @@ public class CompatHandler {
|
|||||||
return Fluids.ULTRAHOTSTEAM;
|
return Fluids.ULTRAHOTSTEAM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -339,12 +339,13 @@ public class TileEntityCraneConsole extends TileEntity implements INBTPacketRece
|
|||||||
return "rbmk_crane";
|
return "rbmk_crane";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Callback(direct = true, limit = 4)
|
@Callback(direct = true, limit = 2) //yknow computers are more efficient than humans, lets give an incentive to use OC
|
||||||
@Optional.Method(modid = "OpenComputers")
|
@Optional.Method(modid = "OpenComputers")
|
||||||
public Object[] move(Context context, Arguments args) {
|
public Object[] move(Context context, Arguments args) {
|
||||||
if(setUpCrane) {
|
if(setUpCrane) {
|
||||||
String textbruh = args.checkString(0);
|
String direction = args.checkString(0);
|
||||||
switch(textbruh) {
|
|
||||||
|
switch(direction) {
|
||||||
case "up":
|
case "up":
|
||||||
tiltFront = 30;
|
tiltFront = 30;
|
||||||
if(!worldObj.isRemote) posFront += speed;
|
if(!worldObj.isRemote) posFront += speed;
|
||||||
@ -368,7 +369,7 @@ public class TileEntityCraneConsole extends TileEntity implements INBTPacketRece
|
|||||||
return new Object[] {"Crane not found"};
|
return new Object[] {"Crane not found"};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Callback(direct = true, limit = 4)
|
@Callback
|
||||||
@Optional.Method(modid = "OpenComputers")
|
@Optional.Method(modid = "OpenComputers")
|
||||||
public Object[] load(Context context, Arguments args) {
|
public Object[] load(Context context, Arguments args) {
|
||||||
if (setUpCrane) {
|
if (setUpCrane) {
|
||||||
@ -395,4 +396,9 @@ public class TileEntityCraneConsole extends TileEntity implements INBTPacketRece
|
|||||||
}
|
}
|
||||||
return new Object[] {"N/A"};
|
return new Object[] {"N/A"};
|
||||||
}
|
}
|
||||||
|
@Callback(direct = true)
|
||||||
|
@Optional.Method(modid = "OpenComputers")
|
||||||
|
public Object[] getCoords(Context context, Arguments args) {
|
||||||
|
return new Object[] {xCoord, yCoord, zCoord};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user