Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new chili crop/seed feature (block, item, recipe, loot table, and assets), plus refactors block registration naming and adjusts a couple existing datapack entries.
Changes:
- Introduce
chili_cropblock +chili_seeditem (placeable seed), including blockstates/models/textures. - Add chili seed crafting recipe and loot table for the chili crop.
- Rename
ModBlock→ModBlocksreferences and tweak some existing loot tablerandom_sequencevalues.
Reviewed changes
Copilot reviewed 19 out of 23 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/data/fadingshadow/recipe/chili_seed.json | Adds shapeless recipe to craft chili seeds from red chili. |
| src/main/resources/data/fadingshadow/loot_table/blocks/scranton_reality_anchors.json | Updates loot table random_sequence identifier. |
| src/main/resources/data/fadingshadow/loot_table/blocks/netherreactor.json | Updates loot table random_sequence identifier. |
| src/main/resources/data/fadingshadow/loot_table/blocks/chili_crop.json | New loot table for chili crop drops and Fortune bonus behavior. |
| src/main/resources/assets/fadingshadow/textures/block/chili_crop_stage0.png | New chili crop stage texture. |
| src/main/resources/assets/fadingshadow/textures/block/chili_crop_stage1.png | New chili crop stage texture. |
| src/main/resources/assets/fadingshadow/textures/block/chili_crop_stage2.png | New chili crop stage texture. |
| src/main/resources/assets/fadingshadow/textures/block/chili_crop_stage3.png | New chili crop stage texture. |
| src/main/resources/assets/fadingshadow/models/item/chili_seed.json | Item model for chili seed (currently references a missing texture). |
| src/main/resources/assets/fadingshadow/models/block/chili_crop_stage0.json | Block model for chili crop stage 0. |
| src/main/resources/assets/fadingshadow/models/block/chili_crop_stage1.json | Block model for chili crop stage 1. |
| src/main/resources/assets/fadingshadow/models/block/chili_crop_stage2.json | Block model for chili crop stage 2. |
| src/main/resources/assets/fadingshadow/models/block/chili_crop_stage3.json | Block model for chili crop stage 3. |
| src/main/resources/assets/fadingshadow/lang/zh_cn.json | Adds zh_cn translation for chili seed. |
| src/main/resources/assets/fadingshadow/lang/en_us.json | Adds en_us translation for chili seed. |
| src/main/resources/assets/fadingshadow/blockstates/chili_crop.json | Adds blockstate variants mapping age to stage models. |
| src/main/java/io/github/mxpea/fadingshadow/item/ModItem.java | Registers chili_seed as an ItemNameBlockItem; adjusts stack sizes for two items. |
| src/main/java/io/github/mxpea/fadingshadow/item/ModCreativeTab.java | Adds chili seed to creative tab; updates to ModBlocks. |
| src/main/java/io/github/mxpea/fadingshadow/block/entity/ModBlockEntities.java | Updates references from ModBlock to ModBlocks. |
| src/main/java/io/github/mxpea/fadingshadow/block/ModBlocks.java | Renames block registry class; registers chili_crop without a default BlockItem. |
| src/main/java/io/github/mxpea/fadingshadow/block/ChiliCropBlock.java | New crop block implementation (currently contains compile-breaking override issues). |
| src/main/java/io/github/mxpea/fadingshadow/FadingShadowClient.java | Sets crop render layer to cutout on client setup. |
| src/main/java/io/github/mxpea/fadingshadow/FadingShadow.java | Updates initialization to ModBlocks.register. |
Comments suppressed due to low confidence (3)
src/main/resources/data/fadingshadow/loot_table/blocks/netherreactor.json:20
random_sequencewas changed tofadingshadow:block/netherreactor, which is inconsistent with the...:blocks/<name>pattern used elsewhere (e.g.,chili_crop.jsonin this PR). Consider usingfadingshadow:blocks/netherreactorfor consistency with vanilla and the rest of the datapack.
src/main/resources/data/fadingshadow/loot_table/blocks/scranton_reality_anchors.json:20random_sequencewas changed from the conventional...:blocks/<name>pattern to...:block/<name>. This is inconsistent with the other block loot table added in this PR (chili_crop.jsonusesfadingshadow:blocks/chili_crop) and with vanilla conventions; consider keepingblocks/<name>for consistency.
src/main/java/io/github/mxpea/fadingshadow/block/ModBlocks.java:7- Unused import
net.minecraft.client.resources.model.Materialwas added but not used anywhere in this file. Please remove it to avoid clutter (and potential CI failures if unused imports are checked).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| } | ||
| ], | ||
| "name": "fadingshadow:red_chili" |
There was a problem hiding this comment.
This pool applies a Fortune bonus using binomial_with_bonus_count (a pattern normally used for extra seed drops), but the entry drops fadingshadow:red_chili. If the intent is to mimic vanilla crop loot, this entry should likely be fadingshadow:chili_seed (or adjust the bonus logic to match intended produce behavior).
| "name": "fadingshadow:red_chili" | |
| "name": "fadingshadow:chili_seed" |
|
|
||
| @Override | ||
| protected ItemLike getBaseSeedId(){ | ||
| return ModItem.chili_seed; |
There was a problem hiding this comment.
getBaseSeedId() must return an ItemLike, but ModItem.chili_seed is a DeferredItem<Item>. This should return the actual item instance (e.g., ModItem.chili_seed.get()) so the crop can resolve its seed item correctly.
| return ModItem.chili_seed; | |
| return ModItem.chili_seed.get(); |
| import net.minecraft.world.InteractionHand; | ||
| import net.minecraft.world.InteractionResult; | ||
| import net.minecraft.world.entity.player.Player; | ||
| import net.minecraft.world.level.BlockGetter; | ||
| import net.minecraft.world.level.ItemLike; | ||
| import net.minecraft.world.level.Level; | ||
| import net.minecraft.world.level.block.Block; | ||
| import net.minecraft.world.level.block.Blocks; | ||
| import net.minecraft.world.level.block.CropBlock; | ||
| import net.minecraft.world.level.block.state.BlockState; | ||
| import net.minecraft.world.level.block.state.StateDefinition; | ||
| import net.minecraft.world.level.block.state.properties.IntegerProperty; | ||
| import net.minecraft.world.phys.BlockHitResult; |
There was a problem hiding this comment.
There are several unused imports in this new class (e.g., InteractionHand, InteractionResult, Player, Level, BlockHitResult). Please remove unused imports to keep the file clean and avoid build failures in setups that treat warnings as errors.
| import net.minecraft.world.InteractionHand; | |
| import net.minecraft.world.InteractionResult; | |
| import net.minecraft.world.entity.player.Player; | |
| import net.minecraft.world.level.BlockGetter; | |
| import net.minecraft.world.level.ItemLike; | |
| import net.minecraft.world.level.Level; | |
| import net.minecraft.world.level.block.Block; | |
| import net.minecraft.world.level.block.Blocks; | |
| import net.minecraft.world.level.block.CropBlock; | |
| import net.minecraft.world.level.block.state.BlockState; | |
| import net.minecraft.world.level.block.state.StateDefinition; | |
| import net.minecraft.world.level.block.state.properties.IntegerProperty; | |
| import net.minecraft.world.phys.BlockHitResult; | |
| import net.minecraft.world.level.BlockGetter; | |
| import net.minecraft.world.level.ItemLike; | |
| import net.minecraft.world.level.block.Block; | |
| import net.minecraft.world.level.block.Blocks; | |
| import net.minecraft.world.level.block.CropBlock; | |
| import net.minecraft.world.level.block.state.BlockState; | |
| import net.minecraft.world.level.block.state.StateDefinition; | |
| import net.minecraft.world.level.block.state.properties.IntegerProperty; |
| { | ||
| "parent": "item/generated", | ||
| "textures": { | ||
| "layer0": "fadingshadow:item/chili_seed" |
There was a problem hiding this comment.
This item model references fadingshadow:item/chili_seed, but there is no corresponding textures/item/chili_seed.png in the assets directory. Add the texture (or update the path) to avoid the missing-texture placeholder in-game.
| "layer0": "fadingshadow:item/chili_seed" | |
| "layer0": "minecraft:item/wheat_seeds" |
| } | ||
|
|
||
| @Override | ||
| protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context){ |
There was a problem hiding this comment.
getShape is overriding a public method from Block/CropBlock, but it is declared protected here. Java does not allow reducing visibility on overrides, so this should be public to compile.
| protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context){ | |
| public VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context){ |
| } | ||
|
|
||
| @Override | ||
| protected IntegerProperty getAgeProperty(){ |
There was a problem hiding this comment.
getAgeProperty is declared protected, but in vanilla CropBlock#getAgeProperty() is public. This will fail to compile due to weaker access on override; make the override public.
| protected IntegerProperty getAgeProperty(){ | |
| public IntegerProperty getAgeProperty(){ |
No description provided.