Skip to content

Commit

Permalink
java docs
Browse files Browse the repository at this point in the history
  • Loading branch information
UselessBullets committed Feb 18, 2024
1 parent 2b44664 commit bd890df
Showing 1 changed file with 43 additions and 8 deletions.
51 changes: 43 additions & 8 deletions src/main/java/turniplabs/halplibe/helper/CreativeHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,57 @@
import turniplabs.halplibe.util.CreativeEntry;

public class CreativeHelper {
public static void setPriority(IItemConvertible item, int priority){
setPriority(item.getDefaultStack(), priority);
/**
* @param itemToAdd The itemstack to be added to the creative inventory list
* @param priority the priority for the item to be added, lower numbers appear higher in the list. Default is 1000
*/
@SuppressWarnings("unused")
public static void setPriority(IItemConvertible itemToAdd, int priority){
setPriority(itemToAdd.getDefaultStack(), priority);
}
public static void setPriority(IItemConvertible item, int meta, int priority){
setPriority(new ItemStack(item, 1, meta), priority);

/**
* @param itemToAdd The itemstack to be added to the creative inventory list
* @param meta the meta value for the itemToAdd
* @param priority the priority for the item to be added, lower numbers appear higher in the list. Default is 1000
*/
@SuppressWarnings("unused")
public static void setPriority(IItemConvertible itemToAdd, int meta, int priority){
setPriority(new ItemStack(itemToAdd, 1, meta), priority);
}
public static void setPriority(ItemStack item, int priority){
CreativeEntry.addEntry(new CreativeEntry(item, priority));
/**
* @param itemToAdd The itemstack to be added to the creative inventory list
* @param priority the priority for the item to be added, lower numbers appear higher in the list. Default is 1000
*/
@SuppressWarnings("unused")
public static void setPriority(ItemStack itemToAdd, int priority){
CreativeEntry.addEntry(new CreativeEntry(itemToAdd, priority));
}

/**
* @param itemToAdd The itemstack to be added to the creative inventory list
* @param itemParent The itemstack that the itemToAdd will be placed after
*/
@SuppressWarnings("unused")
public static void setParent(IItemConvertible itemToAdd, IItemConvertible itemParent){
setParent(itemToAdd.getDefaultStack(), itemParent.getDefaultStack());
}
/**
* @param itemToAdd The itemstack to be added to the creative inventory list
* @param metaToAdd the meta value for the itemToAdd
* @param itemParent The itemstack that the itemToAdd will be placed after
* @param metaParent the meta value for the itemParent
*/
@SuppressWarnings("unused")
public static void setParent(IItemConvertible itemToAdd, int metaToAdd, IItemConvertible itemParent, int metaParent){
setParent(new ItemStack(itemToAdd, 1, metaToAdd), new ItemStack(itemParent, metaParent));
}
public static void setParent(ItemStack itemToAdd, ItemStack parentStack){
CreativeEntry.addEntry(new CreativeEntry(itemToAdd, parentStack));
/**
* @param itemToAdd The itemstack to be added to the creative inventory list
* @param itemParent The itemstack that the itemToAdd will be placed after
*/
@SuppressWarnings("unused")
public static void setParent(ItemStack itemToAdd, ItemStack itemParent){
CreativeEntry.addEntry(new CreativeEntry(itemToAdd, itemParent));
}
}

0 comments on commit bd890df

Please sign in to comment.