NSE Strong, remove stairs

This commit is contained in:
Andrew-71 2023-09-23 14:06:45 +03:00
parent 608f8bafee
commit d20f76caf0
1582 changed files with 1049 additions and 28762 deletions

View file

@ -4,13 +4,16 @@ package su.a71.new_soviet.datagen;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.SlabBlock;
import net.minecraft.block.StairsBlock;
import net.minecraft.data.client.BlockStateModelGenerator;
import net.minecraft.data.client.ItemModelGenerator;
import net.minecraft.data.client.Models;
import net.minecraft.data.client.TextureMap;
import net.minecraft.registry.Registries;
import net.minecraft.structure.StrongholdGenerator;
import net.minecraft.util.Identifier;
import org.apache.http.impl.io.IdentityInputStream;
import su.a71.new_soviet.registration.NSE_Blocks;
public class ModelGenerator extends FabricModelProvider {
@ -39,9 +42,27 @@ public class ModelGenerator extends FabricModelProvider {
public void registerCube(BlockStateModelGenerator blockStateModelGenerator, Block block, String texturePath) {
TextureMap textureMap = TextureMap.all(Registries.BLOCK.getId(block).withPath((path) -> "block/" + texturePath + "/" + path));
Identifier model_id = Models.CUBE_ALL.upload(block, textureMap, blockStateModelGenerator.modelCollector);
// blockStateModelGenerator.registerItemModel(doorBlock.asItem());
blockStateModelGenerator.blockStateCollector.accept(blockStateModelGenerator.createSingletonBlockState(block, model_id));
}
public void registerSlabStairs(BlockStateModelGenerator blockStateModelGenerator, Block parent, StairsBlock stairs, SlabBlock slab, String texturePath) {
TextureMap textureMap = TextureMap.all(Registries.BLOCK.getId(parent).withPath((path) -> "block/" + texturePath + "/" + path));
Identifier slab_model = Models.SLAB.upload(slab, textureMap, blockStateModelGenerator.modelCollector);
Identifier slab_model_top = Models.SLAB_TOP.upload(slab, textureMap, blockStateModelGenerator.modelCollector);
Identifier slab_model_full = Models.CUBE_ALL.upload(slab, textureMap, blockStateModelGenerator.modelCollector);
Identifier stairs_model = Models.STAIRS.upload(stairs, textureMap, blockStateModelGenerator.modelCollector);
Identifier stairs_model_outer = Models.OUTER_STAIRS.upload(stairs, textureMap, blockStateModelGenerator.modelCollector);
Identifier stairs_model_inner = Models.INNER_STAIRS.upload(stairs, textureMap, blockStateModelGenerator.modelCollector);
// blockStateModelGenerator.registerItemModel(doorBlock.asItem());
// BlockStateModelGenerator.createSlabBlockState(slab)
// blockStateModelGenerator.blockStateCollector.accept(BlockStateModelGenerator.createSlabBlockState(slab, slab_model, slab_model_top, slab_model_full));
blockStateModelGenerator.blockStateCollector.accept(BlockStateModelGenerator.createStairsBlockState(slab, stairs_model_inner, stairs_model, stairs_model_outer));
}
@Override
public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) {
// BlockStateModelGenerator.createSingletonBlockState(NSE_Blocks.SAND_TILES, new Identifier("new_soviet", "block/sand_tiles"));
@ -221,6 +242,7 @@ public class ModelGenerator extends FabricModelProvider {
// blockStateModelGenerator.registerSimpleCubeAll(NSE_Blocks.SAND_TILES);
// BlockStateModelGenerator.createSingletonBlockState(NSE_Blocks.SAND_TILES, new Identifier("new_soviet", "block/sand_tiles"));
registerSlabStairs(blockStateModelGenerator, NSE_Blocks.SAND_TILES, NSE_Blocks.SAND_TILES_STAIRS, NSE_Blocks.SAND_TILES_SLAB, "sand");
// blockStateModelGenerator.register();
}