Class MappableElement
java.lang.Object
net.mcreator.generator.mapping.MappableElement
- All Implemented Interfaces:
IWorkspaceDependent
- Direct Known Subclasses:
AchievementEntry, AIPathNodeType, Animation, AttributeEntry, BiomeEntry, ConfiguredFeatureEntry, DamageTypeEntry, EffectEntry, EnchantmentEntry, EntityEntry, EquipmentSlotEntry, FluidEntry, GameEventEntry, GenerationStep, GrowapableSpawnType, KeyButton, MapColor, MItemBlock, MobSpawnType, NonMappableElement, NoteBlockInstrument, ParticleEntry, ProfessionEntry, ProjectileEntry, ScreenEntry, Sound, StepSound, StructureEntry, TabEntry, UniquelyMappedElement
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMappableElement(NameMapper mapper) MappableElement(NameMapper mapper, String value) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetMappedValue(int mappingTable) inthashCode()booleanisEmpty()booleanDetermines if the current element is managed within a tag.booleanvoidsetAssociatedTagEntry(TagElement.Entry associatedTagEntry) Sets the associated tag entry for this element.voidsetWorkspace(Workspace workspace) toString()static booleanvalidateReference(String value, Workspace workspace)
-
Field Details
-
mapper
-
-
Constructor Details
-
MappableElement
-
MappableElement
-
-
Method Details
-
toString
-
isEmpty
public boolean isEmpty() -
getMappedValue
-
getMappedValue
-
getUnmappedValue
-
getNameMapper
-
getMappingSource
-
isValidReference
public boolean isValidReference()- Returns:
- true if the value exists in the workspace. Always returns true for vanilla elements, even if they are not supported in the selected Minecraft version. Returns false if the element is empty.
-
validateReference
-
getDataListEntry
-
getDataListEntryType
-
setAssociatedTagEntry
Sets the associated tag entry for this element. Used in tag UI- Parameters:
associatedTagEntry- the tag entry to be associated with this element, or null if no tag entry is being set
-
getAssociatedTagEntry
-
isManaged
public boolean isManaged()Determines if the current element is managed within a tag.- Returns:
- true if the associated tag entry exists and is flagged as managed; false otherwise.
-
setWorkspace
- Specified by:
setWorkspacein interfaceIWorkspaceDependent
-
getWorkspace
- Specified by:
getWorkspacein interfaceIWorkspaceDependent
-
hashCode
-
equals
-