#1.20.5/6 Snapshots
1 messages ยท Page 10 of 1
check if the stack has DataComponents.FOOD
Awesome, ty
can you squash everything and rebase afterwards?
I am writing this shit down
- Start Kits branch with action
- Press "Run workflow"
- Fill out the survey.
- The workflow checks out the specified branch from this repository.
- It updates
minecraft_versionin gradle.properties with the given Minecraft version. - It updates
neoform_versionin gradle.properties with the given NeoForm version. Grab it from its project page. The version does not include the Minecraft version (i.e.20240415.193619).
- Wait
yep
Oh no don't pin it
this is just a snapshot of what I am writing in an MD file to PR to the repo ๐
* What went wrong:
Execution failed for task ':base:cacheVersionExecutableClient1.20.5-pre1'.
> Failed to download game artifact EXECUTABLE for CLIENT
Is this intermittent?
could be yeah
remote: This repository moved. Please use the new location:
remote: https://github.com/neoforged/Kits.git
I think the action is using a lowercase link
First draft: https://github.com/neoforged/NeoForge/pull/805
1.20.5-pre2 is done and on the main repo. Continuing with Squash/Rebase
PS: I have no clue how to run our clientside game tests, there's an overlay and.... then what?
you can enable a specific one with /tests enable <test id> and then try to validate it
other than that idk ๐
And you do that on every change? ๐
I'll not finish the rebase today, Patch engine failure. I really need to check Diffpatch and see why it can't just reject the hunk instead of throwing like that
And you do that on every change?
of course not ๐
client tests are not really automatable - that's kind of the point
in theory we could pay a QA team to go through them for every commit
You can automate parts of it
Anyhow... This sucks. Running setup with -Pupdating=true
did you merge patches?
Apparently it did that automatically ๐
Agh, why did pre2 have to come out already
Still not done documenting pre1
At least a good 20 mousewheel spins away
Re-run with -si, Patch engine failure is an assertion that failed during patching
are we gonna have to provide a way to register splash screen backgrounds for teleporting between dimensions?
[teleporting between the nether and the end with commands seems to default to the nether's background]
twilight forest has such functionality
It's currently determined by which dimension you are teleporting to or from where if either of those are the nether it uses the nether portal then it checks if either of them are the end where it uses the end portal render type otherwise it will render the menu background as if you aren't in a world
If you are logging in it will use the menu background
If you are entering the end exit portal it will use the end portal render type
If you are respawning it also uses the menu background
is it hardcoded or is there something in levelstem
The ReceivingLevelScreen constructor takes an enum value which the respawn packet determines by using the first check and is hardcoded
i bet the enum's sent by ordinal, so we don't want to extend it [at least not without a synced registry]
could add our own packet
maybe a packet to be sent before the respawn packet that sets a "use this instead of the enum" value
It's not included in the respawn packet. It's determined by the client after receiving the respawn packet
ah well
we could still send an override value ahead of the respawn packet
i guess the question is if the server should be responsible for any part of this
my idea was to patch in a hook and basically ignore the enum
does the artifact publishing for the PR need to be started manually or does it publish automatically?
once a Maintainer checks the checkbox on the PR, it'll automatically publish on each push to the PR
(the checkbox is automatically ticked for PRs opened by Maintainers)
I believe there was something about conflicts preventing the publish?
ah yes; merge conflicts on PRs prevent publishing as well
Cannot use ID syncing for non-synced built-in registry
What does this mean ?
Let me know if this is too early in porting process to bring up issues
the short version is that neoforge has a registry that's supposed to be marked synced but isn't
its one of my custom registries. how does the marking work ?
oh, you do that when you create the registry, there should be a method on the registry builder
the long version is, when someone sends a packet with a registrable in it, you can either refer to it by its string id or its int id
int ids are smaller for packet size, which is good, but they require that the stuff have the same int ids on both sides
in vanilla, this is a given, but in a modded environment, this isn't deterministic because parallel modloading + client can have extra mods the server doesn't
so fnorge has a system whereby the set of int ids of certain registries are synced from server to client to ensure the ids are the same on both sides
such a registry is called a "synced registry" and they can be marked as such in a registry builder
a "built-in" registry are the static registries, like blocks and items (as opposed to dynamic/datapack registries, like biomes and dimensiontypes, which mojang has created their own mark-this-registry-as-syncable system for because mojang does need it for dynamic registries because datapacks have the same problem as mods here)
It only matters if you write numeric IDs for registry objects to packets
If you only ever write the string IDs, it doesn't matter
well the standard RFBB stream codec for registry entries is using the numeric id
Yes, that is true. It depends on how they port. But I suppose in general the sanity check will prevent footguns heh
Yet another pre release :p
Minecraft 1.20.5 Release Candidate 3 wtf
o.o already?

lol
given the ID of the version, it's probably a mistake on their end
rc3 was so good we skipped rc1 and rc2
Blog post correctly says pre release
Any
-level code derps in there?
does this count 
They're now caching the hashCode of ItemContainerContents
And added a lot of hashing to codecs by the looks of things
I'm updating my prediction of RC1 for later this week and 1.20.5 next week 
VoxelShape#getCoords changed from protected->public in pre2 and from public->protected in pre3

Might've been visible for testing but they forgot to annotate it as such
Fuck gotta hurry with FML stuff
someone double-check me: break-able labels can only be on loops, right?
๐ฅ
No, I was just as surprised
It's poor-man-goto in Java
nope
what the fuck
It doesnt even need to be an if
this is gonna make me crack open the JLS
label: {
break label;
}
also works
I've used that before
guessing this is to cut down on allocations
Cursed code is fun
A break statement with label Identifier attempts to transfer control to the enclosing labeled statement (ยง14.7) that has the same Identifier as its label; this enclosing statement, which is called the break target, then immediately completes normally. In this case, the break target need not be a
switch,while,do, orforstatement.
JLS 21 ed., sec. 14.15 "The break statement"
So basically there was a bug report on data component saving being super slow
a switch-a-roo
Wait, is Codec.EMPTY not a codec? lolwat
might be a mapcodec
it's a MapCodec
for {}
yep
MapCodec<Unit> EMPTY = MapCodec.of(Encoder.empty(), Decoder.unit(Unit.INSTANCE));

MapCodec is better anyways
I say rc1 friday release monday or tuesday
neoform needs manual updating (again)
I have a question:
Does Mojang seem to be preparing big changes for Minecraft 1.21?
Agh! More pres!
there's a few minor differences between bedrock and java I think?
but I don't foresee any crazy changes between 1.20.5 and 1.21
I'm hoping to be surprised by some secret new feature though :P
uh... yes?
but why don't need to show any of that for a different version
they will start with the 1.21 snapshots when they can
and then they will have a lot of new things
(datapack blocks?)
I hope my bug report will be fixed soon X)
aight, how many layers of shulker boxes / chests did you do /jk
That can't be the first time that's reported. Overloading a chest with written books has long been used by trolls and griefers to chunk-ban people from servers
a lot
but this has been a thing for like.... since the beginning of chests lol
As far as I know, chunk banning has only been an issue when connecting to a server and is also not a corruption issue since the affected area of the world can be loaded and saved without issues, you just get kicked when you enter the chunk. What Lolo is running into is in singleplayer though, so it's a completely different thing, especially if it actually corrupts the world
affects 1.20.5 pre2 NeoForge port
VF 1.10.1 is out btw, those fixes would be nice
welp since we didn't do the port yet... coeh/shartte please bump VF
Isn't singleplayer now a proper "multiplayer" in 20.5, because the network stuff actually runs?
That'd be why you can suddenly chunkban yourself
I am back home now will do
NeoForm first and this time I am fiddling with the groovy script
in case you are waiting for stuff to compile... I addressed your comments on the FML PR ^^
Does anyone know how I would make Gradle complete a set of tasks and only fail at the end
if any of the tasks failed?
Since the neoform tasks are split into project{shared,client,server,joined}Apply
If I run projectClientApply, it fails on projectSharedApply and just drops the client patches ๐
well then you're probably out of luck ๐
Well I just made ApplyPatch not fail for now, but that's obviously only a stopgap
any reason why you don't just fix the patches
I want to fix them all
Not shared first, then client later ๐
I really need to grok why the hell we need to maintain a separate patchset for joined
They only strip at the class-level now, I think?
That is the first time I seen the word grok said in a conversation
I am not a native speaker, you'll have to excuse me ๐
No like, rare word!
https://github.com/neoforged/NeoForm/pull/6
1.20.5-pre3, Vineflower 1.10.1, re-add parameter metadata
Oh I comitted my ApplyPatch "bandaid", gotta revert that
the neoform build hasn't started?
https://projects.neoforged.net/neoforged/neoform
pre3 is published here, so...?
I already did pre3 early last night
Wait. pre 3 was published a few hours ago. Now I am getting extremely confused ๐
what did you do ๐
Oh I don't know which timezone coehrlich is in ๐
So maybe my changes only relate to VF 1.10.1
a very positive one
not quite there are a few islands in the pacific that are more
Okay, so process question: Kits for pre3 didn't produce rejects, but obviously for some patch files the alignment changed, or the context
Do I still commit that to Kits and make an update commit to the porting branch?
(Commit the realigned patches that is)
shouldn't we do a session of going through all // Porting <version> comments before we do the squash and rebase?
Can't we do that after the squash / rebase?
Yeah it throws, but there's nothing to catch it, I don't think running with different args is going to change that ๐ค
yes let's do it after
Done
I moved the code that decorates the encode/decode errors for custom payloads into the stream codec, otherwise straightforward
Keep in mind that this is still with VF 1.10.0
wdym wait? ๐ So no more ports? ๐
It's only bugfixes anyway I suppose
well we could but no more rebasing or squashing
this means we can start to look into Big Refactorsโข๏ธ
if we start merging actual feature PRs then no more squashing
yes as long as there's no movement on 1.20.x that doesn't need to happen either
The PR publish did update
I'll try to find time to rebase the model data PR on 20.5-pre3 tonight, assuming it needs a rebase
Plastered you with a few review comments. We should take this opportunity to at least write some docs in the code
damn why did I ask for comments ๐ฉ
Should probably ask, but does the new data pack registry event now support adding to the in-game reloadable data pack registry (the one that handles loot tables and co.)?
the new what now
Big +1 as a modder to "change ModLoader.get() to something like ModLoader.INSTANCE
Or static-ing the methods ie ModLoader.isLoaded("mymodid")
static methods would be preferred
Agreed
IMO the isLoaded would make sense to be on FMLEnvironment/Environment too. Imagine Environment.isModLoaded("mymodid")
prime example of why static-ing would be nice
...should probably move to #1187879036815417456
Its the same reason I static'd the network registry
Gradle should catch it
Like adding a new registry to the data pack registries
I phrased it badly
I guess that might matter on what you're referring to
but let me double check the status of those
last I saw Loot Tables got migrated to a "real" reloadable registry but the others were still reload listeners
Maybe? That sounds right
I think that encompasses three registries though
Since all of the loot data (conditions and co) wouldโve been migrated too
the force pushes to port really fuck up prs huh
Yep it's a real pain to fix stuff up on a PR after one, especially if there's conflicts
But in general rebasing to the upstream branch with --interactive and dropping anything before your PR works, if you're as non-git-savvy as I am
YES
Is there a reason the porting stuff is done this way with squashing instead of just a commit/commits per version port or whatever?
Like, why can't there be multiple Port to ABCDEF commits for each version it's ported through?
If you want major refactor PRs ready to merge close to when there's a release, not doing the force pushes would be a lot easier -- so I assume there's some reason for it that I'm not aware of
#1134480199937957969 message
[Reference to](#1134480199937957969 message) #1134480199937957969 [โค ](#1134480199937957969 message)that's what we do to keep a linear history ๐
I don't see how it's necessary to keep a linear history
Say you've ported to pre 1. You can squash all the pre1 -> pre2 changes into one commit on top of that
[Reference to](#1134480199937957969 message) #1134480199937957969 [โค ](#1134480199937957969 message)This force push was only to rebase it on top of 1.20.4 now that 1.20.4 has been frozen, giving us a nice linear history
Idk, thatโs what Iโve been told lol
Ah, right, stuff happening in 1.20.4 still while everything is going on in 1.20.5 land too
I still feel like squashing together all the porting work is a mistake, and makes rebasing stuff a bit more annoying, but whatever, I suppose I see the logic
@elder swallow can you review https://github.com/neoforged/NeoForge/pull/802 one more time and merge it if you're happy (alongside whatever else you're merging)?
we've had enough eyes on it at this point, I think
I should probably set up publishing of the port branches to the snapshots repo
- why are we merging stuff before we fix the porting comments
- why are we merging stuff before we update VF
the port was squashed already
also vf was updated
Oh it does, but it stops applying any of the subsequent patches in the batc
nope, no Neoform release was made with the new VF
Oh wait, now there is one, apparently ๐ค
Okay.. But how am i meant to debug the issue, without a stack trace?
Well, I linked the exact line where the exceptio is thrown ๐
Here: https://github.com/TheCBProject/DiffPatch/blob/07808bf5623e8aeb410462579040cc9e30da52c2/src/main/java/codechicken/diffpatch/patch/Patcher.java#L101
I can grab a stacktrace if you want
You did?
Ahh, you did
I missed that
Well, that error is quite severe, means that it found an exact match of where to apply the patch, but when applying, the context was different.
Will need steps to reproduce, etc
preferably just the input + patch file
TODO:
net.minecraft.client.gui.screens.worldselection.WorldOpenFlows.java (68, 46) public class WorldOpenFlows { // TODO 1.20.3 PORTING: re-add the autoconfirm codenet.minecraft.client.particle.ParticleEngine.java (457, 16) //TODO porting: is this even needed with the particle render order fix???net.minecraft.util.datafix.fixes.StructuresBecomeConfiguredFix.java (186, 16) // Porting 1.20.5 check if this is correctnet.minecraft.world.entity.Entity.java (2803, 217) net.neoforged.neoforge.event.entity.EntityEvent.Size sizeEvent = net.neoforged.neoforge.event.EventHooks.getEntitySizeForge(this, pose, entitydimensions, entitydimensions1, entitydimensions1.eyeHeight()); // Porting 1.20.5 check if this still worksnet.minecraft.world.entity.LivingEntity.java (871, 12) // Porting 1.20.5 re-add or remove PotionColorCalculationEventnet.minecraft.world.inventory.GrindstoneMenu.java (137, 70) if (this.xp != Integer.MIN_VALUE) return ItemStack.EMPTY; // Porting 1.20.5 check if this is correctnet.minecraft.world.item.BowItem.java (28, 44) if (!itemstack.isEmpty()) { // Porting 1.20.5 redo EventHooks.onArrowLoosenet.minecraft.world.level.block.RailBlock.java (168, 57) return p_55402_; // TODO 1.20.3 PORTING: reevaluatenet.minecraft.world.level.block.StemBlock.java (93, 145) if (p_222539_.isEmptyBlock(blockpos) && (blockstate.is(Blocks.FARMLAND) || blockstate.is(BlockTags.DIRT))) { // TODO 1.20.3 PORTING: reimplement canSustainPlant checknet.minecraft.world.level.saveddata.maps.MapDecoration.java (12, 119) public record MapDecoration(Holder<MapDecorationType> type, byte x, byte y, byte rot, Optional<Component> name) { // Porting 1.20.5 this is synced now reevaluate shouldRenderForIndexnet.neoforged.neoforge.client.gui.widget.ModListWidget.java (37, 47) //this.setRenderBackground(false); // Porting 1.20.5 still needed?net.neoforged.neoforge.common.BasicItemListing.java (55, 120) ItemCost cost = new ItemCost(price.getItemHolder(), price.getCount(), DataComponentPredicate.EMPTY, price); // Porting 1.20.5 do something proper for the components herenet.neoforged.neoforge.common.CommonHooks.java (521, 12) // Porting 1.20.5 redo this for components?net.neoforged.neoforge.debug.attachment.AttachmentTests.java (30, 35) public class AttachmentTests { // Porting 1.20.5 nuke?net.neoforged.neoforge.debug.item.ItemTests.java (133, 16) // Porting 1.20.5 replacement?net.neoforged.neoforge.debug.loot.GlobalLootModifiersTest.java (142, 100) return loottable.getRandomItems(builder.create(LootContextParamSets.EMPTY)); // TODO - porting: we need an ATnet.neoforged.neoforge.oldtest.item.HiddenTooltipPartsTest.java (55, 17) // TODO PORTING 1.20.5 - fix or remove test
should we revert and reopen the merged feature PR and then bump VF
why does the order matter
why? we can keep linear from here
because we can not squash after we merged the first feature, everything we do now will be its own commit on the main branch
There's like 9000 commits on the main branch
we can have another "port to pre4" or whatever if necessary, but it doesn't matter that the whole "port to 1.20.5" block is a single commit
specially considering the snapshots/prereleases are publicly available for development purposes
thats fine
you can squash a set of fixes
The squash was only relevant to make it linear with regards to the 1.20.4 branch, that's pretty much it
As long as we don't start merging into 1.20.x, we'll be fine
everyone cares WAY too much about linearity, too
yes it can get messy if you use merge commits in merge commits that are merged to a branch and then merged to another branch before merging to the main branch
but even if we did have merge commits for major feature work, it would still be easy to keep things clean
if I could share an image of how our work git repo looks like I would, non linearity escalates quickly
also yes
Well yes, it was decided to do it, so I did it ๐
squashing is fine, I'm just against this sense of "must preserve the purity of the sacred timeline!"
nah fuck it, if we have 3 port commits we have 3 port commits, who cares
Having multiple port commits does not even go against linearity. It's just in relationship with the 1.20.x branch. The only reason to squash against it really is the effort required to rebase it on that branch
yeah that was an aside
We can just update Neoform using a bog-standard PR to port/1.20.5
IMO, it would have been fine to continue 1.20.x development in parallel, and simply have one merge commit from the 1.20.5 porting branch. limiting the repo to this kind of merge commit would still be perfectly manageable. but I get why we don't want to, even if I don't agree with the reason. :P
is there a neoform version with the new VF yet?
There was only one here yesterday: https://projects.neoforged.net/neoforged/neoform
But now there's two
Yeah the new one references VF 1.10.1
I will rename the pre3 branch on kits and then run the action
NZST is UTC+12 so I am usually asleep when mojang releases something
well we normally wait for you but someone got impatient
all knowledge being in the head of one person is a bad idea
also running the action on kits is useless
just update locally and push the patch changes...
VF bump can cause patch failures so it is not useless
we have a workflow maty doing everything locally without anyone seeing anything but patch changes is bad
you're going to push it, everyone will see patch changes
"workflows" should be guidelines not strict rules to blindly follow in all contexts..
on the kits branch all maintainers can see what happened to the source not just to the patches
NeoForm readme: exists
does that document how to release
kekw
You had months to fix the porting stuff if you wanted to ๐
fixing porting comments is one of the last things
Not really
we've been at the last stage for weeks
We need to move forward with actual breaking changes
Just make a PR for batches of porting fixes
less complaining, more working
this please
we only entered the last stage with pre1
neoform bump is done
new pre can be used for a next step in linearity
/j
@restive raft sound the bell!
nvm Ater snipped Sci lol
Did they update the datapack version again?
if I had access we would have a workflow already
just learn https://nodered.org/
actually, they bumped the resource pack version
Nope, RP version
What are we on now?
32 it seems?
it seems like I will have fun with this in like 3 hours 
oh god rc4
Those versions really are turning into an exponential curve if that continues 
rc? 
no pre4
I read that as "the shitty TTF glyph provider ..."
Showing 20 changed files with 541 additions and 115 deletions.
(that's excluding assets)
smol
Guessing this one was 270838/270845, since that breaks maps
huh. for some reason, Snowman is being regenerated
@spiral radish FYI
theoretically, it should still come out to the same commit hash
but you ought to be informed just in case
TC iirc was building twice
First probably finished before the second?
I'm going to set a limit on it
so it doesn't happen again
should I let it run fully, or should I stop it, update Snowblower with VF 1.10.1, and rerun it
oh right, yea
[Jump to referenced message](#builds message) in #builds
1.20.5-pre4-20240417.132209
main
1.20.5-pre4
catjam
No changes to patches for neoform required this tine
oh right, VF 1.10.1 means we can disable the workaround for params that was added in ART, right?
Unless you want a ton of final parameters no
oh
wait, I'm confused
https://github.com/neoforged/snowblower/pull/5 says it disables use of parameter metadata for parameters with null names, until VF 1.10.1 lands with a fix
isn't that separate from ART's removal of final?
The removal of final was in preparation for when parameter metadata would be reenabled
We'd have to update snowblower separately and remove -ump=0 again
hmmmm
*Update to VF 1.10.1 I mean
workflow is running
There's no point in updating to each pre release
ffs I thought we fixed this https://github.com/neoforged/NeoForge/pull/794#issuecomment-2061482418
But does it matter now that we froze 1.20.4?
it doesn't matter even without the freeze
oop
it is done
the bot should not be in the authors
Just squash the bot out
It doesn't really matter, no
It's just pointless work
Go fix the porting comments instead of updating to pre N+1 ๐
because I use intellij for squashing which only lets me edit the commit message
then don't use intellij
no 
Then yeah that's a skill issue ๐
I use the git CLI ๐
ok, uh. so, I had a branch set up for a PR on 24w12a, but I'm trying to rebase it onto port/1.20.5. the trouble is that it's still tracking the remote which still thinks it's old files for 24w12a are correct, so my local wants to pull those changes before pushing. I'm not a git wizard, so I'm a little lost on how to fix this up aside from creating a new branch off of port/1.20.5
except for when force pushes don't work in IJ it can do everything you need and it should not mater to have the bot in there
thanks for reminding me of force pushing...
ugh, ugly history, have to fix that
ok
would anyone be opposed if i patched in a MutableDataComponentHolder interface, which both ItemStack and FluidStack implement?
it would extend the vanilla DataComponentHolder but also have the set/update/remove methods from both ItemStack and FluidStack
i would like to do this as i have a utility to copy a component from ItemStack onto a FluidStack (and another for vice versa) and would like to make it more generic
copy from DataComponentHolder onto MutableDataComponentHolder.
ive been using this for stuff like potion fluid/containers where i simply copy the potion contents component from container and onto the fluid and vice versa
Seems reasonable enough
Sure
aight noice ๐ will also include my copy utility in MutableDataComponentHolder
so can easily components from 1 holder into another
welp there it is https://github.com/neoforged/NeoForge/pull/817
Conceptually I think I prefer copyFrom - then it's always the receiving object that gets mutated
You're also missing a few Supplier overloads
i am?
For remove at least I thought
looks like both itemstack and fluidstack have it
It should be in the mutable interface
oh i didnt add my supplier pr changes to that
I guess a single PR that does both might make sense then?
yeah il merge the supplier changes into the mutable pr
pr should be rdy for review https://github.com/neoforged/NeoForge/pull/817 
My resource loader fixes PR now has some 1.20.5-specific fixes too -- notably, KnownPacks and the new vanilla systems there should now behave sensibly with child packs, and some stuff that was broken during porting was fixed
I'm not going to implement KnownPacks for mod resource packs themselves yet because that needs a lot more testing to make sure it's doing what I think it is
So that part will be a separate PR
Also, we need to poke how SynchronizeRegistriesTask#handleResponse works a bit more -- it might be sensible in a modded environment to patch the equals call there to a containsAll in a modded context given some funkiness on how required packs work? Or maybe that would have other side effects? I have to poke that more -- a problem for the future
Or maybe it's most sensible to instead sent the registries with an intersection set instead of either of those comparisons?
Yeah I'm thinking in a modded environment it might be most sensible to use a set intersection there, but that needs way more testing before implementing -- but this would be what's necessary for mods to use KnownPack I suspect to not end up having it not even be used for vanilla
There's also the worries about a neo client connecting to a vanilla server... (luckily this is actually not an issue! hooray to things working out of the box for once) all fixable but yeah, I've included the bare minimum in that PR to make stuff available for mods to use without bugginess. I'll address all the stuff you'd need for KnownPacks for mod resources by default in a different PR I think
ok I did some stuff for PotionColorCalculationEvent:
- rename to EffectParticleModificationEvent
- make it be fired per effect (since color and visibility is per effect now too)
should I PR or direct commit (I think we discussed before that maintainers still do direct commit to the porting branch?)
That sounds like a PR kinda change
I mean it is a porting comment fix which in the past would even be hidden in the squash
the branch isn't getting squashed again, PR it
ik it isn't getting squashed so why not just direct commit (I'm in my kits project and don't wanna setup another remote)
because review
we never had reviews for porting todo fixes
we never had public porting branches..
that doesn't mean it needs a review for every change (we also don't have reviews on the actual porting commits)
christ, do what you want
PR it if you think other people should review it. Directly commit it if you are very confident in your change.
ok I have done some more work and think we should add an overload for the data component methods that takes a data component type holder
net.neoforged.neoforge.debug.loot.GlobalLootModifiersTest.java (142, 100) return loottable.getRandomItems(builder.create(LootContextParamSets.EMPTY)); // TODO - porting: we need an AT ugh for what do we need the AT here?
can we change TooltipContext#registries to RegistryAccess? (it is always returns a registry access anyway)
also to any mojangsta reading this please move the item attribute modifier tooltip stuff into ItemAttributeModifiers by making it implement TooltipProvider and adding the nullable player to TooltipProvider#addToTooltip
(AdventureModePredicate could get a similar treatment)
just giving you ideas for the next version ๐
why 
c'mon, you gotta give context
12 porting todos left
(pun not intended, but welcomed regardless)
because you can't get a registry from the lookup
There's already a PR for Supplier
I haven't had the chance to review it yet, it's very new
Im trying to use the snapshot and I get this during gradle reload
C:\Users\Nekretaur\Documents\Chemistria\build\tmp\.cache\expanded\zip_00862ed952d18d88dbbfed4e29883aca\net\minecraft\world\level\block\entity\trialspawner\TrialSpawnerState.java:209: error: cannot find symbol
return list.size() == 1 ? (Entity)list.getFirst() : Util.getRandom(list, p_338524_.random);
^
symbol: method getFirst()
location: variable list of type List<? extends Entity>
Probably java version issue
nothing changed
Created Gist at the request of @fallen igloo: https://gist.github.com/NeoCamelot/d77bd36c2fc0c6bf6dcc392a887a0889
nice
Upgrading a world with horses wearing leather horse armor makes the horse immune to freezing forever
huh ?? how can that happen lol
i am ๐ค this close to hooking up a bot to look at the MC Launcher changelogs API
but not yet at that point 
n8n sci 
I hope there's no rc2
FYI, according to that changelog,
This week's shipping frenzy continues with our very first Release Candidate for 1.20.5! Barring any significant or critical issues found within it, this is the version we are planning to ship as Minecraft: Java Edition 1.20.5 next week.
(emphasis mine)
(emphasis yours)
time to merge the unify tags PR i guess then
So it's 1.20.5 ported, now that you all are working on snapshots.
Is it like done
Or do you just get a head start
If I had access I would have done it
I'll do the port when we get a neoform and then we only have a few porting todos and PRs
not if i do it before you
can someone review and merge the model data PR 
definitely not trying to get out of rebasing it another time
I'd say merge all reviewed PRs before I do the update so we don't need to rebase all of them

the PRs won't need rebasing
oh dear
sometimes it feels like they just don't know java
welp report it to the VF discord
oh its a vf issue
most of the time you think that, it is either a decomp issue or legacy code
am hunting it down

wouldnโt that change the actual result?
because it would continue regardless of the result of $$7
yeah that was my thought
but it could just be dead code from quick commenting on their end
47: aload 4
49: instanceof #1311 // class java/lang/Error
52: istore 5
54: aload 4
56: instanceof #942 // class java/io/IOException
59: ifne 70
62: aload 4
64: instanceof #1313 // class net/minecraft/nbt/NbtException
67: ifeq 74
70: iconst_1
71: goto 75
74: iconst_0
75: istore 6
77: iload 5
79: ifne 90
82: iload 6
84: ifne 134
87: goto 134
slot 6 contains the result of $$7
note how both 84 and 87 jump to 134
134 being getstatic on the LOGGER field (the rest of the if-true case)
the Bytecode :abolbsweats:
so the bytecode does seem to point to the decompiler accurately reflecting the bytecode
(for the curious, 90 and beyond up to before 134 are part of the else of the if (!$$6)
if no one else has any further poking that they want me to do...
deletes the jars and text files from my desktop
What
We are not rebasing anything...
Porting to these versions is just a waste of time. You should focus on more important things
I can do it tonight
if there are conflicts in the PRs they need to be rebased on the porting branch
hey Tech and Schurli, what's your timezones
just asking for my notes
(so I know when not to bother you while you're asleep)
Berlin time
check my global about me
Ah well that would be more reasons not to do these silly updates ๐
[Jump to referenced message](#builds message) in #builds
1.20.5-rc1-20240418.140438
1.20.5-dev
1.20.5-rc1
Fixing the todos is a lot more important
there's not going to be conflicts after this tiny rc
I have done 5 already so don't act like I did none
Careful with that, they previously passed around the lookup in way more places and it might actually be hard to get to the registry access
I was discussing with tech however that we might add an optional level
So uhh, what else am I supposed to use here? of course it doesn't show FMLJMLC is marked as deprecated
Why are you asking that in the snapshot thread? ๐
well level is one thing but the lookup in there is always a RegistryAccess if you check where it creates the context
Because I'm on a snapshot
Yes but it was deprecated way earlier ๐
I'm asking what the alternative is
Declare an IEventBus parameter in your mod constructor
you can get the mod bus by way of a constructor parameter
IDEA didn't tell me about it lol
yea, as shartte says
aight, time to install Guice and use it everywhere
or whatever DI library we prefer
I apologize if this was the wrong place to ask about that. I never knew it was deprecated cause IDEA didn't show it was errored ๐คทโโ๏ธ
we said we go full enterprise so we have to write our own
/s
as long as I get my FactoryFactory, I'll be happy /jk
with 1.20.5 on the horizon of next week
when next week? no one knows
Monday, as a guess
yeah
once rc1 is out, they always plan to release within a week of rc1
so I would expect monday/tuesday release if there's no last-minute rc<N+1>
you'll even get a FactoryFactoryInstanceFactory /s
does that mean the game now does disconnect on invalid packets?
ah yes, I remember seeing that
they added a @Deprecated field
(from ClientCommonPacketListenerImpl.java, https://github.com/neoforged/Snowman/commit/1aac58a73389d873bf0e72cfce16539a319abaf2#diff-3685a00c47d1b0a6afff909a2a12def46aaf0f4f758352caa134eeac1577f8a7R91-R97)
hmm no more super call
I'm gonna push a dev/fix-porting-todos branch to the main repo for us to do the porting todo fixes on
๐ก๏ธ
I didn't even realise the rc1 dropped
My point is that fixing the todos is useful and porting to every intermediate version is not. 5 is a good starting point
I imagined our final commit history would look like:
- Port to 1.20.5-pre1
- ... (normal commits go here)
- Port to 1.20.5
Having intermediate porting commit is just useless noise
it is not since there are changes in between that are nice to have
Can you name an example from one of the 1.20.5 pre-releases?
What feature in 1.20.5-rc1 is nice to have compared to pre3?
it's not about features it is about code changes
such as?
this is the PR for the porting todos https://github.com/neoforged/NeoForge/pull/820
Note: The menu listing the installed mods is weird with the "Programmer Art" resource pack.
Why did you merge that PR arghh
Why is MutableDataComponentHolder.copyFrom static?
Also the javadoc states copes rather than copies
Yeah and the copyFrom logic in DataComponentHolder seems backwards
@wild pine please fix ๐
agreed, copyFrom sounds like it would take from the target and put it on the source
@fallen igloo you get a 
i guess i could rename the copy method in IDataComponentHolderExtension back to copyTo
since its copying to target from this
the static method originally existed as the copy method was on MutableDataComponentHolder
meaning would need a instance of MutableDataComponentHolder to invoke it
but i guess since its now on any component holder via IDataComponentHolderExtension
the static method is no longer needed
It should be copyFrom
On the mutable interface though
Yeah the static method can go
why put it in the mutable iface? your not mutating the instance
your mutating the provided target
That's the whole point of naming it copy_From_
putting it on the component holder extension allows any holder (mutable or immutable) to easily copy a value to another mutable holder
You put the mutation method in the mutable holder
Then the code becomes mutable.copyFrom(immutable)
No change of functionality, just moving the mutation method to the thing that gets mutated
That will also make it more discoverable
so delete the extensions copy method
and change mutables to be like so
mutates the mutable itself and pulsl value from the (im)mutable
default <T> void copyFrom(DataComponentHolder src, DataComponentType<T> componentType) {
set(componentType, src.get(componentType));
}
I don't quite get why you are so up in arms about that ๐
it was up for review
uhh pushed my changes but they didnt show up in the pr
do i have to reopen it first? kinda assumed a push to the branch would auto reopn it
guess ill open a new pr?
ok I created a milestone for stuff to be merged into the porting branch https://github.com/neoforged/NeoForge/milestone/5
coping
it conflicts, huh https://github.com/neoforged/NeoForge/pull/821
Squash your stuff and rebase it onto the port branch
squashed and rebased 
Dunno if we should clarify that copyfrom will clear a local component if the other object doesnt have it
Probably might be the expected behavior anyway, so I presume its fine
yes
it's probably worth clarifying
just because one might otherwise not think about it
idk... I guess it's just the suggestion of rushing to merge/review PRs before porting to pre N+1
yes, I reviewed it last night before going to bed and you merged it while I was still at work without giving me a chance to review the updated version?
it's fiiine - I'm just annoyed when people don't wait for my review and miss important details in the PR
there was no change request else I wouldn't have been able to merge it
yeah it was mostly discussed on discord
as I said, in principle nothing prevents you from merging it - I am just annoyed when it happens and I need to request (or event worse write) a subsequent fix PR
discussions on discord men nothing for PRs if there is no not on the PR
I'm aware. You still need to understand that procedures are guidelines rather than strict requirements. It would have been ideal for me to write something on the PR (which I didn't because it was opened so late...) or for you to wait before merging.
But whatever, Apex thankfully quickly made a fixup PR
im looking at itemstack and noticed i didnt copy the applyComponents methods to the mutable iface
does it make sense to copy those across, those iirc set a group of components in batch
So turns out Mojang didn't turn on MethodParameters
They just disabled stripping
Javac will always export MethodParameters for specifically record constructors
It's also generated for methods with synthetic or mandated parameters
But in that case, the name will not be written unless -parameters is passed
Which is consistent with what we see in the game
I didn't expect them to enable full parameter metadat
wait when?
I think like the last non pre-release non-rc snapshot or so
Like the one after the J21 bump
I wouldn't be surprised if they saw Jasmine's message about it being extremely difficult for a decompiler to detect the mandated parameters and decided to make that information be kept
all the mod loader people begging them directly probably had more to do with it :P
What, they are providing method params now? ๐ฎ
no, they disabled stripping of parameter metadata that doesn't have an associated field
ah okay, still, that is good
so that decompiling inner/anonymous classes isn't impossible
(or well, doesn't require guesswork)
Javac generates parameter metadata in the following cases:
- If
-parametersis passed, always generate full metadata - If the method is a constructor in a record, generate full metadata
- If the method has synthetic or mandated parameters, generate metadata with names stripped
the last one is how you can distinguish ```
public class X {
private int value;
class Y {
public Y() {
doSomething(value);
}
}
}
from ```
public class X {
static class Y {
public Y(X x) {
doSomething(x.value);
}
}
}
Does the top one generate a mandated parameter, since the parameter is still used?
Ok, it always generates it as mandated, regardless of if it's used or not
Do you push the snapshot branches to a maven?
they didn't enable params they just disabled stripping, for us
not yet afaik
That would be useful for early porting to RCs
yea as long as the publishing succeeds
I mean afaik AE2 is already ported
wait where? if so can U link it?
You really don't want a version build for a non-release version of MC...
Well when I said snapshot branches, I meant port branches
Where is that?
should we be throwing an exception if mods.toml is found in the main mod in dev? I was wondering why performance fell off a cliff and then realized my mod just didn't load...
I spend half an hour until I realized filename change
I think it should only fail if mods.toml is found and neoforge.mods.toml isn't found
Because there might be people with both
That
that's one of the goals of the FML locator rewrite yes
added couple more methods to my component type pr, also noticed that i missed the applyComponents methods from item stack when originally copying the mutating methods, but im unsure if it makes sense to copy those across or not
yea pull it up, also copyFrom should probably have the src as first parameter and the second be a vararg of types so you can do multiple at once
also why is it now so much more patching?
looks like we will be getting an rc2, #mojira
src was originally the first param but the component type was not a varargs
tech said he preferred it component type being first to be consistent with all the other methods
its also more patching as im adding 1/2 methods to classes and a whole extension iface didnt feel right just to implement 1/2 methods
i couldnt also make a extension iface for the inner iface in BlockEntity (DataComponent.Input) since its protected
would have had to make it public which i think would be a new AT line
imo extension interface patches are easier to fix than whole methods when porting
also the vararg thing would be useful
i can convert them to be extension ifaces but that would mean making the iface in block entity public
unsure where neo stands on changing the visibility of vanilla classes
well all but 1 can be converted, SetComponentsFunction.setComponent has a supplier variant now and thats static
dont belive i can extension iface that
you can skip that one if it is a problem
pushed the requested changes, kepts copyFrom but added a copyAll method which takes in varargs
also merged in latest changes (mainly so that i could publish locally and use in my userdev workspace xD)
rc2 is out

I'm so far behind on the primer...
Does VanillaRecipeProvider fail in Snowman too?
I don't see a failure in that class
It's failed on both RCs in Ocelot
decompiler failure?
ah. 
what is Snowman ? why is it called snowman lol
Snowman is a private repo containing decomp'd versions of Minecraft, each version applied as a commit ontop of the previous
It's made by Snowblowerhttps://github.com/neoforged/snowblower
As for the name, it's because when asked to keep the LVT Table in the past to help with decomp efforts, they did so although replacing the names with a snowman emoji
\โ
I will deal with this in the morning
so is snowblower an automation script around VF ?
Side note, they've since replaced this with $$<index> since Java introduced the helpful NPE
(https://bugs.mojang.com/browse/MC-227065?jql=text ~ "รขหฦ" ORDER BY lastViewed DESC for a list of issues made before they did so :3)
Yesn't, it's slightly more than just an automation script
it's a tool that uses VF
Ok, finally done with up to 1.20.5-pre1. Now just got to do up to rc2
Long live BootstapContext
Note on this: a KnownPack is more than just a key about where something came from, it's a key that gets synced about where it came from -- so if the same KnownPack is used for a resource pack on the client and the server, the pack must have the same contents or you'll risk client/server desyncs
Because the KnownPack key is used to avoid syncing the actual data
Typo on second bullet of https://gist.github.com/ChampionAsh5357/53b04132e292aa12638d339abfabf955#resourcekey-references - net.miencraft

Any chance I could get https://github.com/neoforged/NeoForge/pull/735 added to the initial 1.20.5 release milestone or at least the 1.20.5 stable milestone? And could I get some review on it if possible? This one fixes some bugs introduced during porting that are pretty easily visible -- like individual mod packs not being properly hidden any more and generally having strange behavior, and the like
net.minecraft.client.gui.navigation.ScreenRectangle#containsPoint- Checks whether the point is within the current rectangle
This is nice. Thank you, Mojang.
BlockBox is also neat o.o
net.minecraft.gametest.framework.GameTestRunner$Builder - A builder for constructing a runner to run the game tests
is this a nice, vanilla way to boot up game tests?
To a degree, a bit more nonsense is involved since you still need to construct most of the objects yourself
Also, finished now with pre2, so everything should be up-to-date
Besides all the spelling mistakes
Which they are probably a lot
[09:31:36.224] [main/ERROR] [loading.ModSorter/LOADING]: Missing or unsupported mandatory dependencies:
Mod ID: 'minecraft', Requested by: 'fabric_block_view_api_v2', Expected range: '[1.20.5-pre1,1.21)', Actual version: '1.20.5-rc1'
Mod ID: 'minecraft', Requested by: 'fabric_rendering_data_attachment_v1', Expected range: '[1.20.5-pre1,1.21)', Actual version: '1.20.5-rc1'
Mod ID: 'minecraft', Requested by: 'fabric_api_base', Expected range: '[1.20.5-pre1,1.21)', Actual version: '1.20.5-rc1'
Mod ID: 'minecraft', Requested by: 'fabric_renderer_api_v1', Expected range: '[1.20.5-pre1,1.21)', Actual version: '1.20.5-rc1' ```
is this how semver is meant to work

apparantly 1.20.5-rc1 is not between 1.20.5-pre1 and 1.21
that's not semver
Forge uses Maven versioning
isnโt that even worse 
Yes
Maven versioning: 1.20.5-rc1 < 1.20.5-pre1

absolutely perfect

Are those versions assigned manually during porting?
I believe that just has to do with rc recognized as a qualifier while pre isn't
Semver versioning: 1.20.5-rc1 > 1.20.5-pre1
ah yes semver vs maven versioning again
Unknown qualifiers are considered 'newer' than known qualifiers
Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable
Shouldn't this thing check /usr/lib/jvm/openjdk-21, now?
ComparableVersion doesn't look possible to subclass and add a custom qualifier to
where's that from?
and is that 21 JVM listed in ./gradlew javaToolchains
Yeah, I encountered that versioning issue while porting a mod. Decided to just use 1.20.4 for the mc version. Tbf, forge never had to account for this since snapshots weren't public
I've just been doing [1.20.5,1.20.6) (mc dep) don't plan to release during snapshot cycle so should be more than fine once 20.5 actually releases
(and [20.5,20.6) for the neo dep)
Petition to rename either AddReloadListenerEvent or RegisterClientReloadListenerEvent to match the other
Like AddAssetReloadListenerEvent and AddDataReloadListenerEvent
rename both
Honestly
Why not merge them and have register method take in the pack type to register listener for?
And I prefer "register" but it is more verbose
Bad client/server separation?
As it stands, the client one is in the client package and the other is in common
i mean everything needed to register reload listener can be accessed on either side (PackType and reload listener ifaces/classes)
so i dont see why there would be any sidedness issues
the thing registering and holding the listeners though is sided but thats shoudlnt rly a issue when both sides are abstracted away via the event, but i could be wrong though
We need to rework these events anyway for proper ordering
The server one has access to DataPackContents
yeah true, that would be a drawback with my method, you loose that server pack context
something like this would be nice though imo
NeoForge.EVENT_BUS.addListener(AddReloadListenersEvent.class, event -> {
event.register(PackType.CLIENT_RESOURCES, <myResourceListener>);
event.register(PackType.SERVER_DATA, <myDataListener>);
});
I mean it's possible to supply a context if we assume that the listener is a factory function, or we could just have nullables
Factory function would probably be safer if we were to entertain the idea
i was assuming the listener would be PreparableReloadListener since thats what both events register currently
Yes, but I was saying something like ctx -> new Listener where ctx would contain whatever objects were necessary from the client resources and server data reloadable managers
both events are basicly the same, registering the same listener iface to some reload handler, just 1 has server context the other does not
Sure
using factories in the register to pass the context would be a good workaround/alternative though
1 event while but keeping the server context when registering a data listener
could even pass along the client resource manager or something as the clients context
Still, I think two separate events make sense since they are called in different places, no?
Unless we're storing the listeners for both in our own intermediary class to push at a specific point in time
just use functions no? client would be Function<ReloadableResourceManager, PreparableReloadListener> while server would be Function<ServerReloadListenerContext, PreparableReloadListener>
collect all those functions and have reload manager invoke them after event has posted and pass off the listeners to manager like normal
we would be providing the server context though, but it could be a simple record holding everything the event currently has
this is all off top of my head though so might not be 100% working logic
Sure, but once again, the timing for each is different
The solution works if we're storing both listeners in our own intermediary class
On the client, the client reload listeners are called during startup while the server resources on world creation/world load/reload
On the server, the server resources are called immediately
It makes no sense to have a single event IMO
The server one also fires once per reload, whereas the client one only fires a single time at startup
oh yeah, the event itself is fired differently depending on sides
for some reason i thought was talking about the call to PreparableReloadListener#reload which ofc thats called differently the handler manages that call
but the event itself being called differently yeah, cant reasonably merge them in that case
that's a lot of Supplier<DataComponentType<?>> patches...
I think you're overdoing it
this is too much patching considering that users can just do .get() where necessary
yeah i just published locally to use in userdev and see how many places i could remove .value() in
but if its too much i can remove them
you can even do .get()
but that simply invokes .value in deferred holder (unless that changed)
yeah it's just a little bit shorter ๐
true
i was originally patching the methods right into the class originaly though
but schurli said having them be extension ifaces would be better even if its just 1/2 methods being patched in
I'd suggest removing all the new extension interfaces in your latest PR
the problem is that this is just a lot of patching for little value
I'd only keep the ItemStack ones (so MutableDataAttachmentHolder and IDataAttachmentHolderExtension)
idk
CopyComponentsFunction and SetComponentsFunction should definitely be removed
I don't like the BlockEntity.DataComponentInput ones either
idk about copyAll - it is definitely redundant with copyFrom however I don't like having the component type go last
yeah il remove all the ones i recently added
copy/set components, item properties, component map/predicate and block entity input
item properties is fine I think
that one is likely to get used a lot
the data component map builder would also make sense I think
anyway just ask yourself what a good tradeoff is
Is anyone opposed to us patching StateHolder to support arbitrary Maps in this snapshot rather than requiring it to be a Reference2ObjectArrayMap? Think FerriteCore would benefit from it
item properties, block entity input and the data component map builder
are ones i would like to keep and think would be used alot
properties for initial registration
and BE input/component map builder during block entity/item component transfers (BlockEntity#collectImplicitComponents / BlockEntity#applyImplicitComponents)
the rest i will agree is prob abit much
we generally don't do random field type changes to suit one specific mod ๐
Keep in mind that these two events behave very differently. The assets reload listener list is built once during startup while the data reload listener list is rebuilt from scratch on every reload (create world screen, world load, /reload).
mk
ok the block entity input might also be used quite a bit yeah
potentially move it to an extension interface as well
i dont think i can since the inner iface of block entity is protected
protected interface DataComponentInput
ah well patch is fine then
as for copyAll, the param consistency is nice
but ability to pass multiple components to copy would also come in quite handy
idk both are pretty handy, im more in favor of copyAll though (replace copyFrom with it)
I'd remove copyFrom and rename copyAll to copyFrom
we have so many deprecations for removal right now that it's not even funny
we'll have a look through them shortly
yay java generics, cause both get andset are generic typed i assume
but the varargs has no type
might have to use explicit types instead of vars
and if that doesn't work, replace ? with T
typing the varargs would defeat the purpose of this method
would basicly be the copyFrom but passing the same component type multiple times
and if i replace var its the same issue
i could do set((DataComponentType) componentType, src.get((DataComponentType) componentType)); however but that looks ugly
This specific generic issue is annoying
The solution is a private helper method that's generically typed
Then you only have to reference the wildcard variable once
well, yeah. the naming just sucks from a user perspective. you fundamentally use them in the same way. The javadocs are for important clarifications ("fired every reload blah blah" vs "fired once at startup")
use DataComponentType raw type instead of var
then theres this nonesense, wasnt quite sure how to cleanly implement this one
default void copyFrom(DataComponentHolder src, Supplier<? extends DataComponentType<?>>... componentTypes) {
copyFrom(src, Stream.of(componentTypes).map(Supplier::get).toArray(DataComponentType[]::new));
}
that looks about right
i guess now that i have that private typed helper
this would be cleaner
default void copyFrom(DataComponentHolder src, Supplier<? extends DataComponentType<?>>... componentTypes) {
for (var componentType : componentTypes) {
copyFrom(src, componentType.get());
}
}
and pushed now to wait for more reviews from tech 
I'd probably put the private copyFrom right below the public ones but it's not very important
i moved it to the bottom to keep public stuff at the top (the stuff user is more likely to care about)
even for the user it's a bit weird to see this other copyFrom method without finding it
but as I said, it doesn't really matter
Where are snapshot/pre/rc builds published? I would like to depend on them. Ideally rc1 or rc2
couldve made it static so its still usable but yeah doesnt rly matter rly
lol
NOOO ๐
was about to post link myself 
can't believe I was double sniped
Thanks
Should we be using suppliers still, or should it be Holders?
Since that is what minecraft is patching everywhere, and we have transitioned to using Holders ourselves
can't use regular holders for DataComponents, since they require the specific type and the Holder just has the registry type
yeah holder would be Holder<DataComponent<?>> while the supplier would be Supplier<DataComponent<T>>
you loose the generic type with holders, unless you want to pass a deferred holder around 
but for things like blocks/items which dont rly need the specific type, passing a holder makes more sense
like DeferredSpawnEggItem could be updated to take in a holder imo rather than the supplier
You forgot a comma in that range
Oh wait I'm silly
Misread that
which was the one benefit of DeferredDataComponentType, but I figured people would be favoring Suppliers
[Jump to referenced message](#builds message) in #builds
1.20.5-rc2-20240419.190916
1.20.5-dev
1.20.5-rc2
...
discord why did you make it look like I wasn't scrolled up when I was
discord classic
Discord plus my bad internet if I had to guess. Ah well
Ah, ok
In theory sure -- though if you compile your mods with it people will need it to run them which isn't great
Especially since 22 isn't an LTS
there're unnamed variables that I would love to use
Unnamed variables in J22? Why make code harder to read...
mine did it at the same time lol
Unnamed variables for "stuff we're tossing out" -- so, like, if you do a pattern match on a record but only want one component of it, you dump the other in an unnamed variable so you don't polute the space of variable names with stuff you're not using that could lead to confusion.
I understand the point, but that doesn't mean I like it
BiPredicate noop = (_, _) -> false
unnamed variables, my beloved
it'd be more useful in pattern matching ofc
switch (someRecord) {
case SomeRecord(_, int num) -> doSomething(),
case SomeRecord(String a, _) when a == null -> somethingElse(),
}
hopefully that syntax is somewhat right, haven't actually used it myself yet
; but yeah it's about right
on the cases or at the end of the switch
right, yeah
switch is also getting more and more stuff โค๏ธ https://openjdk.org/jeps/8323658
at least until nintendo releases a new one and shuts down the old servers
The new stream gatherers are my personal favorite up-and-coming feature
holy
switch is the new if
New java versions are getting all of my favorite fun toys; I love it. Between the new switch stuff and sealed classes we can finally do algebraic data type stuff in java which is awesome
mojang dev who wrote those giant if-else chains: *uncontrollable sobbing*
i only now realised the potential of this
so sad it will take 2 years at least
oracle finally realised how annoying checked exceptions are 
https://bugs.openjdk.org/browse/JDK-8325803
In constructors of Java classes, allow statements to appear before an explicit constructor invocation (super(..) or this(..)). The statements cannot use the instance under construction, but can initialize its fields, which makes classes more reliable when methods are overridden
omg I could yeet my anonymous block hacks if this gets in
html moment
ffs java why do you add that stupid shit and and not better generics
yeah this one is the real gold
convenience features like switch exceptions and stuff is all cool
but being able to put stuff before a constructor's super/this is big news
shut up and go somewhere else to complain about good features 
In all seriousness, because better generics requires reworking a lot more stuff than something that is mostly just fancy syntax sugar
Though I too wish for improved generics
I suppose more technical changes should go in the blog post instead of a primer (i.e removing antlr or the fml locator changes)
I only put the most important things in the blog post
well we should probably mention this stuff too somewhere
I doubt our readers will be excited to hear about antlr
Next thing we know, "why did that shaded antlr class I was using dissapear?"
(Hell, did AT shade antlr or just drag it in normally? I don't even remember)
But yeah, those sort of changes are interesting but not nearly as vital to note -- the JST AT change might be worth noting
No one is gonna read until that point to get that though
there is such a thing as TMI ๐
And yes, the AT thing may be user-visible indeed
the JST AT change is retroactive though, isn't it?
I got like 160 of em
ATs are applied to the decompiled minecraft sources instead of the binary
meaning it is no longer decompiled again when you change ATs
embedded is right, it's NG
Uh, was the issue with subclasses ever resolved?
Like, how does JST handle "AT applied to superclass but not subclass"?
Since that won't recompile properly, in theory
Hm?
That's been the case previously
So it was left as-is
You can write an AT that leads to a recompile issue today
getJumpPower -.-
Ah wait, right, cause they're applied before recomp. Make sense
So yeah the modder-facing AT changes in the 1.20.5 update itself are minor enough they're probably not worth mentioning
what are they though
uhm what happened to the event result refactor
Basically: if for some reason you depended on the antlr runtime that AT bundled (why would you ever do this), it is gone, because AT no longer uses antlr.
But no, nothing about ATs themselves should have changed
yeah alright
Shadows still needs to finish it
but he's been busy with networking until yesterday ^^
Speaking of networking: @true jacinth I'm looking into doing the "staticification" of PacketDistributor and with the way I have it currently, the equivalent of PacketTarget#send() creates exactly one packet and "dispatches" it. Would you prefer something along the lines of the previous solution with a Consumer<Packet<?>> or would you prefer a solution where the "equivalent" of PacketTarget#send() returns the packet and lets the caller pass it further, avoiding the lambda soup (almost) entirely?
do we need PacketTarget at all?
I don't think PacketTarget is necessary
it was necessary to passthrough the lambda to SimpleChannel
but that purpose is defunct
No, that's gone in my current attempt, I just meant "the effective equivalent of that method"
Let me mock something up real quick
btw, for serverbound packets you can't do much except a basic "send to server"
Yup, that's the reason why my PacketTarget#send() equivalent only creates one packet, since it's only used for clientbound packets
Realistically I only need a decision whether you would prefer sendToClient(player.connection::send, payloads); (closer to the old approach) or player.connection.send(makeClientboundPacket(payloads)); (avoids the lambda soup [almost] entirely)
why not sendToClient(ServerPlayer, payload)?
or potentially just player.send(payload) which we might already support
Most of the multiple-player targets hide the individual player in vanilla code
I think the second one here is more preferable
Sounds good, then I'll go for that
also, what do we do with the interaction events
I'm tempted to rework them in 1.20.5, but I'm not sure what events should be kept, and which not, since we have like 3 events firing for block place
The only thing I have to add to that topic is that we need an event between Block#useItemOn() and Block#useWithoutItem() so event-based double door mods can finally stop breaking camo application on FramedBlocks doors (not blaming anyone in particular, the way item-on-block interaction worked before Mojang separated it into those two methods just sucked for that kind of feature combination)
didn't we accept a Commoble PR that added finer-grained events?
UseItemOnBlockEvent exists now ye
Yes, Commoble added UseItemOnBlockEvent, which might be cleanly adaptable for that (I haven't checked yet). It cannot provide the necessary distinction between "using item on block" and "using block empty handed or block didn't care about item" in previous versions though
On a completely different note: server shutdown currently gets stuck on sun.nio.ch.WEpoll.wait() on the Netty Server IO thread. Not sure what's going wrong there
that sounds wrong?
yeah something is wrong with datagen too
could it be that I made changes to the FML executors and forgot to mark some threads as daemons?
Potentially, yeah
yeah I think it's the new modloading-sync-worker
I'll look further into it after I've got the distributor PR done
let me validate that hypothesis real quick...
yeah that was it
what's the alt for Player.MAX_NAME_LENGTH in the snapshots?
that value was only used in a method called from GameProfileCache.lookupGameProfile()
if you look at this method in the snapshots, instead of calling Player.isValidUsername, it calls StringUtil.isValidPlayerName
giga how do you know that? ๐
?
I looked at the code?
sorry I should have specified
the value is only used once in the Player class, in the isValidUsername
this method was only used in GameProfileCache
given that I can't know of other usages of the constant, this is the only breadcrumb trail we can follow
oh, crap, StringUtil.isValidPlayerName doesn't have a constant for it
SharedConstants.MAX_PLAYER_NAME_LENGTH seems likely
Could we add the ability to "copy over" dcomponents?
between stacks (item and fluid) to let's say BEs
that's already supported - see implicit components
I just had an idea how we can "fix" vanilla compat for item components better
if the client is not neoforge we save the component to the nbt in the custom data component and skip the custom one
(we can do this by patching the stream codec for DataComponentPatch)
Hm? How would you identify a vanilla client in the stream codec?
You can't
The solution is trivial
If there are custom components
Then no vanilla clients
Simple as that
well yes but we currently need to do something like for milk fluid because of the neo added ones
Yep
Actually we don't
There can be additional non-vanilla registry entries as long as they are not used
nope because we need to do reg sync
which we don't do when connecting to vanilla clients
so a vanilla Neo client won't be able to connect but a vanilla client will?
Uh vanilla neo client?
what is a vanilla neo client?
You mean if it's missing the mod ?
a neo client with no mods
connect to what?
you can connect two neo clients with no mods
since they both add extra registry entries
it sounded like Schurli wanted to make modded server-side item components possible?
right now we could register normal item components
and it wouldn't break neo-vanilla connections
(as long as nothing uses these components, of course)
this is quite easy to do
you just need a ByteBuf subclass (think RegistryOps)
I have considered it - this is basically how item stack attachment sync works in 1.20.4; but I don't think it's worth it

