Start altering recipes, and adding a new dye

This commit is contained in:
Zontreck 2024-02-21 05:32:53 -07:00
parent c326453a36
commit c629741dab
58 changed files with 647 additions and 157 deletions

View file

@ -6,10 +6,7 @@ import dev.zontreck.otemod.items.DeprecatedModItems;
import net.minecraft.data.PackOutput;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SlabBlock;
import net.minecraft.world.level.block.StairBlock;
import net.minecraft.world.level.block.*;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraftforge.client.model.generators.BlockStateProvider;
import net.minecraftforge.client.model.generators.ModelFile;
@ -64,18 +61,30 @@ public class ModBlockStatesProvider extends BlockStateProvider
blockWithItem(ModBlocks.DIRTY_RED_POOL_TILE);
stairBlock(ModBlocks.DIRTY_RED_POOL_TILE_STAIRS, ModBlocks.DIRTY_RED_POOL_TILE);
slabBlock(ModBlocks.DIRTY_RED_POOL_TILE_SLAB, ModBlocks.DIRTY_RED_POOL_TILE);
blockWithItem(ModBlocks.DARK_RED_WOOL);
carpetBlock(ModBlocks.DARK_RED_CARPET, ModBlocks.DARK_RED_WOOL);
}
private void blockWithItem(RegistryObject<Block> blockRegistryObject)
{
simpleBlockWithItem(blockRegistryObject.get(), cubeAll(blockRegistryObject.get()));
}
private void blockWithItem(RegistryObject<Block> blockRegistryObject, ModelFile model)
{
simpleBlockWithItem(blockRegistryObject.get(), model);
}
private void stairBlock(RegistryObject<Block> blk, RegistryObject<Block> texture)
{
stairsBlock((StairBlock) blk.get(), blockTexture(texture.get()));
simpleBlockItem(blk.get(), stairsModel(blk.get(), texture.get()));
}
private void carpetBlock(RegistryObject<Block> blk, RegistryObject<Block> texture)
{
simpleBlockWithItem(blk.get(), carpetModel(blk.get(), texture.get()));
}
private String name(Block block) {
return this.key(block).getPath();
@ -86,6 +95,9 @@ public class ModBlockStatesProvider extends BlockStateProvider
public ModelFile stairsModel(Block block, Block texture) {
return this.models().stairs(name(block), blockTexture(texture), blockTexture(texture), blockTexture(texture));
}
public ModelFile carpetModel(Block block, Block texture) {
return this.models().carpet(name(block), blockTexture(texture));
}
public ModelFile slabModel(Block block, Block texture) {
return this.models().slab(name(block), blockTexture(texture), blockTexture(texture), blockTexture(texture));
}

View file

@ -51,6 +51,11 @@ public class ModItemModelsProvider extends ItemModelProvider
item(ModItems.MIAB);
item(ModItems.EMPTY_SPAWN_EGG);
item(ModItems.GENERIC_DEPRECATED_ITEM);
item(ModItems.WHITE_BRICK);
item(ModItems.BLUE_BRICK);
item(ModItems.LIGHT_BLUE_BRICK);
item(ModItems.CYAN_BRICK);
item(ModItems.DARK_RED_DYE);
/*

View file

@ -96,6 +96,11 @@ public class ModBlockLootTablesProvider extends BlockLootSubProvider
dropSelf(ModBlocks.FILTHY_RED_POOL_LIGHT.get());
dropSelf(ModBlocks.DIRTY_RED_POOL_TILE_STAIRS.get());
dropSelf(ModBlocks.DIRTY_RED_POOL_TILE_SLAB.get());
dropSelf(ModBlocks.DARK_RED_WOOL.get());
dropSelf(ModBlocks.DARK_RED_CARPET.get());
dropSelf(ModBlocks.DARK_RED_BED.get());
add(ModBlocks.DARK_RED_SHULKER_BOX.get(), createShulkerBoxDrop(ModBlocks.DARK_RED_SHULKER_BOX.get()));
}