Add panzerglass
This commit is contained in:
parent
9b326101e6
commit
21c459bd95
32 changed files with 528 additions and 2 deletions
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": [
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_block_model0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_block_model1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_block_model2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_block_model3"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,88 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"type=bottom,waterlogged=false": [
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model0_bottom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model1_bottom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model2_bottom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model3_bottom"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type=bottom,waterlogged=true": [
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model0_bottom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model1_bottom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model2_bottom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model3_bottom"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type=double,waterlogged=false": [
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model0_double"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model1_double"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model2_double"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model3_double"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type=double,waterlogged=true": [
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model0_double"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model1_double"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model2_double"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model3_double"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type=top,waterlogged=false": [
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model0_top"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model1_top"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model2_top"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model3_top"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type=top,waterlogged=true": [
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model0_top"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model1_top"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model2_top"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "otemod:block/panzerglass_slab_model3_top"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_all",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"all": "otemod:block/engineersdecor/glass/panzerglass_block_texture_inventory"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_all",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"all": "otemod:block/engineersdecor/glass/panzerglass_block_texture0"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_all",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"all": "otemod:block/engineersdecor/glass/panzerglass_block_texture1"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_all",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"all": "otemod:block/engineersdecor/glass/panzerglass_block_texture2"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_all",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"all": "otemod:block/engineersdecor/glass/panzerglass_block_texture3"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/slab",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"bottom": "otemod:block/engineersdecor/glass/panzerglass_block_texture0",
|
||||||
|
"side": "otemod:block/engineersdecor/glass/panzerglass_block_texture0",
|
||||||
|
"top": "otemod:block/engineersdecor/glass/panzerglass_block_texture0"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_all",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"all": "otemod:block/engineersdecor/glass/panzerglass_block_texture0"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/slab_top",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"bottom": "otemod:block/engineersdecor/glass/panzerglass_block_texture0",
|
||||||
|
"side": "otemod:block/engineersdecor/glass/panzerglass_block_texture0",
|
||||||
|
"top": "otemod:block/engineersdecor/glass/panzerglass_block_texture0"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/slab",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"bottom": "otemod:block/engineersdecor/glass/panzerglass_block_texture1",
|
||||||
|
"side": "otemod:block/engineersdecor/glass/panzerglass_block_texture1",
|
||||||
|
"top": "otemod:block/engineersdecor/glass/panzerglass_block_texture1"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_all",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"all": "otemod:block/engineersdecor/glass/panzerglass_block_texture1"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/slab_top",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"bottom": "otemod:block/engineersdecor/glass/panzerglass_block_texture1",
|
||||||
|
"side": "otemod:block/engineersdecor/glass/panzerglass_block_texture1",
|
||||||
|
"top": "otemod:block/engineersdecor/glass/panzerglass_block_texture1"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/slab",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"bottom": "otemod:block/engineersdecor/glass/panzerglass_block_texture2",
|
||||||
|
"side": "otemod:block/engineersdecor/glass/panzerglass_block_texture2",
|
||||||
|
"top": "otemod:block/engineersdecor/glass/panzerglass_block_texture2"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_all",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"all": "otemod:block/engineersdecor/glass/panzerglass_block_texture2"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/slab_top",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"bottom": "otemod:block/engineersdecor/glass/panzerglass_block_texture2",
|
||||||
|
"side": "otemod:block/engineersdecor/glass/panzerglass_block_texture2",
|
||||||
|
"top": "otemod:block/engineersdecor/glass/panzerglass_block_texture2"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/slab",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"bottom": "otemod:block/engineersdecor/glass/panzerglass_block_texture3",
|
||||||
|
"side": "otemod:block/engineersdecor/glass/panzerglass_block_texture3",
|
||||||
|
"top": "otemod:block/engineersdecor/glass/panzerglass_block_texture3"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_all",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"all": "otemod:block/engineersdecor/glass/panzerglass_block_texture3"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/slab_top",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"bottom": "otemod:block/engineersdecor/glass/panzerglass_block_texture3",
|
||||||
|
"side": "otemod:block/engineersdecor/glass/panzerglass_block_texture3",
|
||||||
|
"top": "otemod:block/engineersdecor/glass/panzerglass_block_texture3"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "otemod:block/panzerglass_block_inventory"
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "otemod:block/panzerglass_slab_model0_bottom"
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"bonus_rolls": 0.0,
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "otemod:panzerglass_block"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rolls": 1.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"random_sequence": "otemod:blocks/panzerglass_block"
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"bonus_rolls": 0.0,
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "otemod:panzerglass_slab"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rolls": 1.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"random_sequence": "otemod:blocks/panzerglass_slab"
|
||||||
|
}
|
|
@ -306,4 +306,10 @@ public class ModBlocks {
|
||||||
public static final RegistryObject<Block> REBAR_CONCRETE_TILE_STAIRS = registerWithItem(BLOCKS.register("rebar_concrete_tile_stairs", ()-> new StairBlock(ModBlocks.REBAR_CONCRETE_BLOCK.get()::defaultBlockState, BlockBehaviour.Properties.copy(Blocks.STONE).strength(1f, 2000f).isValidSpawn(ModBlocks::neverSpawn))), new Item.Properties());
|
public static final RegistryObject<Block> REBAR_CONCRETE_TILE_STAIRS = registerWithItem(BLOCKS.register("rebar_concrete_tile_stairs", ()-> new StairBlock(ModBlocks.REBAR_CONCRETE_BLOCK.get()::defaultBlockState, BlockBehaviour.Properties.copy(Blocks.STONE).strength(1f, 2000f).isValidSpawn(ModBlocks::neverSpawn))), new Item.Properties());
|
||||||
|
|
||||||
|
|
||||||
|
public static final RegistryObject<Block> PANZER_GLASS_BLOCK = registerWithItem(BLOCKS.register("panzerglass_block", ()-> new Block(BlockBehaviour.Properties.copy(Blocks.IRON_BLOCK).noOcclusion().strength(0.5f, 2000f).isValidSpawn(ModBlocks::neverSpawn).sound(SoundType.METAL))), new Item.Properties());
|
||||||
|
|
||||||
|
public static final RegistryObject<Block> PANZER_GLASS_SLAB = registerWithItem(BLOCKS.register("panzerglass_slab", ()-> new SlabBlock(BlockBehaviour.Properties.copy(Blocks.IRON_BLOCK).noOcclusion().strength(0.5f, 2000f).isValidSpawn(ModBlocks::neverSpawn).sound(SoundType.METAL))), new Item.Properties());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,6 +129,13 @@ public class ModBlockStatesProvider extends BlockStateProvider {
|
||||||
new ResourceLocation(OTEMod.MOD_ID, "engineersdecor/concrete/rebar_concrete_tile_texture7")
|
new ResourceLocation(OTEMod.MOD_ID, "engineersdecor/concrete/rebar_concrete_tile_texture7")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ResourceLocation[] panzerglass = new ResourceLocation[]{
|
||||||
|
new ResourceLocation(OTEMod.MOD_ID, "engineersdecor/glass/panzerglass_block_texture0"),
|
||||||
|
new ResourceLocation(OTEMod.MOD_ID, "engineersdecor/glass/panzerglass_block_texture1"),
|
||||||
|
new ResourceLocation(OTEMod.MOD_ID, "engineersdecor/glass/panzerglass_block_texture2"),
|
||||||
|
new ResourceLocation(OTEMod.MOD_ID, "engineersdecor/glass/panzerglass_block_texture3")
|
||||||
|
};
|
||||||
|
|
||||||
variantCubeBlock(ModBlocks.CLINKER_BRICK_BLOCK, clinkerBlock);
|
variantCubeBlock(ModBlocks.CLINKER_BRICK_BLOCK, clinkerBlock);
|
||||||
customSlabBlock(ModBlocks.CLINKER_BRICK_SLAB, clinkerBlock);
|
customSlabBlock(ModBlocks.CLINKER_BRICK_SLAB, clinkerBlock);
|
||||||
customStairBlock(ModBlocks.CLINKER_BRICK_STAIRS, clinkerBlock);
|
customStairBlock(ModBlocks.CLINKER_BRICK_STAIRS, clinkerBlock);
|
||||||
|
@ -151,6 +158,9 @@ public class ModBlockStatesProvider extends BlockStateProvider {
|
||||||
variantCubeBlock(ModBlocks.REBAR_CONCRETE_TILE_BLOCK, rebarConcreteTile);
|
variantCubeBlock(ModBlocks.REBAR_CONCRETE_TILE_BLOCK, rebarConcreteTile);
|
||||||
customSlabBlock(ModBlocks.REBAR_CONCRETE_TILE_SLAB, rebarConcreteTile);
|
customSlabBlock(ModBlocks.REBAR_CONCRETE_TILE_SLAB, rebarConcreteTile);
|
||||||
customStairBlock(ModBlocks.REBAR_CONCRETE_TILE_STAIRS, rebarConcreteTile);
|
customStairBlock(ModBlocks.REBAR_CONCRETE_TILE_STAIRS, rebarConcreteTile);
|
||||||
|
|
||||||
|
variantTransparentCubeBlock(ModBlocks.PANZER_GLASS_BLOCK, new ResourceLocation(OTEMod.MOD_ID, "engineersdecor/glass/panzerglass_block_texture_inventory"), panzerglass);
|
||||||
|
customTransparentSlabBlock(ModBlocks.PANZER_GLASS_SLAB, panzerglass);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void wallBlock(RegistryObject<Block> blk, ResourceLocation texture)
|
private void wallBlock(RegistryObject<Block> blk, ResourceLocation texture)
|
||||||
|
@ -305,6 +315,110 @@ public class ModBlockStatesProvider extends BlockStateProvider {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
simpleBlockItem(blockId.get(), model0.get());
|
||||||
|
}
|
||||||
|
private void customTransparentSlabBlock(RegistryObject<Block> blockId, ResourceLocation... variations) {
|
||||||
|
VariantBlockStateBuilder builder = getVariantBuilder(blockId.get());
|
||||||
|
|
||||||
|
|
||||||
|
AtomicReference<ModelFile> model0 = new AtomicReference<>();
|
||||||
|
|
||||||
|
builder.forAllStates((state)->{
|
||||||
|
ConfiguredModel[] models = new ConfiguredModel[variations.length];
|
||||||
|
|
||||||
|
|
||||||
|
String appendName = "";
|
||||||
|
SlabType type = state.getValue(SlabBlock.TYPE);
|
||||||
|
|
||||||
|
if(type == SlabType.BOTTOM)
|
||||||
|
appendName = "_bottom";
|
||||||
|
else if(type == SlabType.TOP)
|
||||||
|
appendName = "_top";
|
||||||
|
else if(type == SlabType.DOUBLE)
|
||||||
|
appendName = "_double";
|
||||||
|
|
||||||
|
for (int i = 0; i < variations.length; i++) {
|
||||||
|
ResourceLocation texture = variations[i];
|
||||||
|
ResourceLocation rss = new ResourceLocation(texture.getNamespace(), "block/" + texture.getPath());
|
||||||
|
ModelFile model = null;
|
||||||
|
if(type == SlabType.TOP)
|
||||||
|
model = models().slabTop(name(blockId.get()) + "_model" + i + appendName, rss, rss, rss).renderType(new ResourceLocation("translucent"));
|
||||||
|
else if(type == SlabType.BOTTOM)
|
||||||
|
model = models().slab(name(blockId.get()) + "_model" + i + appendName, rss, rss, rss).renderType(new ResourceLocation("translucent"));
|
||||||
|
else if(type == SlabType.DOUBLE)
|
||||||
|
model = models().cubeAll(name(blockId.get()) + "_model" + i + appendName, rss).renderType(new ResourceLocation("translucent"));
|
||||||
|
|
||||||
|
|
||||||
|
ConfiguredModel[] cfgModel = ConfiguredModel.builder().modelFile(model).build();
|
||||||
|
|
||||||
|
if(i==0 && model0.get()==null && type == SlabType.BOTTOM) model0.set(model);
|
||||||
|
|
||||||
|
models[i] = cfgModel[0];
|
||||||
|
//builder.partialState().addModels(cfgModel);
|
||||||
|
}
|
||||||
|
return models;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
simpleBlockItem(blockId.get(), model0.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void customTransparentStairBlock(RegistryObject<Block> blockId, ResourceLocation... variations) {
|
||||||
|
VariantBlockStateBuilder builder = getVariantBuilder(blockId.get());
|
||||||
|
ResourceLocation blockDefault = blockTexture(blockId.get());
|
||||||
|
|
||||||
|
|
||||||
|
AtomicReference<ModelFile> model0 = new AtomicReference<>();
|
||||||
|
|
||||||
|
builder.forAllStates((state)->{
|
||||||
|
ConfiguredModel[] models = new ConfiguredModel[variations.length];
|
||||||
|
Direction facing = (Direction)state.getValue(StairBlock.FACING);
|
||||||
|
Half half = (Half)state.getValue(StairBlock.HALF);
|
||||||
|
StairsShape shape = (StairsShape)state.getValue(StairBlock.SHAPE);
|
||||||
|
int yRot = (int)facing.getClockWise().toYRot();
|
||||||
|
if (shape == StairsShape.INNER_LEFT || shape == StairsShape.OUTER_LEFT) {
|
||||||
|
yRot += 270;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (shape != StairsShape.STRAIGHT && half == Half.TOP) {
|
||||||
|
yRot += 90;
|
||||||
|
}
|
||||||
|
|
||||||
|
yRot %= 360;
|
||||||
|
boolean uvlock = yRot != 0 || half == Half.TOP;
|
||||||
|
|
||||||
|
String modelName = (shape == StairsShape.STRAIGHT) ? "" : (shape != StairsShape.INNER_LEFT && shape != StairsShape.INNER_RIGHT) ? "_outer":"_inner";
|
||||||
|
boolean straight = (shape == StairsShape.STRAIGHT);
|
||||||
|
boolean inner = (shape == StairsShape.INNER_LEFT || shape == StairsShape.INNER_RIGHT);
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < variations.length; i++) {
|
||||||
|
ResourceLocation texture = variations[i];
|
||||||
|
ResourceLocation rss = new ResourceLocation(texture.getNamespace(), "block/" + texture.getPath());
|
||||||
|
ModelFile cubeModel = null;
|
||||||
|
if(straight)
|
||||||
|
cubeModel = models().stairs(
|
||||||
|
blockId.getId().getPath() + "_model"+i + modelName, // Model name
|
||||||
|
rss, rss, rss // Texture location
|
||||||
|
).renderType(new ResourceLocation("translucent"));
|
||||||
|
|
||||||
|
if(inner)
|
||||||
|
cubeModel = models().stairsInner(blockId.getId().getPath()+"_model"+i + modelName, rss, rss, rss).renderType(new ResourceLocation("translucent"));
|
||||||
|
else if(!inner && !straight)
|
||||||
|
cubeModel = models().stairsOuter(blockId.getId().getPath() + "_model"+i+modelName, rss, rss, rss).renderType(new ResourceLocation("translucent"));
|
||||||
|
|
||||||
|
ConfiguredModel[] cfgModel = ConfiguredModel.builder().modelFile(cubeModel).rotationX(half == Half.BOTTOM ? 0 : 180).rotationY(yRot).uvLock(uvlock).build();
|
||||||
|
|
||||||
|
if(i==0 && model0.get()==null) model0.set(cubeModel);
|
||||||
|
|
||||||
|
models[i] = cfgModel[0];
|
||||||
|
//builder.partialState().addModels(cfgModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
return models;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
simpleBlockItem(blockId.get(), model0.get());
|
simpleBlockItem(blockId.get(), model0.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,6 +441,32 @@ public class ModBlockStatesProvider extends BlockStateProvider {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
simpleBlockItem(blockId.get(), model0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void variantTransparentCubeBlock(RegistryObject<Block> blockId, ResourceLocation inventory, ResourceLocation... variations) {
|
||||||
|
VariantBlockStateBuilder builder = getVariantBuilder(blockId.get());
|
||||||
|
ResourceLocation blockDefault = blockTexture(blockId.get());
|
||||||
|
|
||||||
|
ModelFile model0 = models().cubeAll(name(blockId.get()) + "_inventory", new ResourceLocation(inventory.getNamespace(), "block/" + inventory.getPath())).renderType(new ResourceLocation("translucent"));
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < variations.length; i++) {
|
||||||
|
ResourceLocation texture = variations[i];
|
||||||
|
ResourceLocation rss = new ResourceLocation(texture.getNamespace(), "block/" + texture.getPath());
|
||||||
|
|
||||||
|
ModelFile cubeModel = models().cubeAll(
|
||||||
|
blockId.getId().getPath() + "_model"+i, // Model name
|
||||||
|
rss // Texture location
|
||||||
|
).renderType(new ResourceLocation("translucent"));
|
||||||
|
var cfgModel = ConfiguredModel.builder().modelFile(cubeModel).build();
|
||||||
|
//if(i==0)model0 = cubeModel;
|
||||||
|
builder.partialState().addModels(cfgModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
simpleBlockItem(blockId.get(), model0);
|
simpleBlockItem(blockId.get(), model0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,6 +137,9 @@ public class ModBlockLootTablesProvider extends BlockLootSubProvider
|
||||||
dropSelf(ModBlocks.REBAR_CONCRETE_TILE_SLAB.get());
|
dropSelf(ModBlocks.REBAR_CONCRETE_TILE_SLAB.get());
|
||||||
dropSelf(ModBlocks.REBAR_CONCRETE_TILE_STAIRS.get());
|
dropSelf(ModBlocks.REBAR_CONCRETE_TILE_STAIRS.get());
|
||||||
|
|
||||||
|
dropSelf(ModBlocks.PANZER_GLASS_BLOCK.get());
|
||||||
|
dropSelf(ModBlocks.PANZER_GLASS_SLAB.get());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,6 +164,10 @@
|
||||||
"block.otemod.rebar_concrete_tile_stairs.help": "Steel reinforced concrete tile stairs.\n Expensive but Creeper-proof.",
|
"block.otemod.rebar_concrete_tile_stairs.help": "Steel reinforced concrete tile stairs.\n Expensive but Creeper-proof.",
|
||||||
"block.otemod.rebar_concrete_wall": "Rebar Concrete Wall",
|
"block.otemod.rebar_concrete_wall": "Rebar Concrete Wall",
|
||||||
"block.otemod.rebar_concrete_wall.help": "Steel reinforced concrete wall.\n Expensive but Creeper-proof.",
|
"block.otemod.rebar_concrete_wall.help": "Steel reinforced concrete wall.\n Expensive but Creeper-proof.",
|
||||||
|
"block.otemod.panzerglass_block": "Panzer Glass Block",
|
||||||
|
"block.otemod.panzerglass_block.help": "Reinforced glass block.\n Expensive, explosion-proof.\n Dark gray tint, faint structural\n lines visible, multi texture for\n seamless look.",
|
||||||
|
"block.otemod.panzerglass_slab": "Panzer Glass Slab",
|
||||||
|
"block.otemod.panzerglass_slab.help": "Reinforced glass slab.\n Expensive, explosion-proof.\n Dark gray tint, faint structural\n lines visible.",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
"otemod:clinker_brick_stained_slab",
|
"otemod:clinker_brick_stained_slab",
|
||||||
"otemod:slag_brick_slab",
|
"otemod:slag_brick_slab",
|
||||||
"otemod:rebar_concrete_slab",
|
"otemod:rebar_concrete_slab",
|
||||||
|
"otemod:panzerglass_slab",
|
||||||
|
|
||||||
"otemod:pool_tile_slab",
|
"otemod:pool_tile_slab",
|
||||||
"otemod:blue_pool_tile_slab",
|
"otemod:blue_pool_tile_slab",
|
||||||
|
|
|
@ -4,6 +4,16 @@
|
||||||
"otemod:ilusium_block",
|
"otemod:ilusium_block",
|
||||||
"otemod:item_scrubber",
|
"otemod:item_scrubber",
|
||||||
"otemod:magical_scrubber",
|
"otemod:magical_scrubber",
|
||||||
"otemod:layered_compressed_obsidian_block"
|
"otemod:layered_compressed_obsidian_block",
|
||||||
|
|
||||||
|
"otemod:panzerglass_block",
|
||||||
|
"otemod:panzerglass_slab",
|
||||||
|
"otemod:rebar_concrete",
|
||||||
|
"otemod:rebar_concrete_slab",
|
||||||
|
"otemod:rebar_concrete_stairs",
|
||||||
|
"otemod:rebar_concrete_wall",
|
||||||
|
"otemod:rebar_concrete_tile",
|
||||||
|
"otemod:rebar_concrete_tile_slab",
|
||||||
|
"otemod:rebar_concrete_tile_stairs"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
"type": "forge:conditional",
|
||||||
|
"recipes": [
|
||||||
|
{
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"type": "otemod:optional",
|
||||||
|
"result": "otemod:panzerglass_block",
|
||||||
|
"required": [
|
||||||
|
"otemod:metal_bar",
|
||||||
|
"minecraft:glass"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"recipe": {
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"SGS",
|
||||||
|
"GSG",
|
||||||
|
"SGS"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"G": {
|
||||||
|
"item": "minecraft:glass"
|
||||||
|
},
|
||||||
|
"S": {
|
||||||
|
"item": "otemod:metal_bar"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "otemod:panzerglass_block",
|
||||||
|
"count": 8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
"type": "forge:conditional",
|
||||||
|
"recipes": [
|
||||||
|
{
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"type": "otemod:optional",
|
||||||
|
"result": "otemod:panzerglass_block",
|
||||||
|
"required": [
|
||||||
|
"otemod:rebar_concrete_tile"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"recipe": {
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
"CCC"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"C": {
|
||||||
|
"item": "otemod:panzerglass_block"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "otemod:panzerglass_slab",
|
||||||
|
"count": 6
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -25,6 +25,9 @@
|
||||||
|
|
||||||
"otemod:rebar_concrete_tile",
|
"otemod:rebar_concrete_tile",
|
||||||
"otemod:rebar_concrete_tile_slab",
|
"otemod:rebar_concrete_tile_slab",
|
||||||
"otemod:rebar_concrete_tile_stairs"
|
"otemod:rebar_concrete_tile_stairs",
|
||||||
|
|
||||||
|
"otemod:panzerglass_block",
|
||||||
|
"otemod:panzerglass_slab"
|
||||||
]
|
]
|
||||||
}
|
}
|
Reference in a new issue