+ more recepis
+ pool tiles slabs/stairs + block tags + fix
This commit is contained in:
@@ -119,6 +119,18 @@ public class ModBlocks {
|
||||
() -> new Block(BlockBehaviour.Properties.ofFullCopy(ModBlocks.POOL_TILES.get())
|
||||
));
|
||||
|
||||
public static final DeferredBlock<StairBlock> POOL_TILES_STAIRS = registerBlock("pool_tiles_stairs",
|
||||
() -> new StairBlock(ModBlocks.POOL_TILES.get().defaultBlockState(), BlockBehaviour.Properties.ofFullCopy(ModBlocks.POOL_TILES.get())));
|
||||
public static final DeferredBlock<SlabBlock> POOL_TILES_SLAB = registerBlock("pool_tiles_slab",
|
||||
() -> new SlabBlock(BlockBehaviour.Properties.ofFullCopy(ModBlocks.POOL_TILES.get())));
|
||||
|
||||
|
||||
public static final DeferredBlock<StairBlock> POOL_TILES1_STAIRS = registerBlock("pool_tiles1_stairs",
|
||||
() -> new StairBlock(ModBlocks.POOL_TILES1.get().defaultBlockState(), BlockBehaviour.Properties.ofFullCopy(ModBlocks.POOL_TILES1.get())));
|
||||
public static final DeferredBlock<SlabBlock> POOL_TILES1_SLAB = registerBlock("pool_tiles1_slab",
|
||||
() -> new SlabBlock(BlockBehaviour.Properties.ofFullCopy(ModBlocks.POOL_TILES1.get())));
|
||||
|
||||
|
||||
//GRATES
|
||||
|
||||
public static final DeferredBlock<Block> IRON_GRATE = registerBlock("iron_grate",
|
||||
|
||||
@@ -16,8 +16,6 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@EventBusSubscriber(modid = Ornamentum.MODID, bus = EventBusSubscriber.Bus.MOD)
|
||||
public class DataGenerators {
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -19,6 +19,12 @@ public class ModBlockLootTableProvider extends BlockLootSubProvider {
|
||||
dropSelf(ModBlocks.POOL_TILES.get());
|
||||
dropSelf(ModBlocks.POOL_TILES1.get());
|
||||
|
||||
dropSelf(ModBlocks.POOL_TILES_STAIRS.get());
|
||||
dropSelf(ModBlocks.POOL_TILES1_STAIRS.get());
|
||||
|
||||
dropSelf(ModBlocks.POOL_TILES_SLAB.get());
|
||||
dropSelf(ModBlocks.POOL_TILES1_SLAB.get());
|
||||
|
||||
dropSelf(ModBlocks.MESH_IRON.get());
|
||||
|
||||
dropSelf(ModBlocks.IRON_GRATE.get());
|
||||
@@ -79,6 +85,8 @@ public class ModBlockLootTableProvider extends BlockLootSubProvider {
|
||||
dropSelf(ModBlocks.RED_WOOL_SLAB.get());
|
||||
dropSelf(ModBlocks.BLACK_WOOL_SLAB.get());
|
||||
|
||||
|
||||
|
||||
//dropSelf(ModBlocks.OBSIDIAN_BRICKS.get());
|
||||
dropWhenSilkTouch(ModBlocks.LIME_GLOW_STAINED_GLASS.get());
|
||||
dropWhenSilkTouch(ModBlocks.WHITE_GLOW_STAINED_GLASS.get());
|
||||
|
||||
@@ -82,6 +82,61 @@ public class ModBlockStateProvider extends BlockStateProvider {
|
||||
createWoolStairsAndSlab(ModBlocks.RED_WOOL_STAIRS, ModBlocks.RED_WOOL_SLAB, "red_wool");
|
||||
createWoolStairsAndSlab(ModBlocks.BLACK_WOOL_STAIRS, ModBlocks.BLACK_WOOL_SLAB, "black_wool");
|
||||
|
||||
createStairsAndSlab(ModBlocks.POOL_TILES_STAIRS, ModBlocks.POOL_TILES_SLAB, "pool_tiles");
|
||||
createStairsAndSlab(ModBlocks.POOL_TILES1_STAIRS, ModBlocks.POOL_TILES1_SLAB, "pool_tiles1");
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void createStairsAndSlab(DeferredBlock<?> stairsDeferred, DeferredBlock<?> slabDeferred, String textureName) {
|
||||
// Textur kommt aus dem EIGENEN Mod-Namespace: assets/ornamentum/textures/block/<textureName>.png
|
||||
var tex = modLoc("block/" + textureName);
|
||||
|
||||
// SLAB MODELS
|
||||
String slabPath = slabDeferred.getId().getPath();
|
||||
String slabTopPath = slabPath + "_top";
|
||||
String doublePath = "double_" + slabPath;
|
||||
|
||||
ModelFile slab = models().withExistingParent(slabPath, mcLoc("block/slab"))
|
||||
.texture("bottom", tex)
|
||||
.texture("top", tex)
|
||||
.texture("side", tex);
|
||||
|
||||
ModelFile slabTop = models().withExistingParent(slabTopPath, mcLoc("block/slab_top"))
|
||||
.texture("bottom", tex)
|
||||
.texture("top", tex)
|
||||
.texture("side", tex);
|
||||
|
||||
ModelFile doubleSlab = models().withExistingParent(doublePath, mcLoc("block/cube_all"))
|
||||
.texture("all", tex);
|
||||
|
||||
// STAIRS MODELS
|
||||
String stairsPath = stairsDeferred.getId().getPath();
|
||||
String stairsInnerPath = stairsPath + "_inner";
|
||||
String stairsOuterPath = stairsPath + "_outer";
|
||||
|
||||
ModelFile stairs = models().withExistingParent(stairsPath, mcLoc("block/stairs"))
|
||||
.texture("bottom", tex)
|
||||
.texture("top", tex)
|
||||
.texture("side", tex);
|
||||
|
||||
ModelFile stairsInner = models().withExistingParent(stairsInnerPath, mcLoc("block/inner_stairs"))
|
||||
.texture("bottom", tex)
|
||||
.texture("top", tex)
|
||||
.texture("side", tex);
|
||||
|
||||
ModelFile stairsOuter = models().withExistingParent(stairsOuterPath, mcLoc("block/outer_stairs"))
|
||||
.texture("bottom", tex)
|
||||
.texture("top", tex)
|
||||
.texture("side", tex);
|
||||
|
||||
// Blockstates + Modelle generieren
|
||||
slabBlock((net.minecraft.world.level.block.SlabBlock) slabDeferred.get(), slab, slabTop, doubleSlab);
|
||||
stairsBlock((net.minecraft.world.level.block.StairBlock) stairsDeferred.get(), stairs, stairsInner, stairsOuter);
|
||||
|
||||
// Item-Modelle manuell auf die generierten Block-Modelle zeigen lassen
|
||||
itemModels().withExistingParent(slabPath, modLoc("block/" + slabPath));
|
||||
itemModels().withExistingParent(stairsPath, modLoc("block/" + stairsPath));
|
||||
}
|
||||
|
||||
private void createWoolStairsAndSlab(DeferredBlock<?> stairsDeferred, DeferredBlock<?> slabDeferred, String vanillaTextureName) {
|
||||
|
||||
@@ -47,6 +47,11 @@ public class ModBlockTagProvider extends BlockTagsProvider {
|
||||
.add(ModBlocks.POOL_TILES.get())
|
||||
.add(ModBlocks.POOL_TILES1.get())
|
||||
|
||||
.add(ModBlocks.POOL_TILES_SLAB.get())
|
||||
.add(ModBlocks.POOL_TILES1_SLAB.get())
|
||||
.add(ModBlocks.POOL_TILES_STAIRS.get())
|
||||
.add(ModBlocks.POOL_TILES1_STAIRS.get())
|
||||
|
||||
.add(ModBlocks.MESH_IRON.get())
|
||||
;
|
||||
|
||||
@@ -75,6 +80,11 @@ public class ModBlockTagProvider extends BlockTagsProvider {
|
||||
.add(ModBlocks.POOL_TILES.get())
|
||||
.add(ModBlocks.POOL_TILES1.get())
|
||||
|
||||
.add(ModBlocks.POOL_TILES_SLAB.get())
|
||||
.add(ModBlocks.POOL_TILES1_SLAB.get())
|
||||
.add(ModBlocks.POOL_TILES_STAIRS.get())
|
||||
.add(ModBlocks.POOL_TILES1_STAIRS.get())
|
||||
|
||||
.add(ModBlocks.MESH_IRON.get())
|
||||
;
|
||||
|
||||
@@ -116,6 +126,11 @@ public class ModBlockTagProvider extends BlockTagsProvider {
|
||||
.add(ModBlocks.POOL_TILES.get())
|
||||
.add(ModBlocks.POOL_TILES1.get())
|
||||
|
||||
.add(ModBlocks.POOL_TILES_SLAB.get())
|
||||
.add(ModBlocks.POOL_TILES1_SLAB.get())
|
||||
.add(ModBlocks.POOL_TILES_STAIRS.get())
|
||||
.add(ModBlocks.POOL_TILES1_STAIRS.get())
|
||||
|
||||
.add(ModBlocks.MESH_IRON.get())
|
||||
;
|
||||
|
||||
@@ -148,10 +163,14 @@ public class ModBlockTagProvider extends BlockTagsProvider {
|
||||
.add(ModBlocks.POOL_TILES.get())
|
||||
.add(ModBlocks.POOL_TILES1.get())
|
||||
|
||||
.add(ModBlocks.POOL_TILES_SLAB.get())
|
||||
.add(ModBlocks.POOL_TILES1_SLAB.get())
|
||||
.add(ModBlocks.POOL_TILES_STAIRS.get())
|
||||
.add(ModBlocks.POOL_TILES1_STAIRS.get())
|
||||
|
||||
.add(ModBlocks.MESH_IRON.get())
|
||||
;
|
||||
|
||||
// Iron-tier tools are "incorrect" for anything that needs diamond tool.
|
||||
tag(BlockTags.INCORRECT_FOR_IRON_TOOL)
|
||||
.add(ModBlocks.OBSIDIAN_GRATE.get())
|
||||
.add(ModBlocks.NETHERITE_GRATE.get())
|
||||
@@ -185,6 +204,11 @@ public class ModBlockTagProvider extends BlockTagsProvider {
|
||||
.add(ModBlocks.POOL_TILES.get())
|
||||
.add(ModBlocks.POOL_TILES1.get())
|
||||
|
||||
.add(ModBlocks.POOL_TILES_SLAB.get())
|
||||
.add(ModBlocks.POOL_TILES1_SLAB.get())
|
||||
.add(ModBlocks.POOL_TILES_STAIRS.get())
|
||||
.add(ModBlocks.POOL_TILES1_STAIRS.get())
|
||||
|
||||
.add(ModBlocks.MESH_IRON.get())
|
||||
;
|
||||
|
||||
@@ -209,8 +233,6 @@ public class ModBlockTagProvider extends BlockTagsProvider {
|
||||
|
||||
;
|
||||
|
||||
// Vanilla glass/stained glass/tinted glass all sit in this tag; it controls
|
||||
// how adjacent fluids render against the glass faces (no water bleeding through).
|
||||
tag(BlockTags.IMPERMEABLE)
|
||||
.add(ModBlocks.WHITE_GLOW_STAINED_GLASS.get())
|
||||
.add(ModBlocks.ORANGE_GLOW_STAINED_GLASS.get())
|
||||
@@ -510,6 +532,9 @@ public class ModBlockTagProvider extends BlockTagsProvider {
|
||||
.add(ModBlocks.RED_WOOL_STAIRS.get())
|
||||
.add(ModBlocks.BLACK_WOOL_STAIRS.get())
|
||||
|
||||
.add(ModBlocks.POOL_TILES_STAIRS.get())
|
||||
.add(ModBlocks.POOL_TILES1_STAIRS.get())
|
||||
|
||||
;
|
||||
|
||||
tag(BlockTags.SLABS)
|
||||
@@ -531,6 +556,9 @@ public class ModBlockTagProvider extends BlockTagsProvider {
|
||||
.add(ModBlocks.RED_WOOL_SLAB.get())
|
||||
.add(ModBlocks.BLACK_WOOL_SLAB.get())
|
||||
|
||||
.add(ModBlocks.POOL_TILES_SLAB.get())
|
||||
.add(ModBlocks.POOL_TILES1_SLAB.get())
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -60,6 +60,12 @@ public class ModLanguageProvider extends LanguageProvider {
|
||||
add(ModBlocks.POOL_TILES.get(), "Pool Tiles");
|
||||
add(ModBlocks.POOL_TILES1.get(), "Pool Tiles");
|
||||
|
||||
add(ModBlocks.POOL_TILES_SLAB.get(), "Pool Tiles Slab");
|
||||
add(ModBlocks.POOL_TILES1_SLAB.get(), "Pool Tiles1 Slab");
|
||||
|
||||
add(ModBlocks.POOL_TILES_STAIRS.get(), "Pool Tiles Stairs");
|
||||
add(ModBlocks.POOL_TILES1_STAIRS.get(), "Pool Tiles1 Stairs");
|
||||
|
||||
add(ModBlocks.MESH_IRON.get(), "Mesh Iron");
|
||||
|
||||
add(ModBlocks.WHITE_WOOL_STAIRS.get(), "White Wool Stairs");
|
||||
|
||||
@@ -87,6 +87,9 @@ public class ModRecipeProvider extends RecipeProvider {
|
||||
stairRecipes.put(Items.RED_WOOL, ModBlocks.RED_WOOL_STAIRS.get());
|
||||
stairRecipes.put(Items.BLACK_WOOL, ModBlocks.BLACK_WOOL_STAIRS.get());
|
||||
|
||||
stairRecipes.put(ModBlocks.POOL_TILES.get(), ModBlocks.POOL_TILES_STAIRS.get());
|
||||
stairRecipes.put(ModBlocks.POOL_TILES1.get(), ModBlocks.POOL_TILES1_STAIRS.get());
|
||||
|
||||
slabRecipes.put(Items.WHITE_WOOL, ModBlocks.WHITE_WOOL_SLAB.get());
|
||||
slabRecipes.put(Items.ORANGE_WOOL, ModBlocks.ORANGE_WOOL_SLAB.get());
|
||||
slabRecipes.put(Items.MAGENTA_WOOL, ModBlocks.MAGENTA_WOOL_SLAB.get());
|
||||
@@ -104,6 +107,9 @@ public class ModRecipeProvider extends RecipeProvider {
|
||||
slabRecipes.put(Items.RED_WOOL, ModBlocks.RED_WOOL_SLAB.get());
|
||||
slabRecipes.put(Items.BLACK_WOOL, ModBlocks.BLACK_WOOL_SLAB.get());
|
||||
|
||||
slabRecipes.put(ModBlocks.POOL_TILES.get(), ModBlocks.POOL_TILES_SLAB.get());
|
||||
slabRecipes.put(ModBlocks.POOL_TILES1.get(), ModBlocks.POOL_TILES1_SLAB.get());
|
||||
|
||||
grateRecipes.put(Items.IRON_BLOCK, ModBlocks.IRON_GRATE.get());
|
||||
grateRecipes.put(Items.GOLD_BLOCK, ModBlocks.GOLD_GRATE.get());
|
||||
grateRecipes.put(Items.DIAMOND_BLOCK, ModBlocks.DIAMOND_GRATE.get());
|
||||
|
||||
@@ -102,7 +102,12 @@ public class ModCreativeModeTabs {
|
||||
output.accept(ModBlocks.BLACK_WOOL_SLAB);
|
||||
|
||||
output.accept(ModBlocks.POOL_TILES);
|
||||
output.accept(ModBlocks.POOL_TILES_STAIRS);
|
||||
output.accept(ModBlocks.POOL_TILES_SLAB);
|
||||
|
||||
output.accept(ModBlocks.POOL_TILES1);
|
||||
output.accept(ModBlocks.POOL_TILES1_STAIRS);
|
||||
output.accept(ModBlocks.POOL_TILES1_SLAB);
|
||||
|
||||
output.accept(ModBlocks.MESH_IRON);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user