Carved pumpkin drop from shearing a snow golem is hard coded
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
Created Issue:
Carved pumpkin loot table from shearing a snow golem is hard coded
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); this.spawnAtLocation(new ItemStack(Items.CARVED_PUMPKIN), this.getEyeHeight()); } }Suggested Fix
Introduce a loot table for shearing a snow golem.Notes
The behavior stated here is irregular when compared to the bogged mob, which shearing loot table is entirely customizable, in the 'shearing' directory of the loot tables folder.
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); this.spawnAtLocation(new ItemStack(Items.CARVED_PUMPKIN), this.getEyeHeight()); } }Suggested Fix
Introduce a loot table for shearing a snow golem.Notes
The behavior stated here is irregular when compared to the bogged mob, which shearing loot table is entirely customizable, in the 'shearing' directory of the loot tables folder.
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
The behavior stated here is irregular when compared to the bogged mob, which shearing loot table is entirely customizable, in the 'shearing' directory of the loot tables folder.
Carved pumpkinloot tablefrom shearing a snow golem is hard codedCarved pumpkin drop from shearing a snow golem is hard coded
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
The behavior stated here is irregular when compared to the bogged mob, which shearing loot table is entirely customizable, in the 'shearing' directory of the loot tables folder.
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
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
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
I did not originally find
MC-269035before creating this when I searched if the issue had been reported before, and this might duplicate it (that issue does include 3 seperate related cases though). Though, the resolution of said issue is interesting given the validity ofMC-267866, and the recent addition of the 'loot_tables>shearing' directory for the bogged mob, which is customizable.Thank you for your report!
We're tracking this issue in
MC-269035, so this ticket is being resolved and linked as a duplicate.If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki