Patterns
This commit is contained in:
parent
0d5e6d544c
commit
f862bc8792
57 changed files with 493 additions and 225 deletions
|
@ -1,5 +1,6 @@
|
|||
package ru.betterend.blocks.basis;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -7,8 +8,11 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.interfaces.Patterned;
|
||||
|
||||
public class BlockBase extends Block {
|
||||
public class BlockBase extends Block implements Patterned {
|
||||
public BlockBase(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
@ -17,4 +21,20 @@ public class BlockBase extends Block {
|
|||
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStatesPattern(Reader data, String block) {
|
||||
Identifier blockId = Registry.BLOCK.getId(this);
|
||||
return Patterned.createJson(data, blockId, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
Identifier blockId = Registry.BLOCK.getId(this);
|
||||
return Patterned.createJson(Patterned.BASE_BLOCK_MODEL, blockId, block);
|
||||
}
|
||||
|
||||
public Identifier statePatternId() {
|
||||
return Patterned.BLOCK_STATES_PATTERN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package ru.betterend.blocks.basis;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -7,8 +8,11 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.block.PillarBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.interfaces.Patterned;
|
||||
|
||||
public class BlockPillar extends PillarBlock {
|
||||
public class BlockPillar extends PillarBlock implements Patterned {
|
||||
public BlockPillar(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
@ -17,4 +21,20 @@ public class BlockPillar extends PillarBlock {
|
|||
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStatesPattern(Reader data, String block) {
|
||||
Identifier blockId = Registry.BLOCK.getId(this);
|
||||
return Patterned.createJson(data, blockId, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
Identifier blockId = Registry.BLOCK.getId(this);
|
||||
return Patterned.createJson(Patterned.PILLAR_BLOCK_MODEL, blockId, block);
|
||||
}
|
||||
|
||||
public Identifier statePatternId() {
|
||||
return Patterned.PILLAR_STATES_PATTERN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package ru.betterend.blocks.basis;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -9,14 +10,40 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.block.PressurePlateBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.interfaces.Patterned;
|
||||
|
||||
public class BlockPressurePlate extends PressurePlateBlock implements Patterned {
|
||||
|
||||
private final Block parent;
|
||||
|
||||
public class BlockPressurePlate extends PressurePlateBlock {
|
||||
public BlockPressurePlate(Block source) {
|
||||
super(ActivationRule.EVERYTHING, FabricBlockSettings.copyOf(source).nonOpaque());
|
||||
this.parent = source;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStatesPattern(Reader data, String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
return Patterned.createJson(data, parentId, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
if (block.contains("down")) {
|
||||
return Patterned.createJson(Patterned.PLATE_MODEL_DOWN, parentId, block);
|
||||
}
|
||||
return Patterned.createJson(Patterned.PLATE_MODEL_UP, parentId, block);
|
||||
}
|
||||
|
||||
public Identifier statePatternId() {
|
||||
return Patterned.PLATE_STATES_PATTERN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package ru.betterend.blocks.basis;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -11,14 +12,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.loot.context.LootContext;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.interfaces.Patterned;
|
||||
|
||||
public class BlockSlab extends SlabBlock implements Patterned {
|
||||
|
||||
private final static Identifier STATES_PATTERN = BetterEnd.makeID("patterns/blockstate/pattern_slab.json");
|
||||
private final static Identifier MODEL_PATTERN = BetterEnd.makeID("patterns/block/pattern_slab.json");
|
||||
|
||||
private final Block parent;
|
||||
|
||||
public BlockSlab(Block source) {
|
||||
|
@ -32,18 +29,18 @@ public class BlockSlab extends SlabBlock implements Patterned {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String blockStatePattern(String name) {
|
||||
public String getStatesPattern(Reader data, String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
return Patterned.createJson(STATES_PATTERN, parentId.getPath());
|
||||
return Patterned.createJson(data, parentId, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String modelPattern(String name) {
|
||||
public String getModelPattern(String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
return Patterned.createJson(MODEL_PATTERN, parentId.getPath());
|
||||
return Patterned.createJson(Patterned.SLAB_BLOCK_MODEL, parentId, block);
|
||||
}
|
||||
|
||||
public Identifier statePatternId() {
|
||||
return STATES_PATTERN;
|
||||
return Patterned.SLAB_STATES_PATTERN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package ru.betterend.blocks.basis;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -9,14 +10,43 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.block.StairsBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.interfaces.Patterned;
|
||||
|
||||
public class BlockStairs extends StairsBlock implements Patterned {
|
||||
|
||||
private final Block parent;
|
||||
|
||||
public class BlockStairs extends StairsBlock {
|
||||
public BlockStairs(Block source) {
|
||||
super(source.getDefaultState(), FabricBlockSettings.copyOf(source));
|
||||
this.parent = source;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStatesPattern(Reader data, String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
return Patterned.createJson(data, parentId, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
if (block.contains("inner")) {
|
||||
return Patterned.createJson(Patterned.STAIRS_MODEL_INNER, parentId, block);
|
||||
}
|
||||
if (block.contains("outer")) {
|
||||
return Patterned.createJson(Patterned.STAIRS_MODEL_OUTER, parentId, block);
|
||||
}
|
||||
return Patterned.createJson(Patterned.STAIRS_MODEL, parentId, block);
|
||||
}
|
||||
|
||||
public Identifier statePatternId() {
|
||||
return Patterned.STAIRS_STATES_PATTERN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,55 @@
|
|||
package ru.betterend.blocks.basis;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.StoneButtonBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
import ru.betterend.interfaces.Patterned;
|
||||
|
||||
public class BlockStoneButton extends StoneButtonBlock implements Patterned {
|
||||
|
||||
private final Block parent;
|
||||
|
||||
public class BlockStoneButton extends StoneButtonBlock {
|
||||
public BlockStoneButton(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source).nonOpaque());
|
||||
this.parent = source;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStatesPattern(Reader data, String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
return Patterned.createJson(data, parentId, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
if (block.contains("item")) {
|
||||
return Patterned.createJson(Patterned.BUTTON_ITEM_MODEL, parentId, block);
|
||||
}
|
||||
if (block.contains("pressed")) {
|
||||
return Patterned.createJson(Patterned.BUTTON_PRESSED_MODEL, parentId, block);
|
||||
}
|
||||
return Patterned.createJson(Patterned.BUTTON_BLOCK_MODEL, parentId, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identifier statePatternId() {
|
||||
return Patterned.BUTTON_STATES_PATTERN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package ru.betterend.blocks.basis;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -9,14 +10,40 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.block.PressurePlateBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.interfaces.Patterned;
|
||||
|
||||
public class BlockStonePressurePlate extends PressurePlateBlock implements Patterned {
|
||||
|
||||
private final Block parent;
|
||||
|
||||
public class BlockStonePressurePlate extends PressurePlateBlock {
|
||||
public BlockStonePressurePlate(Block source) {
|
||||
super(ActivationRule.MOBS, FabricBlockSettings.copyOf(source).nonOpaque());
|
||||
this.parent = source;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStatesPattern(Reader data, String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
return Patterned.createJson(data, parentId, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
if (block.contains("down")) {
|
||||
return Patterned.createJson(Patterned.PLATE_MODEL_DOWN, parentId, block);
|
||||
}
|
||||
return Patterned.createJson(Patterned.PLATE_MODEL_UP, parentId, block);
|
||||
}
|
||||
|
||||
public Identifier statePatternId() {
|
||||
return Patterned.PLATE_STATES_PATTERN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package ru.betterend.blocks.basis;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -9,14 +10,46 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.block.WallBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.interfaces.Patterned;
|
||||
|
||||
public class BlockWall extends WallBlock implements Patterned {
|
||||
|
||||
private final Block parent;
|
||||
|
||||
public class BlockWall extends WallBlock {
|
||||
public BlockWall(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source).nonOpaque());
|
||||
this.parent = source;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStatesPattern(Reader data, String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
return Patterned.createJson(data, parentId, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
if (block.contains("item")) {
|
||||
return Patterned.createJson(Patterned.WALL_ITEM_MODEL, parentId, block);
|
||||
}
|
||||
if (block.contains("side_tall")) {
|
||||
return Patterned.createJson(Patterned.WALL_SIDE_TALL_MODEL, parentId, block);
|
||||
}
|
||||
if (block.contains("side")) {
|
||||
return Patterned.createJson(Patterned.WALL_SIDE_MODEL, parentId, block);
|
||||
}
|
||||
return Patterned.createJson(Patterned.WALL_POST_MODEL, parentId, block);
|
||||
}
|
||||
|
||||
public Identifier statePatternId() {
|
||||
return Patterned.WALL_STATES_PATTERN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package ru.betterend.blocks.basis;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -9,14 +10,44 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.block.WoodenButtonBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.interfaces.Patterned;
|
||||
|
||||
public class BlockWoodenButton extends WoodenButtonBlock implements Patterned {
|
||||
|
||||
private final Block parent;
|
||||
|
||||
public class BlockWoodenButton extends WoodenButtonBlock {
|
||||
public BlockWoodenButton(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source).nonOpaque());
|
||||
this.parent = source;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStatesPattern(Reader data, String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
return Patterned.createJson(data, parentId, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
Identifier parentId = Registry.BLOCK.getId(parent);
|
||||
if (block.contains("item")) {
|
||||
return Patterned.createJson(Patterned.BUTTON_ITEM_MODEL, parentId, block);
|
||||
}
|
||||
if (block.contains("pressed")) {
|
||||
return Patterned.createJson(Patterned.BUTTON_PRESSED_MODEL, parentId, block);
|
||||
}
|
||||
return Patterned.createJson(Patterned.BUTTON_BLOCK_MODEL, parentId, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identifier statePatternId() {
|
||||
return Patterned.BUTTON_STATES_PATTERN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,8 +38,8 @@ public class StoneMaterial {
|
|||
FabricBlockSettings material = FabricBlockSettings.copyOf(Blocks.END_STONE).materialColor(color);
|
||||
|
||||
stone = BlockRegistry.registerBlock(name, new BlockBase(material));
|
||||
tile = BlockRegistry.registerBlock(name + "_tile", new BlockBase(material));
|
||||
small_tiles = BlockRegistry.registerBlock(name + "_small_tiles", new BlockBase(material));
|
||||
tile = BlockRegistry.registerBlock(name + "_polished", new BlockBase(material));
|
||||
small_tiles = BlockRegistry.registerBlock(name + "_tiles", new BlockBase(material));
|
||||
pillar = BlockRegistry.registerBlock(name + "_pillar", new BlockPillar(material));
|
||||
stairs = BlockRegistry.registerBlock(name + "_stairs", new BlockStairs(stone));
|
||||
slab = BlockRegistry.registerBlock(name + "_slab", new BlockSlab(stone));
|
||||
|
@ -48,23 +48,23 @@ public class StoneMaterial {
|
|||
pressure_plate = BlockRegistry.registerBlock(name + "_plate", new BlockStonePressurePlate(stone));
|
||||
|
||||
bricks = BlockRegistry.registerBlock(name + "_bricks", new BlockBase(material));
|
||||
brick_stairs = BlockRegistry.registerBlock(name + "_brick_stairs", new BlockStairs(bricks));
|
||||
brick_slab = BlockRegistry.registerBlock(name + "_brick_slab", new BlockSlab(bricks));
|
||||
brick_wall = BlockRegistry.registerBlock(name + "_brick_wall", new BlockWall(bricks));
|
||||
brick_stairs = BlockRegistry.registerBlock(name + "_bricks_stairs", new BlockStairs(bricks));
|
||||
brick_slab = BlockRegistry.registerBlock(name + "_bricks_slab", new BlockSlab(bricks));
|
||||
brick_wall = BlockRegistry.registerBlock(name + "_bricks_wall", new BlockWall(bricks));
|
||||
|
||||
// Recipes //
|
||||
RecipeBuilder.make(name + "_bricks", bricks).setOutputCount(4).setShape("##", "##").addMaterial('#', stone).setGroup("end_bricks").build();
|
||||
RecipeBuilder.make(name + "_tile", tile).setOutputCount(4).setShape("##", "##").addMaterial('#', bricks).setGroup("end_tile").build();
|
||||
RecipeBuilder.make(name + "_small_tiles", small_tiles).setOutputCount(4).setShape("##", "##").addMaterial('#', tile).setGroup("end_small_tile").build();
|
||||
RecipeBuilder.make(name + "_polished", tile).setOutputCount(4).setShape("##", "##").addMaterial('#', bricks).setGroup("end_tile").build();
|
||||
RecipeBuilder.make(name + "_tiles", small_tiles).setOutputCount(4).setShape("##", "##").addMaterial('#', tile).setGroup("end_small_tile").build();
|
||||
RecipeBuilder.make(name + "_pillar", pillar).setShape("#", "#").addMaterial('#', slab).setGroup("end_pillar").build();
|
||||
|
||||
RecipeBuilder.make(name + "_stairs", stairs).setOutputCount(4).setShape("# ", "## ", "###").addMaterial('#', stone).setGroup("end_stone_stairs").build();
|
||||
RecipeBuilder.make(name + "_slab", slab).setOutputCount(6).setShape("###").addMaterial('#', stone).setGroup("end_stone_slabs").build();
|
||||
RecipeBuilder.make(name + "_brick_stairs", brick_stairs).setOutputCount(4).setShape("# ", "## ", "###").addMaterial('#', bricks).setGroup("end_stone_stairs").build();
|
||||
RecipeBuilder.make(name + "_brick_slab", brick_slab).setOutputCount(6).setShape("###").addMaterial('#', bricks).setGroup("end_stone_slabs").build();
|
||||
RecipeBuilder.make(name + "_bricks_stairs", brick_stairs).setOutputCount(4).setShape("# ", "## ", "###").addMaterial('#', bricks).setGroup("end_stone_stairs").build();
|
||||
RecipeBuilder.make(name + "_bricks_slab", brick_slab).setOutputCount(6).setShape("###").addMaterial('#', bricks).setGroup("end_stone_slabs").build();
|
||||
|
||||
RecipeBuilder.make(name + "_wall", wall).setOutputCount(6).setShape("###", "###").addMaterial('#', stone).setGroup("end_wall").build();
|
||||
RecipeBuilder.make(name + "_brick_wall", brick_wall).setOutputCount(6).setShape("###", "###").addMaterial('#', bricks).setGroup("end_wall").build();
|
||||
RecipeBuilder.make(name + "_bricks_wall", brick_wall).setOutputCount(6).setShape("###", "###").addMaterial('#', bricks).setGroup("end_wall").build();
|
||||
|
||||
RecipeBuilder.make(name + "_button", button).setList("#").addMaterial('#', stone).setGroup("end_stone_buttons").build();
|
||||
RecipeBuilder.make(name + "_pressure_plate", pressure_plate).setShape("##").addMaterial('#', stone).setGroup("end_stone_plates").build();
|
||||
|
|
|
@ -18,6 +18,7 @@ import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView;
|
|||
import net.fabricmc.fabric.api.renderer.v1.mesh.QuadEmitter;
|
||||
import net.fabricmc.fabric.api.renderer.v1.model.FabricBakedModel;
|
||||
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.render.model.BakedModel;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
|
@ -35,6 +36,7 @@ import net.minecraft.util.Identifier;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.BlockRenderView;
|
||||
|
||||
import ru.betterend.BetterEnd;
|
||||
|
||||
public class SlabModel implements UnbakedModel, BakedModel, FabricBakedModel {
|
||||
|
|
|
@ -3,19 +3,48 @@ package ru.betterend.interfaces;
|
|||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.resource.ResourceManager;
|
||||
import net.minecraft.util.Identifier;
|
||||
import ru.betterend.BetterEnd;
|
||||
|
||||
public interface Patterned {
|
||||
default String blockStatePattern(String name) {
|
||||
//Blockstates
|
||||
public final static Identifier BLOCK_STATES_PATTERN = BetterEnd.makeID("patterns/blockstate/pattern_block.json");
|
||||
public final static Identifier SLAB_STATES_PATTERN = BetterEnd.makeID("patterns/blockstate/pattern_slab.json");
|
||||
public final static Identifier STAIRS_STATES_PATTERN = BetterEnd.makeID("patterns/blockstate/pattern_stairs.json");
|
||||
public final static Identifier WALL_STATES_PATTERN = BetterEnd.makeID("patterns/blockstate/pattern_wall.json");
|
||||
public final static Identifier BUTTON_STATES_PATTERN = BetterEnd.makeID("patterns/blockstate/pattern_button.json");
|
||||
public final static Identifier PILLAR_STATES_PATTERN = BetterEnd.makeID("patterns/blockstate/pattern_pillar.json");
|
||||
public final static Identifier PLATE_STATES_PATTERN = BetterEnd.makeID("patterns/blockstate/pattern_pressure_plate.json");
|
||||
//Models
|
||||
public final static Identifier BASE_BLOCK_MODEL = BetterEnd.makeID("patterns/blockstate/pattern_block.json");
|
||||
public final static Identifier SLAB_BLOCK_MODEL = BetterEnd.makeID("patterns/block/pattern_slab.json");
|
||||
public final static Identifier STAIRS_MODEL = BetterEnd.makeID("patterns/block/pattern_stairs.json");
|
||||
public final static Identifier STAIRS_MODEL_INNER = BetterEnd.makeID("patterns/block/pattern_inner_stairs.json");
|
||||
public final static Identifier STAIRS_MODEL_OUTER = BetterEnd.makeID("patterns/block/pattern_outer_stairs.json");
|
||||
public final static Identifier WALL_POST_MODEL = BetterEnd.makeID("patterns/block/pattern_wall_post.json");
|
||||
public final static Identifier WALL_SIDE_MODEL = BetterEnd.makeID("patterns/block/pattern_wall_side.json");
|
||||
public final static Identifier WALL_SIDE_TALL_MODEL = BetterEnd.makeID("patterns/block/pattern_wall_side_tall.json");
|
||||
public final static Identifier WALL_ITEM_MODEL = BetterEnd.makeID("patterns/item/pattern_wall.json");
|
||||
public final static Identifier BUTTON_BLOCK_MODEL = BetterEnd.makeID("patterns/block/pattern_button.json");
|
||||
public final static Identifier BUTTON_PRESSED_MODEL = BetterEnd.makeID("patterns/block/pattern_button_pressed.json");
|
||||
public final static Identifier BUTTON_ITEM_MODEL = BetterEnd.makeID("patterns/item/pattern_button.json");
|
||||
public final static Identifier PILLAR_BLOCK_MODEL = BetterEnd.makeID("patterns/block/pattern_pillar.json");
|
||||
public final static Identifier PLATE_MODEL_UP = BetterEnd.makeID("patterns/block/pattern_pressure_plate_up.json");
|
||||
public final static Identifier PLATE_MODEL_DOWN = BetterEnd.makeID("patterns/block/pattern_pressure_plate_down.json");
|
||||
|
||||
default String getStatesPattern(Reader data, String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
default String modelPattern(String name) {
|
||||
default String getModelPattern(String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -27,15 +56,52 @@ public interface Patterned {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static String createJson(Identifier patternId, String name) {
|
||||
ResourceManager resourceManager = MinecraftClient.getInstance().getResourceManager();
|
||||
try (InputStream input = resourceManager.getResource(patternId).getInputStream()) {
|
||||
return new BufferedReader(new InputStreamReader(input, StandardCharsets.UTF_8))
|
||||
.lines()
|
||||
.collect(Collectors.joining()).replace("%name%", name);
|
||||
|
||||
} catch (Exception ex) {}
|
||||
|
||||
public static String createJson(Reader data, Identifier parent, String block) {
|
||||
try (BufferedReader buffer = new BufferedReader(data)) {
|
||||
return buffer.lines().collect(Collectors.joining())
|
||||
.replace("%parent%", parent.getPath())
|
||||
.replace("%block%", block);
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static String createJson(Identifier patternId, Identifier parent, String block) {
|
||||
ResourceManager resourceManager = MinecraftClient.getInstance().getResourceManager();
|
||||
try (InputStream input = resourceManager.getResource(patternId).getInputStream()) {
|
||||
return new BufferedReader(new InputStreamReader(input, StandardCharsets.UTF_8))
|
||||
.lines().collect(Collectors.joining())
|
||||
.replace("%parent%", parent.getPath())
|
||||
.replace("%block%", block);
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static String createJson(Identifier patternId, String texture, String block) {
|
||||
ResourceManager resourceManager = MinecraftClient.getInstance().getResourceManager();
|
||||
try (InputStream input = resourceManager.getResource(patternId).getInputStream()) {
|
||||
return new BufferedReader(new InputStreamReader(input, StandardCharsets.UTF_8))
|
||||
.lines().collect(Collectors.joining())
|
||||
.replace("%texture%", texture)
|
||||
.replace("%block%", block);
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static String createJson(Identifier patternId, String block, Map<String, String> textures) {
|
||||
ResourceManager resourceManager = MinecraftClient.getInstance().getResourceManager();
|
||||
try (InputStream input = resourceManager.getResource(patternId).getInputStream()) {
|
||||
String json = new BufferedReader(new InputStreamReader(input, StandardCharsets.UTF_8))
|
||||
.lines().collect(Collectors.joining())
|
||||
.replace("%block%", block);
|
||||
for (Entry<String, String> texture : textures.entrySet()) {
|
||||
json = json.replace(texture.getKey(), texture.getValue());
|
||||
}
|
||||
return json;
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package ru.betterend.mixin.client;
|
||||
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -12,8 +17,11 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.client.render.model.ModelLoader;
|
||||
import net.minecraft.client.render.model.json.JsonUnbakedModel;
|
||||
import net.minecraft.client.render.model.json.ModelVariantMap.DeserializationContext;
|
||||
import net.minecraft.resource.Resource;
|
||||
import net.minecraft.resource.ResourceManager;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.interfaces.IdentifiedContext;
|
||||
import ru.betterend.interfaces.Patterned;
|
||||
|
@ -21,28 +29,59 @@ import ru.betterend.interfaces.Patterned;
|
|||
@Mixin(ModelLoader.class)
|
||||
public class ModelLoaderMixin {
|
||||
|
||||
@Final
|
||||
@Shadow
|
||||
private DeserializationContext variantMapDeserializationContext;
|
||||
|
||||
@Inject(method = "loadModelFromJson", at = @At("HEAD"), cancellable = true)
|
||||
private void loadModelFromJson(Identifier id, CallbackInfoReturnable<JsonUnbakedModel> info) {
|
||||
if (id.getNamespace().equals(BetterEnd.MOD_ID) && id.getPath().contains("pattern")) {
|
||||
@Final
|
||||
@Shadow
|
||||
private ResourceManager resourceManager;
|
||||
|
||||
@Inject(method = "loadModelFromJson", cancellable = true, at = @At(
|
||||
value = "NEW",
|
||||
target = "net/minecraft/util/Identifier",
|
||||
shift = Shift.BEFORE))
|
||||
private void loadModelPattern(Identifier id, CallbackInfoReturnable<JsonUnbakedModel> info) {
|
||||
if (id.getNamespace().equals(BetterEnd.MOD_ID)) {
|
||||
Identifier modelId = new Identifier(id.getNamespace(), "models/" + id.getPath() + ".json");
|
||||
JsonUnbakedModel model;
|
||||
try (Resource resource = this.resourceManager.getResource(modelId)) {
|
||||
Reader reader = new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8);
|
||||
model = JsonUnbakedModel.deserialize(reader);
|
||||
model.id = id.toString();
|
||||
info.setReturnValue(model);
|
||||
info.cancel();
|
||||
} catch (Exception ex) {
|
||||
String data[] = id.getPath().split("/");
|
||||
if (data.length > 1) {
|
||||
Identifier blockId = new Identifier(id.getNamespace(), data[1]);
|
||||
Block block = Registry.BLOCK.get(blockId);
|
||||
if (block instanceof Patterned) {
|
||||
String pattern = ((Patterned) block).modelPattern(data[1]);
|
||||
info.setReturnValue(JsonUnbakedModel.deserialize(pattern));
|
||||
String pattern;
|
||||
if (id.getPath().contains("item")) {
|
||||
pattern = ((Patterned) block).getModelPattern(id.getPath());
|
||||
} else {
|
||||
if (data.length > 2) {
|
||||
pattern = ((Patterned) block).getModelPattern(data[2]);
|
||||
} else {
|
||||
pattern = ((Patterned) block).getModelPattern(data[1]);
|
||||
}
|
||||
}
|
||||
model = JsonUnbakedModel.deserialize(pattern);
|
||||
model.id = id.toString();
|
||||
info.setReturnValue(model);
|
||||
info.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "loadModel", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/render/model/json/ModelVariantMap$DeserializationContext;setStateFactory(Lnet/minecraft/state/StateManager;)V",
|
||||
shift = Shift.AFTER))
|
||||
private void loadModel(Identifier id, CallbackInfo info) {
|
||||
private void appendContextID(Identifier id, CallbackInfo info) {
|
||||
IdentifiedContext context = IdentifiedContext.class.cast(variantMapDeserializationContext);
|
||||
if (id.getNamespace().equals(BetterEnd.MOD_ID)) {
|
||||
context.setContextId(BetterEnd.makeID("pattern/" + id.getPath()));
|
||||
|
|
|
@ -34,7 +34,7 @@ public abstract class ModelVariantMapMixin {
|
|||
Block block = Registry.BLOCK.get(blockId);
|
||||
idContext.removeId();
|
||||
if (block instanceof Patterned) {
|
||||
String pattern = ((Patterned) block).blockStatePattern(data[1]);
|
||||
String pattern = ((Patterned) block).getStatesPattern(reader, data[1]);
|
||||
info.setReturnValue(deserialize(context, new StringReader(pattern)));
|
||||
info.cancel();
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.At.Shift;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
|
@ -24,8 +25,11 @@ public abstract class NamespaceResourceManagerMixin {
|
|||
@Shadow
|
||||
public abstract Resource getResource(Identifier id);
|
||||
|
||||
@Inject(method = "getAllResources", at = @At("HEAD"), cancellable = true)
|
||||
public void getAllResources(Identifier id, CallbackInfoReturnable<List<Resource>> info) {
|
||||
@Inject(method = "getAllResources", cancellable = true, at = @At(
|
||||
value = "NEW",
|
||||
target = "java/io/FileNotFoundException",
|
||||
shift = Shift.BEFORE))
|
||||
public void getStatesPattern(Identifier id, CallbackInfoReturnable<List<Resource>> info) {
|
||||
if (id.getNamespace().contains(BetterEnd.MOD_ID)) {
|
||||
String[] data = id.getPath().split("/");
|
||||
if (data.length > 1) {
|
||||
|
|
|
@ -22,7 +22,6 @@ import ru.betterend.blocks.BlockMossyGlowshroomHymenophore;
|
|||
import ru.betterend.blocks.BlockMossyGlowshroomSapling;
|
||||
import ru.betterend.blocks.BlockOre;
|
||||
import ru.betterend.blocks.BlockPath;
|
||||
import ru.betterend.blocks.BlockStone;
|
||||
import ru.betterend.blocks.BlockTerrain;
|
||||
import ru.betterend.blocks.BlockUmbrellaMoss;
|
||||
import ru.betterend.blocks.BlockUmbrellaMossTall;
|
||||
|
@ -30,10 +29,10 @@ import ru.betterend.blocks.EndStoneSmelter;
|
|||
import ru.betterend.blocks.EnderBlock;
|
||||
import ru.betterend.blocks.TerminiteBlock;
|
||||
import ru.betterend.blocks.basis.BlockGlowingFur;
|
||||
import ru.betterend.blocks.basis.BlockSlab;
|
||||
import ru.betterend.blocks.basis.BlockVine;
|
||||
import ru.betterend.blocks.complex.StoneMaterial;
|
||||
import ru.betterend.blocks.complex.WoodenMaterial;
|
||||
|
||||
import ru.betterend.tab.CreativeTab;
|
||||
|
||||
public class BlockRegistry {
|
||||
|
@ -49,8 +48,7 @@ public class BlockRegistry {
|
|||
public static final Block CHORUS_NYLIUM_PATH = registerBlock("chorus_nylium_path", new BlockPath(CHORUS_NYLIUM));
|
||||
|
||||
// Rocks //
|
||||
public static final Block FLAVOLITE = registerBlock("flavolite", new BlockStone(MaterialColor.SAND));
|
||||
public static final Block FLAVOLITE_SLAB = registerBlock("flavolite_slab", new BlockSlab(FLAVOLITE));
|
||||
public static final StoneMaterial FLAVOLITE = new StoneMaterial("flavolite", MaterialColor.SAND);
|
||||
public static final StoneMaterial VIOLECITE = new StoneMaterial("violecite", MaterialColor.PURPLE);
|
||||
|
||||
// Wooden Materials //
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%"
|
||||
"all": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/button",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
"texture": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "block/button_inventory",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/button_pressed",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
"texture": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/inner_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
"bottom": "betterend:block/%parent%",
|
||||
"side": "betterend:block/%parent%",
|
||||
"top": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/outer_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
"bottom": "betterend:block/%parent%",
|
||||
"side": "betterend:block/%parent%",
|
||||
"top": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"parent": "minecraft:block/cube_column",
|
||||
"textures": {
|
||||
"end": "betterend:block/%name%_pillar_top",
|
||||
"side": "betterend:block/%name%_pillar_side"
|
||||
"end": "betterend:block/%parent%_top",
|
||||
"side": "betterend:block/%parent%_side"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/pressure_plate_down",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
"texture": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/pressure_plate_up",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
"texture": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "minecraft:block/slab",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
"bottom": "betterend:block/%parent%",
|
||||
"side": "betterend:block/%parent%",
|
||||
"top": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_small_tiles"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
"bottom": "betterend:block/%parent%",
|
||||
"side": "betterend:block/%parent%",
|
||||
"top": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_tile"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/wall_inventory",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
"wall": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_post",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
"wall": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_side",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
"wall": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_side_tall",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
"wall": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%"
|
||||
"model": "betterend:pattern/%block%"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,115 +1,115 @@
|
|||
{
|
||||
"variants": {
|
||||
"face=ceiling,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"face=ceiling,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"model": "betterend:pattern/%block%/%block%_pressed",
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"face=ceiling,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"face=ceiling,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"model": "betterend:pattern/%block%/%block%_pressed",
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"face=ceiling,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"model": "betterend:pattern/%block%/%block%_pressed",
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"face=ceiling,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"model": "betterend:pattern/%block%/%block%_pressed",
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"model": "betterend:pattern/%block%/%block%_pressed",
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button"
|
||||
"model": "betterend:pattern/%block%"
|
||||
},
|
||||
"face=floor,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed"
|
||||
"model": "betterend:pattern/%block%/%block%_pressed"
|
||||
},
|
||||
"face=floor,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"y": 180
|
||||
},
|
||||
"face=floor,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"model": "betterend:pattern/%block%/%block%_pressed",
|
||||
"y": 180
|
||||
},
|
||||
"face=floor,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"y": 270
|
||||
},
|
||||
"face=floor,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"model": "betterend:pattern/%block%/%block%_pressed",
|
||||
"y": 270
|
||||
},
|
||||
"face=wall,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"face=wall,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"model": "betterend:pattern/%block%/%block%_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"face=wall,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"uvlock": true,
|
||||
"x": 90
|
||||
},
|
||||
"face=wall,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"model": "betterend:pattern/%block%/%block%_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90
|
||||
},
|
||||
"face=wall,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"face=wall,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"model": "betterend:pattern/%block%/%block%_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"face=wall,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 270
|
||||
},
|
||||
"face=wall,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"model": "betterend:pattern/%block%/%block%_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 270
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"variants": {
|
||||
"axis=x": { "model": "betterend:block/%name%_pillar", "x": 90, "y": 90 },
|
||||
"axis=y": { "model": "betterend:block/%name%_pillar" },
|
||||
"axis=z": { "model": "betterend:block/%name%_pillar", "x": 90 }
|
||||
"axis=x": { "model": "betterend:pattern/%block%", "x": 90, "y": 90 },
|
||||
"axis=y": { "model": "betterend:pattern/%block%" },
|
||||
"axis=z": { "model": "betterend:pattern/%block%", "x": 90 }
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"variants": {
|
||||
"powered=false": {
|
||||
"model": "betterend:block/%name%_pressure_plate_up"
|
||||
"model": "betterend:pattern/%block%/%block%_up"
|
||||
},
|
||||
"powered=true": {
|
||||
"model": "betterend:block/%name%_pressure_plate_down"
|
||||
"model": "betterend:pattern/%block%/%block%_down"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"variants": {
|
||||
"type=bottom": {
|
||||
"model": "betterend:pattern/%name%_slab"
|
||||
"model": "betterend:pattern/%block%"
|
||||
},
|
||||
"type=double": {
|
||||
"model": "betterend:block/%name%"
|
||||
"model": "betterend:block/%parent%"
|
||||
},
|
||||
"type=top": {
|
||||
"model": "betterend:pattern/%name%_slab",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_small_tiles"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,206 +1,206 @@
|
|||
{
|
||||
"variants": {
|
||||
"facing=east,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs"
|
||||
"model": "betterend:pattern/%block%/%block%_inner"
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs"
|
||||
"model": "betterend:pattern/%block%/%block%_outer"
|
||||
},
|
||||
"facing=east,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs"
|
||||
"model": "betterend:pattern/%block%"
|
||||
},
|
||||
"facing=east,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs"
|
||||
"model": "betterend:pattern/%block%/%block%_inner"
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs"
|
||||
"model": "betterend:pattern/%block%/%block%_outer"
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_inner",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"model": "betterend:pattern/%block%/%block%_outer",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"model": "betterend:pattern/%block%",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_tile"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
"up": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_post"
|
||||
"model": "betterend:pattern/%block%/%block%_post"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
|||
"north": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"model": "betterend:pattern/%block%/%block%_side",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
|
@ -22,7 +22,7 @@
|
|||
"east": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"model": "betterend:pattern/%block%/%block%_side",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
|||
"south": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"model": "betterend:pattern/%block%/%block%_side",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
|
@ -42,7 +42,7 @@
|
|||
"west": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"model": "betterend:pattern/%block%/%block%_side",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
|
@ -52,7 +52,7 @@
|
|||
"north": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"model": "betterend:pattern/%block%/%block%_side_tall",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
|
@ -61,7 +61,7 @@
|
|||
"east": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"model": "betterend:pattern/%block%/%block%_side_tall",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
|
@ -71,7 +71,7 @@
|
|||
"south": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"model": "betterend:pattern/%block%/%block%_side_tall",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
|
@ -81,7 +81,7 @@
|
|||
"west": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"model": "betterend:pattern/%block%/%block%_side_tall",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_brick_slab"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_brick_stairs"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_brick_wall_inventory"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_bricks"
|
||||
}
|
|
@ -1,3 +1,6 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_button_inventory"
|
||||
"parent": "block/button_inventory",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_pillar"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_pressure_plate_up"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_slab"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_small_tiles"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_stairs"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_tile"
|
||||
}
|
|
@ -1,3 +1,6 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_wall_inventory"
|
||||
"parent": "minecraft:block/wall_inventory",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 230 B |
Loading…
Add table
Add a link
Reference in a new issue