File tree Expand file tree Collapse file tree 11 files changed +60
-3
lines changed
java/io/github/mxpea/fadingshadow
data/fadingshadow/loot_table Expand file tree Collapse file tree 11 files changed +60
-3
lines changed Original file line number Diff line number Diff line change 44import io .github .mxpea .fadingshadow .block .entity .AnimatedBlockEntity ;
55import net .minecraft .core .BlockPos ;
66import net .minecraft .core .Direction ;
7+ import net .minecraft .core .HolderLookup ;
8+ import net .minecraft .tags .BlockTags ;
79import net .minecraft .world .item .context .BlockPlaceContext ;
810import net .minecraft .world .level .BlockGetter ;
911import net .minecraft .world .level .block .BaseEntityBlock ;
Original file line number Diff line number Diff line change 33import io .github .mxpea .fadingshadow .FadingShadow ;
44import io .github .mxpea .fadingshadow .item .ModItem ;
55import io .github .mxpea .fadingshadow .item .ScrantonRealityAnchorsItem ;
6+ import net .minecraft .core .HolderLookup ;
7+ import net .minecraft .tags .BlockTags ;
68import net .minecraft .world .item .BlockItem ;
79import net .minecraft .world .item .Item ;
810import 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 ) {
Original file line number Diff line number Diff 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 );
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 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" :" 喷溅辣椒水" ,
Original file line number Diff line number Diff line change 1+ {
2+ "parent" : " item/generated" ,
3+ "textures" : {
4+ "layer0" : " fadingshadow:item/firesalt_ingot"
5+ }
6+ }
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments