|
1 | 1 | package net.anawesomguy.wsmlmb.test;
|
2 | 2 |
|
3 | 3 | import net.anawesomguy.wsmlmb.block.CustomCraftingTableBlock;
|
| 4 | +import net.anawesomguy.wsmlmb.block.MultiVersionBlockSettings; |
4 | 5 | import net.anawesomguy.wsmlmb.block.chest.TexturedChestBlock;
|
| 6 | +import net.anawesomguy.wsmlmb.item.MultiVersionItemSettings; |
5 | 7 | import net.anawesomguy.wsmlmb.util.WSMLMBUtil;
|
6 | 8 | import net.fabricmc.api.ModInitializer;
|
7 |
| -import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; |
8 | 9 | import net.minecraft.block.Block;
|
9 | 10 | import net.minecraft.item.BlockItem;
|
10 | 11 | import net.minecraft.item.Item;
|
|
13 | 14 | import net.minecraft.registry.Registry;
|
14 | 15 | import net.minecraft.util.Identifier;
|
15 | 16 |
|
16 |
| -@SuppressWarnings("deprecation") |
17 | 17 | public final class WSMLMBTest implements ModInitializer {
|
18 | 18 | public static final String MOD_ID = "wsmlmb-test";
|
19 | 19 | public static final Block STONE_CHEST = Registry.register(
|
20 | 20 | Registries.BLOCK,
|
21 | 21 | new Identifier(MOD_ID, "stone_chest"),
|
22 |
| - new TexturedChestBlock.Builder(FabricBlockSettings.of().strength(1.5F, 6).requiresTool()) |
| 22 | + new TexturedChestBlock.Builder(MultiVersionBlockSettings.of("stone").strength(1.5F, 6).requiresTool()) |
23 | 23 | .setTextures(chestTexture("stone"), chestTexture("stone_left"), chestTexture("stone_right")) // sets the textures
|
24 | 24 | .build()
|
25 | 25 | );
|
26 | 26 | public static final Item STONE_CHEST_ITEM = Registry.register(
|
27 | 27 | Registries.ITEM,
|
28 | 28 | new Identifier(MOD_ID, "stone_chest"),
|
29 |
| - new BlockItem(STONE_CHEST, new Item.Settings()) |
| 29 | + new BlockItem(STONE_CHEST, new MultiVersionItemSettings()) |
30 | 30 | );
|
31 | 31 | public static final Block CUSTOM_CRAFTING_TABLE = Registry.register(
|
32 | 32 | Registries.BLOCK,
|
33 | 33 | new Identifier(MOD_ID, "custom_crafting_table"),
|
34 |
| - new CustomCraftingTableBlock(FabricBlockSettings.of()) |
| 34 | + new CustomCraftingTableBlock(MultiVersionBlockSettings.of("wood")) |
35 | 35 | );
|
36 | 36 | public static final Item CUSTOM_CRAFTING_TABLE_ITEM = Registry.register(
|
37 | 37 | Registries.ITEM,
|
38 | 38 | new Identifier(MOD_ID, "custom_crafting_table"),
|
39 |
| - new BlockItem(CUSTOM_CRAFTING_TABLE, new Item.Settings()) |
| 39 | + new BlockItem(CUSTOM_CRAFTING_TABLE, new MultiVersionItemSettings()) |
40 | 40 | );
|
41 | 41 | // will be added to c:shears
|
42 | 42 | public static final Item TEST_SHEARS = Registry.register(
|
43 | 43 | Registries.ITEM,
|
44 | 44 | new Identifier(MOD_ID, "test_shears"),
|
45 |
| - new ShearsItem(new Item.Settings()) |
| 45 | + new ShearsItem(new MultiVersionItemSettings()) |
46 | 46 | );
|
47 | 47 |
|
48 | 48 | @Override
|
|
0 commit comments