Interface InternalAPIBridge
Static bridge to the server internals.
Any and all methods in here are *not* to be called by plugin developers, may change at any time and may generally cause issues when called under unexpected circumstances.
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.createCombatEntry(DamageSource damageSource, float damage, @Nullable FallLocationType fallLocationType, float fallDistance) Creates a new combat entrycreateCombatEntry(LivingEntity entity, DamageSource damageSource, float damage) Creates a new combat entry.createOccupancy(String enumNameEntry) Creates an occupancy instance for the passed enum entry name.static InternalAPIBridgeget()Yields the instance of this API bridge by lazily requesting it from the java service loader API.getDamageEffect(String key) Creates a damage effect instance for the passed key.<MODERN,LEGACY>
GameRule<LEGACY> legacyGameRuleBridge(GameRule<MODERN> rule, Function<LEGACY, MODERN> fromLegacyToModern, Function<MODERN, LEGACY> toLegacyFromModern, Class<LEGACY> legacyClass) restricted(Predicate<CommandSourceStack> predicate) Causes this predicate to be considered restricted.
-
Method Details
-
get
Yields the instance of this API bridge by lazily requesting it from the java service loader API.- Returns:
- the instance.
-
getDamageEffect
Creates a damage effect instance for the passed key.- Parameters:
key- the string key.- Returns:
- the damage effect.
-
createOccupancy
Creates an occupancy instance for the passed enum entry name.- Parameters:
enumNameEntry- the enum entry- Returns:
- the occupancy
-
constructLegacyCustomBiome
@Deprecated(forRemoval=true, since="1.21.5") @ScheduledForRemoval(inVersion="1.22") Biome constructLegacyCustomBiome()Deprecated, for removal: This API element is subject to removal in a future version.Constructs the legacy custom biome instance for the biome enum.- Returns:
- the created biome.
-
createCombatEntry
Creates a new combat entry.The fall location and fall distance will be calculated from the entity's current state.
- Parameters:
entity- entitydamageSource- damage sourcedamage- damage amount- Returns:
- new combat entry
-
createCombatEntry
CombatEntry createCombatEntry(DamageSource damageSource, float damage, @Nullable FallLocationType fallLocationType, float fallDistance) Creates a new combat entry- Parameters:
damageSource- damage sourcedamage- damage amountfallLocationType- fall location typefallDistance- fall distance- Returns:
- combat entry
-
restricted
Causes this predicate to be considered restricted. Applying this to a command node prevents this command from being executed from an unattended context, such as click events.- Parameters:
predicate- wrapped predicate- Returns:
- wrapped predicate
-
defaultMannequinProfile
ResolvableProfile defaultMannequinProfile() -
allSkinParts
-
defaultMannequinDescription
Component defaultMannequinDescription() -
legacyGameRuleBridge
-
validMannequinPoses
-