2015-08-29 14:33:25 +02:00
|
|
|
|
/*
|
|
|
|
|
* This file ("ChestContainer.java") is part of the Actually Additions Mod for Minecraft.
|
|
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
|
* under the Actually Additions License to be found at
|
|
|
|
|
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
|
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
|
*
|
|
|
|
|
* <EFBFBD> 2015 Ellpeck
|
|
|
|
|
*/
|
|
|
|
|
|
2015-07-15 00:19:44 +02:00
|
|
|
|
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)
|
|
|
|
|
@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)
|
|
|
|
|
@interface IsLargeCallback {
|
|
|
|
|
}
|
|
|
|
|
}
|