Skip to content

Commit

Permalink
修护:稻米作物创造模式选取错误
Browse files Browse the repository at this point in the history
  • Loading branch information
MCZME committed Aug 6, 2024
1 parent f5d08e8 commit 4105e58
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.21 2024-08-06T21:56:13.987637 Languages: zh_cn for mod: lingshi
e555acbe8820b73ef1de654d149cfca34bba5963 assets/lingshi/lang/zh_cn.json
// 1.21 2024-08-06T22:30:49.6383033 Languages: zh_cn for mod: lingshi
99918422a5d56dab647af19828bb12044cdf0336 assets/lingshi/lang/zh_cn.json
2 changes: 1 addition & 1 deletion src/generated/resources/assets/lingshi/lang/zh_cn.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"block.lingshi.rice": "稻米",
"block.lingshi.rice_seedling": "稻苗",
"block.lingshi.tea_tree": "茶树",
"item.lingshi.rice_of_ear": "稻穗",
"item.lingshi.rice_seedling": "稻苗",
"item.lingshi.tea_leaf": "茶叶",
"lingshi.lingshi_tab": "灵食"
}
17 changes: 17 additions & 0 deletions src/main/java/mczme/lingshi/common/block/RiceBlock.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package mczme.lingshi.common.block;

import mczme.lingshi.common.registry.ModItems;
import net.minecraft.world.level.ItemLike;
import net.minecraft.world.level.block.CropBlock;
import org.jetbrains.annotations.NotNull;

public class RiceBlock extends CropBlock {
public RiceBlock(Properties properties) {
super(properties);
}

@Override
protected @NotNull ItemLike getBaseSeedId() {
return ModItems.RICE.get();
}
}
20 changes: 0 additions & 20 deletions src/main/java/mczme/lingshi/common/item/RiceSeedlingItem.java

This file was deleted.

8 changes: 2 additions & 6 deletions src/main/java/mczme/lingshi/common/registry/ModBlocks.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package mczme.lingshi.common.registry;

import mczme.lingshi.common.block.RiceSeedlingBlock;
import mczme.lingshi.common.block.RiceSeedlingTopBlock;
import mczme.lingshi.common.block.TeaBlock;
import mczme.lingshi.common.block.TeaTreeBlock;
import mczme.lingshi.common.item.Tea;
import mczme.lingshi.common.block.*;
import mczme.lingshi.lingshi;
import net.minecraft.world.level.block.CropBlock;
import net.minecraft.world.level.block.SoundType;
Expand All @@ -19,7 +15,7 @@
public class ModBlocks {
public static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks(lingshi.MODID);

public static final Supplier<CropBlock> RICE = BLOCKS.registerBlock("rice", CropBlock::new,
public static final Supplier<CropBlock> RICE = BLOCKS.registerBlock("rice", RiceBlock::new,
BlockBehaviour.Properties.of().mapColor(MapColor.PLANT)
.noCollission()
.randomTicks()
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/mczme/lingshi/common/registry/ModItems.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package mczme.lingshi.common.registry;

import mczme.lingshi.common.item.RiceSeedlingItem;
import mczme.lingshi.lingshi;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
Expand All @@ -16,7 +15,7 @@ public class ModItems {
public static final List<Supplier<Item>> ITEMS_LIST = new ArrayList<>();

public static final Supplier<Item> RICE = registerWithCreateTab("rice", ()->new BlockItem(ModBlocks.RICE.get(), new Item.Properties()));
public static final Supplier<Item> RICE_SEEDLING =registerWithCreateTab("rice_seedling", ()->new RiceSeedlingItem(ModBlocks.RICE_SEEDLING.get(),new Item.Properties()));
public static final Supplier<Item> RICE_SEEDLING =registerWithCreateTab("rice_seedling", ()->new BlockItem(ModBlocks.RICE_SEEDLING.get(), new Item.Properties()));
public static final Supplier<Item> RICE_OF_EAR = registerWithCreateTab("rice_of_ear", () -> new Item(new Item.Properties()));

public static final Supplier<Item> TEA_TREE = registerWithCreateTab("tea_tree", () -> new BlockItem(ModBlocks.TEA_TREE.get(), new Item.Properties()));
Expand Down

0 comments on commit 4105e58

Please sign in to comment.