summaryrefslogtreecommitdiff
path: root/src/api/java/invtweaks
diff options
context:
space:
mode:
authorLance5057 <Lance5057@gmail.com>2015-03-13 08:15:33 -0500
committerLance5057 <Lance5057@gmail.com>2015-03-13 08:15:33 -0500
commitafb474545246da88084a43cae31259c33e63a8d1 (patch)
treedf0e220a3568546b7c64bf56e00c8d6af24fed64 /src/api/java/invtweaks
parent495fc1d710df9f5b98fec0d0f61f105811742d89 (diff)
Updated to TiCo 1.8.3 and fixed the rendering issues that followed.
Also refactored some codes.
Diffstat (limited to 'src/api/java/invtweaks')
-rw-r--r--src/api/java/invtweaks/api/container/ChestContainer.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/api/java/invtweaks/api/container/ChestContainer.java b/src/api/java/invtweaks/api/container/ChestContainer.java
new file mode 100644
index 0000000..dc27377
--- /dev/null
+++ b/src/api/java/invtweaks/api/container/ChestContainer.java
@@ -0,0 +1,38 @@
+package invtweaks.api.container;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * A marker for containers that have a chest-like persistant storage component. Enables the Inventroy Tweaks sorting
+ * buttons for this container.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface ChestContainer {
+ // Set to true if the Inventory Tweaks sorting buttons should be shown for this container.
+ boolean showButtons() default true;
+
+ // Size of a chest row
+ int rowSize() default 9;
+
+ // Uses 'large chest' mode for sorting buttons
+ // (Renders buttons vertically down the right side of the GUI)
+ boolean isLargeChest() default false;
+
+ // Annotation for method to get size of a chest row if it is not a fixed size for this container class
+ // Signature int func()
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target(ElementType.METHOD)
+ public @interface RowSizeCallback {
+ }
+
+ // Annotation for method to get size of a chest row if it is not a fixed size for this container class
+ // Signature int func()
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target(ElementType.METHOD)
+ public @interface IsLargeCallback {
+ }
+} \ No newline at end of file