2021-09-30 21:44:30 -05:00
|
|
|
//
|
|
|
|
|
// Source code recreated from a .class file by IntelliJ IDEA
|
|
|
|
|
// (powered by FernFlower decompiler)
|
|
|
|
|
//
|
|
|
|
|
|
2021-10-18 06:33:39 -05:00
|
|
|
package noppes.npcs.scripted.interfaces;
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
import net.minecraft.inventory.Container;
|
|
|
|
|
import net.minecraft.inventory.IInventory;
|
2022-05-11 22:08:31 -05:00
|
|
|
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
2022-05-11 16:43:14 -05:00
|
|
|
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
2021-09-30 21:44:30 -05:00
|
|
|
|
|
|
|
|
public interface IContainer {
|
|
|
|
|
int getSize();
|
|
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
IItemStack getSlot(int slot);
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param slot The slot to be replaced
|
|
|
|
|
* @param item The item replacing the previous item in that slot, as an IItemStack object
|
|
|
|
|
*/
|
2021-09-30 21:44:30 -05:00
|
|
|
void setSlot(int slot, IItemStack item);
|
|
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
2022-05-17 18:02:09 -05:00
|
|
|
* @return An obfuscated MC inventory object.
|
2022-05-17 05:24:57 -05:00
|
|
|
*/
|
2021-09-30 21:44:30 -05:00
|
|
|
IInventory getMCInventory();
|
|
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
2022-05-17 18:02:09 -05:00
|
|
|
* @return An obfuscated MC container object.
|
2022-05-17 05:24:57 -05:00
|
|
|
*/
|
2021-09-30 21:44:30 -05:00
|
|
|
Container getMCContainer();
|
|
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param itemStack The item stack to be searched in the container
|
|
|
|
|
* @param ignoreDamage Whether damage should be ignored when searching
|
|
|
|
|
* @param ignoreNBT Whether NBT values should be ignored when searching
|
2022-05-17 18:02:09 -05:00
|
|
|
* @return The amount of the item stack found, based on the flags given above.
|
2022-05-17 05:24:57 -05:00
|
|
|
*/
|
|
|
|
|
int count(IItemStack itemStack, boolean ignoreDamage, boolean ignoreNBT);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
2022-05-17 18:02:09 -05:00
|
|
|
* @return A list of all item stacks in the container as a list of IItemStack objects.
|
2022-05-17 05:24:57 -05:00
|
|
|
*/
|
2021-09-30 21:44:30 -05:00
|
|
|
IItemStack[] getItems();
|
2022-01-12 04:54:07 -06:00
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
2022-05-17 18:02:09 -05:00
|
|
|
* @return True if this container belongs to a Custom GUI.
|
2022-05-17 05:24:57 -05:00
|
|
|
*/
|
2022-01-12 04:54:07 -06:00
|
|
|
boolean isCustomGUI();
|
2022-05-03 14:05:49 -05:00
|
|
|
|
2022-05-17 18:02:09 -05:00
|
|
|
/**
|
|
|
|
|
* Sends changes to be reflected on the player's client.
|
|
|
|
|
*/
|
2022-05-03 14:05:49 -05:00
|
|
|
void detectAndSendChanges();
|
|
|
|
|
|
2022-05-11 22:08:31 -05:00
|
|
|
boolean isPlayerNotUsingContainer(IPlayer player);
|
2021-09-30 21:44:30 -05:00
|
|
|
}
|