Skip to content

1.12.35 for 1.21.1

Pre-release
Pre-release

Choose a tag to compare

@KnightMiner KnightMiner released this 05 Nov 00:54
· 6 commits to 1.21 since this 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#getId to IdAwareObject#id to make it easier to implement in records.

JSON

  • Added JsonHelper#processConditions to replace the now removed CraftingHelper#processConditions. Neo switched all their condition parsing to codecs which we often choose not to use.
  • Added JsonHelper#parse and JsonHelper#serialize overloads that take a DynamicOps<JsonElement> argument, for using things such as RegistryOps.
  • Added JsonHelper#serializeArray and JsonHelper#serializeList to make it easier to save JsonArray elements (such as condition arrays).
  • ResourceLocationSerializer now expects a two argument constructor instead of a one argument constructor.
  • Updated the common namespace for tags and alike to c instead of forge.
  • Removed several JSON serializer and byte buffer methods on utilities that have loadable instances.
  • Removed JsonHelper#convertToEnum and JsonHelper#getAsEnum in favor of EnumLoadable.
  • Removed JsonHelper#getAsBlockState, JsonHelper.convertToBlockState, and JsonHelper#serializeBlockState in favor of BlockStateLoadable.
  • Removed BlockEntityHelper#get in favor of pattern matching cast level.getBlockEntity(pos) instanceof YourBlockEntity be.
  • Removed MobTypePredicate as MobType is now gone. Most usecases can use tags.
  • Removed ConditionSerializer and ConditionDeserializer in favor of CodecSerializer#CONDITION

Loadable

  • Loadable list methods now return a type of ArrayLoadable, allowing access to methods such as emptyField.
  • Remove deprecated predicate registry constructors which lacked the none field. None is still nullable but you now need to explicately choose to skip it.
  • Streamable now uses RegistryFriendlyByteBuffer instead of FriendlyByteBuffer as I don't feel like dealing with the double generics like StreamCodec.
    • Every usage of Loadable we 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.
  • Moved BaseRegistryLoadable, LazyRegisitryLoadable, and RegistryLoadable classes to slimeknights.mantle.data.loadable.registry.
  • Added HolderLoadable
    • RegistryHolderLoadable is for built in registries when you want the type to be Holder<T> instead of T in object fields. Notably used by attributes and mob effects.
    • DatapackRegistryLoadable is 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.
  • CodecLoadable now optionally takes a StreamCodec for network instead of using the codec directly.
    • Can pass null to throw on attempts to serialize to network, which may be useful for loot table or resource pack usages.
    • The constructor that takes just a Codec will use the codec to create a stream codec.
  • CodecLoadable is 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.Registry parses the with required registry access, throwing if its missing.
  • Serializing and writing to the packet buffer both now have TypedMap context parameters, in case we need registry access to serialize.
  • Moved IngredientLoadable to fields in Loadables using their new codecs.
  • Replaced DisplayContextLoadable with Loadables#ITEM_DISPLAY_CONTEXT since its no longer a weird Forge registry.
  • Added SimpleJsonSerializer, SimpleJsonDeserializer, RecordJsonSerializer, and RecordJsonDeserializer interfaces as new parents of Loadable and RecordLoadable, allowing for some additional loadable builders.
    • These new interfaces just implement one side of the JSON logic, making it possible to mix and match.
    • CompositeLoadable allows combining a deserializer, a serializer, and a streamable to make a loadable.
  • Added DispatchLoadable for dispatching to different loadables based on JSON keys.
    • Replaces EitherLoadable which is now removed.
    • The IAmLoadable interface was removed in favor of just passing a JsonSerializer and a Streamable. If desired, either can be implemented using instanceof mapping.
  • Added EitherRecordLoadable for creating Either loadables from a left and right field.
  • Loadable no longer implements GSON interfaces to clean up the interface, use LoadableSerializer if that is required.
  • Remove Loadable#comapFlatMap, Loadable#flatComap, Loadable#xmap, and Loadable#flatXmap since they were confusing named. The replacements are Loadable#mapChecked and Loadable#map.

Codec

  • Added MantleCodecs and MantleStreamCodecs holding various (stream) codec instances and helpers used by Mantle.
  • Added CodecSerializer for using a codec in a GSON instance.
  • ErrorFactory now implements Function<String,RuntimeException> for usage in some codec contexts.
  • LoadableCodec now 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 StreamableCodec to create a StreamCodec from a Streamable (which is a base interface for Loadable). Has the same context building as LoadableCodec.
  • Added SupplierStreamCodec, which is like StreamCodec#unit but it creates a new instance every decode (used for some of our recipe caches).
  • Added NamedCollectionSteamCodec for making codecs of collections of Streamable<? 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 LoadableMapCodec and JsonMapCodec for creating MapCodecs from loadables or raw JSON.

Predicates

  • Fluid tooltips now use FluidPredicate instead of TagKey<Fluid> for the fluid field.
  • Split LivingEntityPredicate into EntityPredicate and `LivingEntityPredicate.
    • Can use LivingEntityPredicate#fallback or LivingEntityPredicate#asEntity to convert one to the other. asEntity will use an instanceof and fail if the type is wrong, while fallback will 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.

Outputs

  • ItemOutput and FluidOutput now use DataComponentPatch instead of CompoundTag for stack data.
  • Both outputs now extend StackOutput which has some common methods.
  • Moved serializers to direct fields on the object instead of a nested Loadable enum (largely as import kept getting confused).
  • Now leverages Either to make the item or tag logic simpler, replacing the previous nullable getTag method for lookups.

Ingredients

  • Removed SizedIngredient in favor of Neo's SizedIngredient.
  • Removed FluidIngredient in favor of Neo's SizedFluidIngredient or in some cases FluidIngredient (when size doesn't matter).
  • Added FluidStackSet for size sensitive fluid predicates that wish to ignore components. See also FluidPredicate for size insensitive fluids.
  • Added PotionFluidIngredient, works the same as PotionIngredient but is for FluidIngredient (so you can match a specific potion like regeneration in a recipe).
  • PotionIngredient now uses a holder set for the potion instead of a single potion, and a holder set for the items instead of a nested ingredient.
  • EntityIngredient now uses a holder set for the entity types instead of an either setup.
  • Removed EntityIngredient#getEggs in favor of EntityIngredient#getDisplayEggs which has the proper format for JEI ingredients with gaps.
  • Removed LoadableIngredientSerializer, use the loadable to codec objects instead (or the helper in IngredientDeferredRegister that takes a loadable)

Datagen

  • Added GenericRegistryDataProvider which handles the completable future for HolderLookup.Provider registry access.
  • Added FluidBlockStateModelProvider and FluidBucketModelProvider which automatically register models for all relevant fluids.
  • Removed ItemNameIngredient and NBTNameIngredient, since they are less practical to do now with the new ingredient system. Use MockRecipe or mock item instances to replace.

Network

  • Removed NetworkWrapper as Neo uses an event for registration which is now separated from the packet distribution.
    • Helpers from NetworkWrapper that were not in Neo's PacketDistributor were moved to the new PacketHelper.
  • Removed IThreadsafePacket as the new registration event lets you select thread.
  • Moved ISimplePacket to slimeknights.mantle.network. It is a bit less necessary than before, though its ISimplePacket#handle method is helpful for packet registration.
  • Moved BlockEntityPacket to slimeknights.mantle.network. Decided that the root network package will be for helpers while the packet subpackage will be Mantle specific packets.
  • Moved JsonHelper#syncPackets to PacketHelper.

Recipe

  • Reworked SimpleRecipeSerializer. Now takes a pair of MapCodec and StreamCodec to 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 singleton helper, which is now doable as recipes no longer need to read their ID from JSON.
  • Removed TypeAwareRecipeSerializer, use LoadableRecipeSerializer#TYPE and LoadableRecipeSerializer#SERIALIZER separately. It is recommended when using the type aware LoadableRecipeSerializer to create a wrapper object for all serializers.

Mantle recipes

  • Added ShapelessFallbackRecipe, works like ShapedFallbackRecipe but is a shapeless recipe.
  • RetexturedRecipe no 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 IEmptyContainer to NoItemInput.
  • Renamed ISingleStackContainer to SingleItemInput.
  • Renamed InventorySlotWrapper to ItemHandlerSlotWrapper.
  • Removed IRecipeContainer in favor of using RecipeInput directly - unlike Container it doesn't require a ton of useless methods.

Datagen

  • Added ShapedExtensionBuilder and ShapelessExtensionBuilder to make it easier to make builders for shaped or shapeless recipe extensions.
    • Replaces the previous approach using ConsumerWrapperBuilder which is now way less practical.
    • ShapedRetexturedRecipeBuilder now extends those instead of wrapping a shaped recipe builder.
  • Updated AbstractRecipeBuilder to use RecipeOutput.
    • LoadableFinishedRecipe was removed since RecipeOutput takes Recipe instances now.
    • buildAdvancement/buildOptionalAdvancement now returns a AdvancementHolder and requires passing RecipeOutput as an argument.
  • Replaced SimpleFinishedRecipe with SimpleRecipeBuilder
  • Removed GSON support from GenericDataProvider, moving it to GsonDataProvider.
  • Removed ConsumerWrapperBuilder.
    • For conditions, Neo now has RecipeOutput#withConditions.
    • For serializer swapping, see mock recipe below.

Mock Recipe

  • New helper MockRecipe for creating datagen recipes without Recipe instances. Mirrors the previous FinishedRecipe class.
  • MockRecipe includes a Serializer to help with serializing using codecs or loadables.
  • MockRecipeConsumer acts like RecipeOutput as the main object collecting MockRecipe.
  • MockRecipeOutput allows wrapping a standard recipe builder in a MockRecipe to swap out components using RecipeModification
  • MockRecipeProvider is the main datagen object for providing mock recipes.

JEI

  • Added NamedRecipe helper for storing recipes in JEI that do not extend Recipe<?>. 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 IMultiRecipe with MultiNamedRecipe (for new recipes) and MultiRecipeHolder (for vanilla recipes).
    • Both now take the recipe ID as argument along with a HolderLookup.Provider, and return a list of NamedRecipe/RecipeHolder.
    • Its recommended that display recipe builders return NamedRecipe<DisplayInterface> instead of DisplayInterface directly.
  • Removed RecipeHelper, all its methods were moved to MultiNamedRecipe, MultiRecipeHolder, or can be done using the better generics on vanilla's RecipeManager directly.
  • Removed MantleJEIConstants#getCraftingIndex as 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 FlowingFluid instead of Supplier<FlowingFluid> in the constructor.
  • Added `MantleFluids#DISPEN
  • Removed TextureFluidType and InvertedFluidType in favor of registering ClientTextureFluidType/ClientInvertedFluidType in RegisterClientExtensionsEvent.

Fluid Transfer

  • Added fluid transfer JEI tab, which can be enabled using MantleJEIConstants#enableTransferTab().
    • Any fluid transfer that implement IDisplayFluidTransfer will 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) or mantle:fluid_containers/filled (for containers to empty such as slime bottles).
  • 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 MantleFluids is called in a constructor of a Mantle mod.
  • Potion was ported from Tinkers, which is unplaceable and uses PotionContents to 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, and ILecternBookItem to slimeknights.mantle.item.book.
  • Moved all tooltip items to slimeknights.mantle.item.tooltip.
  • Moved burnable items to slimeknights.mantle.item.burnable.
  • Rework EdibleItem to show improved tooltips and to take a UseAnim parameter.
  • Removed ContainerFoodItem in favor of EdibleItem as Mojang fixed the stacked container bugs and Neo changed how fluids capabilites are registered.

Tags

  • Added BlockItemTagKey helper 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 c that work the same.
    • Also includes honey, soup, stew, and potions which are all common enough to exist in Neo.

Loot tables

  • Moved all loot table in MantleLoot to 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 /reload command, 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.

Global loot modifiers

  • Added and, or, and inverted conditions.
  • Switch to codecs instead of GSON for condition serializing.
  • Rename loot modifier conditions to have the form LootModifierCondition instead of ModifierLootCondition.

Data components and attachments

  • Added MantleData for 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

  • GaugeBlock now supports block fluid handlers instead of just block entity.
  • InventoryBlock no longer requires a block entity for its item handler, though you will need an alternative menu provider then.
  • Renamed ConstantFluidContainerWrapper to ConstantFluidHandlerItem.
  • Removed WeakConsumerWrapper as its no longer needed with the new capability API.
  • Removed LogicHelper#orElseNull as its no longer needed with the new capability API.
  • Remove EmptyItemHandler as 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#BLOCK to parse blocsk from strings if needed.
  • Retextured block entity now passes the texture using collectImplicitComponents and applyImplicitComponents, so its no longer necessary to implement texture copying in Block#setPlacedBy.

Attributes

  • Added MantleAttributes for 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 SmartItemHandlerSlot since Neo fixed one of the two bugs.
  • Added ItemHandlerCopySlot to fix the remaining bug in Neo's ItemHandlerCopySlot.
  • Updated WrapperSlot with the new methods. Do we still use this anywhere?
  • Removed OutSlot and RestrictedItemSlot, neither of which have been used for awhile.

Registration

  • Added RegistryHelper#castKey because ? extends sucks in Java sometimes.
  • Added RegistryHelper#holderSet for 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.
  • 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 uses RegistrationHelper to store the suppliers.

Deferred register

  • Added LootConditionDeferredRegister with a helper just taking a MapCodec.
  • Deferred registers now extend DeferredRegister instead 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.
  • BlockDeferredRegister now has a default block item, which will be used in various block registration methods if no block item is passed.
  • BlockDeferredRegister now uses a builder for building blocks, allowing you to pass constructors for all relevant blocks and ending with a wall or fence call.
  • AttributeDeferredRegister now uses a builder for creating attributes, allowing you to set sync and the new attribute sentiment.
  • Added DataComponentTypeDeferredRegister and AttachmentTypeDeferredRegister with helpers for their builders with codecs and relevant deferred holders.
  • Added FluidIngredientDeferredRegister, IngredientDeferredRegister, RecipeSerializerDeferredRegister, and RecipeTypeDeferredRegister with 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 isBound method to check if they are registered.
  • Block deferred registers now return DeferredBlock instead of ItemObject<T extends Block>
  • Item deferred registers now return DeferredItem instead of ItemObject<T extends Block>
  • ItemObject still exists for uses in a few other registries, but now has two generics: registry item and item type are separate.
  • EnumObject now 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> for DeferredHolder<ArgumentTypeInfo<?,?>,T>
    • DeferredAttribute<T> for DeferredHolder<Attribute,T>
    • DeferredBlockEntity<T> for DeferredHolder<BlockEntityType<?>,BlockEntityType<T>>
    • DeferredEntity<T> for DeferredHolder<EntityType<?>,EntityType<T>>. Used for entities that lack eggs so won't use EntityObject.
    • DeferredLootFunction<T> for DeferredHolder<LootItemFunctionType<?>,LootItemFunctionType<T>>
    • DeferredMenu<T> for DeferredHolder<MenuType<?>,MenuType<T>>

Model

  • Added assets/<domain>/textures/fluid to 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 NBTKeyModel into ItemKeyModel
    • Instead of a string NBT key, uses a registry called ItemKey of 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.
  • AbstractFluidTextureProvider now uses ResourceLocation internally 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_REGISTRY to RenderItem#REGISTRY.
  • Removed FluidTextureBuilder#textures(path, overlay, camera), use wrapId() followed by still(), flowing(), camera(), and overlay()`.

Combat

  • Item attributes for a slot are a bit more complicated to fetch, so CombatHelper#getModifiers can 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 ElementScreen into ScreenElement
  • Now has two implementations: SpriteElement and TextureElement, 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 TextureElement as they are not relevant to a `SpriteElement.
  • Relevant widgets take ScreenElement allowing you to choose between sprite elements or texture elements.
  • Fix usages of TextureAtlasSprite multiplying 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#FLUID in favor of FluidRenderer#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#parent protected with a public getter and setter, allowing for easier overriding.
  • Moved ContentTableTransformer to its own class instead of it being nested inside BookTransformer. You likely never directly accessed this class.
  • Removed OpenNamedBookPacket since 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