Package net.mcreator.element.types
Class Item
java.lang.Object
net.mcreator.element.GeneratableElement
net.mcreator.element.types.Item
- All Implemented Interfaces:
ICommonType,IItem,IItemWithModel,IItemWithTexture,IMCItemProvider,ISpecialInfoHolder,ITabContainedElement
public class Item
extends GeneratableElement
implements IItem, IItemWithModel, ITabContainedElement, ISpecialInfoHolder, IItemWithTexture
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.mcreator.element.GeneratableElement
GeneratableElement.GSONAdapter, GeneratableElement.Unknown -
Field Summary
FieldsModifier and TypeFieldDescriptionintbooleandoublebooleanbooleanbooleanintbooleanintintbooleanbooleanbooleanbooleanbooleanintintintbooleanbooleanintdoublebooleanintbooleandoubleintFields inherited from class net.mcreator.element.GeneratableElement
formatVersion -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Model.TypedecodeModelType(int modelType) static intencodeModelType(Model.Type modelType) WARNING: Calls to this method are generally not thread safe.Returns a copy ofstatesreferencing only properties supported in the current workspace.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanThis method determines what MCItems are provided by this generatable elementMethods inherited from class net.mcreator.element.GeneratableElement
finalizeModElementGeneration, getAdditionalTemplateData, getModElement, isUnknown, performQuickValidation, setModElement, wasConversionAppliedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.mcreator.element.types.interfaces.IItem
getBaseTypesProvidedMethods inherited from interface net.mcreator.element.types.interfaces.IMCItemProvider
getIconForMCItemMethods inherited from interface net.mcreator.element.types.interfaces.ISpecialInfoHolder
getFixedSpecialInformation, hasSpecialInformation
-
Field Details
-
renderType
public int renderType -
texture
-
customModelName
-
guiTexture
-
customProperties
-
states
-
animations
-
name
-
rarity
-
creativeTabs
-
stackSize
public int stackSize -
enchantability
public int enchantability -
useDuration
public int useDuration -
toolType
public double toolType -
damageCount
public int damageCount -
recipeRemainder
-
destroyAnyBlock
public boolean destroyAnyBlock -
immuneToFire
public boolean immuneToFire -
isPiglinCurrency
public boolean isPiglinCurrency -
stayInGridWhenCrafting
public boolean stayInGridWhenCrafting -
damageOnCrafting
public boolean damageOnCrafting -
enableMeleeDamage
public boolean enableMeleeDamage -
damageVsEntity
public double damageVsEntity -
specialInformation
-
glowCondition
-
guiBoundTo
-
inventorySize
public int inventorySize -
inventoryStackSize
public int inventoryStackSize -
onRightClickedInAir
-
onRightClickedOnBlock
-
onCrafted
-
onEntityHitWith
-
onItemInInventoryTick
-
onItemInUseTick
-
onStoppedUsing
-
onEntitySwing
-
onDroppedByPlayer
-
onFinishUsingItem
-
everyTickWhileUsing
-
onItemEntityDestroyed
-
enableRanged
public boolean enableRanged -
shootConstantly
public boolean shootConstantly -
rangedItemChargesPower
public boolean rangedItemChargesPower -
projectile
-
projectileDisableAmmoCheck
public boolean projectileDisableAmmoCheck -
onRangedItemUsed
-
rangedUseCondition
-
isFood
public boolean isFood -
nutritionalValue
public int nutritionalValue -
saturation
public double saturation -
eatResultItem
-
isMeat
public boolean isMeat -
isAlwaysEdible
public boolean isAlwaysEdible -
animation
-
isMusicDisc
public boolean isMusicDisc -
musicDiscMusic
-
musicDiscDescription
-
musicDiscLengthInTicks
public int musicDiscLengthInTicks -
musicDiscAnalogOutput
public int musicDiscAnalogOutput -
providedBannerPatterns
-
-
Constructor Details
-
Item
-
-
Method Details
-
generateModElementPicture
- Overrides:
generateModElementPicturein classGeneratableElement- Returns:
- BufferedImage of mod element preview or null if default mod element icon should be used
-
getItemModel
- Specified by:
getItemModelin interfaceIItemWithModel
-
getTextureMap
- Specified by:
getTextureMapin interfaceIItemWithModel
-
getCreativeTabs
- Specified by:
getCreativeTabsin interfaceITabContainedElement
-
getTexture
- Specified by:
getTexturein interfaceIItemWithTexture
-
providedMCItems
Description copied from interface:IMCItemProviderThis method determines what MCItems are provided by this generatable elementWARNING: Calls to this method are generally not thread safe. Implementations can call MCItem.Custom::new that calls getBlockIconBasedOnName which calls ModElement#getGeneratableElement that is not thread safe
- Specified by:
providedMCItemsin interfaceIMCItemProvider- Returns:
- A list of MCItems provided by this generatable element
-
getCreativeTabItems
Description copied from interface:ITabContainedElementWARNING: Calls to this method are generally not thread safe. Implementations can call MCItem.Custom::new that calls getBlockIconBasedOnName that calls ModElement#getGeneratableElement which is not thread safe- Specified by:
getCreativeTabItemsin interfaceITabContainedElement- Returns:
- list of items in the creative tab of this element
-
getSpecialInfoProcedure
- Specified by:
getSpecialInfoProcedurein interfaceISpecialInfoHolder
-
hasGUITexture
public boolean hasGUITexture() -
hasNormalModel
public boolean hasNormalModel() -
hasToolModel
public boolean hasToolModel() -
hasRangedItemModel
public boolean hasRangedItemModel() -
hasCustomJSONModel
public boolean hasCustomJSONModel() -
hasCustomOBJModel
public boolean hasCustomOBJModel() -
hasCustomJAVAModel
public boolean hasCustomJAVAModel() -
hasInventory
public boolean hasInventory() -
hasNonDefaultAnimation
public boolean hasNonDefaultAnimation() -
hasCustomFoodConsumable
public boolean hasCustomFoodConsumable() -
hasEatResultItem
public boolean hasEatResultItem() -
hasCustomEatResultItem
public boolean hasCustomEatResultItem() -
hasBannerPatterns
public boolean hasBannerPatterns() -
getPatternDescription
-
getModels
Returns a copy ofstatesreferencing only properties supported in the current workspace. Should only be used by generators to filter invalid data.Also populates models with Workspace reference for the use in templates
- Returns:
- Models with contents matching current generator.
-
encodeModelType
-
decodeModelType
-