#1.20.5/6 Snapshots
1 messages · Page 7 of 1
I would want to seek input from SilentChaos and KnightMiner on their opinions
I can get ahold of knight pretty easily
dunno about silent though
hey @azure sparrow it seems that there are a lot of questions on the design decision to use blacklists for tools could you shed some light on this (or tell us who can)?
The blacklist is... easier to define, but that's about all I have tbh
and given that the needs_x tags already existed its just very puzzling
@fallen igloo volunteered
Do I need to start rebasing the network api changes anytime soon?
I don't think there are anymore outstanding complaints with the implementation
does unpick run before or after the patching?
I'm out of date, what does unpick do?
deinline constants
it’s basically a straight port of what was there before. the tier comparison is effectively combining all of those needs_ tags, which is what those combination tags do
those needs_ tags are blacklists, and they’re the most natural way to express the source data (at least imo)
They are blacklists for the prior tool, I suppose
I think the natural expansion would have been to make laddered whitelists though
i.e. create requires_at_least tags, starting at wood, and have the future tags be defined as supersets of the previous
and/or can_be_mined_with_X (all names are verbose)
having the needs_ tags contain each other would cause more work for datapack/modpack devs
then the definition is
can_be_mined_with_wood -> [almost everything]
can_be_mined_with_stone -> [ #can_be_mined_with_wood, <iron>, ...]
etc
not really since datapack authors can just redefine the entire thing (and typically have to anyway)
that is what I meant they'd need to redefine the whole thing instead of just a part
Perhaps I'm missing a functional requirement of the design though, the goals that we have may be different from yours
the trouble is that it’s not just that, but can_be_mined_with_stone_pickaxe - so those source tags would need to be split more
that or the rule system would need to be a lot more complex
but I agree the inversion is not very natural. it’s mostly there because it mapped the logic we already had directly (early-exits based on tier and each tag)
The usecase that has become common in modded that is not well supported by the inverse tag list is comparison of individual Tiers
The vanilla design is more flexible (since the tools are not required to be strict supersets of the prior)
but arguably that flexibility could be contained to the Tool Component rather than the Tier system
since the component is what is exposed to datapack authors
“Tier” is basically just a template at this point
but I’m curious what the use-case of comparison is?
shadows let comparison go, you can now have a block that is mineable by gold but not by any other tier there is no order
is it figuring out if one tool is “better” than another?
Modular tool mods with two heads need to be able to select the "best" one
it could just check if it is in none of the tags
The thing is we also need equivalency classes
Mods providing new tools for new materials need to be able to say "this tool is as good as X"
I would argue for that being a separate system than the tool’s block break definition
equivalent tools just use the same tag (and if they are above netherite it is up to a pack dev anyway)
because two tools might have totally unrelated sets of blocks that they mine, ideally there’s the flexibility to not define each tool as a superset of the last
so if you some specifically defined order is needed, it makes sense to define it explicitly
The other annoying problem is that if you presently want to define that a block requires a netherite pickaxe, you need to add it to 5 tags
This seems cumbersome
(this is mostly an argument for having the tag definitions be laddered in terms of eachother)
but that’s only netherite because it doesn’t have a needs_netherite tag
diamond too :p
but then you just put it in needs_diamond
imo tools should take a list of tags that they're valid for, and blocks should just have two tags, something like needs_tool/pickaxe and needs_tier/diamond
hm, right, the inversion is fiddling with my head a bit
the incorrect_for tags aren’t really supposed to be modified directly, they’re just combinations of the needs_ collections
so a netherite pickaxe would be valid for needs_tool/pickaxe and needs_tier/wood all the way through needs_tier/netherite
Unfortunately there is another common usecase that arises
being able to "upgrade" a tool to the next tier
I suppose if everything is determined in relevance to the vanilla tiers it might™️ work out?
this is another case for defining an explicit structure for tier ordering
that should be done by recipes anyway so no magic there
I believe the trouble with them being disjoint comes in the case of the following:
- A tool selects the highest of two arbitrary tiers, T1 and T2
- The highest tier is used for all checks, but cannot actually break a superset of the lower
what if it's something like dire's mining gadget? there's no "recipes" for upgrades there
And the inverse structure makes it impossible to unify between two disjoint sets
in terms of what a modder/data pack creator would write - I agree, and that is essentially what’s there now. the weirder part is those combination tags, which I do agree is unintuitive and would ideally be avoided with a more expressive rule system. might still be worth changing
this is a fundamental flaw of allowing these to be more flexible, tbf. the goal is that tools would need to be well-behaved if they want to be included in the tier list
At least if the tag wasn't inverted it would be easier to create a union between two tiers to actually represent the best tier
to simplify the logic for the tool there could be another tag, something like can_mine/diamond, which would let a datapack/modpack author change tool tiers; the check would then be get_needs_tier(block) == get_can_mine(tool)
at least for "vanilla" style pickaxes
Fundamentally the need from the modded side is that Tiers are comparable
Everything else eventually boils down to that requirement
for something like tinkers tools, they would change it so that the logic is instead something like get_can_mine(parts).contains(get_needs_tier(block))
that is on the component not in a tag
sure, on the component then
the component generated from a tag :p
(as you can see i haven't looked too extensively at the changes for 1.20.5 other than what i've heard)
that is current behaviour the stack defines the incorrect for tag
I was thinking while in the shower, we need 3 levels of tags:
- incorrect for X might contain random stuff (eg an "elven metal" tool might not be able to mine iron ore despite being netherite level otherwise)
- needs X tool should only contain the stuff for one tier
- so, we should have a third level that is iron_or_higher, that contains [ needs iron tool, diamond_or_higher ], and chains into each other
Virtually every single usage I can see boils down to Tier being Comparable
Based on Gegy's information the incorrect_for_x tags should never be modified directly
and we should design within that constraint
the inversion is just screwing with my head
it already works like that now, no?
atm the incorrect_for tag is the "authoritative" tag
I mean in 1.20.4
is correct tool checks that the block is not in a higher tier
Right, that's what the needs_x tags accomplish
1.20.5 just yeets that and replaces it with tags
but the incorrect_for tags are the ones that get used and reference the needs_x tags of the above
except netherite, which references nothing
aren't all usecases except direct comparison covered by our advanced holderset stuff?
Due to the inversion, I don't think so
there's two use cases:
- define a new tier
- define a new block
if you define a new block, you add it to the needs tag for its level, nothing else
if you define a new tier you would need to include all the needs tags above, which is not feasible
But perhaps we can just disconnect the breakable blocks from the "level" entirely
hence my proposal to introduce a third level thay does the upward chaining
diamond_or_higher includes needs_diamond + netherite_or_higher
it is (imo) reasonable enough to not support interleaving within the vanilla tiers, there are like 5 of them after all
if someone wants to insert themselves between, they just add their or_higher tag to that same tag
it doesn't require more than that
iron_or_higher : append vampirite_or_higher
vampirite_or_higher: [ needs_vampirite_tool, diamond_or_higher]
those 2 tag files are enough to insert yourself in vanilla if we add the chaining intermediates
- incorrect_for_vampirite [ diamond or higher ]
Okay, say two of those exist
how do you compare them?
two things between iron and diamond with disjoint block lists
The effective goal of the API is that we are providing a stability guarantee between "levels"
will become undefined
until a modpack reconciles them
iron will refuse to mine both
but they will not know of each other
I think based on gegys response we should wait at least a few snapshots for the redesign for the case that mojang changes it again
de-inversion of those tags will make things more straightforward
hopefully that happens
not sure if we can expect native chained definitions
will it tho?
no we shouldn't invert the tags
I am curious if anyone actually defines any intermediate tiers between vanilla tiers though
aren't stuff like copper/bronze, silver, etc. in between?
nope
always iron equivalent
or stone equivalent
nobody is actually adding intermediates
copper tends to == stone
bronze is == iron
btw gegy are you able to tell us when we can expect the dfu bump to happen?
they will probably stay inverted - as far as I can tell the best you can get without changing the source tags is a more flexible rule system that would only really allow those to be inlined (but that’s not really better)
the key problem being that there’s no needs_wood_tool (this is effectively defined by blacklist from other tags)
(similarly for advanced materials which tend to be diamond equivalent)
yea the de-inversion would require a needs_wood tag
I agree that needs_wood becomes a very large tag
the inversion is a bit confusing but I think it’s not often that you need to think in that space. it’s much more convenient to have easy setup for blocks
its almost the entirety of blocks/mineable
At least a native needs_netherite should be present
it would be weird if we have to provide it and link it
yea blocks should be the primary usecase
If we have the full needs_x spread from the vanilla materials we can then establish a convention for tools beyond that set. I don't see convincing evidence that anyone is injecting tiers between vanilla tiers (imo it would make for super weird gameplay anyway, vanilla's are fairly granular)
(that claim based on a usage search of registerTier)
@rigid walrus we are not mirroring unpick on our maven
add the fabric maven for now
People will still want to compare Tiers but such comparisons can be done though knowledge of the vanilla tags
which is?
@pine egret do you happen to know of any instances of anyone inserting a tier between vanilla tiers?
Or is everything you've seen either equivalent to a vanilla tier or above netherite
why doth thou pingeth me?
ah, tiers
good question, in tinkers we don't currently do any custom tiers, but I did do one as an example in my JSON addon just to show it could be done. IIRC I made it below netherite, not that it matters
plenty of discussion above
part of that is I only care about tiers for harevesting
I'd honestly love a separation between material tiers and harvest tiers
having to make a material tier with 10 properties I don't use just to get a harvest tier is dumb
this separation would also mean custom modded material tier can just return a vanilla harvest tier if they don't need custom logic
a win win
psst @azure sparrow do that™️ ^
Copper? Brass?
I have seen those
to be clear @azure sparrow , the "that" is mostly separation, but JSON would be nice so I don't have to do it myself
you have seen them created or seen them used?
most material tiers are people need custom tools, not custom harvest tiers
Was it tetra?
to vanilla item components at least there’s no concept of tier
for modpacks, we'd really want to let them change the harvest tier tied to material tiers in JSON if possible
tier is just the template for generating the default components
Maybe that is our issue tzhen?
That we think of tiers while in reality they don't exist?
a modder should be able to say "my copper pickaxe mines whatever gold pickaxes do"
a modpack maker should be able to say "actually no, we have a new tag for copper, its between stone and iron, and this tool uses it"
that may be as simple as a tag tbh
yeah, that’s definitely a big use-case. the tags that vanilla uses are reusable, but the tool components don’t strictly require it at least 🙂
iterate backwards through the tiers, if this tool has the tag, use this tier and give it these blocks
but those tags are specifically mining-related - so it might not make sense for those to be used as a substitute for other kinds of tier comparison
what other tier comparison is there?
in vanilla, there is none - but the sense that I got from the conversation is that there is some utility to this in modded contexts
(that is to say, it probably makes most sense for this kind of structure to exist in mod APIs)
most of vanilla tiers is just stats
none of that is strictly ordered
its just the harvest level with an ordering
I would say not just in modded, if you look at wikis and how the individual materials are thought of in a players minds, it is very much hierarchical, tiered even.
it's the sense of progression. a better tool opens up more things to mine
but that doesn't need to be represented explicitly IMO
we just need to make it the least annoying possible while maintaining the functionality
I still think the 3 tag solution is best, but we sacrifice the explicit sorting order
@rigid walrus unpick basically only did the command levels
Yeah completely. I am just saying that there is more then just the way it is expressed in vanilla code
in terms of gameplay - they are indeed tiered. I mostly mean in terms of tool component definition
Yeah for sure gegy, the tool component has no concept of tiering that is true
the tier mineable tags are basically just convenience for defining these, but strictly it's not required to follow those
Wasn't it just to test it?
it didn't break anything here is the branch https://github.com/neoforged/Kits/compare/24w12a-unpick
Test the installer and userdev as well
copper is == stone, not between stone/iron; brass is the same for iron
note that in the current (1.20.4) system "==" doesn't actually exist, the sorter always puts one before or after another
it just happens that if there are no elements in a tag, it's effectively equal
so if brass is sorted after iron but with an empty tag, and someone made that tag not empty, it would automatically become > iron
it was an active design choice to do it like that, not just a side-effect
currently testing userdev it produces logspam (no errors just a ton of stuff it is doing)
we need to capture system.err in the execute tasks
I meant the tasks defined by neoform
installer can't find the unpick neoform
yes
and introduced new tags
incorrect for wood -> needs stone | needs iron | needs diamond | needs netherite
incorrect for stone -> needs iron | needs diamond | needs netherite
incorrect for iron -> needs diamond | needs netherite
the tiers now have absolutely no "ordering" of any kind in vanilla
they just contain increasingly less disallowed blocks in the tags
that's why my suggestion was to introduce a level of tags in between
[replace tags]
incorrect for wood -> stone or higher
incorrect for stone -> iron or higher
...
[new tags]
stone or higher -> needs stone | iron or higher
iron or higher -> needs iron | diamond or higher
diamond or higher -> needs diamond | netherite or higher
but then the in between is not practical
it's not too bad:
- append "mediocrite or higher" to "incorrect for iron" tag
- make "mediocrite or higher" = needs mediocrite | iron or higher
- make "incorrect for mediocrite" = "iron or higher"
the only things we would lose that way, is the ability to list tiers in order, and the ability to distinguish "parallel" tiers
eg, mediocrite tool wouldn't be able to mine betweenium level blocks, and betweenium tool wouldn't be able to mine mediocrite level blocks
hmm, that would be problematic for my usecases
I need to be able to tell which of two tiers is "higher"
if I can assume they are all linear, that can be done by tag size comparison
Can't you check both tiers every time?
not relevant really
return canMine(tier1) || canMine(tier2) essentially
my tools have a mining tier stat
that stat shoud be displable to the player as the highest mining level from a few sources
I don't want to tell the player "this tool mines at Iron, Diamond" because I have no idea which is better
hmm you'd have to choose a tier explicitly, like "this tool is Iron tier", whatever that means would depend on the tag
instad of going by level
but I suppose that doesn't work for anything taht increases tier by 1
before tier sorting let me determine which of two tiers was greater
I never just increase tier by 1, its always a max operation
this tool has tier iron, but a modifier wants tier diamond. Diamond is better, use that
this tool has tier netherite, with a modifier wanting tier diamond, stick with netherite
Allow player to choose?
ah yes, lets add a UI for a decision they may not know
if its vanilla tiers that is easy, sure
but its just an unneeded UI, we should know
the logic to "get the best of both worlds" (aka merging) is not hard, the problem here is just telling the player what this tool can mine
The UI could show list of blocks the tier can mine in JEI style so they can glance at it to see which groups of blocks they want to be able to mine
again, this is an unneeded UI
the whole point here is to show them info in a tooltip
you should not have to use a UI to tell the tooltip what to show
It sounded like, and I can be wrong, that Mojang was pushing to make the tier system no longer be tiers. Like datapacks can make stone tools mine blocks that iron tools cannot mine
Unless I misunderstood
looked to me like its just datapack controlled
I mean, you could make it not hierarchical I suppose
if that ends up being something I need to support, I just show all names in the tooltip and accept the loss
I could probably reduce the list with a set contains check if needed
means I get to construct a graph of how tiers compare to see if any tier is redundant, a fun time
but yeah, the actual harvest logic is easy, just only blacklist if its blacklisted in all tiers the tool has
that's a problem because that does not exist anymore
there is no such thing as tiers anymore (they are still in the code but they are just templates)
net.neoforged.neoforge.network.codec.NeoForgeStreamCodecs.lazy
What is the point of that?
It has no docs for when to use it 😅
It also seems to do the same thing as net.minecraft.network.codec.StreamCodec#recursive at a glance
Wouldn't surprise me since the lazy Codec is a recursive Codec
That did not exist in the past
A LazyCodec was there because sometimes it was not possible to build a codec directly (registry was not build etc) or it was expensive to do, if it was unsure if the codec was needed (through a cap for example)
The lazy codec was there to cover both cases
Well I figured as much, but Mojang has a stream codec that seems to do exactly the same thing 😅
(Maybe it was introduced in a later snapshot)
we should just remove the neoforge one
A lazy codec is not a stream codec though
Layzy codec was designed for normal codecs
Uhm Orion
Check my message again 😄
net.neoforged.neoforge.network.codec.NeoForgeStreamCodecs.lazy
yea I introduced that and I think stream codecs didn't have a recursive one yet
Ah yes, that explains that, should be removed in that case
lazy is just such a better name for what it does.... recursive really made me make a double take
I assume this is needed because the registry it references will class-load the entry-class, which itself then defines the codec (hence the "recursion")?
no recursive was made so a codec can reference itself a literal recursion
Okay 🤔 the uses I found were for wrapping a registry
Hm no, I must be mistaken. You are right, it seems to be used in real recursive data structures.
IDK we could keep the lazy one for clarity
I mean in dfu the lazy one is just a wrapper around the recursive one that ignores the parameter (that is the new dfu version on the repo)
I probably need to test in which case it actually needs to be used when referencing registries
Very annoying observation: RegistryFriendlyByteBuf needs a full RegistryAccess while all new NBT serialization methods pass through only the HolderLookup.Provider 🤔
Are you serializing a byte buf to NBT?
You know exactly what this is 😄
Client side state saving?
syncing,y es
Well you can call a HolderLookup.Provider method with a RegistryAccess
Ah but we write a bytebuf to nbt for syncing I presume
Yup... so within an NBT write method, you have a HolderLookup.Provider. If you want to construct a RegistryFriendlyByteBuf there, you really can't
Yeah
For static registries you can grab a global RegistryAccess but it's a bit ugly
@elder swallow Is this now the intended way to use DeferredRegister for registering custom component types? https://gist.github.com/shartte/3f51f2f28dd41a0bd1dc78c215af50fe
It's quite... verbose 😄
Just use deferred register 
Ah but you are
Well the builder is not too different from attachment types or other things I'd say
what is the theoretical procedure if I wanted to rebase the 24w12a branch on 1.20.4
I assume git rebase would just conflict on everything
tbh i'd add a subclass for components that exposes a register(string, unaryop)
I think components is a candidate for a dedicated DR like items/blocks
yes it will
That's how it's implemented, but the intended use case is quite different
So while you could use recursive as lazy, using lazy makes your intention much clearer
I just think the generic type for the derredholder is very unwieldy
you could use the regular holder<registrytype> type
Because it's a holder, it's just not possible to get around if you also want the specific type of the object. Though, you can get around it by just making a bunch of DeferredBlock, DeferredItem, DeferredDataComponentType, etc. Or yeah, if you don't need specific type, just use the Holder interface
Well you do need the specific type especially for data component types
We should at least probably patch something into DataComponentMap to make it usable directly in my opinion. For deferred items it's not a problem due to ItemLike, but for the component types, one has to call a lot of .get() to use them with DataComponentMap
Then yeah, that should be added to neo as another convenience class
Hm, there is also no pre-made CODEC for a DataComponentMap, as far as I can see, right? Only for the patches?
Yeah it does, it's just a tag now
The tags alone are enough for me to make a stat of sorts
Stat merging gets a little weird
With what Shadows said about the material and tier being disjoint, something like this might be necessary to properly convey what a tool can/can't do
assuming that those things are decoupled from one another
is there a way to test snapshot versions in userdev?
compile it from source, publish to maven local, then point a userdev workspace at that version
What's the right process to PR to the port?
I'd like to add a SINGLE_FLUID_CODEC to FluidStack to mirror the SINGLE_ITEM_CODEC from ItemStack. Essentially a CODEC to serialize the stack without a count
set up https://github.com/neoforged/NeoForge/tree/port/24w12a, make changes, push to personal fork, make PR and properly title it to indicate it is a porting PR
Wait but we PR to the port tree and not Kits?
Ah interesting, thanks for the reference PR. I'll do that then
the idea is to keep Kits strictly for patch work
as soon as the patched vanilla code can be removed, it gets transferred to the public repo
I have such a thing on my fluid resource PR branch
I think it would make more sense
That works, but I'd just mirror ItemStack 1:1 and make one that has amount=1 same as ItemStack.SINGLE_ITEM_CODEC. I understand "SINGLE_MILLIBUCKET_CODEC" is not as sexy
but serves the use case of serializing a filter
No that's not how the SINGLE_ITEM_CODEC works either 😄
what is a "single fluid codec"?
like, fluid with size 1?
and no tags/attachments
I'd probably want that size to be a parameter instead of fixing to 1 personally, it could be useful for say, a fluid stack in a recipe with size 1000
so I don't have to manually set its count after the fact
SINGLE_ITEM_CODEC is a codec that stores an Item serialized, but returns an Itemstack
It is with tags/attachments
no tag/attachment data
public static final Codec<ItemStack> SINGLE_ITEM_CODEC = ITEM_NON_AIR_CODEC.xmap(ItemStack::new, ItemStack::getItem);
unless it has changed in 1.20.5
in 1.20.5:
public static final Codec<ItemStack> SINGLE_ITEM_CODEC = ExtraCodecs.lazyInitializedCodec(
() -> ExtraCodecs.validate(
RecordCodecBuilder.create(
p_332617_ -> p_332617_.group(
ITEM_NON_AIR_CODEC.fieldOf("id").forGetter(ItemStack::getItemHolder),
ExtraCodecs.strictOptionalField(DataComponentPatch.CODEC, "components", DataComponentPatch.EMPTY)
.forGetter(p_332616_ -> p_332616_.components.asPatch())
)
.apply(p_332617_, (p_332614_, p_332615_) -> new ItemStack(p_332614_, 1, p_332615_))
),
ItemStack::validate
)
);
It is actually useful for me now, for storing "item types" (for filters, etc.)
what about a function that returns a fixed size fluid codec, then a static field for FluidValues.BUCKET_VOLUME
That is totally fine, Techs method could be used to expose that
I'd just like to have the symmetry with ItemStack here 😄
or 1, whichever you prefer for the "default", just think bucket is more useful than 1
Although I understand "SINGLE" is not great for something uncountable as fluid
I suppose a modder would normally use this for filters where the amount shouldn't really matter, but yeah a bucket is likely the "default" amount
FLUID_VARIANT_CODEC
that does remind me that I need such a serializer for my non-codec stuff on 1.19.2, as it has come up
FLUID_BUCKET_CODEC and static fixedSizeFluidCodec(int size)
BUCKET_FLUID_CODEC? either way, I'd just put the count in the name, that is what it is
its not really countless, its just fixed
Yeah, true enough, it should be easy for a modder to spot the symmetry with SINGLE_ITEM_CODEC in my opinion
if you want 1, MILLIBUCKET_FLUID_CODEC could be the name
1 bucket is fine too, really
I like the idea of FluidStack not having a default amount
That's why I suggested the static method instead of a codec field
unpick is much better designed for situations like this:
public static final int TYPE_INSIDE = 0;
public static final int TYPE_FACE = 1;
public static final int TYPE_EDGE = 2;
public static final int TYPE_CORNER = 3;
instead of constants like this:
public static final char SYNTAX_START_COMPONENTS = '[';
public static final char SYNTAX_END_COMPONENTS = ']';
public static final char SYNTAX_COMPONENT_SEPARATOR = ',';
public static final char SYNTAX_COMPONENT_ASSIGNMENT = '=';
It seems to also not support comparisons against 0
It's designed with bit masks in mind
Could it be limited to those?
(e.g. level update flags)
Does it also unpick references to glfw?
Unpick supports both numerical constants and bitmasks
I created an unpick file for all of LWJGL 2's OpenGL support
It took a few hours
It should also work for LWJGL 3, but it won't have as much coverage percentage, since LWJGL 3 has more stuff
<next stable release>-alpha.<target snapshot>.<timestamp> what's the timestamp here for 24w12a?
nvm got it
@elder swallow Shouldn't there be an else statement here: https://github.com/FabricMC/unpick/blob/master/unpick-format-utils/src/main/java/daomephsta/unpick/constantmappers/datadriven/parser/v2/UnpickV2Reader.java#L134 ?
That's likely something for Fabric Discord 🤔 I'll ask there
But at a glance, I'd agree
I do here, with a caveat:
In practice we leave all the tags for our tools, empty - since there was no other way to define a tool *exactly equal to* a vanilla tool and that annoyed me for some reason a while back I gave up trying to make this really work, so in practice I don't think we're actually using this, tho ideally I would.
well yes atm by virtue of the sorting registry everything has to be "inbetween"
but functionally they are all just identical
For tier sorting I think we can just standardize the level_N tags
And ask modders never to use them directly for their tools
Then if you are a modpack maker you just override all the tool blacklist tags to do what you want
Regarding in-code tier checks... I wouldn't even expect mods to continue using Tier
So... probably not worth salvaging that functionality
Heh:
Caused by: java.lang.IllegalArgumentException: Data components must implement equals and hashCode. Keep in mind they must also be immutable. Problematic class: class net.minecraft.world.item.BlockItem
Well, I tried to do something about it: https://github.com/neoforged/NeoForge/pull/744
Searching all registries is certainly not "great" but is done only once per class 🤔
Dunno if we really need the annotation yet as implementing equals/hashCode would be sufficient. For "true singletons" not part of a registry one wouldn't do that though
CC: @elder swallow
Iirc, there's a method to call to simply say "ik what I'm doing, this doesn't impl equals/hashcode, but it's fine". That was the compromise over an annotation
can we just add Block and Item (and modders are responsible for adding other registry object types if they need them) and check superclasses?
I'd say always use holders
Yes, that breaks specific typing unless you use deferred, but it's already covered by neos validation and avoids all ordering issues
are Tiers not used to declare other things like repair ingredient, durability, etc?
that's what I was thinking 🤔
We just talked about this, I don't see an implementation of this
Also: What is the benefit of using holders here?
Also: Blergh due to all the codecs it's now very hard to actually figure out which item fails the serialization 😄 It's just deeply nested in Codecs
It's in CommonHooks
Right above the check
That's well hidden. Intentionally so? 😄
The flaw I see is that you need to call that for all subclasses of Item
and all subclasses of Block
since the check is based on the concrete class of the object being attached, and not on the generic type of the component
Which is why you should just be using a holder
Can you explain why though
I think that the registry contains check is fine
The markComponentClassAsValid is probably pointless due to the subclass issue, unless we start searching the inheritance tree upwards as well
Well it's right above where the exception is thrown
I looked for it on the DataComponentType builder 😄
Meh 😄
Idk, singleton subclasses are quite rare I think?
(besides registry objects)
Would it be preferable to use Holder? No idea
I think that people would expect Block and Item to work
Yes, I'd say we can ignore my attempt at adding an annotation
the mark method is fine as well
I don't see why you wouldn't use a holder. Mc is clearly heading toward data driven elements, so things like block would eventually need a holder. It provides load order safety and is generally covered without needing to be marked as safe. All MC data components which use registry objects use holders.
Yes I'd like to know why, though 😛
You mean in case datapacks that define blocks get reloaded?
Don't misunderstand: If we're to issue a general recommendation to "`just use holders", I'd like to fully understand why 😄
I basically just skipped fully understanding holders for the most part and thought of them purely as a mechanism to solve cross-references within the datapack registry objects
this is why i think the check should check all superclasses (well, all superclasses except Object), possibly automatically adding the concrete class and maybe also any intermediate superclasses to the set so that that part can be skipped on future calls with the same concrete class
I would expect blockstate to be the json defined part. Not blocks themselves
Like a special blockstate json to define the properties and behaviors of the block with the block as type
that still means the block instances get reconstructed and replaced on reload
Unless they go components style for blocks like they did for item
Well let's stay with Item then, for now
What happens if you reload a datapack and the Item actually goes away
All it can do is crash at that point, no?
anyway, holders aren't really good enough because 
we'd need some sort of special 'optional holder' that devolves to air or whatever if the block disappears from under it
Sorry, I need to be more precise: An item that is referenced by your component really no longer exists (so the holder is dangling)
probably blockstate also wouldn't be suitable at that point, we'd need something that can cope with properties being added or removed even if the same block id does still exist in the registry
yeah, i got it, it was the same thing i was getting at just with blocks as the example
anyway, dealing with things being made dynamic isn't going to be done overnight
NO
PLS
NO AIR SPECIAL ENTRY IN TAGS WHEN REMOVING STUFF
even if we forbid directly attaching a single block or item, people are definitely going to do, like, "record that contains a List<ItemStack>" for their own attachments and those will
i'm not talking about tags?
The holder would be in the registry right? And if an entry is removed, the holder points to air but still in registry?
anyway, an object that has e.g. a block as an attachment has to do something when that block is no longer registered.
I have no idea what happens and how Holders actually help with this particular problem
why is there a discussion about why not to use holders for something?
right now blocks can only be removed when the game is fully restarted (due to the mod that registers the block being removed or having its config changed), so it's only a problem for the serialized representation, and the most obvious ways of doing so do result in air
I just wanna know why 😛
for what usecase?
hmm
DataComponents attached to ItemStack
really, if we're anticipating the fully dynamic situation [and let's keep in mind we have no idea how many minecraft versions in the future that will be], we should really only be allowing ResourceKeys as attachments
holders are probably better there since resolving if something needs an instance is easier than wrapping if something needs a holder
I mean a reference holder is just a resource key bound to the registry
what actually happens to a holder when the registry reloads
and what happens if there is no object registered with that name
if we don't want to have the discussion about dynamic blocks or items, consider if someone wanted to put, i don't know, a biome as an attachment
though really biomes shouldn't be deleted after world creation either, idk what a good example is even for dynamic registries then
I'd just really like to understand what the point of holders is right now for Block/Item/et al
it's future-proofing, the merit is debatable but that is what it is
Existing biome defaults to ocean if biome is removed iirc
if it is a reference holder and there is a value for the key it gets the new value, if there is no value after the reload the value is nulled out which causes an error on resolve, if it is a direct holder nothing happens
One would presumably use a Registry.holderByNameCodec
yes
codec only really solves the issue for if the value disappears while the game is offline, not in an online resource pack reload
One can do that, but why would one do that? 😄
No, I was not getting at that at all, just at what you would get (reference or direct) if you were defining a data component
if it comes from a registry it is always a reference
and if you want to use something from a non static registry then you don't even have access to Registry.holderByNameCodec only to the RegistryFileCodec like with Biome.CODEC
Sure but that is not the case for Block/Item 🤔
ultimately, people are definitely going to have attachments that are things like records or lists that contain static registry objects and they are going to work fine and nobody is going to have a reason to expect it to cause a problem, so having bare static registry objects as attachments work is necessary for consistency imo
I think staying consistent here is just the easiest way, we need holders for some so just do it for all
I don't really see the point of using holders myself
also, whatever version blocks or items are made dynamic in, presumably there won't be an easily obtainable codec for blocks that doesn't return a holder anyway, so they'll have that pushing them to rewrite to holders
for stuff like GameEvents you need a holder now and you don't always have a RegistryAccess
you can always get a RegistryAccess from Minecraft or ServerLifecycle if you really need one - unless you also don't know what side you're on i suppose
All NBT deserialization and serialization functions now have a HolderLookup parameter
Although that doesn't really help in that case I suppose
Anyway, ItemStack still holds an Item internally, so I am really not sure what forcing Holder<Item> is supposed to accomplish atm
I was more talking about usage but you can't get the holder for an entry with a HolderLookup anyway
It's also quite annoying to go from Item to Holder, as you need to call that deprecated function
as I said resolving when you need an instance is easier than wrapping when needing a holder
you don't have to, you can go through the registry
That's even more annoying 😛
it's also much slower
the performance overhead of doing a map lookup instead of just reading a field off the object in Forge 1.19/1.20 was significant
and I believe Mojang registries also use a map to retrieve delegates
Caused by: java.lang.IllegalStateException: Cannot encode empty FluidStack That's gonna cause some bugs 😄
Following up from #neoforge-github: how should we make PRs targeting the snapshot that depend on PRs only merged to 1.20.4 and not yet present on the snapshot branch? Just leave the PR targetting 1.20.4 until the snapshot branch is updated?
Probably, the snapshot branch should be... rebased? Is that how we'd do that?
IIRC we don't wanted new changes targetted at the port branch before porting was done. But I might have missed some follow-up on that.
This isn't a new feature, it's my resource pack fix which is probably considered breaking
But it depends on tech's earlier resource pack fix which isn't on the porting branch yet
But I'm not sure how the process there is supposed to work, so I suppose I'll just leave it as is for now
IIRC the idea was that all the porting work would be squashed
The fix for the resource packs is not strictly related to the 1.20.5 port, so we might want to keep it as a PR and identifiably as its own commit?
Ah, so target the 1.20.5 branch once that's a thing
I'll leave it as it for now then
That's my understanding at least, y eah
Primarmily because it might just be all squashed together and rebased i.e. when the next snapshot hits.
That doesn't seem to be what happened for the last couple but fair enough
I thought Tech suggested the commits to be squashed
The porting from one snapshot to the other was squashed, yes, but earlier snapshot porting commits weren't squashed into that
Hm so FluidTank#writeToNBT is just broken right now
Should a platform util-class like FluidTank offer a CODEC and STREAM_CODEC now?
I think we're treading new ground regarding that and it's probably better to be a bit conservative with your PR. So the approach you suggested seems like the best idea (essentially wait & see :D)
Yeah fair enough.
Ugh, testing out the snapshot porting branch locally is pain because it's still on gradle 8.1 so I have to manually specify my java path to not be j21
Least-effort fix for FluidTank: https://github.com/neoforged/NeoForge/pull/745/files
There is FluidStack#saveOptional, but it insists on returning a new tag
Yes
There is, but it returns a new Tag for empty, while the current FluidTank#writeToNBT saves to the passed in tag
Hm, certainly seems so
It's a start, there is sooooooo many bugs 😐
call them surprise features and leave them in?
This "pattern" for ItemStack stack doesn't work anymore and always returns empty tags 😄
CompoundTag result = new CompoundTag();
stack.save(provider, result);
return result;
TierSortingRegistry is nuked for now
I think generic level_x tags will be the way to go for that
maybe
I really dislike the level_x tags, they feel way too rigid
the whole point of tier sorting was to NOT give tiers a number
now that vanilla yeets their numbers, we add back our own
Well the use-case that people want is tiers having a comparable number :p
do they really? or do they just want to know what comes before/after?
There are modifiers for tic/silent's/etc that perform the action of +1 mining level, which in essence moves to the next "real" tier
yeah but you don't need a number for it, you just need them to be sortable in a deterministic way
Well, yes, but the most abstract way to do that is via tags, and in lieu of trying to name all the tags, we would just use a level_x tag
they can then be rearranged by pack authors if necessary
data maps? 
data maps can only bind to registry objects
my issue with level_x, is that it gives things hard numbers, which are impossible to reconcile without basically recreating all the tags in every single modpack
it doesn't just allow modpack authors to figure things out, it forces them to
oh right, duh.
how not?
only if the modpack desires to rewrite the mining levels
if every mod adds diamond+1
every mod has level_5
someone has to say which one is 6,7,8
(random numbers)
I was planning on providing default numbers up to 7 (with 5/6/7 being empty, and 0-4 being the wood-netherite)
I only know of one mod atm that is even adding post-netherite mining levels
as long as we provide the default tags mods can set their own equivalencies
IMO this is 5 steps back from what we had. I don't have a better idea right now, but I really don't like this one
it feels like designing things only thinking of the forgecraft people, and not the wide modding community at large
AutoSwitch would like to know which tool is better than the other
I think in practice I just assume mining speed/damage for that currently
I meant that in the sense of msot of the "big names" in modding being there :P
I'm making assumptions based on my knowledge of usage history going back to ~1.5.2
People will need to be able to do the following in a consistent way:
- Set what blocks can be broken by a given tier group
- Set what tiers are in a given tier group
- Compare tiers
I guess I just really hate removing features on the ground of "I don't happen to know anyone who uses it"
Modpack authors may need to do the following:
4. Change what blocks can be broken by a given tier group
5. Change what tiers are in a given tier group
The easiest way to satisfy all requirements is by having two tag sets, though ideally we would have Tier tags (but that requires making a Registry<Tier>
that's another thing. I really have no idea how this would work without tagging the tiers themselves
they'd all be 5 unless a mod chooses to do it differently
Well you tag all the items that use the tiers, which is a bit ugly
I'm not sure if we can introduce a Registry<Tier> (though, why not, we already have a psuedo-registry)
TierSortingRegistry not being able to define equivalent tiers was a flaw in the system IMO
when was tier sorting even added? 1.17?
it wasn't a flaw, it was an explicit design choice
that was when all the tag stuff was in vanilla anyway
it was discussed and decided to do it that way
maybe the design was flawed 
As of the snapshot does vanilla not have ordering in their tiers anymore?
vanilla never had ordering
it was decided to do it that way for the benefit of modpack authors, so that they would automatically get the tiers to not be "effectively equal" simply by adding blocks to a tag
without having to mess with the sorting
the snapshot introduced a new tag that is declared by the tier which declares what blocks are invalid for the Tier
"never" is a big word, vanilla tiers used to be numbered, back in 1.12 at least, maybe even up to 1.16 if i'm remembering right
which makes the current model used by the registry invalid
yeah I'm not arguing against removing TierSortingRegistry -- makes no sense as things are now
I just don't like hardcoded numbers :P
should I move the port commits on the neo repo to #neoforge-private 
Would it be viable to design a new model as opposed to trying to make the old model keep working?
that's what we are doing
I don't think it's a problem if two above-diamond tiers registered by different mods that don't know or care about each other are by default equivalent to each other as long as modpacks can easily change it
we just aren't agreeing on what the new system will have to look like
i do think it's important to be able to register a tier that's between two existing tiers, not just above all existing tiers
I mean, a model that does not have ordering
and it's not clear if the current design has that
I think they are fine on the public repo
level_x tags don't cover the use case of a modpack author wanting to make two tools distinct that are otherwise not, because the mod uses the exact same tags / tier, the importance of this use case notwithstanding.
In practice nobody does that
I've scanned a ton of mods via github search, nobody is injecting "real" tiers (those with different block lists) between the vanilla tiers
not even terra firma craft?
in reality people might just make blocks that can only be broken by select tools
i.e. instead of using levels and tiers etc they might just have a list of blocks that require "advanced pickaxes"
Not that I could tell, no - the thing is vanilla already has 5 distinct "levels", which is sufficient for progression
Are e.g. shears and swords using these tier tags?
shears do not, swords do but nothing in vanilla cares for sword mining level
TFC has tiers that are in theory between vanilla tiers, but
- we don't much care about the exact vanilla compat, and
- we don't actually populate our tags because I couldn't make tools that were "exactly equal to" vanilla ones.
okay so to recap:
- vanilla now has two kinds of tags
a. first, the "needs_x_tool" block tags, which define which blocks require at least a certain tier
b. second, the "incorrect_for_x" block tags, which define which blocks cannot be mined by a certain tier. these tags contain "needs_x_tool" tags inside - vanilla no longer has any numbering or ordering on tools, they only use the tiers as a way to provide the tool with a default "block blacklist" tag
- modders want a way to compare two tiers and know which tier is higher relativeto each other
a. modders also want a way to get the next tier up in a chain of tiers, or the next tier down - we cannot do this automatically using tier sorting, because the actual mining hierarchy is far too tag-dependant
Hmm, does bamboo instant breaking with any sword count as a "mining level"
no
in principle we could directly compare the tags for comparison purposes
if they are exactly equal they're equal, if one is a subset of the other they're ordered, if neither is a subset of the other they're unorderable
This might be useful to have pinned
nor does cobweb speed up
the point is that it doesn't care because it's a wooden sword (and because bamboo does break with bare hand, even if it's not instant)
it's also weird because bamboo is technically an axe block, swords are special cased
spiderwebs are a normal sword block iirc
Ah right, mining levels are only for increased dig speed and whether items drop, right?
now, there's two issues with level_x, that I see.
- it is impossible to insert a tool between vanilla tags, without overwriting all the tag files
- it is impossible to distinguish between "tier branches" defined by different mods. that is, if mod1 says it has a "strongium" and "overpowerium" above netherite, and mod2 says there's "titanium" and "unobtanium", there's no way for a mod to know based on level_x+1, that unobtanium is the successor of titanium, and not "overpowerium"
yes
there is no block in vanilla that specifically requires e.g. an iron sword, so sword tier only really matters for damage and speed [for vanilla blocks and default data, that is]
Hmm, does tier of sword affect speed?
yes
The two issues are mostly based on theoreticals though;
In practice, we have not observed anyone doing (1), and there is sufficiently small sample sizes of mods doing (2) that they should be able to agree on which tools go in which "level"
Huh, I don't remember wooden vs diamond sword mining at different speeds, but will check.
Ah, that'll be it then
ah, swords only have a single tag for blocks, instead of using the tier system
if we design the API based on "no one needs" 1, we are forcing it to be true in the future, we are preventing people from considering any feature like it in mods. I am generally opposed to this kind of design that makes future expansion impossible because it isn't necessary now
as I said before, though, I don't have a better idea
if we have to settle for this, we can settle for this
[well, single tag plus special casing for cobwebs and bamboo]
I just don't have to like it
so I would like to see if there's a better option
before giving up and settling on a bad design
I am of the opinion that there are no game design improvements to be made from having more levels jammed into the vanilla space
but also I see no avenues to make it possible due to the tag-backed system
the normal sword tag includes a ton of stuff actually, mostly plant based stuff like leaves, melons, etc
IIRC the sword tag also has some instant-break blocks? Or maybe that was the axe
afaict it's not better than an axe for those but it's better than bare hand
as I don't know how you would reconcile the tags if you could add something between the vanilla tags
it's very easy to add something between the vanilla tags
yeah they clearly populated it based on the old block material property
just add it to the blacklist of all the tools below your tier
and add the blacklist of all the tools strictly above your tier to your own blacklist
™️
is it possible to define a tag that includes a tag and then selectively excludes items from it? if not maybe that would be a useful feature to have in general
my best idea so far, which doesn't work in practice
would be a way to define tiers in json files, in a way like this: diamond.json - ```
{
"precedessor": "iron",
"incorrect_for_tier": "tag:name"
"repair": "...",
"speed" etc...
}
the predecessor would be used to build a hierarchy tree, and be exposed in some way.
however, it doesn't work well in practice due to there being no hard requirements for the tiers to include each other, meaning if this file isn't kept in sync with the tags, you would end up with higher tiers not being able to mine things lower tiers can mine
no lol, I make JsonThings :P
😛
defining tiers in json files is something I will be doing
I'm sure tiers will be json files eventually
either in neo, or myself
I mean I already do, I just have to change it for 1.20.5 :P
in any case, that's my best idea, and it's not viable
the problem with that is, suppose i want to make a copper pickaxe that can mine redstone ore in addition to blocks mined by stone pickaxes. i would have to exclude redstone from the requires_iron tag, or somehow add diamond and whatever other blocks require iron to my own requires_copper tag without relying on the requires_iron tag
(Neo)Forge has tag entry removal, I don't know whether it's currently functional though
does that remove from entries added by including tags, or only from entries added by earlier datapacks?
I don't believe it's recursive
it only affects the tags in the current file and predecessors
if I remember correctly
i'm not sure i understand how 'recursive' applies to what i said
If I recall correctly, all additions (including from referenced tags) are evaluated first and then the removals are done
that might be workable then
I can't find where the removals are, anyone has the code location for it?
the tag loading has changed far too much between 1.16.5 and now :P
TagFile or something like that. The tag loading is ridiculously complicated
you'd just use multiple rules
if (!tagloader$entrywithsource.entry().build(pLookup, tagloader$entrywithsource.remove() ? builder::remove : builder::add)) {
lol
add a force-allow override for redstone ore
oh, are rules available without using the nbt components?
i.e. can you construct a list of default rules directly in a DiggerItem
keep in mind that each item has its own set of default components
DiggerItem does barely anything nowadays
items provide default components
ok that solves that then
this is the key thing
the runtime attached components are replacements for the defaults
Tier is literally just a convenient way for vanilla to instantiate the corresponding components
that also means if, say, Project E wants only its dark matter and red matter pickaxes to be able to mine dark and red matter blocks, it can handle them directly in rules and not use a tag so no-one else's above-diamond tiers can do them
or well... that might not be fully true yet
but I wouldn't be surprised if Tier just disappeared entirely
yeah exactly
and if we want to find out if one tool is strictly better than another we can build the set of all blocks that their rules allow them to mine, and determine if one is a subset of the other
(set comparison is an expensive operation but it could be cached)
iterating the rules
but yeah basically, it's still expensive and should be cached
enum Orderability { LESS, GREATER, EQUIVALENT, UNORDERED } Map<Pair<Item, Item>, Orderability> cache; etc
we don't really need a way to say "these two unorderable tiers sit between the same vanilla tiers / are both above diamond" since we can compare to the vanilla tiers as well to answer that if we are interested in knowing it
and i am deeply unconvinced that "i want to be able to mine other mods' tier 5 blocks but not their tier 6 blocks" is a thing, though "I want to be able to mine any block that can be mined by any tool" [so excluding bedrock, barriers, technical blocks] probably is.
yeah I think that the concept of global mining levels is/was quite flawed
you generally want mod progressions to be separated
can we please defer the replacement of the tier system until someone actually requests a system with a usecase and not just model a system after the old system which was based on the Tier enum just because that is how it worked before
(and we shouldn't count "I want a system that works like before because xyz" as a request with a usecase)
yeah that's more or less what I did by nuking the TierSortingRegistry
did you also nuke the associated packets and config tasks
yes
👍
norge.mods
@elder swallow don't forget to rename the tests mods.toml too 
and the testframework one too
Did I forget them?
i see pr publishing is ticked but the bot has not signed the cla blocking it https://github.com/neoforged/NeoForge/pull/748
i assume thats not intended
why is the bot there 
bots can't even copyright their code smh
we need to sign the cla with the bot account @slow prism
we need to make a shover bot to keep pushing the other bot away
Can we link to an article explaining the usage from the bot comment?
it can't
because private repo gen lol
why? there has to be a way to at least exclude it
because in the future I want the bot to do the squashing too
explain
it's a gh app
can github somehow be told "squash all these commits and the resulting commit has 'CLA signed' status if all of the original commits do"?
no
but does it have a username
we (or possibly I -- I forget which among us enabled the CLA assistant, and if management access is locked to whoever enabled it) might be able to import it into the CLA assistant manually
because it has an associated user?
Can I allow bot user contributions?
Since there's no way for bot users (such as Dependabot or Greenkeeper) to sign a CLA, you may want to allow their contributions without it. You can do so by importing their names (in this case dependabot[bot] and greenkeeper[bot]) in the CLA assistant dashboard.
from the cla-assistant faq
Oh, interesting small change that caused many of my custom item models to become "invisible"
The ItemColors now expect the returned color to include an alpha component
(which mine didn't, leading to alpha=0 -> invisible)
huh
i wonder if block colors do it too if the block model itself renders in the translucent render type
[they almost certainly don't if it doesn't, and i have no prediction for if it'll affect cutout thresholds]
I did the lazy thing and just wrap all my ItemColors at registration time now lol
private static ItemColor makeOpaque(ItemColor itemColor) {
return (stack, tintIndex) -> FastColor.ARGB32.opaque(itemColor.getColor(stack, tintIndex));
}
huh, if it does, using an alpha block color to randomize cutout thresholds could be an interesting thing to do to, say, leaves
now, how did I move a block to the translucent layer to try this
I have not touched this in so long
specify it in the json model
Ah, we're still using ItemBlockRenderTypes
yes, but also no
there was a plan to deprecate ItemBlockRenderTypes at one point but it is never going to happen
Another item for the "move back to forgisms" backlog
Okay this model does not look right in translucent 😄
But since the color is visible, I'd say it does not respect alpha of the blockcolor
Yeah it doesn't. Looking at Vanillas code, it just extracts RGB from it. While the item renderer now extracts ARGB from it
huh i didn't realize you could color ME chests - how do you do it? i know terminals just take it from the attached cable
color applicator
Ah. render_type in a multipart model is likely just ignored, is it?
you have to specify it in the parts
since part of the point of the thing is to have different quads in different render types
Yeah, looks okay then. But as stated above it ignores the alpha anyway
I wonder if this means they're going to fix translucent item rendering 🤔
specifically, these parts
that was exactly I was thinking
though I forgot that FAQ even existed
the PR publishing still appears broken
You can just commit the squashing yourself
actions don't run when the pr has conflicts
I mean it has to happen at some point but yeah
I would greatly appreciate rebasing it
and would be willing to try and help if someone explained what needs to be done
I can rebase it, the problem is that I couldn't push it to the original repo and PR-ing a rebase is not possible heh
we can't commit directly to the snapshot branch?
I see
I can rebase later
I think I'll even get our CI/CD to pass once the snapshot is actually published 🤔
The AE2 port is kinda done. Tests pass and all.
snapshot day
it is Wednesday, my dudes
Has mojang typically released snapshots the week before April fools in the past?
They're fixing bugs so we'll definitely get those
But it's probably a much smaller snapshot than we've been seeing
depends
they could have had a few people work on the april fools version\
gegy 🐸 or no 🐸 ?
Snapshot today now parallelizes entity ticking on off threads to break all entity mods
(Joking)
they are certainly resolving a lot of tickets
april fool's snapshot will have a bunch of random custom blocks
Random blocks of John Cena
(added via datapack)
they're doing a lot of merges to prep for the snapshot /jk
You never know 
I pushed the changes for the unpick definitions that I currently have to the unpick branch although it currently requires running the publishToMavenLocal gradle task with the latest commit on the unpick repo
👍
world access synchronization is accomplished via CompletableFuture
itemstacks are now multithreaded
hmm no 🐸 yet
these snapshots have been pretty late recently 
they just found an issue with their CompletableFutures
damn I just crashed with io.netty.handler.codec.EncoderException: Pipeline has no outbound protocol configured, can't process packet net.minecraft.network.protocol.common.ClientboundKeepAlivePacket@63336b67
why is this not fixed yet 
our race condition?
at last
Maces enchanted with Wind Burst will emit a Wind Burst upon hitting an enemy, launching the attacker upward and enabling the linking of smash attacks one after the other
very cool gameplay changes
Non-default components on item stacks containing block items are now stored on block entities when placed
yeah curious
maty dewit
<@&1067092163520909374>
any big diffs?
bad omen is no longer given by killing raid captains, is instead given by drinking ominous bottle
Oh shit yeah I forgot it's wednesday
finally 😭🔥
ok there's a billion codec-related changes lol
bad omen now drops itemized from raid captains and vaults and is basically a "drink this to fight the uber version" now
wow what a good change
it actually is
ik i wasn't being ironic
oh good, I won't accidentally set off raids in villager farms anymore
But they've purged extra codecs as far as possible?
wait... components on blockentities?
dcomponents?
BlockEntity#load -> BlockEntity#loadAdditional
Well do they just store it to maintain state of the item placing the BE?
what is this crap
why not just place the codec in DataComponentMap
yeah ik
probably just lazy singleton
and the get/getOrDefault methods in ItemStack were not implementing any interface
oh right - but it's a protected interface - in BlockEntity??
BlockEntity.applyComponents -> BlockEntity.applyImplicitComponents(BlockEntity.DataComponentInput)
can BEs have components that they actually use independent of items
BlockEntity.applyComponents -> applyImplicitComponents
saveWithoutMetadata -> saveCustomOnly
wait no
saveWithoutMetadata still exists
but does smth else
what data components may a BE have?
unclear
wtf is .split().added()
Gut feeling: they apply all supported components to the internal BE state
but keep any unsupported components around for when the BE gets turned back into an item
people will be so annoyed about immutability
oh yeah cause the patch is Map<type, Optional<component>>
Well the BEs internals aren't
so they separate the "addition" and "removal"
AbstractProjectileDispenseBehavior is gone
that seems quite... irrelevant
just listing the changes
generally we try to only list the relevant changes 😄
got it
I feel like we might see the shulker box's storage being turned into a component soon
hehehe yes
People can always just use CustomData
because it's trivial to port
CustomData as the data-type for a mod-specific attachment
CustomData.update(MyModComponents.STUFF, stack, tag -> { tag.putString("blah", "123");});
Is not that hard to do
oh that's quite nice heh
So copy and replace?
yes
Fine by me 
And within a mod you can easily wrap that up into a util function... updateNbt(Consumer<CompoundTag> tag) within your custom item class or whatever
So, honestly? I went the "hard" route of making everything custom records in custom attachments 😄
but there is a lower effort path
Old NBT data not handled by datafixers are just in custom data, right?
who knows
anything major technical this time ?
once ported to this snapshot will the pr (#748) be updated and "fixed" to allow the pr publishing to publish?
probably
is this the last snapshot?
we have no idea
I'm guessing that the plan is to eventually de-legacy-ify the custom_name stuff and the other stuff is a bonus. Though I can think of several mods that have enchantable blocks that would benefit from this.
looking back at 1.20.1, MobEffects are significantly better now (onEffectStarted, onEffectAdded, onMobRemoved, onMobHurt, etc)
So, the BE is only storing the patch though, right?
Meaning it doesn't have any of the item-default components available
are they implemented by classes per effect instead of by a huge if/else statement?
It's storing a map atm
Not sure how it's populated
that's in basecontainer be
ah, nice
I'd bet it's just the patch converted into a map
it relies on each block manually calling collectImplicitComponents
What are you getting at w.r.t. bad mojang?
there used to be a big if/else statement for, at least, all instantaneous effects, now HealOrHarm is its own class et c
yep, been the case since like 1.20.2 or 1.20.3, but with 24w13a we also got a few new methods used with the new mob effects
In the last snapshot it was wrapped up in BlockEntity#saveToItem
oo, wait, can you also define custom particles too now in mob effects?
yeah, you can. i missed that somehow
Well and in the last snapshot they only calledSavetoItem in creative mode context lol
has anyone checked if they changed potion recipes in any way (except for adding new ones)

welp time to wait for the unpick release so we can get the new unpick neoform
https://github.com/neoforged/NeoForm/actions/runs/8455377839/job/23162817219#step:13:373
That's a lot of patch errors
How could I actually help with ports like that? Well. Can I? 😄
you are Maintainer, you definitely can choose to participate in the "patch churn"
although that's neoform, that's decompile post-processing right?
that's not the patchening that's working on NeoForm patches
it is making the decompiled source compile on all common compilers and fixing decompiler errors
Yes, I have no idea of the process though, and how to avoid stepping on each others feet
coeh is the only one who knows afaik
Huh interesting didn't know they were still updating this game.... Good on them. /S
Interesting snapshot
I'm not a huge fan of all the tags they are adding tho....
Like there are too many and not everything has every tag. They added tags for immune for 2 potions... What if I want to make something immune to some other effects?
I think some of these tags should be auto created for each type. Like if you register in a new effect it auto makes an empty "immue_to_xyz" tag
Same goes for the mobs and how some have poisonous/ tempt extra tags but most only have food
the thing that bothers me most is the inconsistencies between cat and wolf feeding
the thing that bothers me is mace functionally invalidating basically all combat for mods
lol
Yeah... What the hell is "is_meat"??
😉
time to join the "refusing to update" club?
I think they are gonna Nerf the mace enchant a bit more
Also the mace is really terrain dependent...
If you don't have any height difference than it isn't that great
uh no
Unless you also have a bunch of wind chargers
it applies after 1.5 blocks fallen
and with enchants scales to like 12dmg/block
so you can oneshot most standard mobs with even a slight incline
ad on top of that the other enchant launches you back up
so you can then just chain it
and if they were gonna nerf it, they wouldn't have added half of this stuff to begin with (or the advancement for dealing 100 dmg in a hit???)
I think they are gonna change the enchantment to only do 0.5dmg/block/level
lol right..
that's why they're doubling down on it
so they can go back on it later
But also it is not that easy to get a mace....
OP is OP no matter how long it takes to get
idk why people don't seem to understand that lol
Anyway mods can always make their mobs resistant to mace
so dumb
I'm gonna end up having to nerf its scaling and apply a bunch of durability damage or something
it's just gonna be stupid
i enjoy it's capabilities frankly. it's more game-y and fun
they added an inner class to BlockEntity that currently only has a codec to read components from the components field
Yeah it's cursed
Probably just a lazy singleton
Maybe that's the new lazilyInitializedCodec
There's probably more plans for the class
[Reference to](#mojira message) #mojira [➤ ](#mojira message)This ticket has just been resolved as Fixed!
Hello, there is a tricky race condition in the latest snapshot, due to the server-side handling of ServerboundFinishConfigurationPacket. The packet is terminal, which causes the connection to become unbound immediately when it is received. It is then queued for processing on the main thread, which will eventually setup the outbound GAME protocol. In the meanwhile, it can happen that a keep alive packet is sent to the client, causing an immediate disconnection due to
I have created a 24w07a Fabric mod that does exactly this, you can find it at https://github.com/Technici4n/MC-268727-repro.
Resolved as Fixed <t:1711619724:R>
Future Update
2
1
<t:1708685884:R>
Finally hehe
for the snapshot versions, are there any changes related to how mod is detected and loaded ? I am testing a minimal project on the last snapshot build and the mod isnt being detected/loaded at all. No logs either. I think I am missing something
the mods.toml file was renamed
Is there no logging?
I hoped we would have some warning if a mods.toml file is detected but not a neo.mods.toml
just like we detect a fabric mod
🤦 ofcourse
we don't
no, that code hasn't worked since 1.17 or earlier
huh
(thank god)
it definitely did work in the past
as I've said many times before, with the current locator design any kind of warning or other loader detection would be bad
we really need this warning though


