Compatibility
Minecraft: Java Edition
1.21.4
Platforms
Supported environments
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Links
Creators
Details
Licensed GPL-3.0-or-later
Published 8 months ago
Updated 19 hours ago
CandyWarpper is a library mod I use in many of my mods. You are free to use it in your mods.
Things made player riding possible:
- Redirect
isSaveable()
inaddPassenger()
to a custom method which returnsisPlayer()
if not saveable. - Send
EntityPassengersSetS2CPacket
to the vehicle player when mounting or dismounting.
Other utils:
ItemEnchantmentsComponent.getLevel(String enchantment)
String to int.Scoreboard.getOrAddObjective(String name, ScoreboardCriterion criterion, Text displayName, ScoreboardCriterion.RenderType renderType, boolean displayAutoUpdate, @Nullable NumberFormat numberFormat)
GetOrAdd for objective.ServerPlayerEntity.getScoreHolder()
forScoreHolder.fromProfile(player.getGameProfile())
.Entity.hasCommandTag(String commandTag)
forEntity.getCommandTags().contains(String commandTag)
ItemStack.getCustomStatusEffects()
NbtListstatus_effects
in NbtComponentminecraft:custom_data
.ItemStack.getCustomModifiers()
NbtListmodifiers
in NbtComponentminecraft:custom_data
.LivingEntity.getCustomModifiers()
eligible custom modifiers, which from equippedItemStack
.LivingEntity.getCustomModifiers(String attribute)
eligible custom modifiers and filter based onattribute
field.LivingEntity.getCustomModifiedValue(String attribute, double base)
String and double to double.LivingEntity.get/has/add/setCustomStatusEffects(...)
Scoreboard-based status effect.
FAQ
Performence downside if only install the library?
Not at all. It just takes a few more milliseconds to start Minecraft. Because the purpose of this library is to provide util methods.