Turtle eggs can become broken by placing them in the same block as some already broken eggs
The bug
When one turtle egg is cracked, you can place more on the same block and they will be cracked, too.
To reproduce
Reproduction steps provided by [~moesh]:
- Generate world
- Use command /setblock ~ ~ ~ minecraft:turtle_egg[eggs=1,hatch=1]
- Grab Turtle Egg from inventory
- Place another egg by right-clicking
- Observe issue
Code analysis
Code analysis and fix by [Mod] ampolive can be found in this comment.
Created Issue:
Turtle egg glitch
When one turtle egg is cracked, you can place more on the same block and they will be cracked too.
Turtle egg glitchTurtle eggs can become broken by placing them in the same block as some already broken eggs
The bug
When one turtle egg is cracked, you can place more on the same block and they will be cracked, too.
Reproduction steps provided by [~moesh]:
- Generate world
- Use command /setblock ~ ~ ~ minecraft:turtle_egg[eggs=1,hatch=1]
- Grab Turtle Egg from inventory
- Place another egg by right-clicking
- Observe issue
The bug
When one turtle egg is cracked, you can place more on the same block and they will be cracked, too.
Reproduction steps provided by [~moesh]:
- Generate world
- Use command /setblock ~ ~ ~ minecraft:turtle_egg[eggs=1,hatch=1]
- Grab Turtle Egg from inventory
- Place another egg by right-clicking
- Observe issue
The bug
When one turtle egg is cracked, you can place more on the same block and they will be cracked, too.
To reprodyce
Reproduction steps provided by [~moesh]:
- Generate world
- Use command /setblock ~ ~ ~ minecraft:turtle_egg[eggs=1,hatch=1]
- Grab Turtle Egg from inventory
- Place another egg by right-clicking
- Observe issue
Code analysis
Code analysis and fix by [Mod] ampolive can be found in this comment.
The bug
When one turtle egg is cracked, you can place more on the same block and they will be cracked, too.
To reprod
yceReproduction steps provided by [~moesh]:
- Generate world
- Use command /setblock ~ ~ ~ minecraft:turtle_egg[eggs=1,hatch=1]
- Grab Turtle Egg from inventory
- Place another egg by right-clicking
- Observe issue
Code analysis
Code analysis and fix by [Mod] ampolive can be found in this comment.
The bug
When one turtle egg is cracked, you can place more on the same block and they will be cracked, too.
To reproduce
Reproduction steps provided by [~moesh]:
- Generate world
- Use command /setblock ~ ~ ~ minecraft:turtle_egg[eggs=1,hatch=1]
- Grab Turtle Egg from inventory
- Place another egg by right-clicking
- Observe issue
Code analysis
Code analysis and fix by [Mod] ampolive can be found in this comment.
Can confirm. This probably works as intended, however, I do not make that decision. This very closely relates to MC-218528. Here are some steps to reproduce this issue for clarification reasons:
Steps to Reproduce:
- Place down a singular lit candle.
/setblock ~ ~ ~ minecraft:purple_candle[lit=true,candles=1]
- Obtain a purple candle and place it on the same block as the already lit candle.
→
Notice how the candle that you just placed is ignited.
Repro steps
Video attached. Also affects 21w10a.
With the block states that turtle eggs have it isn’t possible to fix this. Fix would require making different turtle eggs on the same block have different hatch states somehow.
Or, another option would be to not let players place turtle eggs on cracked turtle eggs.
Can confirm in 21w11a.
Can confirm in 21w13a.
Can confirm in 21w14a.
Can confirm in 21w15a.
Can confirm in 21w16a.
Can confirm in 21w17a.
Can confirm in 1.17.
Can confirm in 1.17.1.
Can confirm in 1.18.2.
Can confirm in 1.19.
Can confirm in 1.19.2.
I believe the easiest fix would be to just disallow placing turtle eggs on already hatched turtle eggs. This could be done by adding a new condition to check the HATCH value inside TurtleEggBlock#canBeReplaced(...):
... @Override public boolean canBeReplaced(BlockState $$0, BlockPlaceContext $$1) { if (!$$1.isSecondaryUseActive() && $$1.getItemInHand().is(this.asItem()) && $$0.getValue(EGGS) < 4 && $$0.getValue(HATCH) == 0) { return true; } return super.canBeReplaced($$0, $$1); } ...Can confirm in 1.19.3