Skip to content

GroovyScript

CaliforniaDemise edited this page May 17, 2025 · 1 revision

Info Types

You can get IBaubleType like baubleType("baubles:ring") default bauble types are here.

Expansions

EntityLivingBase Stuff

  • EntityLivingBase#baublesHandler - Returns IBaublesItemHandler if the entity has bauble slots. It's 100% BaublesContainer if entity is EntityPlayer
  • EntityLivingBase#getBaublesItem(int slotIndex) - Returns the ItemStack that's in baubles slot. Either an ItemStack with IBauble or ItemStack#EMPTY.
  • EntityLivingBase#setBaublesItem(int slotIndex, ItemStack stack) - Sets the ItemStack in that slot. Given stack needs to be a bauble item. Returns true if it succeeds
  • EntityLivingBase#insertBaublesItem(ItemStack stack) - Tries to insert the stack to player. It's akin to shift-right clicking item into a baubles slot. Returns the remaining stack that's not inserted. Can be the same stack or ItemStack#EMPTY.

NOTE: As of right now none of these would do anything if the entity is not a player.

EntityPlayer Stuff

  • EntityPlayer#baublesContainer - Returns BaublesContainer which is just IBaublesItemHandler with dynamically changable slots.
  • EntityPlayer#growBaubleSlot(IBaubleType type, int amount) - Grows bauble slots of type with the given amount.
  • EntityPlayer#shrinkBaubleSlot(IBaubleType type, int amount) - Shrinks bauble slots of type with the given amount.
  • EntityPlayer#setBaubleSlot(IBaubleType type, int amount) - Sets bauble slots of type specifically to given amount.
  • EntityPlayer#resetBaubleSlots() - Sets bauble slots to default.

ItemStack Stuff

  • ItemStack#bauble - Returns IBauble if stack is a bauble or null if not.
  • ItemStack#baubleType Returns IBaubleType if stack is a bauble or null if it isn't.

Clone this wiki locally