Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts: # gradle.properties # src/main/java/appeng/client/gui/Size1Slot.java # src/main/java/appeng/client/me/SlotFluidME.java # src/main/java/appeng/client/me/SlotME.java # src/main/java/appeng/client/render/cablebus/CableBusBakedModel.java # src/main/java/appeng/client/render/cablebus/CableBusModelLoader.java # src/main/java/appeng/core/sync/packets/MEFluidInventoryUpdatePacket.java # src/main/java/appeng/core/sync/packets/MEInterfaceUpdatePacket.java # src/main/java/appeng/core/sync/packets/MEInventoryUpdatePacket.java # src/main/java/appeng/datagen/providers/loot/BlockDropProvider.java # src/main/java/appeng/fluids/client/gui/widgets/FluidSlotWidget.java # src/main/java/appeng/fluids/container/FluidConfigurableContainer.java # src/main/java/appeng/fluids/helper/FluidCellConfig.java # src/main/resources/META-INF/mods.toml
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
package appeng.client.me;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
|
||||
@@ -26,16 +29,18 @@ import appeng.api.storage.data.IAEItemStack;
|
||||
|
||||
public class SlotME extends Slot {
|
||||
|
||||
private final InternalSlotME mySlot;
|
||||
private static final Inventory EMPTY_INVENTORY = new Inventory(0);
|
||||
|
||||
public SlotME(final InternalSlotME me) {
|
||||
super(null, 0, me.getxPosition(), me.getyPosition());
|
||||
this.mySlot = me;
|
||||
private final InternalSlotME slot;
|
||||
|
||||
public SlotME(final InternalSlotME slot) {
|
||||
super(EMPTY_INVENTORY, 0, slot.getxPosition(), slot.getyPosition());
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
public IAEItemStack getAEStack() {
|
||||
if (this.mySlot.hasPower()) {
|
||||
return this.mySlot.getAEStack();
|
||||
if (this.slot.hasPower()) {
|
||||
return this.slot.getAEStack();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -47,15 +52,15 @@ public class SlotME extends Slot {
|
||||
|
||||
@Override
|
||||
public ItemStack getStack() {
|
||||
if (this.mySlot.hasPower()) {
|
||||
return this.mySlot.getStack();
|
||||
if (this.slot.hasPower()) {
|
||||
return this.slot.getStack();
|
||||
}
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasStack() {
|
||||
if (this.mySlot.hasPower()) {
|
||||
if (this.slot.hasPower()) {
|
||||
return !this.getStack().isEmpty();
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user