Egg laying drop from chickens is hardcoded
Eggs which chickens randomly lay are not controlled by a loot table, but instead are hardcoded. This issue was created due to the fix for MC-267866.
Steps to Reproduce:
Since this bug report is about functionality that is missing, the only way to verify this issue is to look into the various loot tables in the game either by decompressing the game jar, or looking in the code of the game.
Code analysis:
public void aiStep() { . . . this.flap += this.flapping * 2.0F; if (!this.level().isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggTime <= 0) { this.playSound(SoundEvents.CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); -> ISSUE START this.spawnAtLocation(Items.EGG); -> ISSUE END this.gameEvent(GameEvent.ENTITY_PLACE); this.eggTime = this.random.nextInt(6000) + 6000; } . . . }
Suggested Fix
Introduce a loot table for eggs dropping from chickens.
Notes:
Related to MC-94610 MC-149589 MC-269838 MC-269839 MC-269873 MC-269874 MC-269875
Linked Issues
relates to12
Created Issue:
Random egg drop from chickens is hardcoded
Eggs which chickens randomly lay are not controlled by a loot table, but instead are hardcoded. This issue was created due to the fix for
MC-267866, and relates to other similar issues: MC-94610 MC-149589 MC-269838 MC-269839.Code analysis:
public void aiStep() { . . . this.flap += this.flapping * 2.0F; if (!this.level().isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggTime <= 0) { this.playSound(SoundEvents.CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); -> ISSUE START this.spawnAtLocation(Items.EGG); -> ISSUE END this.gameEvent(GameEvent.ENTITY_PLACE); this.eggTime = this.random.nextInt(6000) + 6000; } . . . }Suggested Fix
Introduce a loot table for eggs dropping from chickens.
Random egg drop from chickens is hardcodedEgg laying drop from chickens is hardcoded
Eggs which chickens randomly lay are not controlled by a loot table, but instead are hardcoded. This issue was created due to the fix for
MC-267866, and relates to other similar issues: MC-94610 MC-149589 MC-269838 MC-269839.Code analysis:
public void aiStep() { . . . this.flap += this.flapping * 2.0F; if (!this.level().isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggTime <= 0) { this.playSound(SoundEvents.CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); -> ISSUE START this.spawnAtLocation(Items.EGG); -> ISSUE END this.gameEvent(GameEvent.ENTITY_PLACE); this.eggTime = this.random.nextInt(6000) + 6000; } . . . }Suggested Fix
Introduce a loot table for eggs dropping from chickens.
Eggs which chickens randomly lay are not controlled by a loot table, but instead are hardcoded. This issue was created due to the fix for
MC-267866.Code analysis:
public void aiStep() { . . . this.flap += this.flapping * 2.0F; if (!this.level().isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggTime <= 0) { this.playSound(SoundEvents.CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); -> ISSUE START this.spawnAtLocation(Items.EGG); -> ISSUE END this.gameEvent(GameEvent.ENTITY_PLACE); this.eggTime = this.random.nextInt(6000) + 6000; } . . . }Suggested Fix
Introduce a loot table for eggs dropping from chickens.
Notes:
Related to MC-94610 MC-149589 MC-269838 MC-269839
MC-269873MC-269874MC-269875
relates to
relates to
Eggs which chickens randomly lay are not controlled by a loot table, but instead are hardcoded. This issue was created due to the fix for
MC-267866.
Code analysis:public void aiStep() { . . . this.flap += this.flapping * 2.0F; if (!this.level().isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggTime <= 0) { this.playSound(SoundEvents.CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); -> ISSUE START this.spawnAtLocation(Items.EGG); -> ISSUE END this.gameEvent(GameEvent.ENTITY_PLACE); this.eggTime = this.random.nextInt(6000) + 6000; } . . . }Suggested Fix
Introduce a loot table for eggs dropping from chickens.
Notes:
Related to MC-94610 MC-149589 MC-269838 MC-269839
MC-269873MC-269874MC-269875Eggs which chickens randomly lay are not controlled by a loot table, but instead are hardcoded. This issue was created due to the fix for
MC-267866.Steps to Reproduce:
Since this bug report is about functionality that is missing, the only way to verify this issue is to look into the various loot tables in the game either by decompressing the game jar, or looking in the code of the game.
Code analysis:
public void aiStep() { . . . this.flap += this.flapping * 2.0F; if (!this.level().isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggTime <= 0) { this.playSound(SoundEvents.CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); -> ISSUE START this.spawnAtLocation(Items.EGG); -> ISSUE END this.gameEvent(GameEvent.ENTITY_PLACE); this.eggTime = this.random.nextInt(6000) + 6000; } . . . }Suggested Fix
Introduce a loot table for eggs dropping from chickens.
Notes:
Related to MC-94610 MC-149589 MC-269838 MC-269839
MC-269873MC-269874MC-269875
relates to
relates to
relates to
relates to
Eggs which chickens randomly lay are not controlled by a loot table, but instead are hardcoded. This issue was created due to the fix for MC-267866.
Steps to Reproduce:
Since this bug report is about functionality that is missing, the only way to verify this issue is to look into the various loot tables in the game either by decompressing the game jar, or looking in the code of the game.
Code analysis:
public void aiStep() { . . . this.flap += this.flapping * 2.0F; if (!this.level().isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggTime <= 0) { this.playSound(SoundEvents.CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); -> ISSUE START this.spawnAtLocation(Items.EGG); -> ISSUE END this.gameEvent(GameEvent.ENTITY_PLACE); this.eggTime = this.random.nextInt(6000) + 6000; } . . . }
Suggested Fix
Introduce a loot table for eggs dropping from chickens.
Notes:
Related to MC-94610 MC-149589 MC-269838 MC-269839 MC-269873 MC-269874 MC-269875
The sticks and planks dropped from a boat breaking is not controlled by a loot table, but instead is hardcoded. This issue was created due to the recent fix for MC-267866.
Steps to Reproduce:
Since this bug report is about functionality that is missing, the only way to verify this issue is to look into the various loot tables in the game either by decompressing the game jar, or looking in the code of the game.
Code analysis:
protected void checkFallDamage(double p_38307_, boolean p_38308_, BlockState p_38309_, BlockPos p_38310_) { . . . this.causeFallDamage(this.fallDistance, 1.0F, this.damageSources().fall()); if (!this.level().isClientSide && !this.isRemoved()) { this.kill(); if (this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { -> ISSUE START for(int i = 0; i < 3; ++i) { this.spawnAtLocation(this.getVariant().getPlanks()); } for(int j = 0; j < 2; ++j) { this.spawnAtLocation(Items.STICK); } -> ISSUE END } } } this.resetFallDistance(); } . . . }
Suggested Fix
Introduce a loot table for sticks and planks dropped from boats.
Notes:
Related to MC-94610 MC-149589 MC-269838 MC-269839 MC-269873 MC-269874 MC-269875
The carved pumpkin drop from shearing a snow golem is hardcoded. This issue was created due to the fix for MC-267866.
Code Analysis:
Method shear() in SnowGolem public void shear(SoundSource soundSource) { this.level().playSound((Player)null, this, SoundEvents.SNOW_GOLEM_SHEAR, soundSource, 1.0F, 1.0F); if (!this.level().isClientSide()) { this.setPumpkin(false); -> ISSUE START this.spawnAtLocation(new ItemStack(Items.CARVED_PUMPKIN), this.getEyeHeight()); -> ISSUE END } }
Suggested Fix
Introduce a loot table for shearing a snow golem.
Notes
Relates to: MC-94610 MC-109377 MC-149589 MC-173732 MC-177712 MC-202586 MC-235754 MC-235755 MC-267866 MC-269035 MC-269838 MC-269839 MC-269873 MC-269874 MC-273941 MC-273942 MC-273943 MC-273944
The bug
When right clicking on cave vines, glow berries are dropped at its location. This does not appear to be tied to its own loot table - it either reuses the loot table for breaking vines, or is a hardcoded drop.
How to fix
Introduce a dedicated loot table for right clicking on cave vines.
Relates to: MC-94610 MC-109377 MC-149589 MC-173732 MC-177712 MC-202586 MC-235754 MC-235755 MC-267866 MC-269035 MC-269838 MC-269839 MC-269873 MC-269874 MC-273941 MC-273942 MC-273943 MC-273944 MC-276629 MC-276634
The bug
24w37a added a new loot table for armadillos dropping scutes. This loot table is correctly used for when they drop scutes over time, but is not used when brushing manually.
How to reproduce
A data pack that makes armadillos drop player heads instead of scutes is attached to this ticket.
- Download and apply this data pack
- Wait for an armadillo to drop something
- Manually brush the armadillo
Expected results
In both cases the same item would drop.
Actual results
When brushed manually it still drops scutes.
How to fix
Either make brushing use the armadillo_shed loot table, or add a dedicated loot table for brushing.