mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-18 03:15:26 +00:00
cells
This commit is contained in:
1 parent
24d30ef078
commit
ebd42852ff
38 files changed
+211
-2351
No files matched your search
@@ -1,27 +0,0 @@
|
||||
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