mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 16:58:34 +01:00
Removed unneded parts of the InvTweaks API.
Why did I have these again..?
This commit is contained in:
parent
bddce5fcd6
commit
19d11e783b
9 changed files with 0 additions and 424 deletions
|
@ -1,68 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2013 Andrew Crocker
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package invtweaks.api;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public interface IItemTree {
|
|
||||||
public void registerOre(String category, String name, String oreName, int order);
|
|
||||||
|
|
||||||
boolean matches(List<IItemTreeItem> items, String keyword);
|
|
||||||
|
|
||||||
boolean isKeywordValid(String keyword);
|
|
||||||
|
|
||||||
Collection<IItemTreeCategory> getAllCategories();
|
|
||||||
|
|
||||||
IItemTreeCategory getRootCategory();
|
|
||||||
|
|
||||||
IItemTreeCategory getCategory(String keyword);
|
|
||||||
|
|
||||||
boolean isItemUnknown(String id, int damage);
|
|
||||||
|
|
||||||
List<IItemTreeItem> getItems(String id, int damage);
|
|
||||||
|
|
||||||
List<IItemTreeItem> getItems(String name);
|
|
||||||
|
|
||||||
IItemTreeItem getRandomItem(Random r);
|
|
||||||
|
|
||||||
boolean containsItem(String name);
|
|
||||||
|
|
||||||
boolean containsCategory(String name);
|
|
||||||
|
|
||||||
void setRootCategory(IItemTreeCategory category);
|
|
||||||
|
|
||||||
IItemTreeCategory addCategory(String parentCategory, String newCategory) throws NullPointerException;
|
|
||||||
|
|
||||||
void addCategory(String parentCategory, IItemTreeCategory newCategory) throws NullPointerException;
|
|
||||||
|
|
||||||
IItemTreeItem addItem(String parentCategory, String name, String id, int damage, int order)
|
|
||||||
throws NullPointerException;
|
|
||||||
|
|
||||||
void addItem(String parentCategory, IItemTreeItem newItem) throws NullPointerException;
|
|
||||||
|
|
||||||
int getKeywordDepth(String keyword);
|
|
||||||
|
|
||||||
int getKeywordOrder(String keyword);
|
|
||||||
}
|
|
|
@ -1,46 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2013 Andrew Crocker
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package invtweaks.api;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface IItemTreeCategory {
|
|
||||||
boolean contains(IItemTreeItem item);
|
|
||||||
|
|
||||||
void addCategory(IItemTreeCategory category);
|
|
||||||
|
|
||||||
void addItem(IItemTreeItem item);
|
|
||||||
|
|
||||||
Collection<IItemTreeCategory> getSubCategories();
|
|
||||||
|
|
||||||
Collection<List<IItemTreeItem>> getItems();
|
|
||||||
|
|
||||||
String getName();
|
|
||||||
|
|
||||||
int getCategoryOrder();
|
|
||||||
|
|
||||||
int findCategoryOrder(String keyword);
|
|
||||||
|
|
||||||
int findKeywordDepth(String keyword);
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2013 Andrew Crocker
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package invtweaks.api;
|
|
||||||
|
|
||||||
public interface IItemTreeItem extends Comparable<IItemTreeItem> {
|
|
||||||
String getName();
|
|
||||||
|
|
||||||
String getId();
|
|
||||||
|
|
||||||
int getDamage();
|
|
||||||
|
|
||||||
int getOrder();
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2013 Andrew Crocker
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package invtweaks.api;
|
|
||||||
|
|
||||||
import java.util.EventListener;
|
|
||||||
|
|
||||||
public interface IItemTreeListener extends EventListener {
|
|
||||||
void onTreeLoaded(IItemTree tree);
|
|
||||||
}
|
|
|
@ -1,84 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2013 Andrew Crocker
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package invtweaks.api;
|
|
||||||
|
|
||||||
import invtweaks.api.container.ContainerSection;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Interface to access functions exposed by Inventory Tweaks
|
|
||||||
* <p/>
|
|
||||||
* The main @Mod instance of the mod implements this interface, so a refernce to it can
|
|
||||||
* be obtained via @Instance("inventorytweaks") or methods in cpw.mods.fml.common.Loader
|
|
||||||
* <p/>
|
|
||||||
* All of these functions currently have no effect if called on a dedicated server.
|
|
||||||
*/
|
|
||||||
public interface InvTweaksAPI {
|
|
||||||
/**
|
|
||||||
* Add a listener for ItemTree load events
|
|
||||||
*
|
|
||||||
* @param listener
|
|
||||||
*/
|
|
||||||
void addOnLoadListener(IItemTreeListener listener);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove a listener for ItemTree load events
|
|
||||||
*
|
|
||||||
* @param listener
|
|
||||||
* @return true if the listener was previously added
|
|
||||||
*/
|
|
||||||
boolean removeOnLoadListener(IItemTreeListener listener);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Toggle sorting shortcut state.
|
|
||||||
*
|
|
||||||
* @param enabled
|
|
||||||
*/
|
|
||||||
void setSortKeyEnabled(boolean enabled);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Toggle sorting shortcut supression.
|
|
||||||
* Unlike setSortKeyEnabled, this flag is automatically cleared when GUIs are closed.
|
|
||||||
*
|
|
||||||
* @param enabled
|
|
||||||
*/
|
|
||||||
void setTextboxMode(boolean enabled);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Compare two items using the default (non-rule based) algorithm,
|
|
||||||
* sutable for an implementation of Comparator<ItemStack>.
|
|
||||||
*
|
|
||||||
* @param i
|
|
||||||
* @param j
|
|
||||||
* @return A value with a sign representing the relative order of the item stacks
|
|
||||||
*/
|
|
||||||
int compareItems(ItemStack i, ItemStack j);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initiate a sort as if the player had clicked on a sorting button or pressed the sort key.
|
|
||||||
*
|
|
||||||
* @param section
|
|
||||||
* @param method
|
|
||||||
*/
|
|
||||||
void sort(ContainerSection section, SortingMethod method);
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2013 Andrew Crocker
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package invtweaks.api;
|
|
||||||
|
|
||||||
public enum SortingMethod {
|
|
||||||
/** Standard 'r' sorting for generic inventories */
|
|
||||||
DEFAULT,
|
|
||||||
/** Sort method creating vertical columns of items.
|
|
||||||
* Used for chests only, requires container to have a valid row size for correct results.
|
|
||||||
*/
|
|
||||||
VERTICAL,
|
|
||||||
/** Sort method creating horizontal rows of items.
|
|
||||||
* Used for chests only, requires container to have a valid row size for correct results.
|
|
||||||
*/
|
|
||||||
HORIZONTAL,
|
|
||||||
/** Sort method for player inventory.
|
|
||||||
* Applies to extra player-specified sorting rules for the main inventory.
|
|
||||||
* Will always operate on main inventory.
|
|
||||||
*/
|
|
||||||
INVENTORY,
|
|
||||||
/** Attempts to even the number of items in each stack of the same type of item, without moving full stacks.
|
|
||||||
* Used in crafting grid sorting.
|
|
||||||
*/
|
|
||||||
EVEN_STACKS,
|
|
||||||
}
|
|
|
@ -1,88 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2013 Andrew Crocker
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package invtweaks.api.container;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Names for specific parts of containers. For unknown container types (such as mod containers), only INVENTORY and
|
|
||||||
* CHEST sections are available.
|
|
||||||
*/
|
|
||||||
public enum ContainerSection {
|
|
||||||
/**
|
|
||||||
* The player's inventory
|
|
||||||
*/
|
|
||||||
INVENTORY,
|
|
||||||
/**
|
|
||||||
* The player's inventory (only the hotbar)
|
|
||||||
*/
|
|
||||||
INVENTORY_HOTBAR,
|
|
||||||
/**
|
|
||||||
* The player's inventory (all except the hotbar)
|
|
||||||
*/
|
|
||||||
INVENTORY_NOT_HOTBAR,
|
|
||||||
/**
|
|
||||||
* The chest or dispenser contents. Also used for unknown container contents.
|
|
||||||
*/
|
|
||||||
CHEST,
|
|
||||||
/**
|
|
||||||
* The crafting input
|
|
||||||
*/
|
|
||||||
CRAFTING_IN,
|
|
||||||
/**
|
|
||||||
* The crafting input, for containters that store it internally
|
|
||||||
*/
|
|
||||||
CRAFTING_IN_PERSISTENT,
|
|
||||||
/**
|
|
||||||
* The crafting output
|
|
||||||
*/
|
|
||||||
CRAFTING_OUT,
|
|
||||||
/**
|
|
||||||
* The armor slots
|
|
||||||
*/
|
|
||||||
ARMOR,
|
|
||||||
/**
|
|
||||||
* The furnace input
|
|
||||||
*/
|
|
||||||
FURNACE_IN,
|
|
||||||
/**
|
|
||||||
* The furnace output
|
|
||||||
*/
|
|
||||||
FURNACE_OUT,
|
|
||||||
/**
|
|
||||||
* The furnace fuel
|
|
||||||
*/
|
|
||||||
FURNACE_FUEL,
|
|
||||||
/**
|
|
||||||
* The enchantment table slot
|
|
||||||
*/
|
|
||||||
ENCHANTMENT,
|
|
||||||
/**
|
|
||||||
* The three bottles slots in brewing tables
|
|
||||||
* NOTE: Do not use without also using BREWING_INGREDIENT.
|
|
||||||
*/
|
|
||||||
BREWING_BOTTLES,
|
|
||||||
/**
|
|
||||||
* The top slot in brewing tables
|
|
||||||
* NOTE: Do not use without also using BREWING_BOTTLES.
|
|
||||||
*/
|
|
||||||
BREWING_INGREDIENT
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
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 a method to call which returns the set of ContainerSections for this container.
|
|
||||||
* <p/>
|
|
||||||
* Signature of the method should be Map<ContainerSection, List<Slot>> func()
|
|
||||||
*/
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
@Target(ElementType.METHOD)
|
|
||||||
public @interface ContainerSectionCallback {
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
package invtweaks.api.container;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Use this annotation to override inherited annotation properties and mark a Container as unsortable.
|
|
||||||
* This effect is inherited as well.
|
|
||||||
*/
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
@Target(ElementType.TYPE)
|
|
||||||
public @interface IgnoreContainer {
|
|
||||||
}
|
|
Loading…
Reference in a new issue