mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
well that was stupid
This commit is contained in:
parent
775126f0ba
commit
8113546777
@ -342,23 +342,8 @@ public abstract class GuiInfoContainer extends GuiContainer implements INEIGuiHa
|
||||
@Optional.Method(modid = "NotEnoughItems")
|
||||
public boolean handleDragNDrop(GuiContainer gui, int x, int y, ItemStack stack, int button) {
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
// BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD! BALD!
|
||||
|
||||
/*if(gui instanceof GuiInfoContainer && stack != null){
|
||||
if(gui instanceof GuiInfoContainer && stack != null){
|
||||
Slot slot = getSlotAtPosition(x,y);
|
||||
if(slot instanceof SlotPattern){
|
||||
if(inventorySlots instanceof ContainerBase) {
|
||||
@ -374,7 +359,7 @@ public abstract class GuiInfoContainer extends GuiContainer implements INEIGuiHa
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//all credits for impl to GTNH's EnderCore fork
|
||||
|
||||
@ -14,9 +14,11 @@ import api.hbm.redstoneoverradio.IRORInteractive;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityPneumoStorageExporter extends TileEntityPneumaticMachineBase implements IRORInteractive, IControlReceiver, IControlReceiverFilter {
|
||||
@ -318,6 +320,18 @@ public class TileEntityPneumoStorageExporter extends TileEntityPneumaticMachineB
|
||||
@Override
|
||||
public void nextMode(int i) { }
|
||||
|
||||
@Override
|
||||
public void setFilterContents(NBTTagCompound nbt) {
|
||||
TileEntity tile = (TileEntity) this;
|
||||
IInventory inv = (IInventory) this;
|
||||
int slot = nbt.getInteger("slot");
|
||||
NBTTagCompound stack = nbt.getCompoundTag("stack");
|
||||
ItemStack item = ItemStack.loadItemStackFromNBT(stack);
|
||||
inv.setInventorySlotContents(slot, item);
|
||||
nextMode(slot);
|
||||
tile.getWorldObj().markTileEntityChunkModified(tile.xCoord, tile.yCoord, tile.zCoord, tile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFunctionInfo() {
|
||||
return new String[] {
|
||||
|
||||
@ -12,8 +12,10 @@ import api.hbm.ntl.ISlotMonitorProvider;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityPneumoStorageMono extends TileEntityPneumaticStorageBase implements IPneumaticConnector, IFluidStandardReceiverMK2, ISlotMonitorProvider, IControlReceiver, IGUIProvider, IControlReceiverFilter {
|
||||
@ -69,6 +71,26 @@ public class TileEntityPneumoStorageMono extends TileEntityPneumaticStorageBase
|
||||
@Override public long getAmountAt(int index) { return amounts[index]; }
|
||||
@Override public boolean allowTypeSetting() { return false; }
|
||||
|
||||
@Override
|
||||
public void receiveControl(NBTTagCompound data) {
|
||||
super.receiveControl(data);
|
||||
if(data.hasKey("slot")){
|
||||
setFilterContents(data);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFilterContents(NBTTagCompound nbt) {
|
||||
TileEntity tile = (TileEntity) this;
|
||||
IInventory inv = (IInventory) this;
|
||||
int slot = nbt.getInteger("slot");
|
||||
NBTTagCompound stack = nbt.getCompoundTag("stack");
|
||||
ItemStack item = ItemStack.loadItemStackFromNBT(stack);
|
||||
inv.setInventorySlotContents(slot, item);
|
||||
nextMode(slot);
|
||||
tile.getWorldObj().markTileEntityChunkModified(tile.xCoord, tile.yCoord, tile.zCoord, tile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long useUpItem(int index, long amount) {
|
||||
if(amounts[index] <= 0) return amount;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user