Xander Smith
- isXander
- JIRAUSER640396
- Etc/GMT-1
- Yes
- No
Looking at the code, doesn't the CustomName nbt work?
Wouldn't you use
if (this.world.isClient || isLogicalSideForUpdatingMovement())
A change has been made in ContainerEventHandler where upon mouse click, the child that is clicked is focused. This is not noticeable in most places because most buttons change the screen.
However, in settings menus, it is prevalent, for example, changing a setting from OFF to ON leaves that button focused.
A change has been made in ContainerEventHandler where upon mouse click, the child that is clicked is focused. This is not noticeable in most places because most buttons change the screen.
However, in settings menus, it is prevalent, for example, changing a setting from OFF to ON leaves that button focused.
Code analysis
ContainerEventHandler.java - mojmap 1.19.4
@Override default public boolean mouseClicked(double mouseX, double mouseY, int button) { for (GuiEventListener guiEventListener : this.children()) { if (!guiEventListener.mouseClicked(mouseX, mouseY, button)) continue; this.setFocused(guiEventListener); if (button == 0) { this.setDragging(true); } return true; } return false; }Here you can see this.setFocused(guiEventListener) is being invoked on every mouse click. Remember, both Screen and ObjectSelectionList.Entry both implement this interface.
This could be fixed with the following code:
@Override default public boolean mouseClicked(double mouseX, double mouseY, int button) { for (GuiEventListener child : this.children()) { if (child.mouseClicked(mouseX, mouseY, button)) { if (button == InputConstants.MOUSE_BUTTON_LEFT) this.setDragging(true); return true; } } return false; }However, this would break dragging code as mouseDragged is only passed to the focused element. This could be solved by just iterating through the children like usual, as most mouseDragged implementation have a boolean to check if they are dragging anyway.
When pressing F11 to toggle in and out of full-screen, it does not save options.txt, so upon the next launch of Minecraft the previous fullscreen state is restored, not the one that was set.
Code analysis
Mojang mappings 1.20.1 - KeyboardHandler.java
if (this.minecraft.options.keyFullscreen.matches(key, scancode)) { this.minecraft.getWindow().toggleFullScreen(); this.minecraft.options.fullscreen().set(this.minecraft.getWindow().isFullscreen()); return; }here we can see the code that toggles fullscreen doesn't trigger Options#save.
When pressing F11 to toggle in and out of full-screen, it does not save options.txt, so upon the next launch of Minecraft the previous fullscreen state is restored, not the one that was set.
Code analysis
Mojang mappings 1.20.1 - KeyboardHandler.java
if (this.minecraft.options.keyFullscreen.matches(key, scancode)) { this.minecraft.getWindow().toggleFullScreen(); this.minecraft.options.fullscreen().set(this.minecraft.getWindow().isFullscreen()); return; }here we can see the code that toggles fullscreen doesn't trigger Options#save.
I have implemented this fix inside my mod, Debugify, so people who find this particularly annoying can use my mod to fix this among other bugs as well.
When dark-coloured blocks are deposited into a bundle, it makes it very hard to see depending on colour/gamma settings of the monitor it's viewed on.
It's important to note that this is very dependent on the monitor/screen it is viewed on. On my primary monitor, they all look visible, but on monitors with worse color reproduction, it can be very hard to see.
When executing rcon commands, the response is all in one string with no newline characters, even when the command yields several lines of text when executed on the console.
Bukkit returns the newlines, but vanilla Minecraft does not, making the server response much harder to parse.
Suggest either null-splitting or \n-splitting the lines.
Code analysis can be found by Xander Smith in this comment.
The Bug:
Large item tooltips can get cut off at the edges of the screen.
Steps to Reproduce:
- Give yourself an item that has a large tooltip.
/give @s minecraft:dirt{display:{Lore:["{\"text\":\"MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757 MC-26757\"}"]}}
- Hold your mouse cursor over the item in order for its tooltip to be displayed.
- Take note as to whether or not large item tooltips can get cut off at the edges of the screen.
Observed Behavior:
Item tooltips can get cut off at the edges of the screen.
Expected Behavior:
Item tooltips would not get cut off at the edges of the screen.
Code Analysis:
Code analysis by Xander Smith can be found in this comment.
How to reproduce
- Set a long title length, e.g. /title @s times 50 1000 50
- Show a title to yourself, e.g.
/title @s title {"text":"Transport to a new world"} - Close the active world
- Enter another world
→ The title still shows up in the other world
Code analysis
Code analysis by Xander Smith can be found in MC-251245.
The bug
The channeling enchantment doesn't work on a mob whilst it is standing in water or lava.
How to reproduce
- Summon an entity in a block of water
- Run the command /weather thunder
- Obtain a trident with the Channeling enchantment
- Strike the entity with the trident
Observed behavior
No lightning strikes the entity and the Channeling enchantment does not affect the entity.
Expected behavior
The Channeling enchantment would be effective even when the entity is in water.
Code analysis
Code analysis by Xander Smith can be found in this comment.
How to reproduce
- Go to a ≥2 block deep body of water
- Wait until underwater area is visible (theoretically easier with night vision and water breathing)
- When underwater area is visible, leave the world
- Re-enter the world
Underwater visibility should remain when logging back into a world (at least that's what I expected).
Code analysis
Code analysis by Xander Smith can be found in this comment.
The bug
So whenever I go into creative mode and there is a creeper nearby it explodes. I was just testing an automated music disc farm, and when I went back into creative mode to get my stuff the creepers that weren't killed exploded for some reason. I am very confused right now..... ._.
Code analysis
Code analyses can be found in this comment by Xander Smith and this comment by BillyGalbreath.
The bug
If you stand on soul sand with the Soul Speed enchantment and switch to spectator mode you will keep the speed boost.
Code analysis
Code analysis by Xander Smith can be found in this comment.
The bug
Certain Entities such as Bee and Bat stop their animations of their wings after they've been in the world for too long. I noticed this bug when I was making a mod for forge that extended the bee entity and I noticed that my bees wouldn't flap their wings after being in world for a while so I tested it in vanilla (unmodified) Minecraft and noticed it had the same problem so I went back to the vanilla bees model code and noticed it was using ageInTicks(tickexisted + partialticks) which back traced back to ticks existed so I tested again using a command block on repeat to see how long it would take for the bee it takes about 98000 ticks - 98200 ticks for the bee to stop flapping the wings while for the bat it took from 158400 ticks - 158600 ticks. the value is not random between these values its consistent I'm just giving a range due to my scoreboard taking a couple extra ticks to start the repeating of adding 1 to the scoreboard. This is likely due to the ticks existed variable multiplied by whatever value you guys set per entity model to then be used in your math classes cos method and then the method returning the same index every time due to the input value being so big. This could also happen on the phantom in theory but it would take about a full day according to calculations so I didn't test it but in theory it has the same code as the bat and the bee do for the cos method implementation so it should happen on it too.
Expected result
Bees and Bats and other entities that have animations that use the cos method not stop after they exceed a certain value.
Observed result
The bees and bats stopped their wing animations, you can see this happening in the videos provided.
Reproduce
- Go into a world and spawn a bee and you can also spawn a bat if you wanna see it happen to that but you'll have to wait longer.
- Wait about 81 min
- then you'll see a bee not flapping its wings anymore
- and you can wait about another 51 min if you spawned the bat
- then you'll see a bat not flapping its wings anymore
Code analysis and potential fix
Code analysis by [Mod] ampolive can be found in this comment.
Potential fix by Xander Smith can be found in this comment.
Xander Smith That is MC-231736.
Xander Smith Yes, I think that in theory that would work.
Code analysis by Xander Smith (Quilt mappings) available in MC-251245
Xander Smith, this isn't intentional per the assigned "Mojang Priority" on this ticket. All other tooltips are slightly transparent as shown in the two attachments I've provided which can be found below.
MC-192011 - Tooltip of items within inventory.png![]()
MC-192011 - Tooltip of items within villager trading GUI.png![]()
The Bug:
Buttons and sliders remain selected after clicking on them.
This issue did not occur in 1.19.3. It first appeared in 23w03a.
Steps to Reproduce:
- Navigate to your video settings.
- Click on the "Graphics" button and then move your mouse cursor away from it.
- Take note as to whether or not buttons and sliders remain selected after clicking on them.
Observed Behavior:
Buttons and sliders remain selected.
Expected Behavior:
Buttons and sliders would not remain selected, just like how they didn't in 1.19.3.
Code Analysis:
Code analysis by Xander Smith can be found in the duplicate MC-261578:
@Override default public boolean mouseClicked(double mouseX, double mouseY, int button) { for (GuiEventListener guiEventListener : this.children()) { if (!guiEventListener.mouseClicked(mouseX, mouseY, button)) continue; this.setFocused(guiEventListener); if (button == 0) { this.setDragging(true); } return true; } return false; }
Here you can see this.setFocused(guiEventListener) is being invoked on every mouse click. Remember, both Screen and ObjectSelectionList.Entry both implement this interface.
This could be fixed with the following code:
@Override default public boolean mouseClicked(double mouseX, double mouseY, int button) { for (GuiEventListener child : this.children()) { if (child.mouseClicked(mouseX, mouseY, button)) { if (button == InputConstants.MOUSE_BUTTON_LEFT) this.setDragging(true); return true; } } return false; }
However, this would break dragging code as mouseDragged is only passed to the focused element. This could be solved by just iterating through the children like usual, as most mouseDragged implementation have a boolean to check if they are dragging anyway.












This could be because in 1.13, Minecraft updated to LWJGL 3 from 2. This isn't MC's fault but LWJGL's input.
Could you confirm this change occurs going from 1.8 -> 1.13 but not 1.8 -> 1.12?
As far as I know, this is an intended behavior. Just briefly let go of W to stop sprinting.
Could this be because you are not completely filling the cauldron? Looking into the code, it seems that the stat, use_cauldron is incremented instead
In this example, even if this was fixed, it would then be cut off on the other end.
Code analysis
Tested in 1.18.2 with yarn mappings
net.minecraft.entity.LivingEntity
This piece of code is responsible from removing the speed boost from an entity.
Suggested Fix
Simply override the check in PlayerEntity check if the player is in spectator mode. If so, return true!
Confirmed in 1.18.2
Couldn't this be solved by using
basically just wrapping the value back to zero if it reaches the limit
After testing further, it seems that float 32 loses loads of precision by then and would not be desirable. I will look further into solutions.
This is probably to do with the drag present in water that isn't present on land.
Can confirm in 1.18.2
There are no instances where this would affect anything and would simply just be an extra division calculation
Does this affect sign rendering itself or just the GUI?
Code analysis (tentative)
This is probably because checks like this look directly below the center of the player to find what block the player is "standing" on. Instead, collision should track what blocks the player is colliding with and use that block instead.
This seems intended.
Code analysis
Based on 1.18.2 yarn with custom local var names
This is the code to position the tooltip box. Another check should be added to center it.
For example
if (x < 0) { x = mouseX - width / 2 - 6 }Code analysis
Based on yarn mappings in 1.18.2
I'm guessing this is the this.world.isSkyVisible(blockPos) which checks if the block's light level is the maximum, which it isn't in water.
Code analysis
This is because getUnderwaterInvisibility (yarn 1.18.2) is present in ClientPlayerEntity not PlayerEntity and cannot be saved in NBT.
Code analysis
Based on yarn 1.18.2 mappings
This is the damage function of a wolf. As you can see, for damage values of zero, (0 + 1) / 2 = 0.5 damage. Another check should be added to check if the amount of damage is zero and not modify it.
Can confirm on 1.18.2
Code analysis
Based on yarn 1.18.2 mappings
In the class RconCommandOutput
The message is appended to the buffer. Without a line seperator. I suggest simply appending System.lineSeperator() to the buffer on each system message
Like this!
Tried about 8 times with no results in 1.18.2
Cannot repeat on 1.18.2
Looks like the max packet size has increased to 8mb
Code analysis
Yarn 1.18.2 mappings
Found in PacketInflater#decode
Nevermind. Actually saw this happening in my normal survival server on accident.
Code analysis
Based on 1.18.2 yarn mappings
I believe the issue is contained here and increasing streaming sources would help with the issue though I think 247 (in my case) is way too many.
SoundEngine#init
Taking a look at getMonoSourceCount()
In my case, this method returns 255. Because OpenAL can have a maximum of 256 sounds. (255 for mono, 1 for stereo)
OpenAL Soft has a practical limit of 256 simultaneous sources (the same maximum that can be allocated). It's all done in software, so the OS doesn't affect it.
This means that you can either trade streaming sources (records etc) or be stuck with 255.
TLDR: Minecraft is already using all the sound streams available for the hardware. This should be closed.
Code analysis (tentative)
The minecraft gui item renderer renders item as the top layer. This is not the problem of render order but the item renderer itself.
Duplicate of
MC-224729Code analysis (tentative)
Could this be because at some point, player jump velocity was increased ever so slightly so now the player hits their head.
Causing traps like this https://youtu.be/Yal1h5wdncM?t=149
Can confirm on 1.18.2
Code analysis
Based on 1.18.2 yarn mappings
CreeperIgniteGoal
This function does not check if the target can take damage.
Wouldn't it be
Code analysis
Based on Quilt Mappings (1.18.2 build 22)
net.minecraft.server.command.LocateCommand
returning false into the second parameter of sendFeedback specifies to not send to ops. This is explicit behaviour and should be marked as WAI
Cannot repeat on 1.18.2
Avoma your potential fix is incorrect. $p is referring to the projectile, which doesn't have getAbilities() you would need to first check if the trident had an owner, then check if that owner is a Player and then get the abilities.
If the slider isn't very good, make an issue on the slider, not the fact the game isn't telling you about sounds that aren't playing.
Why is this a bug?
Code analysis
Yarn 1.19 mappings - net.minecraft.client.network.ClientPlayNetworkHandler
As you can see this is where the player is re-created. In this method there is no call to set the selected slot to the previous. I suggest the following.
Preventing cramming tick on client prevents player from being pushed.
I suggest instead caching the entities that are searched for per cramming tick for all living entities.
When profiling the server, it seems the issue is when it tries to get the structure position. What seems to be happening is when it tries to sample the heightmap it is taking a very long time, I don't know why.
In my opinion, this way of calculating fall damage is flawed and not realistic.
Instead, I propose calculating fall damage based on the velocity of the entity before hitting the ground. You can tune this calculation to replicate the current behaviour of 3 blocks = damage knowing Minecraft's gravitational constant.
This technique also allows Mojang to remove any specific slow-falling conditions as the impact velocity would not be high enough to inflict damage.
After more testing, I came up with this...
In sin and cos methods, modulo by TAU (2PI)
WAI, affects all tooltips.
This should be re-opened as the vanilla fix is awful.
For people who don't know, in the snapshots, tooltips now just aren't allowed to go off-screen to the left so simply blocks the view of the cursor and can still go off-screen if a line is longer than the screen width.
Not to mention this fix does nothing on the y axis, and tooltips with a lot of lines end up going off-screen at the top.
Appears to be fixed.
This is because when generating the loot table, it has to locate a valid buried treasure. This takes time because there are no existing chunks that have a buried treasure strucutre, so it has to generate chunks.
Due to the hidden nature of buried treasure, I think it would be safe to just highly increase the spawn rate of buried treasure, so it is more likely to be closer to treasure maps.
You could trigger this with `/title @s title {"translate":"doesnt_exist"}` because centering requires querying width, but this seems to have been fixed and can be closed.
Could be an adaptive-sync technology like gsync or freesync?
You could use a hotbox accounting for the delta motion of the minecart.
This can be fixed by increasing the z-index of the debug overlay.
This issue should be renamed 'Trial Spawners cause observers to be ticked when updating their internal state'
The TNT itself is not the cause of the issue, it's the fact the observer is powered. You can test this by placing an observer next to a trial spawner and changing the gamerule, it will power.
Code analysis
The following code is an extract of decompiled 1.20.5-pre1 using official mappings
The error exists within the above code.
Every server tick, the spawner checks if it is still able to spawn mobs as per the game rule and difficulty. If an update is required, it calls `setState`, which causes an observer to see the change and power the tnt.