Compare commits

...

3 Commits

Author SHA1 Message Date
Boblet
9d7b7ca3bc don't tell 7 but this copy paste job is sloppy af 2026-07-10 08:08:23 +02:00
HbmMods
2e3a6cb086
Merge pull request #3001 from 70000hp/draganddropfix
well that was stupid
2026-07-10 08:03:51 +02:00
70000hp
8113546777 well that was stupid 2026-07-09 18:19:45 -04:00
4 changed files with 96 additions and 94 deletions

View File

@ -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

View File

@ -1,6 +1,5 @@
package com.hbm.tileentity.network.pneumatic;
import com.hbm.interfaces.IControlReceiver;
import com.hbm.inventory.container.ContainerPneumoStorageExporter;
import com.hbm.inventory.gui.GUIPneumoStorageExporter;
@ -318,6 +317,15 @@ public class TileEntityPneumoStorageExporter extends TileEntityPneumaticMachineB
@Override
public void nextMode(int i) { }
@Override
public void setFilterContents(NBTTagCompound nbt) {
int slot = nbt.getInteger("slot");
NBTTagCompound stack = nbt.getCompoundTag("stack");
ItemStack item = ItemStack.loadItemStackFromNBT(stack);
this.setInventorySlotContents(slot, item);
this.markChanged();
}
@Override
public String[] getFunctionInfo() {
return new String[] {

View File

@ -69,6 +69,15 @@ 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 long useUpItem(int index, long amount) {
if(amounts[index] <= 0) return amount;