Skip to content

Commit 96d237f

Browse files
authored
Merge pull request #35 from Mxpea/dev
写了一些战利品列表,但似乎并没有起作用……
2 parents 2c06ad4 + 0c05e78 commit 96d237f

File tree

11 files changed

+60
-3
lines changed

11 files changed

+60
-3
lines changed

src/main/java/io/github/mxpea/fadingshadow/block/AnimatedBlock.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import io.github.mxpea.fadingshadow.block.entity.AnimatedBlockEntity;
55
import net.minecraft.core.BlockPos;
66
import net.minecraft.core.Direction;
7+
import net.minecraft.core.HolderLookup;
8+
import net.minecraft.tags.BlockTags;
79
import net.minecraft.world.item.context.BlockPlaceContext;
810
import net.minecraft.world.level.BlockGetter;
911
import net.minecraft.world.level.block.BaseEntityBlock;

src/main/java/io/github/mxpea/fadingshadow/block/ModBlock.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import io.github.mxpea.fadingshadow.FadingShadow;
44
import io.github.mxpea.fadingshadow.item.ModItem;
55
import io.github.mxpea.fadingshadow.item.ScrantonRealityAnchorsItem;
6+
import net.minecraft.core.HolderLookup;
7+
import net.minecraft.tags.BlockTags;
68
import net.minecraft.world.item.BlockItem;
79
import net.minecraft.world.item.Item;
810
import net.minecraft.world.level.block.Block;
@@ -27,8 +29,8 @@ public class ModBlock {
2729
() -> new AnimatedBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.STONE)));
2830

2931
public static final DeferredBlock<Block> netherreactor =
30-
registerBlocks("netherreactor",
31-
() -> new Block(BlockBehaviour.Properties.ofFullCopy(Blocks.STONE)));
32+
registerBlocks("netherreactor", //添加代码需要正确的工具才能挖掘“.requiresCorrectToolForDrops()”
33+
() -> new Block(BlockBehaviour.Properties.of().strength(2.0F,6.0F)));
3234

3335
// 默认情况下注册普通方块物品
3436
private static <T extends Block> void registerBlockItems(String name, DeferredBlock<T> block) {

src/main/java/io/github/mxpea/fadingshadow/item/ModCreativeTab.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public class ModCreativeTab {
2828
output.accept(ModItem.advanced_geiger_counter);
2929
output.accept(ModItem.geiger_counter);
3030
output.accept(ModItem.firesalt);
31+
output.accept(ModItem.firesalt_ingot);
3132
output.accept(ModItem.lightning_in_a_bottle);
3233

3334
output.accept(ModBlock.scranton_reality_anchors);

src/main/java/io/github/mxpea/fadingshadow/item/ModItem.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ public class ModItem {
3131

3232
public static final DeferredItem<Item> advanced_geiger_counter =
3333
ITEMS.register("advanced_geiger_counter", () -> new Item(new Item.Properties()));
34-
3534
public static final DeferredItem<Item> geiger_counter =
3635
ITEMS.register("geiger_counter", () -> new Item(new Item.Properties()));
36+
3737
public static final DeferredItem<Item> firesalt =
3838
ITEMS.register("firesalt", () -> new Item(new Item.Properties()));
39+
public static final DeferredItem<Item> firesalt_ingot =
40+
ITEMS.register("firesalt_ingot", () -> new Item(new Item.Properties()));
3941

4042

4143

src/main/resources/assets/fadingshadow/lang/en_us.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"item.fadingshadow.advanced_geiger_counter": "advanced geiger counter",
88
"item.fadingshadow.geiger_counter": "geiger counter",
99
"item.fadingshadow.firesalt": "fire salt",
10+
"item.fadingshadow.firesalt_ingot": "fire salt ingot",
1011

1112
"item.minecraft.potion.effect.red_chili_juice":"chili water",
1213
"item.minecraft.splash_potion.effect.red_chili_juice":"splash chili water",

src/main/resources/assets/fadingshadow/lang/zh_cn.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"item.fadingshadow.geiger_counter": "盖革计数器",
88
"item.fadingshadow.lightning_in_a_bottle": "瓶中闪电",
99
"item.fadingshadow.firesalt": "火盐",
10+
"item.fadingshadow.firesalt_ingot": "火盐锭",
1011

1112
"item.minecraft.potion.effect.red_chili_juice":"辣椒水",
1213
"item.minecraft.splash_potion.effect.red_chili_juice":"喷溅辣椒水",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "item/generated",
3+
"textures": {
4+
"layer0": "fadingshadow:item/firesalt_ingot"
5+
}
6+
}
2 Bytes
Loading
602 Bytes
Loading
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"type": "minecraft:block",
3+
"pools": [
4+
{
5+
"bonus_rolls": 0.0,
6+
"conditions": [
7+
{
8+
"condition": "minecraft:survives_explosion"
9+
}
10+
],
11+
"entries": [
12+
{
13+
"type": "minecraft:item",
14+
"name": "fadingshadow:netherreactor"
15+
}
16+
],
17+
"rolls": 1.0
18+
}
19+
],
20+
"random_sequence": "fadingshadow:netherreactor"
21+
}

0 commit comments

Comments
 (0)