mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge pull request #1558 from BallOfEnergy1/OC_bugfix
oops (fixing OC bug)
This commit is contained in:
commit
09af834a99
@ -14,6 +14,8 @@ import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
|
||||
|
||||
/**
|
||||
* General handler for OpenComputers compatibility.
|
||||
@ -96,11 +98,9 @@ public class CompatHandler {
|
||||
if(!info.equals(""))
|
||||
player.addChatComponentMessage(new ChatComponentTranslation(info).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
}
|
||||
TileEntity te = player.worldObj.getTileEntity((int) hitX, (int) hitY, (int) hitZ);
|
||||
OCComponent component = (OCComponent) te;
|
||||
if((component.methods() == null && te instanceof TileEntityProxyCombo) || component.getComponentName().equals("ntm_null")) {
|
||||
TileEntity te = (TileEntity) this;
|
||||
if(Array.getLength(this.methods()) == 0 && te instanceof TileEntityProxyCombo || this.getComponentName().equals("ntm_null"))
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("analyze.error").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ public class CompatHandler {
|
||||
* @return Array of methods to expose to the computer.
|
||||
*/
|
||||
@Override
|
||||
default String[] methods() {return null;}
|
||||
default String[] methods() {return new String[0];}
|
||||
|
||||
/**
|
||||
* Standard invoke function from {@link li.cil.oc.api.network.ManagedPeripheral} extending {@link li.cil.oc.api.network.SimpleComponent}.
|
||||
|
||||
@ -404,11 +404,6 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
||||
return new Object[] {true};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectNode(ForgeDirection side) {
|
||||
return side == ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerRBMKGeneric(player.inventory);
|
||||
|
||||
@ -166,9 +166,4 @@ public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase im
|
||||
targetLevel = MathHelper.clamp_double(newLevel, 0, 1);
|
||||
return new Object[] {};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectNode(ForgeDirection side) {
|
||||
return side == ForgeDirection.DOWN;
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,9 +180,4 @@ public class TileEntityRBMKCooler extends TileEntityRBMKBase implements IFluidAc
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[]{heat, tank.getFill(), tank.getMaxFill(), xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectNode(ForgeDirection side) {
|
||||
return side == ForgeDirection.DOWN;
|
||||
}
|
||||
}
|
||||
|
||||
@ -336,11 +336,6 @@ public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements I
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectNode(ForgeDirection side) {
|
||||
return side == ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerRBMKHeater(player.inventory, this);
|
||||
|
||||
@ -264,11 +264,6 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
return new Object[] {gas.getFill(), gas.getMaxFill(), progress, gas.getTankType().getID(), xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectNode(ForgeDirection side) {
|
||||
return side == ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerRBMKOutgasser(player.inventory, this);
|
||||
|
||||
@ -496,11 +496,6 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectNode(ForgeDirection side) {
|
||||
return side == ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerRBMKRod(player.inventory, this);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user