Skip to content

Commit 23ed5d2

Browse files
committed
feat: finish raw ore block
Signed-off-by: AlasDiablo <25723276+AlasDiablo@users.noreply.github.com>
1 parent 8450443 commit 23ed5d2

File tree

9 files changed

+117
-94
lines changed

9 files changed

+117
-94
lines changed

src/main/java/fr/alasdiablo/janoeo/foundation/Foundation.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,14 @@ public class Foundation {
4747

4848
public static final Logger logger = LogManager.getLogger(Registries.MOD_ID);
4949

50-
public static final CreativeModeTab ORES_ITEMS_GROUP = new GroundCreativeModeTab("janoeo.foundation.ores.item") {
51-
@Override
52-
public ItemStack makeIcon() {
53-
return new ItemStack(FoundationItems.SILVER_INGOT);
54-
}
55-
};
56-
57-
public static final CreativeModeTab GEAR_ITEMS_GROUP = new GroundCreativeModeTab("janoeo.foundation.gear.item") {
50+
public static final CreativeModeTab MATERIALS_GROUP = new GroundCreativeModeTab("janoeo.foundation.materials") {
5851
@Override
5952
public ItemStack makeIcon() {
6053
return new ItemStack(FoundationItems.SILVER_GEAR);
6154
}
6255
};
6356

64-
public static final CreativeModeTab ORES_BLOCKS_GROUP = new GroundCreativeModeTab("janoeo.foundation.ores.block") {
57+
public static final CreativeModeTab ORES_GROUP = new GroundCreativeModeTab("janoeo.foundation.ores") {
6558
@Override
6659
public ItemStack makeIcon() {
6760
return new ItemStack(FoundationBlocks.SILVER_ORE);

src/main/java/fr/alasdiablo/janoeo/foundation/compatibility/create/CrushingRecipe.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,36 +39,42 @@ public CrushingRecipe(DataGenerator dataGenerator) {
3939
this.ore(() -> FoundationBlocks.BAUXITE_ORE, AllItems.CRUSHED_BAUXITE::get, () -> Blocks.COBBLESTONE);
4040
this.ore(() -> FoundationBlocks.DEEPSLATE_BAUXITE_ORE, AllItems.CRUSHED_BAUXITE::get, () -> Blocks.COBBLED_DEEPSLATE);
4141
this.raw(() -> FoundationItems.RAW_ALUMINIUM, AllItems.CRUSHED_BAUXITE::get);
42+
this.rawBlock(() -> FoundationBlocks.RAW_ALUMINIUM_BLOCK, AllItems.CRUSHED_BAUXITE::get);
4243
this.dust(() -> FoundationItems.ALUMINIUM_INGOT, () -> FoundationItems.ALUMINIUM_DUST);
4344
this.dust(AllItems.CRUSHED_BAUXITE::get, () -> FoundationItems.ALUMINIUM_DUST);
4445

4546
this.ore(() -> FoundationBlocks.LEAD_ORE, AllItems.CRUSHED_LEAD::get, () -> Blocks.COBBLESTONE);
4647
this.ore(() -> FoundationBlocks.DEEPSLATE_LEAD_ORE, AllItems.CRUSHED_LEAD::get, () -> Blocks.COBBLED_DEEPSLATE);
4748
this.raw(() -> FoundationItems.RAW_LEAD, AllItems.CRUSHED_LEAD::get);
49+
this.rawBlock(() -> FoundationBlocks.RAW_LEAD_BLOCK, AllItems.CRUSHED_LEAD::get);
4850
this.dust(() -> FoundationItems.LEAD_INGOT, () -> FoundationItems.LEAD_DUST);
4951
this.dust(AllItems.CRUSHED_LEAD::get, () -> FoundationItems.LEAD_DUST);
5052

5153
this.ore(() -> FoundationBlocks.NICKEL_ORE, AllItems.CRUSHED_NICKEL::get, () -> Blocks.COBBLESTONE);
5254
this.ore(() -> FoundationBlocks.DEEPSLATE_NICKEL_ORE, AllItems.CRUSHED_NICKEL::get, () -> Blocks.COBBLED_DEEPSLATE);
5355
this.raw(() -> FoundationItems.RAW_NICKEL, AllItems.CRUSHED_NICKEL::get);
56+
this.rawBlock(() -> FoundationBlocks.RAW_NICKEL_BLOCK, AllItems.CRUSHED_NICKEL::get);
5457
this.dust(() -> FoundationItems.NICKEL_INGOT, () -> FoundationItems.NICKEL_DUST);
5558
this.dust(AllItems.CRUSHED_NICKEL::get, () -> FoundationItems.NICKEL_DUST);
5659

5760
this.ore(() -> FoundationBlocks.SILVER_ORE, AllItems.CRUSHED_SILVER::get, () -> Blocks.COBBLESTONE);
5861
this.ore(() -> FoundationBlocks.DEEPSLATE_SILVER_ORE, AllItems.CRUSHED_SILVER::get, () -> Blocks.COBBLED_DEEPSLATE);
5962
this.raw(() -> FoundationItems.RAW_SILVER, AllItems.CRUSHED_SILVER::get);
63+
this.rawBlock(() -> FoundationBlocks.RAW_SILVER_BLOCK, AllItems.CRUSHED_SILVER::get);
6064
this.dust(() -> FoundationItems.SILVER_INGOT, () -> FoundationItems.SILVER_DUST);
6165
this.dust(AllItems.CRUSHED_SILVER::get, () -> FoundationItems.SILVER_DUST);
6266

6367
this.ore(() -> FoundationBlocks.TIN_ORE, AllItems.CRUSHED_TIN::get, () -> Blocks.COBBLESTONE);
6468
this.ore(() -> FoundationBlocks.DEEPSLATE_TIN_ORE, AllItems.CRUSHED_TIN::get, () -> Blocks.COBBLED_DEEPSLATE);
6569
this.raw(() -> FoundationItems.RAW_TIN, AllItems.CRUSHED_TIN::get);
70+
this.rawBlock(() -> FoundationBlocks.RAW_TIN_BLOCK, AllItems.CRUSHED_TIN::get);
6671
this.dust(() -> FoundationItems.TIN_INGOT, () -> FoundationItems.TIN_DUST);
6772
this.dust(AllItems.CRUSHED_TIN::get, () -> FoundationItems.TIN_DUST);
6873

6974
this.ore(() -> FoundationBlocks.URANIUM_ORE, AllItems.CRUSHED_URANIUM::get, () -> Blocks.COBBLESTONE);
7075
this.ore(() -> FoundationBlocks.DEEPSLATE_URANIUM_ORE, AllItems.CRUSHED_URANIUM::get, () -> Blocks.COBBLED_DEEPSLATE);
7176
this.raw(() -> FoundationItems.RAW_URANIUM, AllItems.CRUSHED_URANIUM::get);
77+
this.rawBlock(() -> FoundationBlocks.RAW_URANIUM_BLOCK, AllItems.CRUSHED_URANIUM::get);
7278
this.dust(() -> FoundationItems.URANIUM_INGOT, () -> FoundationItems.URANIUM_DUST);
7379
this.dust(AllItems.CRUSHED_URANIUM::get, () -> FoundationItems.URANIUM_DUST);
7480
}
@@ -93,6 +99,15 @@ private void raw(Supplier<ItemLike> input, Supplier<ItemLike> output) {
9399
});
94100
}
95101

102+
private void rawBlock(Supplier<ItemLike> input, Supplier<ItemLike> output) {
103+
this.create(Registries.MOD_ID, input, builder -> {
104+
builder.duration(400);
105+
builder.output(output.get(), 9);
106+
builder.output(0.75f, AllItems.EXP_NUGGET.get(), 9);
107+
return builder;
108+
});
109+
}
110+
96111
private void dust(Supplier<ItemLike> input, Supplier<ItemLike> output) {
97112
this.create(Registries.MOD_ID, input, builder -> {
98113
builder.duration(350);

src/main/java/fr/alasdiablo/janoeo/foundation/data/language/EnglishProvider.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,20 @@ protected void addTranslations() {
144144
this.add(TIN_BLOCK, "Block of Tin");
145145
this.add(URANIUM_BLOCK, "Block of Uranium");
146146

147+
this.add(RAW_ALUMINIUM_BLOCK, "Block of Raw Aluminium");
148+
this.add(RAW_LEAD_BLOCK, "Block of Raw Lead");
149+
this.add(RAW_NICKEL_BLOCK, "Block of Raw Nickel");
150+
this.add(RAW_SILVER_BLOCK, "Block of Raw Silver");
151+
this.add(RAW_TIN_BLOCK, "Block of Raw Tin");
152+
this.add(RAW_URANIUM_BLOCK, "Block of Raw Uranium");
153+
147154
this.add(
148-
((TranslatableComponent) Foundation.ORES_ITEMS_GROUP.getDisplayName()).getKey(),
149-
"Janoeo Foundation - Items"
150-
);
151-
this.add(
152-
((TranslatableComponent) Foundation.GEAR_ITEMS_GROUP.getDisplayName()).getKey(),
153-
"Janoeo Foundation - Gear"
155+
((TranslatableComponent) Foundation.ORES_GROUP.getDisplayName()).getKey(),
156+
"Janoeo Foundation - Ores"
154157
);
155158
this.add(
156-
((TranslatableComponent) Foundation.ORES_BLOCKS_GROUP.getDisplayName()).getKey(),
157-
"Janoeo Foundation - Blocks"
159+
((TranslatableComponent) Foundation.MATERIALS_GROUP.getDisplayName()).getKey(),
160+
"Janoeo Foundation - Materials"
158161
);
159162
}
160163
}

src/main/java/fr/alasdiablo/janoeo/foundation/data/language/FrenchProvider.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,20 @@ protected void addTranslations() {
144144
this.add(TIN_BLOCK, SimpleUnicode.encodeOf("Block of Tin"));
145145
this.add(URANIUM_BLOCK, SimpleUnicode.encodeOf("Block of Uranium"));
146146

147+
this.add(RAW_ALUMINIUM_BLOCK, SimpleUnicode.encodeOf("Block of Raw Aluminium"));
148+
this.add(RAW_LEAD_BLOCK, SimpleUnicode.encodeOf("Block of Raw Lead"));
149+
this.add(RAW_NICKEL_BLOCK, SimpleUnicode.encodeOf("Block of Raw Nickel"));
150+
this.add(RAW_SILVER_BLOCK, SimpleUnicode.encodeOf("Block of Raw Silver"));
151+
this.add(RAW_TIN_BLOCK, SimpleUnicode.encodeOf("Block of Raw Tin"));
152+
this.add(RAW_URANIUM_BLOCK, SimpleUnicode.encodeOf("Block of Raw Uranium"));
153+
147154
this.add(
148-
((TranslatableComponent) Foundation.ORES_ITEMS_GROUP.getDisplayName()).getKey(),
149-
"Janoeo Foundation - Objets"
150-
);
151-
this.add(
152-
((TranslatableComponent) Foundation.GEAR_ITEMS_GROUP.getDisplayName()).getKey(),
153-
"Janoeo Foundation - Gear"
155+
((TranslatableComponent) Foundation.ORES_GROUP.getDisplayName()).getKey(),
156+
"Janoeo Foundation - Ores"
154157
);
155158
this.add(
156-
((TranslatableComponent) Foundation.ORES_BLOCKS_GROUP.getDisplayName()).getKey(),
157-
"Janoeo Foundation - Blocs"
159+
((TranslatableComponent) Foundation.MATERIALS_GROUP.getDisplayName()).getKey(),
160+
"Janoeo Foundation - Materials"
158161
);
159162
}
160163
}

src/main/java/fr/alasdiablo/janoeo/foundation/data/language/SpanishProvider.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,20 @@ protected void addTranslations() {
144144
this.add(TIN_BLOCK, SimpleUnicode.encodeOf("Block of Tin"));
145145
this.add(URANIUM_BLOCK, SimpleUnicode.encodeOf("Block of Uranium"));
146146

147+
this.add(RAW_ALUMINIUM_BLOCK, SimpleUnicode.encodeOf("Block of Raw Aluminium"));
148+
this.add(RAW_LEAD_BLOCK, SimpleUnicode.encodeOf("Block of Raw Lead"));
149+
this.add(RAW_NICKEL_BLOCK, SimpleUnicode.encodeOf("Block of Raw Nickel"));
150+
this.add(RAW_SILVER_BLOCK, SimpleUnicode.encodeOf("Block of Raw Silver"));
151+
this.add(RAW_TIN_BLOCK, SimpleUnicode.encodeOf("Block of Raw Tin"));
152+
this.add(RAW_URANIUM_BLOCK, SimpleUnicode.encodeOf("Block of Raw Uranium"));
153+
147154
this.add(
148-
((TranslatableComponent) Foundation.ORES_ITEMS_GROUP.getDisplayName()).getKey(),
149-
"Janoeo Foundation - Objetos"
150-
);
151-
this.add(
152-
((TranslatableComponent) Foundation.GEAR_ITEMS_GROUP.getDisplayName()).getKey(),
153-
"Janoeo Foundation - Gear"
155+
((TranslatableComponent) Foundation.ORES_GROUP.getDisplayName()).getKey(),
156+
"Janoeo Foundation - Ores"
154157
);
155158
this.add(
156-
((TranslatableComponent) Foundation.ORES_BLOCKS_GROUP.getDisplayName()).getKey(),
157-
"Janoeo Foundation - Bloques"
159+
((TranslatableComponent) Foundation.MATERIALS_GROUP.getDisplayName()).getKey(),
160+
"Janoeo Foundation - Materials"
158161
);
159162
}
160163
}

src/main/java/fr/alasdiablo/janoeo/foundation/data/loot/table/FoundationBlockLootTables.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ protected void addTables() {
2727
this.dropSelf(FoundationBlocks.TIN_BLOCK);
2828
this.dropSelf(FoundationBlocks.URANIUM_BLOCK);
2929

30+
this.dropSelf(FoundationBlocks.RAW_ALUMINIUM_BLOCK);
31+
this.dropSelf(FoundationBlocks.RAW_LEAD_BLOCK);
32+
this.dropSelf(FoundationBlocks.RAW_NICKEL_BLOCK);
33+
this.dropSelf(FoundationBlocks.RAW_SILVER_BLOCK);
34+
this.dropSelf(FoundationBlocks.RAW_TIN_BLOCK);
35+
this.dropSelf(FoundationBlocks.RAW_URANIUM_BLOCK);
36+
3037
this.registerOreLootTable(
3138
FoundationItems.RAW_ALUMINIUM, ConstantValue.exactly(1.0F), FoundationBlocks.BAUXITE_ORE, FoundationBlocks.DEEPSLATE_BAUXITE_ORE);
3239
this.registerOreLootTable(FoundationItems.RAW_LEAD, ConstantValue.exactly(1.0F), FoundationBlocks.LEAD_ORE, FoundationBlocks.DEEPSLATE_LEAD_ORE);

src/main/java/fr/alasdiablo/janoeo/foundation/init/FoundationBlocks.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
public class FoundationBlocks {
2222
/* * * * * * * * * * * * * * * Item Properties * * * * * * * * * * * * * */
23-
private static final Item.Properties PROPERTIES_ITEM_BLOCK = new Item.Properties().tab(Foundation.ORES_BLOCKS_GROUP);
23+
private static final Item.Properties PROPERTIES_ITEM_BLOCK = new Item.Properties().tab(Foundation.ORES_GROUP);
2424

2525
/* * * * * * * * * * * * * * * Block Properties * * * * * * * * * * * * * */
2626
private static final BlockBehaviour.Properties PROPERTIES_STONE_ORE = BlockBehaviour.Properties.of(Material.STONE)
@@ -133,7 +133,7 @@ public class FoundationBlocks {
133133
PROPERTIES_NETHER_ORE, ExperienceRarity.UNCOMMON, Registries.NETHER_URANIUM_ORE);
134134

135135
/* * * * * * * * * * * * * * * Storage Block Properties * * * * * * * * * * * * * */
136-
private static final Item.Properties PROPERTIES_ITEM_STORAGE_BLOCK = new Item.Properties().tab(Foundation.GEAR_ITEMS_GROUP);
136+
private static final Item.Properties PROPERTIES_ITEM_STORAGE_BLOCK = new Item.Properties().tab(Foundation.MATERIALS_GROUP);
137137

138138
/* * * * * * * * * * * * * * * Storage Block * * * * * * * * * * * * * */
139139
public static final Block ALUMINIUM_BLOCK = createStorageBlock(Registries.ALUMINIUM_BLOCK, MaterialColor.METAL);

0 commit comments

Comments
 (0)