From addfabad33d8ed7b19b37a035c1f2d4d114f2fba Mon Sep 17 00:00:00 2001 From: miozune Date: Wed, 14 Aug 2024 01:02:53 +0900 Subject: [PATCH] Move future package --- .../modularui/future/ListItemHandlerLong.java | 82 -------------- .../modularui/screen/ContainerCustomizer.java | 2 +- .../modularui/test/ItemEditorGui.java | 2 +- .../cleanroommc/modularui/test/TestItem.java | 2 +- .../cleanroommc/modularui/test/TestTile.java | 4 +- .../modularui/utils/ItemStackItemHandler.java | 4 +- .../item}/CombinedInvWrapper.java | 2 +- .../utils/item/CombinedInvWrapperLong.java | 102 ++++++++++++++++++ .../{future => utils/item}/EmptyHandler.java | 2 +- .../utils/item/EmptyHandlerLong.java | 38 +++++++ .../{future => utils/item}/IItemHandler.java | 2 +- .../item}/IItemHandlerLong.java | 3 +- .../item}/IItemHandlerModifiable.java | 2 +- .../item}/INBTSerializable.java | 2 +- .../{future => utils/item}/InvWrapper.java | 2 +- .../item}/ItemHandlerHelper.java | 2 +- .../item}/ItemStackHandler.java | 2 +- .../item}/ItemStackLongHandler.java | 3 +- .../item}/PlayerArmorInvWrapper.java | 2 +- .../item}/PlayerInvWrapper.java | 2 +- .../item}/PlayerMainInvWrapper.java | 2 +- .../{future => utils/item}/RangedWrapper.java | 2 +- .../item}/SlotItemHandler.java | 2 +- .../modularui/value/sync/ItemSlotLongSH.java | 2 +- .../modularui/value/sync/ItemSlotSH.java | 2 +- .../value/sync/ModularSyncManager.java | 9 +- .../value/sync/PanelSyncManager.java | 2 +- .../modularui/value/sync/SyncHandlers.java | 2 +- .../modularui/widgets/ItemSlot.java | 2 +- .../modularui/widgets/ItemSlotLong.java | 4 +- .../modularui/widgets/slot/ModularSlot.java | 4 +- .../widgets/slot/ModularSlotLong.java | 2 +- 32 files changed, 176 insertions(+), 121 deletions(-) delete mode 100644 src/main/java/com/cleanroommc/modularui/future/ListItemHandlerLong.java rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/CombinedInvWrapper.java (98%) create mode 100644 src/main/java/com/cleanroommc/modularui/utils/item/CombinedInvWrapperLong.java rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/EmptyHandler.java (95%) create mode 100644 src/main/java/com/cleanroommc/modularui/utils/item/EmptyHandlerLong.java rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/IItemHandler.java (99%) rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/IItemHandlerLong.java (95%) rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/IItemHandlerModifiable.java (93%) rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/INBTSerializable.java (84%) rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/InvWrapper.java (99%) rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/ItemHandlerHelper.java (99%) rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/ItemStackHandler.java (99%) rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/ItemStackLongHandler.java (98%) rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/PlayerArmorInvWrapper.java (95%) rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/PlayerInvWrapper.java (84%) rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/PlayerMainInvWrapper.java (96%) rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/RangedWrapper.java (98%) rename src/main/java/com/cleanroommc/modularui/{future => utils/item}/SlotItemHandler.java (98%) diff --git a/src/main/java/com/cleanroommc/modularui/future/ListItemHandlerLong.java b/src/main/java/com/cleanroommc/modularui/future/ListItemHandlerLong.java deleted file mode 100644 index 4c5cae83..00000000 --- a/src/main/java/com/cleanroommc/modularui/future/ListItemHandlerLong.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.cleanroommc.modularui.future; - -import javax.annotation.Nullable; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import com.cleanroommc.modularui.api.IItemStackLong; - -public class ListItemHandlerLong implements IItemHandlerLong { - - protected final Iterable listItemHandler; - - public ListItemHandlerLong(Iterable listItemHandler) { - this.listItemHandler = listItemHandler; - } - - @Override - public int getSlots() { - int ret = 0; - for (IItemHandlerLong itemHandler : listItemHandler) { - ret += itemHandler.getSlots(); - } - return ret; - } - - @Override - public IItemStackLong getStackInSlotLong(int slot) { - Pair result = findItemHandler(slot); - return result.getLeft().getStackInSlotLong(result.getRight()); - } - - @Nullable - @Override - public IItemStackLong insertItemLong(int slot, IItemStackLong stack, boolean simulate) { - Pair result = findItemHandler(slot); - return result.getLeft().insertItemLong(result.getRight(), stack, simulate); - } - - @Nullable - @Override - public IItemStackLong extractItemLong(int slot, long amount, boolean simulate) { - Pair result = findItemHandler(slot); - return result.getLeft().extractItemLong(result.getRight(), amount, simulate); - } - - @Override - public long getSlotLimitLong(int slot) { - Pair result = findItemHandler(slot); - return result.getLeft().getSlotLimitLong(result.getRight()); - } - - @Override - public void setStackInSlotLong(int slot, IItemStackLong stack) { - Pair result = findItemHandler(slot); - result.getLeft().setStackInSlotLong(result.getRight(), stack); - } - - @Override - public boolean isItemValidLong(int slot, IItemStackLong stack) { - Pair result = findItemHandler(slot); - return result.getLeft().isItemValidLong(result.getRight(), stack); - } - - /** - * Searches all item handlers and find one matching handler that contains specified slot index - * - * @param slot Index to search - * @return Pair of item handler and actual index for it - */ - protected Pair findItemHandler(int slot) { - int searching = 0; - for (IItemHandlerLong itemHandler : listItemHandler) { - int numSlots = itemHandler.getSlots(); - if (slot >= searching && slot < searching + numSlots) { - return new ImmutablePair<>(itemHandler, slot - searching); - } - searching += numSlots; - } - throw new RuntimeException("Slot " + slot + " not in valid range - [0," + getSlots() + ")"); - } -} diff --git a/src/main/java/com/cleanroommc/modularui/screen/ContainerCustomizer.java b/src/main/java/com/cleanroommc/modularui/screen/ContainerCustomizer.java index 84c6779f..86ffe455 100644 --- a/src/main/java/com/cleanroommc/modularui/screen/ContainerCustomizer.java +++ b/src/main/java/com/cleanroommc/modularui/screen/ContainerCustomizer.java @@ -1,7 +1,7 @@ package com.cleanroommc.modularui.screen; import com.cleanroommc.modularui.api.inventory.ClickType; -import com.cleanroommc.modularui.future.ItemHandlerHelper; +import com.cleanroommc.modularui.utils.item.ItemHandlerHelper; import com.cleanroommc.modularui.widgets.slot.ModularSlot; import com.cleanroommc.modularui.widgets.slot.SlotGroup; diff --git a/src/main/java/com/cleanroommc/modularui/test/ItemEditorGui.java b/src/main/java/com/cleanroommc/modularui/test/ItemEditorGui.java index 40684d92..ce854c0f 100644 --- a/src/main/java/com/cleanroommc/modularui/test/ItemEditorGui.java +++ b/src/main/java/com/cleanroommc/modularui/test/ItemEditorGui.java @@ -4,7 +4,7 @@ import com.cleanroommc.modularui.api.drawable.IKey; import com.cleanroommc.modularui.factory.GuiData; import com.cleanroommc.modularui.factory.SimpleGuiFactory; -import com.cleanroommc.modularui.future.ItemStackHandler; +import com.cleanroommc.modularui.utils.item.ItemStackHandler; import com.cleanroommc.modularui.screen.ModularPanel; import com.cleanroommc.modularui.utils.Alignment; import com.cleanroommc.modularui.value.sync.IntSyncValue; diff --git a/src/main/java/com/cleanroommc/modularui/test/TestItem.java b/src/main/java/com/cleanroommc/modularui/test/TestItem.java index 847e80c3..bc18f9de 100644 --- a/src/main/java/com/cleanroommc/modularui/test/TestItem.java +++ b/src/main/java/com/cleanroommc/modularui/test/TestItem.java @@ -1,7 +1,7 @@ package com.cleanroommc.modularui.test; import com.cleanroommc.modularui.api.IGuiHolder; -import com.cleanroommc.modularui.future.IItemHandlerModifiable; +import com.cleanroommc.modularui.utils.item.IItemHandlerModifiable; import com.cleanroommc.modularui.factory.GuiData; import com.cleanroommc.modularui.factory.ItemGuiFactory; import com.cleanroommc.modularui.screen.ModularPanel; diff --git a/src/main/java/com/cleanroommc/modularui/test/TestTile.java b/src/main/java/com/cleanroommc/modularui/test/TestTile.java index 53a563ce..e8cff084 100644 --- a/src/main/java/com/cleanroommc/modularui/test/TestTile.java +++ b/src/main/java/com/cleanroommc/modularui/test/TestTile.java @@ -8,8 +8,8 @@ import com.cleanroommc.modularui.drawable.GuiTextures; import com.cleanroommc.modularui.drawable.ItemDrawable; import com.cleanroommc.modularui.drawable.Rectangle; -import com.cleanroommc.modularui.future.IItemHandlerModifiable; -import com.cleanroommc.modularui.future.ItemStackHandler; +import com.cleanroommc.modularui.utils.item.IItemHandlerModifiable; +import com.cleanroommc.modularui.utils.item.ItemStackHandler; import com.cleanroommc.modularui.factory.PosGuiData; import com.cleanroommc.modularui.screen.ModularPanel; import com.cleanroommc.modularui.screen.Tooltip; diff --git a/src/main/java/com/cleanroommc/modularui/utils/ItemStackItemHandler.java b/src/main/java/com/cleanroommc/modularui/utils/ItemStackItemHandler.java index a39a24f5..cd68d5cf 100644 --- a/src/main/java/com/cleanroommc/modularui/utils/ItemStackItemHandler.java +++ b/src/main/java/com/cleanroommc/modularui/utils/ItemStackItemHandler.java @@ -1,7 +1,7 @@ package com.cleanroommc.modularui.utils; -import com.cleanroommc.modularui.future.IItemHandlerModifiable; -import com.cleanroommc.modularui.future.ItemHandlerHelper; +import com.cleanroommc.modularui.utils.item.IItemHandlerModifiable; +import com.cleanroommc.modularui.utils.item.ItemHandlerHelper; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; diff --git a/src/main/java/com/cleanroommc/modularui/future/CombinedInvWrapper.java b/src/main/java/com/cleanroommc/modularui/utils/item/CombinedInvWrapper.java similarity index 98% rename from src/main/java/com/cleanroommc/modularui/future/CombinedInvWrapper.java rename to src/main/java/com/cleanroommc/modularui/utils/item/CombinedInvWrapper.java index 46e56e70..1f095113 100644 --- a/src/main/java/com/cleanroommc/modularui/future/CombinedInvWrapper.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/CombinedInvWrapper.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/cleanroommc/modularui/utils/item/CombinedInvWrapperLong.java b/src/main/java/com/cleanroommc/modularui/utils/item/CombinedInvWrapperLong.java new file mode 100644 index 00000000..c059dd2d --- /dev/null +++ b/src/main/java/com/cleanroommc/modularui/utils/item/CombinedInvWrapperLong.java @@ -0,0 +1,102 @@ +package com.cleanroommc.modularui.utils.item; + +import com.cleanroommc.modularui.api.IItemStackLong; + +public class CombinedInvWrapperLong implements IItemHandlerLong { + + protected final IItemHandlerLong[] itemHandler; // the handlers + protected final int[] baseIndex; // index-offsets of the different handlers + protected final int slotCount; // number of total slots + + public CombinedInvWrapperLong(IItemHandlerLong... itemHandler) { + this.itemHandler = itemHandler; + this.baseIndex = new int[itemHandler.length]; + int index = 0; + for (int i = 0; i < itemHandler.length; i++) { + index += itemHandler[i].getSlots(); + baseIndex[i] = index; + } + this.slotCount = index; + } + + // returns the handler index for the slot + protected int getIndexForSlot(int slot) { + if (slot < 0) { + return -1; + } + + for (int i = 0; i < baseIndex.length; i++) { + if (slot - baseIndex[i] < 0) { + return i; + } + } + return -1; + } + + protected IItemHandlerLong getHandlerFromIndex(int index) { + if (index < 0 || index >= itemHandler.length) { + return EmptyHandlerLong.INSTANCE; + } + return itemHandler[index]; + } + + protected int getSlotFromIndex(int slot, int index) { + if (index <= 0 || index >= baseIndex.length) { + return slot; + } + return slot - baseIndex[index - 1]; + } + + @Override + public void setStackInSlotLong(int slot, IItemStackLong stack) { + int index = getIndexForSlot(slot); + IItemHandlerLong handler = getHandlerFromIndex(index); + slot = getSlotFromIndex(slot, index); + handler.setStackInSlotLong(slot, stack); + } + + @Override + public int getSlots() { + return slotCount; + } + + @Override + public IItemStackLong getStackInSlotLong(int slot) { + int index = getIndexForSlot(slot); + IItemHandlerLong handler = getHandlerFromIndex(index); + slot = getSlotFromIndex(slot, index); + return handler.getStackInSlotLong(slot); + } + + @Override + public IItemStackLong insertItemLong(int slot, IItemStackLong stack, boolean simulate) { + int index = getIndexForSlot(slot); + IItemHandlerLong handler = getHandlerFromIndex(index); + slot = getSlotFromIndex(slot, index); + return handler.insertItemLong(slot, stack, simulate); + } + + @Override + public IItemStackLong extractItemLong(int slot, long amount, boolean simulate) { + int index = getIndexForSlot(slot); + IItemHandlerLong handler = getHandlerFromIndex(index); + slot = getSlotFromIndex(slot, index); + return handler.extractItemLong(slot, amount, simulate); + } + + @Override + public long getSlotLimitLong(int slot) { + int index = getIndexForSlot(slot); + IItemHandlerLong handler = getHandlerFromIndex(index); + int localSlot = getSlotFromIndex(slot, index); + return handler.getSlotLimitLong(localSlot); + } + + @Override + public boolean isItemValidLong(int slot, IItemStackLong stack) { + int index = getIndexForSlot(slot); + IItemHandlerLong handler = getHandlerFromIndex(index); + int localSlot = getSlotFromIndex(slot, index); + return handler.isItemValidLong(localSlot, stack); + } +} diff --git a/src/main/java/com/cleanroommc/modularui/future/EmptyHandler.java b/src/main/java/com/cleanroommc/modularui/utils/item/EmptyHandler.java similarity index 95% rename from src/main/java/com/cleanroommc/modularui/future/EmptyHandler.java rename to src/main/java/com/cleanroommc/modularui/utils/item/EmptyHandler.java index ed76f0ac..7b020987 100644 --- a/src/main/java/com/cleanroommc/modularui/future/EmptyHandler.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/EmptyHandler.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/cleanroommc/modularui/utils/item/EmptyHandlerLong.java b/src/main/java/com/cleanroommc/modularui/utils/item/EmptyHandlerLong.java new file mode 100644 index 00000000..88464b46 --- /dev/null +++ b/src/main/java/com/cleanroommc/modularui/utils/item/EmptyHandlerLong.java @@ -0,0 +1,38 @@ +package com.cleanroommc.modularui.utils.item; + +import com.cleanroommc.modularui.api.IItemStackLong; + +public class EmptyHandlerLong implements IItemHandlerLong { + + public static final IItemHandlerLong INSTANCE = new EmptyHandlerLong(); + + @Override + public void setStackInSlotLong(int slot, IItemStackLong stack) { + // nothing to do here + } + + @Override + public IItemStackLong extractItemLong(int slot, long amount, boolean simulate) { + return null; + } + + @Override + public long getSlotLimitLong(int slot) { + return 0; + } + + @Override + public IItemStackLong getStackInSlotLong(int slot) { + return null; + } + + @Override + public IItemStackLong insertItemLong(int slot, IItemStackLong stack, boolean simulate) { + return null; + } + + @Override + public int getSlots() { + return 0; + } +} diff --git a/src/main/java/com/cleanroommc/modularui/future/IItemHandler.java b/src/main/java/com/cleanroommc/modularui/utils/item/IItemHandler.java similarity index 99% rename from src/main/java/com/cleanroommc/modularui/future/IItemHandler.java rename to src/main/java/com/cleanroommc/modularui/utils/item/IItemHandler.java index c6652ef6..e6bff564 100644 --- a/src/main/java/com/cleanroommc/modularui/future/IItemHandler.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/IItemHandler.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/cleanroommc/modularui/future/IItemHandlerLong.java b/src/main/java/com/cleanroommc/modularui/utils/item/IItemHandlerLong.java similarity index 95% rename from src/main/java/com/cleanroommc/modularui/future/IItemHandlerLong.java rename to src/main/java/com/cleanroommc/modularui/utils/item/IItemHandlerLong.java index 9b4b4dd7..d9aa203f 100644 --- a/src/main/java/com/cleanroommc/modularui/future/IItemHandlerLong.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/IItemHandlerLong.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; import static com.google.common.primitives.Ints.saturatedCast; @@ -6,7 +6,6 @@ import java.util.List; import com.cleanroommc.modularui.api.IItemStackLong; -import com.cleanroommc.modularui.utils.item.ItemStackLong; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/cleanroommc/modularui/future/IItemHandlerModifiable.java b/src/main/java/com/cleanroommc/modularui/utils/item/IItemHandlerModifiable.java similarity index 93% rename from src/main/java/com/cleanroommc/modularui/future/IItemHandlerModifiable.java rename to src/main/java/com/cleanroommc/modularui/utils/item/IItemHandlerModifiable.java index 57ad99a5..5532131c 100644 --- a/src/main/java/com/cleanroommc/modularui/future/IItemHandlerModifiable.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/IItemHandlerModifiable.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/cleanroommc/modularui/future/INBTSerializable.java b/src/main/java/com/cleanroommc/modularui/utils/item/INBTSerializable.java similarity index 84% rename from src/main/java/com/cleanroommc/modularui/future/INBTSerializable.java rename to src/main/java/com/cleanroommc/modularui/utils/item/INBTSerializable.java index 3f5ba3f9..ffec17ec 100644 --- a/src/main/java/com/cleanroommc/modularui/future/INBTSerializable.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/INBTSerializable.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; // // Source code recreated from a .class file by IntelliJ IDEA diff --git a/src/main/java/com/cleanroommc/modularui/future/InvWrapper.java b/src/main/java/com/cleanroommc/modularui/utils/item/InvWrapper.java similarity index 99% rename from src/main/java/com/cleanroommc/modularui/future/InvWrapper.java rename to src/main/java/com/cleanroommc/modularui/utils/item/InvWrapper.java index 42826851..bd1e746f 100644 --- a/src/main/java/com/cleanroommc/modularui/future/InvWrapper.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/InvWrapper.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/cleanroommc/modularui/future/ItemHandlerHelper.java b/src/main/java/com/cleanroommc/modularui/utils/item/ItemHandlerHelper.java similarity index 99% rename from src/main/java/com/cleanroommc/modularui/future/ItemHandlerHelper.java rename to src/main/java/com/cleanroommc/modularui/utils/item/ItemHandlerHelper.java index 86744584..35114231 100644 --- a/src/main/java/com/cleanroommc/modularui/future/ItemHandlerHelper.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/ItemHandlerHelper.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; // // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) diff --git a/src/main/java/com/cleanroommc/modularui/future/ItemStackHandler.java b/src/main/java/com/cleanroommc/modularui/utils/item/ItemStackHandler.java similarity index 99% rename from src/main/java/com/cleanroommc/modularui/future/ItemStackHandler.java rename to src/main/java/com/cleanroommc/modularui/utils/item/ItemStackHandler.java index 683c6dd1..2dd5d092 100644 --- a/src/main/java/com/cleanroommc/modularui/future/ItemStackHandler.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/ItemStackHandler.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; // // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) diff --git a/src/main/java/com/cleanroommc/modularui/future/ItemStackLongHandler.java b/src/main/java/com/cleanroommc/modularui/utils/item/ItemStackLongHandler.java similarity index 98% rename from src/main/java/com/cleanroommc/modularui/future/ItemStackLongHandler.java rename to src/main/java/com/cleanroommc/modularui/utils/item/ItemStackLongHandler.java index ba0616b4..50ab5536 100644 --- a/src/main/java/com/cleanroommc/modularui/future/ItemStackLongHandler.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/ItemStackLongHandler.java @@ -1,10 +1,9 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; import java.util.Arrays; import java.util.List; import com.cleanroommc.modularui.api.IItemStackLong; -import com.cleanroommc.modularui.utils.item.ItemStackLong; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; diff --git a/src/main/java/com/cleanroommc/modularui/future/PlayerArmorInvWrapper.java b/src/main/java/com/cleanroommc/modularui/utils/item/PlayerArmorInvWrapper.java similarity index 95% rename from src/main/java/com/cleanroommc/modularui/future/PlayerArmorInvWrapper.java rename to src/main/java/com/cleanroommc/modularui/utils/item/PlayerArmorInvWrapper.java index 3aed28cd..01431b51 100644 --- a/src/main/java/com/cleanroommc/modularui/future/PlayerArmorInvWrapper.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/PlayerArmorInvWrapper.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/cleanroommc/modularui/future/PlayerInvWrapper.java b/src/main/java/com/cleanroommc/modularui/utils/item/PlayerInvWrapper.java similarity index 84% rename from src/main/java/com/cleanroommc/modularui/future/PlayerInvWrapper.java rename to src/main/java/com/cleanroommc/modularui/utils/item/PlayerInvWrapper.java index bf6d3f24..becc493b 100644 --- a/src/main/java/com/cleanroommc/modularui/future/PlayerInvWrapper.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/PlayerInvWrapper.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; import net.minecraft.entity.player.InventoryPlayer; diff --git a/src/main/java/com/cleanroommc/modularui/future/PlayerMainInvWrapper.java b/src/main/java/com/cleanroommc/modularui/utils/item/PlayerMainInvWrapper.java similarity index 96% rename from src/main/java/com/cleanroommc/modularui/future/PlayerMainInvWrapper.java rename to src/main/java/com/cleanroommc/modularui/utils/item/PlayerMainInvWrapper.java index 8807acb9..643167a2 100644 --- a/src/main/java/com/cleanroommc/modularui/future/PlayerMainInvWrapper.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/PlayerMainInvWrapper.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; diff --git a/src/main/java/com/cleanroommc/modularui/future/RangedWrapper.java b/src/main/java/com/cleanroommc/modularui/utils/item/RangedWrapper.java similarity index 98% rename from src/main/java/com/cleanroommc/modularui/future/RangedWrapper.java rename to src/main/java/com/cleanroommc/modularui/utils/item/RangedWrapper.java index 798d44ff..89947f73 100644 --- a/src/main/java/com/cleanroommc/modularui/future/RangedWrapper.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/RangedWrapper.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; import com.google.common.base.Preconditions; diff --git a/src/main/java/com/cleanroommc/modularui/future/SlotItemHandler.java b/src/main/java/com/cleanroommc/modularui/utils/item/SlotItemHandler.java similarity index 98% rename from src/main/java/com/cleanroommc/modularui/future/SlotItemHandler.java rename to src/main/java/com/cleanroommc/modularui/utils/item/SlotItemHandler.java index 5f57ebec..7cb96c5f 100644 --- a/src/main/java/com/cleanroommc/modularui/future/SlotItemHandler.java +++ b/src/main/java/com/cleanroommc/modularui/utils/item/SlotItemHandler.java @@ -1,4 +1,4 @@ -package com.cleanroommc.modularui.future; +package com.cleanroommc.modularui.utils.item; // // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) diff --git a/src/main/java/com/cleanroommc/modularui/value/sync/ItemSlotLongSH.java b/src/main/java/com/cleanroommc/modularui/value/sync/ItemSlotLongSH.java index 804ddc8f..71ff3304 100644 --- a/src/main/java/com/cleanroommc/modularui/value/sync/ItemSlotLongSH.java +++ b/src/main/java/com/cleanroommc/modularui/value/sync/ItemSlotLongSH.java @@ -4,7 +4,7 @@ import org.jetbrains.annotations.Nullable; import com.cleanroommc.modularui.api.IItemStackLong; -import com.cleanroommc.modularui.future.ItemHandlerHelper; +import com.cleanroommc.modularui.utils.item.ItemHandlerHelper; import com.cleanroommc.modularui.network.NetworkUtils; import com.cleanroommc.modularui.utils.MouseData; import com.cleanroommc.modularui.utils.item.ItemStackLong; diff --git a/src/main/java/com/cleanroommc/modularui/value/sync/ItemSlotSH.java b/src/main/java/com/cleanroommc/modularui/value/sync/ItemSlotSH.java index 6987b15e..6da9e662 100644 --- a/src/main/java/com/cleanroommc/modularui/value/sync/ItemSlotSH.java +++ b/src/main/java/com/cleanroommc/modularui/value/sync/ItemSlotSH.java @@ -1,6 +1,6 @@ package com.cleanroommc.modularui.value.sync; -import com.cleanroommc.modularui.future.ItemHandlerHelper; +import com.cleanroommc.modularui.utils.item.ItemHandlerHelper; import com.cleanroommc.modularui.network.NetworkUtils; import com.cleanroommc.modularui.utils.MouseData; import com.cleanroommc.modularui.widgets.slot.ModularSlot; diff --git a/src/main/java/com/cleanroommc/modularui/value/sync/ModularSyncManager.java b/src/main/java/com/cleanroommc/modularui/value/sync/ModularSyncManager.java index bc079229..201fd47c 100644 --- a/src/main/java/com/cleanroommc/modularui/value/sync/ModularSyncManager.java +++ b/src/main/java/com/cleanroommc/modularui/value/sync/ModularSyncManager.java @@ -1,11 +1,10 @@ package com.cleanroommc.modularui.value.sync; -import com.cleanroommc.modularui.ModularUI; import com.cleanroommc.modularui.api.IPanelSyncManager; -import com.cleanroommc.modularui.future.IItemHandler; -import com.cleanroommc.modularui.future.PlayerInvWrapper; -import com.cleanroommc.modularui.future.PlayerMainInvWrapper; -import com.cleanroommc.modularui.future.SlotItemHandler; +import com.cleanroommc.modularui.utils.item.IItemHandler; +import com.cleanroommc.modularui.utils.item.PlayerInvWrapper; +import com.cleanroommc.modularui.utils.item.PlayerMainInvWrapper; +import com.cleanroommc.modularui.utils.item.SlotItemHandler; import com.cleanroommc.modularui.screen.ModularContainer; import com.cleanroommc.modularui.widgets.slot.SlotGroup; diff --git a/src/main/java/com/cleanroommc/modularui/value/sync/PanelSyncManager.java b/src/main/java/com/cleanroommc/modularui/value/sync/PanelSyncManager.java index 9f9bd81e..d6f568ca 100644 --- a/src/main/java/com/cleanroommc/modularui/value/sync/PanelSyncManager.java +++ b/src/main/java/com/cleanroommc/modularui/value/sync/PanelSyncManager.java @@ -1,6 +1,6 @@ package com.cleanroommc.modularui.value.sync; -import com.cleanroommc.modularui.future.PlayerMainInvWrapper; +import com.cleanroommc.modularui.utils.item.PlayerMainInvWrapper; import com.cleanroommc.modularui.api.IPanelSyncManager; import com.cleanroommc.modularui.screen.ContainerCustomizer; import com.cleanroommc.modularui.screen.ModularContainer; diff --git a/src/main/java/com/cleanroommc/modularui/value/sync/SyncHandlers.java b/src/main/java/com/cleanroommc/modularui/value/sync/SyncHandlers.java index 5cba9ee1..137fd551 100644 --- a/src/main/java/com/cleanroommc/modularui/value/sync/SyncHandlers.java +++ b/src/main/java/com/cleanroommc/modularui/value/sync/SyncHandlers.java @@ -1,6 +1,6 @@ package com.cleanroommc.modularui.value.sync; -import com.cleanroommc.modularui.future.IItemHandlerModifiable; +import com.cleanroommc.modularui.utils.item.IItemHandlerModifiable; import com.cleanroommc.modularui.utils.BooleanConsumer; import com.cleanroommc.modularui.widgets.slot.ModularSlot; import net.minecraftforge.fluids.IFluidTank; diff --git a/src/main/java/com/cleanroommc/modularui/widgets/ItemSlot.java b/src/main/java/com/cleanroommc/modularui/widgets/ItemSlot.java index 0ba7347f..c50d9b64 100644 --- a/src/main/java/com/cleanroommc/modularui/widgets/ItemSlot.java +++ b/src/main/java/com/cleanroommc/modularui/widgets/ItemSlot.java @@ -8,7 +8,7 @@ import com.cleanroommc.modularui.api.widget.Interactable; import com.cleanroommc.modularui.drawable.GuiDraw; import com.cleanroommc.modularui.drawable.TextRenderer; -import com.cleanroommc.modularui.future.IItemHandlerModifiable; +import com.cleanroommc.modularui.utils.item.IItemHandlerModifiable; import com.cleanroommc.modularui.integration.nei.NEIDragAndDropHandler; import com.cleanroommc.modularui.integration.nei.NEIIngredientProvider; import com.cleanroommc.modularui.mixins.early.minecraft.GuiContainerAccessor; diff --git a/src/main/java/com/cleanroommc/modularui/widgets/ItemSlotLong.java b/src/main/java/com/cleanroommc/modularui/widgets/ItemSlotLong.java index 1c46ebd2..d03aa8bd 100644 --- a/src/main/java/com/cleanroommc/modularui/widgets/ItemSlotLong.java +++ b/src/main/java/com/cleanroommc/modularui/widgets/ItemSlotLong.java @@ -6,8 +6,8 @@ import com.cleanroommc.modularui.api.IItemStackLong; import com.cleanroommc.modularui.drawable.GuiDraw; import com.cleanroommc.modularui.drawable.TextRenderer; -import com.cleanroommc.modularui.future.IItemHandlerLong; -import com.cleanroommc.modularui.future.IItemHandlerModifiable; +import com.cleanroommc.modularui.utils.item.IItemHandlerLong; +import com.cleanroommc.modularui.utils.item.IItemHandlerModifiable; import com.cleanroommc.modularui.mixins.early.minecraft.GuiContainerAccessor; import com.cleanroommc.modularui.screen.GuiScreenWrapper; import com.cleanroommc.modularui.screen.viewport.GuiContext; diff --git a/src/main/java/com/cleanroommc/modularui/widgets/slot/ModularSlot.java b/src/main/java/com/cleanroommc/modularui/widgets/slot/ModularSlot.java index 880d7adc..253a0a7f 100644 --- a/src/main/java/com/cleanroommc/modularui/widgets/slot/ModularSlot.java +++ b/src/main/java/com/cleanroommc/modularui/widgets/slot/ModularSlot.java @@ -1,7 +1,7 @@ package com.cleanroommc.modularui.widgets.slot; -import com.cleanroommc.modularui.future.IItemHandler; -import com.cleanroommc.modularui.future.SlotItemHandler; +import com.cleanroommc.modularui.utils.item.IItemHandler; +import com.cleanroommc.modularui.utils.item.SlotItemHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.TextureAtlasSprite; diff --git a/src/main/java/com/cleanroommc/modularui/widgets/slot/ModularSlotLong.java b/src/main/java/com/cleanroommc/modularui/widgets/slot/ModularSlotLong.java index 49c19a7a..75946bc3 100644 --- a/src/main/java/com/cleanroommc/modularui/widgets/slot/ModularSlotLong.java +++ b/src/main/java/com/cleanroommc/modularui/widgets/slot/ModularSlotLong.java @@ -8,7 +8,7 @@ import org.jetbrains.annotations.Nullable; import com.cleanroommc.modularui.api.IItemStackLong; -import com.cleanroommc.modularui.future.IItemHandlerLong; +import com.cleanroommc.modularui.utils.item.IItemHandlerLong; import com.cleanroommc.modularui.utils.item.ItemStackLong; import net.minecraft.item.ItemStack;