Repository navigation
1.12.35 for 1.21.1
Pre-release
Pre-release
This release was created in parallel with 1.11.128 for 1.20. Any new features included in both releases is just listed just under the changelog for 1.11.128.
General
- Added tag translations for all Mantle added tags.
- Rename
IdAwareObject#getIdtoIdAwareObject#idto make it easier to implement in records.
JSON
- Added
JsonHelper#processConditionsto replace the now removedCraftingHelper#processConditions. Neo switched all their condition parsing to codecs which we often choose not to use. - Added
JsonHelper#parseandJsonHelper#serializeoverloads that take aDynamicOps<JsonElement>argument, for using things such asRegistryOps. - Added
JsonHelper#serializeArrayandJsonHelper#serializeListto make it easier to saveJsonArrayelements (such as condition arrays). ResourceLocationSerializernow expects a two argument constructor instead of a one argument constructor.- Updated the common namespace for tags and alike to
cinstead offorge. - Removed several JSON serializer and byte buffer methods on utilities that have loadable instances.
- Removed
JsonHelper#convertToEnumandJsonHelper#getAsEnumin favor ofEnumLoadable. - Removed
JsonHelper#getAsBlockState,JsonHelper.convertToBlockState, andJsonHelper#serializeBlockStatein favor ofBlockStateLoadable. - Removed
BlockEntityHelper#getin favor of pattern matching castlevel.getBlockEntity(pos) instanceof YourBlockEntity be. - Removed
MobTypePredicateasMobTypeis now gone. Most usecases can use tags. - Removed
ConditionSerializerandConditionDeserializerin favor ofCodecSerializer#CONDITION
Loadable
- Loadable list methods now return a type of
ArrayLoadable, allowing access to methods such asemptyField. - Remove deprecated predicate registry constructors which lacked the none field. None is still nullable but you now need to explicately choose to skip it.
Streamablenow usesRegistryFriendlyByteBufferinstead ofFriendlyByteBufferas I don't feel like dealing with the double generics likeStreamCodec.- Every usage of
Loadablewe have has access to registries so this should only affect implementing the interface directly - On the chance you need a different buffer implementation, use
StreamCodec.
- Every usage of
- Moved
BaseRegistryLoadable,LazyRegisitryLoadable, andRegistryLoadableclasses toslimeknights.mantle.data.loadable.registry. - Added
HolderLoadableRegistryHolderLoadableis for built in registries when you want the type to beHolder<T>instead ofTin object fields. Notably used by attributes and mob effects.DatapackRegistryLoadableis for data registries such as enchantments or damage types. Still usage in datapacks but will fail if the registry access lacks them such as in client usages.
CodecLoadablenow optionally takes aStreamCodecfor network instead of using the codec directly.- Can pass
nullto throw on attempts to serialize to network, which may be useful for loot table or resource pack usages. - The constructor that takes just a
Codecwill use the codec to create a stream codec.
- Can pass
CodecLoadableis now instantiated through one of two subclasses:CodecLoadable.Direcet: parses the codec without requiring registry access, though will still pass it along if present.CodecLoadable.Registryparses the with required registry access, throwing if its missing.
- Serializing and writing to the packet buffer both now have
TypedMap contextparameters, in case we need registry access to serialize. - Moved
IngredientLoadableto fields inLoadablesusing their new codecs. - Replaced
DisplayContextLoadablewithLoadables#ITEM_DISPLAY_CONTEXTsince its no longer a weird Forge registry. - Added
SimpleJsonSerializer,SimpleJsonDeserializer,RecordJsonSerializer, andRecordJsonDeserializerinterfaces as new parents ofLoadableandRecordLoadable, allowing for some additional loadable builders.- These new interfaces just implement one side of the JSON logic, making it possible to mix and match.
CompositeLoadableallows combining a deserializer, a serializer, and a streamable to make a loadable.
- Added
DispatchLoadablefor dispatching to different loadables based on JSON keys.- Replaces
EitherLoadablewhich is now removed. - The
IAmLoadableinterface was removed in favor of just passing aJsonSerializerand aStreamable. If desired, either can be implemented usinginstanceofmapping.
- Replaces
- Added
EitherRecordLoadablefor creatingEitherloadables from a left and right field. - Loadable no longer implements GSON interfaces to clean up the interface, use
LoadableSerializerif that is required. - Remove
Loadable#comapFlatMap,Loadable#flatComap,Loadable#xmap, andLoadable#flatXmapsince they were confusing named. The replacements areLoadable#mapCheckedandLoadable#map.
Codec
- Added
MantleCodecsandMantleStreamCodecsholding various (stream) codec instances and helpers used by Mantle. - Added
CodecSerializerfor using a codec in a GSON instance. ErrorFactorynow implementsFunction<String,RuntimeException>for usage in some codec contexts.LoadableCodecnow supports a consumer for building the context, which will automatically include registry and conditions access if the codec is parsed with the appropriate ops.- Added
StreamableCodecto create aStreamCodecfrom aStreamable(which is a base interface forLoadable). Has the same context building asLoadableCodec. - Added
SupplierStreamCodec, which is likeStreamCodec#unitbut it creates a new instance every decode (used for some of our recipe caches). - Added
NamedCollectionSteamCodecfor making codecs of collections ofStreamable<? extends IdAwareObject>. - Moved helpers for creating codecs from loadables or GSON to
slimeknights.mantle.data.codec. - Ensure codecs and loadables when nested still pass along registry context in all cases. This means you can have a codec inside a loadable inside a codec and it will still work as expected.
- Added
LoadableMapCodecandJsonMapCodecfor creatingMapCodecsfrom loadables or raw JSON.
Predicates
- Fluid tooltips now use
FluidPredicateinstead ofTagKey<Fluid>for the fluid field. - Split
LivingEntityPredicateintoEntityPredicateand `LivingEntityPredicate.- Can use
LivingEntityPredicate#fallbackorLivingEntityPredicate#asEntityto convert one to the other.asEntitywill use aninstanceofand fail if the type is wrong, whilefallbackwill always work in contexts with living. - Any predicates that only required entity access were moved to
EntityPredicate, which notably will also work on entity types such as projectiles.
- Can use
Outputs
ItemOutputandFluidOutputnow useDataComponentPatchinstead ofCompoundTagfor stack data.- Both outputs now extend
StackOutputwhich has some common methods. - Moved serializers to direct fields on the object instead of a nested
Loadableenum (largely as import kept getting confused). - Now leverages
Eitherto make the item or tag logic simpler, replacing the previous nullablegetTagmethod for lookups.
Ingredients
- Removed
SizedIngredientin favor of Neo'sSizedIngredient. - Removed
FluidIngredientin favor of Neo'sSizedFluidIngredientor in some casesFluidIngredient(when size doesn't matter). - Added
FluidStackSetfor size sensitive fluid predicates that wish to ignore components. See alsoFluidPredicatefor size insensitive fluids. - Added
PotionFluidIngredient, works the same asPotionIngredientbut is forFluidIngredient(so you can match a specific potion like regeneration in a recipe). PotionIngredientnow uses a holder set for the potion instead of a single potion, and a holder set for the items instead of a nested ingredient.EntityIngredientnow uses a holder set for the entity types instead of an either setup.- Removed
EntityIngredient#getEggsin favor ofEntityIngredient#getDisplayEggswhich has the proper format for JEI ingredients with gaps. - Removed
LoadableIngredientSerializer, use the loadable to codec objects instead (or the helper inIngredientDeferredRegisterthat takes a loadable)
Datagen
- Added
GenericRegistryDataProviderwhich handles the completable future forHolderLookup.Providerregistry access. - Added
FluidBlockStateModelProviderandFluidBucketModelProviderwhich automatically register models for all relevant fluids. - Removed
ItemNameIngredientandNBTNameIngredient, since they are less practical to do now with the new ingredient system. UseMockRecipeor mock item instances to replace.
Network
- Removed
NetworkWrapperas Neo uses an event for registration which is now separated from the packet distribution.- Helpers from
NetworkWrapperthat were not in Neo'sPacketDistributorwere moved to the newPacketHelper.
- Helpers from
- Removed
IThreadsafePacketas the new registration event lets you select thread. - Moved
ISimplePackettoslimeknights.mantle.network. It is a bit less necessary than before, though itsISimplePacket#handlemethod is helpful for packet registration. - Moved
BlockEntityPackettoslimeknights.mantle.network. Decided that the rootnetworkpackage will be for helpers while thepacketsubpackage will be Mantle specific packets. - Moved
JsonHelper#syncPacketstoPacketHelper.
Recipe
- Reworked
SimpleRecipeSerializer. Now takes a pair ofMapCodecandStreamCodecto construct a serializer (as vanilla always just reimplements the serializer).- Has a static helper for the previous usages of
noArguments, replaces recipes with just a resource location argument. - Has a new
singletonhelper, which is now doable as recipes no longer need to read their ID from JSON.
- Has a static helper for the previous usages of
- Removed
TypeAwareRecipeSerializer, useLoadableRecipeSerializer#TYPEandLoadableRecipeSerializer#SERIALIZERseparately. It is recommended when using the type awareLoadableRecipeSerializerto create a wrapper object for all serializers.
Mantle recipes
- Added
ShapelessFallbackRecipe, works likeShapedFallbackRecipebut is a shapeless recipe. RetexturedRecipeno longer supports passing in the texture as an ingredient, now only supporting it to be a character key from the texture map.
Recipe inputs
- Migrated all recipe containers to recipe inputs.
- Renamed
IEmptyContainertoNoItemInput. - Renamed
ISingleStackContainertoSingleItemInput. - Renamed
InventorySlotWrappertoItemHandlerSlotWrapper. - Removed
IRecipeContainerin favor of usingRecipeInputdirectly - unlikeContainerit doesn't require a ton of useless methods.
Datagen
- Added
ShapedExtensionBuilderandShapelessExtensionBuilderto make it easier to make builders for shaped or shapeless recipe extensions.- Replaces the previous approach using
ConsumerWrapperBuilderwhich is now way less practical. ShapedRetexturedRecipeBuildernow extends those instead of wrapping a shaped recipe builder.
- Replaces the previous approach using
- Updated
AbstractRecipeBuilderto useRecipeOutput.LoadableFinishedRecipewas removed sinceRecipeOutputtakesRecipeinstances now.buildAdvancement/buildOptionalAdvancementnow returns aAdvancementHolderand requires passingRecipeOutputas an argument.
- Replaced
SimpleFinishedRecipewithSimpleRecipeBuilder - Removed
GSONsupport fromGenericDataProvider, moving it toGsonDataProvider. - Removed
ConsumerWrapperBuilder.- For conditions, Neo now has
RecipeOutput#withConditions. - For serializer swapping, see mock recipe below.
- For conditions, Neo now has
Mock Recipe
- New helper
MockRecipefor creating datagen recipes withoutRecipeinstances. Mirrors the previousFinishedRecipeclass. MockRecipeincludes aSerializerto help with serializing using codecs or loadables.MockRecipeConsumeracts likeRecipeOutputas the main object collectingMockRecipe.MockRecipeOutputallows wrapping a standard recipe builder in aMockRecipeto swap out components usingRecipeModificationMockRecipeProvideris the main datagen object for providing mock recipes.
JEI
- Added
NamedRecipehelper for storing recipes in JEI that do not extendRecipe<?>. Used commonly for recipe interfaces in tinkers.- Notably includes source IDs so the parent recipe ID can be different from the bookmark recipe ID.
- Added JEI helper for fluid tooltips.
- Replaced
IMultiRecipewithMultiNamedRecipe(for new recipes) andMultiRecipeHolder(for vanilla recipes).- Both now take the recipe ID as argument along with a
HolderLookup.Provider, and return a list ofNamedRecipe/RecipeHolder. - Its recommended that display recipe builders return
NamedRecipe<DisplayInterface>instead ofDisplayInterfacedirectly.
- Both now take the recipe ID as argument along with a
- Removed
RecipeHelper, all its methods were moved toMultiNamedRecipe,MultiRecipeHolder, or can be done using the better generics on vanilla'sRecipeManagerdirectly. - Removed
MantleJEIConstants#getCraftingIndexas that is part of the public JEI API.
Fluids
- Gauges now use block tags for the blacklist and the hide amount tag instead of block entity tags, since fluid capabilities are now defined on blocks instead of block entities.
- Fluid blocks now use
FlowingFluidinstead ofSupplier<FlowingFluid>in the constructor. - Added `MantleFluids#DISPEN
- Removed
TextureFluidTypeandInvertedFluidTypein favor of registeringClientTextureFluidType/ClientInvertedFluidTypeinRegisterClientExtensionsEvent.
Fluid Transfer
- Added fluid transfer JEI tab, which can be enabled using
MantleJEIConstants#enableTransferTab().- Any fluid transfer that implement
IDisplayFluidTransferwill show in the tab. - Additional fake recipes will show for fluid containers tagged as
mantle:fluid_containers/empty(for containers to fill such as copper cans) ormantle:fluid_containers/filled(for containers to empty such as slime bottles).
- Any fluid transfer that implement
- Fluid transfer now uses loadable instead of GSON for parsing.
- Fluid transfer is now fully synced to client instead of just representative items for the sake of the JEI tab, though we still use representative items for client interactions.
- Change sponge wetting from costing 250mb to 1000mb to prevent a water dupe in the nether/finite water modpacks with sponge drrying in furances
- Renamed copy NBT transfers to copy data since components are not exactly NBT.
- Removed deprecated directionless transfer methods.
Mantle Fluids
- Added several fluids registered by Mantle, meant to be shared between Mantle mods such as Tinkers and Ceramics
- Fluids will only be registered if the proper method on
MantleFluidsis called in a constructor of a Mantle mod. - Potion was ported from Tinkers, which is unplaceable and uses
PotionContentsto store the potion type. It has a bucket which can be drunk as a larger potion. - Honey and soups were ported as standard placeable fluids with no special interactions.
- Powder snow was ported as an unplaceable fluid for the vanilla powder snow bucket.
- Has config options to disable it being registered with the vanilla bucket and vanilla cauldron
Items
- Moved
LecternBookItem,AbstractBookItem, andILecternBookItemtoslimeknights.mantle.item.book. - Moved all tooltip items to
slimeknights.mantle.item.tooltip. - Moved burnable items to
slimeknights.mantle.item.burnable. - Rework
EdibleItemto show improved tooltips and to take aUseAnimparameter. - Removed
ContainerFoodItemin favor ofEdibleItemas Mojang fixed the stacked container bugs and Neo changed how fluids capabilites are registered.
Tags
- Added
BlockItemTagKeyhelper that wraps a block and item tag key with the same name. Includes tag provider extensions to make using it a bit easier. - Migrated many Mantle tags to use the NeoForge constants.
- Notably includes water and lava fluid tags, which now have tags under
cthat work the same. - Also includes honey, soup, stew, and potions which are all common enough to exist in Neo.
- Notably includes water and lava fluid tags, which now have tags under
Loot tables
- Moved all loot table in
MantleLootto deferred holders instead of direct static fields. - Loot table injections are now a data registry as that was required to ensure it loaded before loot tables.
- The main thing this changes is they no longer reload with the
/reloadcommand, only reloading on world reload. - Datagen helpers remain as before, though if you really wanted to you could use the datapack registry datagen instead with their new codec.
- The main thing this changes is they no longer reload with the
Global loot modifiers
- Added and, or, and inverted conditions.
- Switch to codecs instead of
GSONfor condition serializing. - Rename loot modifier conditions to have the form
LootModifierConditioninstead ofModifierLootCondition.
Data components and attachments
- Added
MantleDatafor all data component and data attachment instances. - Contains the soulbound slot as a component, was previously in `MantleEvents.
- Offhand cooldown tracker is now a data attachment instead of a capability.
- Nameable block entity now uses the component hooks to copy the custom name over rather than
Block#setPlacedBy. - Several serialize/deserialize methods for NBT now require a
HolderLookup.Provider.
Capabilities
GaugeBlocknow supports block fluid handlers instead of just block entity.InventoryBlockno longer requires a block entity for its item handler, though you will need an alternative menu provider then.- Renamed
ConstantFluidContainerWrappertoConstantFluidHandlerItem. - Removed
WeakConsumerWrapperas its no longer needed with the new capability API. - Removed
LogicHelper#orElseNullas its no longer needed with the new capability API. - Remove
EmptyItemHandleras NeoForge provides that now.
Retextured
- Retextured blocks now store a block directly instead of a string, so some copying methods that took strings or returned strings were removed. You can use
Loadables#BLOCKto parse blocsk from strings if needed. - Retextured block entity now passes the texture using
collectImplicitComponentsandapplyImplicitComponents, so its no longer necessary to implement texture copying inBlock#setPlacedBy.
Attributes
- Added
MantleAttributesfor some attributes added by Mantle. - Knockback multiplier multiplies knockback using
LivingKnockBackEvent. - Experience multiplier multiplies XP drops for blocks and entities.
- Looting boost and fortune boost increase the level of the relevant enchantment.
- Equipment drop change boost increase the drop change of equipment from player kills.
Menu
- Updated
SmartItemHandlerSlotsince Neo fixed one of the two bugs. - Added
ItemHandlerCopySlotto fix the remaining bug in Neo'sItemHandlerCopySlot. - Updated
WrapperSlotwith the new methods. Do we still use this anywhere? - Removed
OutSlotandRestrictedItemSlot, neither of which have been used for awhile.
Registration
- Added
RegistryHelper#castKeybecause? extendssucks in Java sometimes. - Added
RegistryHelper#holderSetfor making a holder set from a list of entries. - Removed registry adapters.
- With the migration of many things to holders and with the fact most of the time they were as much work as just using
Registry#register, they were a lot to maintain for little gain. - Since only Inspirations used them, Inspirations will either write its own more focused alternative or migrate to deferred registers.
- With the migration of many things to holders and with the fact most of the time they were as much work as just using
- Removed the Mantle sign block entities in favor of Neo's
BlockEntityTypeAddBlocksEvent. We still automatically register signs added using our deferred register, though that now usesRegistrationHelperto store the suppliers.
Deferred register
- Added
LootConditionDeferredRegisterwith a helper just taking aMapCodec. - Deferred registers now extend
DeferredRegisterinstead of wrapping when practical, meaning they get a few more available methods. - Deferred registers are no longer
synchronized, as that was a niche problem in Tinkers that we plan to tackle differently. - Improve registration methods for enum objects, allowing more control over the enum placement.
BlockDeferredRegisternow has a default block item, which will be used in various block registration methods if no block item is passed.BlockDeferredRegisternow uses a builder for building blocks, allowing you to pass constructors for all relevant blocks and ending with a wall or fence call.AttributeDeferredRegisternow uses a builder for creating attributes, allowing you to set sync and the new attribute sentiment.- Added
DataComponentTypeDeferredRegisterandAttachmentTypeDeferredRegisterwith helpers for their builders with codecs and relevant deferred holders. - Added
FluidIngredientDeferredRegister,IngredientDeferredRegister,RecipeSerializerDeferredRegister, andRecipeTypeDeferredRegisterwith helpers to create the relevant objects types and relevant deferred holders
Registration objects
- All registry objects now have methods to fetch the holders instead of just the values, as a lot of places use holders now.
- All registry objects now have a
isBoundmethod to check if they are registered. - Block deferred registers now return
DeferredBlockinstead ofItemObject<T extends Block> - Item deferred registers now return
DeferredIteminstead ofItemObject<T extends Block> ItemObjectstill exists for uses in a few other registries, but now has two generics: registry item and item type are separate.EnumObjectnow has generics of enum type and registry type as we need it for the holders. Undecided so far if I'll add a variant with object type as well.- Added several new registration objects to simplify generics on common
DeferredHolder:DeferredArgument<T>forDeferredHolder<ArgumentTypeInfo<?,?>,T>DeferredAttribute<T>forDeferredHolder<Attribute,T>DeferredBlockEntity<T>forDeferredHolder<BlockEntityType<?>,BlockEntityType<T>>DeferredEntity<T>forDeferredHolder<EntityType<?>,EntityType<T>>. Used for entities that lack eggs so won't useEntityObject.DeferredLootFunction<T>forDeferredHolder<LootItemFunctionType<?>,LootItemFunctionType<T>>DeferredMenu<T>forDeferredHolder<MenuType<?>,MenuType<T>>
Model
- Added
assets/<domain>/textures/fluidto the block atlas by default as multiple Mantle mods use that. - Added fluid container model from Tinkers, which supports component sensitive fluid models along with baked tinting.
- Supports using the texture maps to override specific fluid textures.
- Supports making the fluid optional so it does not error if the fluid is not present.
- Reworked
NBTKeyModelintoItemKeyModel- Instead of a string NBT key, uses a registry called
ItemKeyof functions fetching a string from item data. Intention is to map stack components. - No longer supports statically registering texture overrides in favor of the new texture map system. See the 1.11.128 changelog for more info as that system is on 1.20 now.
- Instead of a string NBT key, uses a registry called
AbstractFluidTextureProvidernow usesResourceLocationinternally for fluids to make it easier to register for non-present fluids.- Removed block based render item registry in favor of the block state registry.
- Renamed
RenderItem#STATE_REGISTRYtoRenderItem#REGISTRY. - Removed
FluidTextureBuilder#textures(path, overlay, camera), usewrapId()followed bystill(),flowing(),camera(), andoverlay()`.
Combat
- Item attributes for a slot are a bit more complicated to fetch, so
CombatHelper#getModifierscan fetch them. - Updated combat helper for various melee attack changes. Some notable interesting cases:
- Sweep attack now applies damage bonuses per target instead of scaling the main target's damage to the sweep targets.
- Sweep attack now applies extra effects such as fire aspect per target.
- Fire aspect no longer uses the hack to set entities on fire before attacking, instead the loot table checks directly for the enchantment.
- Tridents now use the offhand stack if the attack originated from the offhand, and use a special damage field instead of attributes.
Rendering
- Reworked
ElementScreenintoScreenElement - Now has two implementations:
SpriteElementandTextureElement, based on whether you want to use the new GUI sprite system or the classic sprite sheet texture. - Scaling helpers are now part of the base
SpriteElement. - Helpers for shifting and moving only exist on
TextureElementas they are not relevant to a `SpriteElement. - Relevant widgets take
ScreenElementallowing you to choose between sprite elements or texture elements. - Fix usages of
TextureAtlasSpritemultiplying texture coordinates by 16 since Mojang no longer does that. Mentioning this in the changelog as its a very easy bug to miss for any usages in renderers. - Removed
MantleRenderTypes#FLUIDin favor ofFluidRenderer#getRenderType.- Has two arguments: transparent and cull.
- Transparent should make non-transparent fluids more performant as before we always used transparent.
- Cull when false causes both sides of the quad to render like in the smeltery renderer. Most usages will want to cull for one-sided.
Book
- Removed deprecated method to adding line breaks in text content, use the linebreak field. Text parsing will no longer treat a line break by itself special.
- Renamed the fields in ContentTextLeftImage and ContentTextRightImage to be more clear where the text is placed.
- Made
BookElement#parentprotected with a public getter and setter, allowing for easier overriding. - Moved
ContentTableTransformerto its own class instead of it being nested insideBookTransformer. You likely never directly accessed this class. - Removed
OpenNamedBookPacketsince the book open command is now a client command.
Command
- Repackaged command arguments under
slimeknights.mantle.command.argument - Repackaged all tag commands under
slimeknights.mantle.command.tags - Removed redundant suggestion provider fields in
MantleCommand, which were moved to the relevant argument helper. - Removed the harvest tiers command as that system no longer exists on 1.21.
Full Changelog: v1.11.128...v1.12.35