mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 10:34:40 +00:00
always use fluid packet for partition (#310)
Co-authored-by: boubou19 <[email protected]>
This commit is contained in:
1 parent
88c5b6be72
commit
dffd8e07e0
7 files changed
+44
-10
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package com.glodblock.github.inventory;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.glodblock.github.common.item.ItemFluidPacket;
|
||||
import com.glodblock.github.util.Util;
|
||||
|
||||
import appeng.items.contents.CellConfig;
|
||||
|
||||
public class FluidCellConfig extends CellConfig {
|
||||
|
||||
public FluidCellConfig(ItemStack is) {
|
||||
super(is);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int slot, ItemStack newItemStack) {
|
||||
if (newItemStack != null && !(newItemStack.getItem() instanceof ItemFluidPacket)) {
|
||||
ItemStack fluidPacket = ItemFluidPacket.newDisplayStack(Util.getFluidFromItem(newItemStack));
|
||||
if (fluidPacket != null) {
|
||||
super.setInventorySlotContents(slot, fluidPacket);
|
||||
return;
|
||||
}
|
||||
}
|
||||
super.setInventorySlotContents(slot, newItemStack);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user