public class PokeBall extends java.lang.Object implements ITranslatable
| Constructor and Description |
|---|
PokeBall(java.lang.String name,
java.lang.String model,
ResourceWithFallback texture,
ResourceWithFallback flashingTexture,
ResourceWithFallback ballSprite,
ResourceWithFallback lidSprite,
ResourceWithFallback guiSprite,
java.lang.String logic,
java.lang.String[] bases,
java.lang.String captureMethod,
double catchBonus,
double breakChance,
double velocityModifier,
double gravityModifier,
boolean particles,
boolean hasLid,
java.lang.String json)
Constructs a new Poké Ball.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
net.minecraft.item.ItemStack |
getBallItem()
Gets a new ItemStack of count 1 of this Poké Ball.
|
net.minecraft.item.ItemStack |
getBallItem(int count)
Gets a new ItemStack of this Poké Ball.
|
net.minecraft.util.ResourceLocation |
getBallSprite()
Gets the sprite ResourceLocation of this Poké Ball.
|
java.lang.String[] |
getBases()
Gets the possible bases for this Poké Ball.
|
java.util.Set<net.minecraft.item.Item> |
getBasesAsItems()
Gets a Set of the Poké Ball bases this Poké Ball can have.
|
double |
getBreakChance()
Gets the break chance of this Poké Ball.
|
CaptureMethod |
getCaptureMethod()
Gets the capture method used by this Poké Ball.
|
java.lang.String |
getCaptureMethodID()
Gets the ID of the
CaptureMethod of this Poké Ball. |
double |
getCatchBonus()
Gets the catch bonus of this Poké Ball.
|
net.minecraft.util.ResourceLocation |
getFlashingTexture()
Gets the flashing texture ResourceLocation of this Poké Ball.
|
double |
getGravityModifier()
Gets the gravity modifier of this Poké Ball.
|
net.minecraft.util.ResourceLocation |
getGUISprite()
Gets the GUI sprite ResourceLocation of this Poké Ball.
|
java.lang.String |
getJson()
Gets this Poké Ball object's JSON representation as a String, if available.
|
net.minecraft.item.ItemStack |
getLidItem()
Gets a new ItemStack of count 1 of this Poké Ball's lid.
|
net.minecraft.item.ItemStack |
getLidItem(int count)
Gets a new ItemStack of this Poké Ball's lid.
|
net.minecraft.util.ResourceLocation |
getLidSprite()
Gets the sprite ResourceLocation of this Poké Ball Lid.
|
java.lang.String |
getLidTranslationKey()
Gets the translation key of this Poké Ball's Poké Ball Lid item name.
|
BallLogic |
getLogic()
Gets the capture logic for this Poké Ball.
|
java.lang.String |
getLogicPath()
Gets the classpath of the
BallLogic of this Poké Ball. |
java.lang.String |
getModel()
Gets the model type of this Poké Ball.
|
GenericModelHolder<ModelPokeballs> |
getModelHolder()
Gets a
ModelPokeballs instance for the given PokeBall |
GenericModelHolder<ModelPokeballs> |
getModelHolder(boolean animate)
Gets a
ModelPokeballs instance for the given PokeBall |
net.minecraft.util.ResourceLocation |
getModelTexture()
Gets the texture ResourceLocation of this Poké Ball.
|
java.lang.String |
getName()
Gets the name of this Poké Ball.
|
net.minecraft.item.Item |
getRandomBaseAsItem()
Gets a random Poké Ball base this Poké Ball can have.
|
net.minecraft.util.text.TranslationTextComponent |
getTranslatedLidName()
Gets the translated name of this Poké Ball's Poké Ball Lid item name.
|
java.lang.String |
getTranslationKey()
Gets the translation key of this Poké Ball's Poké Ball item name.
|
double |
getVelocityModifier()
Gets the velocity modifier of this Poké Ball.
|
int |
hashCode() |
boolean |
hasLid()
If the ball has a lid item
|
boolean |
hasParticles()
Gets whether this Poké Ball has a special particle trail.
|
boolean |
is(PokeBall... pokeballs)
Checks if any of the balls in the given array match the current one
|
boolean |
is(RegistryValue<PokeBall>... pokeballs)
Checks if any of the balls in the given array match the current one
|
boolean |
isGuaranteedCatch()
Gets whether this Poké Ball is a guaranteed catch or not.
|
boolean |
isHisuian()
Checks if the
PokeBall is a Hisuian (ancient) ball |
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetLocalizedName, getTranslatedNamepublic PokeBall(java.lang.String name,
java.lang.String model,
ResourceWithFallback texture,
ResourceWithFallback flashingTexture,
ResourceWithFallback ballSprite,
ResourceWithFallback lidSprite,
ResourceWithFallback guiSprite,
java.lang.String logic,
java.lang.String[] bases,
java.lang.String captureMethod,
double catchBonus,
double breakChance,
double velocityModifier,
double gravityModifier,
boolean particles,
boolean hasLid,
java.lang.String json)
name - The unique name of this Poké Ball.model - The path to the model of this Poké Ball.texture - The path to the texture for the model of this Poké Ball.flashingTexture - The path to the texture for the model of the Poké Ball while it is flashing.ballSprite - The path to the sprite of the Poké Ball item of this Poké Ball.lidSprite - The path to the sprite of the Poké Ball Lid item of this Poké Ball.guiSprite - The path to the texture for the party sidebar visual of this Poké Ball.logic - The classpath of the BallLogic class of this Poké Ball. Null or empty means no special logic.bases - Item IDs of what bases this Poké Ball uses.captureMethod - The registered CaptureMethod to use for this Poké Ball.catchBonus - The base ball bonus of this Poké Ball.breakChance - The chance, 0-1, that this Poké Ball breaks on a miss.velocityModifier - The multiplier by which this Poké Ball's thrown velocity is multiplied by.gravityModifier - The multiplier by which this Poké Ball's gravity acceleration is multiplied by.particles - Whether this Poké Ball has a rainbow particle trail or not.json - The JSON representation of this Poké Ball object.public java.lang.String getName()
public java.lang.String getModel()
public net.minecraft.util.ResourceLocation getBallSprite()
public net.minecraft.util.ResourceLocation getLidSprite()
public net.minecraft.util.ResourceLocation getModelTexture()
public net.minecraft.util.ResourceLocation getFlashingTexture()
public net.minecraft.util.ResourceLocation getGUISprite()
public BallLogic getLogic()
public java.lang.String[] getBases()
public CaptureMethod getCaptureMethod()
public double getCatchBonus()
public boolean isGuaranteedCatch()
public double getBreakChance()
public double getVelocityModifier()
public double getGravityModifier()
public boolean hasParticles()
public java.lang.String getTranslationKey()
getTranslationKey in interface ITranslatablepublic java.lang.String getLidTranslationKey()
public boolean hasLid()
public net.minecraft.util.text.TranslationTextComponent getTranslatedLidName()
public boolean is(PokeBall... pokeballs)
pokeballs - The balls being checked@SafeVarargs public final boolean is(RegistryValue<PokeBall>... pokeballs)
pokeballs - The balls being checkedpublic GenericModelHolder<ModelPokeballs> getModelHolder()
ModelPokeballs instance for the given PokeBallpublic GenericModelHolder<ModelPokeballs> getModelHolder(boolean animate)
ModelPokeballs instance for the given PokeBallpublic net.minecraft.item.ItemStack getBallItem()
public net.minecraft.item.ItemStack getBallItem(int count)
count - The size of the new ItemStack.public java.util.Set<net.minecraft.item.Item> getBasesAsItems()
public net.minecraft.item.Item getRandomBaseAsItem()
public net.minecraft.item.ItemStack getLidItem()
public net.minecraft.item.ItemStack getLidItem(int count)
count - The size of the new ItemStack.public java.lang.String getJson()
public java.lang.String getLogicPath()
BallLogic of this Poké Ball. May be null or empty for no logic.public java.lang.String getCaptureMethodID()
CaptureMethod of this Poké Ball.public boolean isHisuian()
PokeBall is a Hisuian (ancient) ballpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object