mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge pull request #1535 from BallOfEnergy1/OC_bugfix
worlds smallest PR
This commit is contained in:
commit
458dd79b3c
@ -16,6 +16,7 @@ import net.minecraft.client.gui.GuiScreen;
|
|||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
@ -136,9 +137,19 @@ public class TileEntityRBMKControlManual extends TileEntityRBMKControl implement
|
|||||||
@Callback(direct = true)
|
@Callback(direct = true)
|
||||||
@Optional.Method(modid = "OpenComputers")
|
@Optional.Method(modid = "OpenComputers")
|
||||||
public Object[] getColor(Context context, Arguments args) {
|
public Object[] getColor(Context context, Arguments args) {
|
||||||
return new Object[] {this.color};
|
return new Object[] {this.color.ordinal()};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Callback(direct = true)
|
||||||
|
@Optional.Method(modid = "OpenComputers")
|
||||||
|
public Object[] setColor(Context context, Arguments args) {
|
||||||
|
int colorI = args.checkInteger(0);
|
||||||
|
colorI = MathHelper.clamp_int(colorI, 0, 4);
|
||||||
|
this.color = RBMKColor.values()[colorI];
|
||||||
|
return new Object[] {true};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
return new ContainerRBMKControl(player.inventory, this);
|
return new ContainerRBMKControl(player.inventory, this);
|
||||||
|
|||||||
@ -241,7 +241,7 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
|||||||
@Callback(direct = true)
|
@Callback(direct = true)
|
||||||
@Optional.Method(modid = "OpenComputers")
|
@Optional.Method(modid = "OpenComputers")
|
||||||
public Object[] getGasType(Context context, Arguments args) {
|
public Object[] getGasType(Context context, Arguments args) {
|
||||||
return new Object[] {gas.getTankType().getID()};
|
return new Object[] {gas.getTankType().getName()};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Callback(direct = true)
|
@Callback(direct = true)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user