mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Make RBMK slotted elements have OC accessible inventories, and added a OC outgasser function that allows seeing the item that is being processed.
This commit is contained in:
parent
f6c74ce98e
commit
ebd7ffc827
@ -273,6 +273,15 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
|||||||
return new Object[] {progress};
|
return new Object[] {progress};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Callback(direct = true, doc = "Returns the unlocalized name and size of the stack that the outgasser is crafting (the input), or nil, nil if there is no stack")
|
||||||
|
@Optional.Method(modid = "OpenComputers")
|
||||||
|
public Object[] getCrafting(Context context, Arguments args) {
|
||||||
|
if (slots[0] == null)
|
||||||
|
return new Object[] { null, null };
|
||||||
|
else
|
||||||
|
return new Object[]{slots[0].getUnlocalizedName(), slots[0].stackSize};
|
||||||
|
}
|
||||||
|
|
||||||
@Callback(direct = true)
|
@Callback(direct = true)
|
||||||
@Optional.Method(modid = "OpenComputers")
|
@Optional.Method(modid = "OpenComputers")
|
||||||
public Object[] getCoordinates(Context context, Arguments args) {
|
public Object[] getCoordinates(Context context, Arguments args) {
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.tileentity.machine.rbmk;
|
|||||||
|
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
@ -87,6 +88,15 @@ public abstract class TileEntityRBMKSlottedBase extends TileEntityRBMKActiveBase
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||||
|
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 128;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack decrStackSize(int slot, int amount) {
|
public ItemStack decrStackSize(int slot, int amount) {
|
||||||
if(slots[slot] != null) {
|
if(slots[slot] != null) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user