update readme and make blueprints survival friendly
This commit is contained in:
@@ -0,0 +1,130 @@
|
||||
package dev.tggamesyt.szar.client.mixin;
|
||||
|
||||
import dev.tggamesyt.szar.*;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.particle.BlockDustParticle;
|
||||
import net.minecraft.client.particle.ParticleManager;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Box;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
import net.minecraft.world.World;
|
||||
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.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(ParticleManager.class)
|
||||
public class ParticleManagerMixin {
|
||||
|
||||
@Shadow
|
||||
public ClientWorld world;
|
||||
|
||||
@Inject(method = "addBlockBreakParticles", at = @At("HEAD"), cancellable = true)
|
||||
private void redirectBreakParticles(BlockPos pos, BlockState state, CallbackInfo ci) {
|
||||
if (world == null) return;
|
||||
|
||||
if (!(state.getBlock() instanceof BlueprintStairsBlock ||
|
||||
state.getBlock() instanceof BlueprintSlabBlock ||
|
||||
state.getBlock() instanceof BlueprintDoorBlock ||
|
||||
state.getBlock() instanceof BlueprintTrapDoorBlock ||
|
||||
state.getBlock() instanceof BlueprintWallBlock ||
|
||||
state.getBlock() instanceof BlueprintFenceBlock)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var be = world.getBlockEntity(pos);
|
||||
if (!(be instanceof BlueprintBlockEntity blueprint) || !blueprint.hasStoredBlock()) return;
|
||||
|
||||
BlockState storedState = Registries.BLOCK
|
||||
.get(new Identifier(blueprint.getStoredBlockId()))
|
||||
.getDefaultState();
|
||||
|
||||
ci.cancel();
|
||||
|
||||
// ✅ USE BLUEPRINT SHAPE, NOT STORED
|
||||
var shape = state.getOutlineShape(world, pos);
|
||||
|
||||
shape.forEachBox((minX, minY, minZ, maxX, maxY, maxZ) -> {
|
||||
double dx = Math.min(1.0, maxX - minX);
|
||||
double dy = Math.min(1.0, maxY - minY);
|
||||
double dz = Math.min(1.0, maxZ - minZ);
|
||||
|
||||
int ix = Math.max(2, net.minecraft.util.math.MathHelper.ceil(dx / 0.25));
|
||||
int iy = Math.max(2, net.minecraft.util.math.MathHelper.ceil(dy / 0.25));
|
||||
int iz = Math.max(2, net.minecraft.util.math.MathHelper.ceil(dz / 0.25));
|
||||
|
||||
for (int x = 0; x < ix; x++) {
|
||||
for (int y = 0; y < iy; y++) {
|
||||
for (int z = 0; z < iz; z++) {
|
||||
|
||||
double fx = (x + 0.5) / ix;
|
||||
double fy = (y + 0.5) / iy;
|
||||
double fz = (z + 0.5) / iz;
|
||||
|
||||
double px = fx * dx + minX;
|
||||
double py = fy * dy + minY;
|
||||
double pz = fz * dz + minZ;
|
||||
|
||||
((ParticleManager)(Object)this).addParticle(
|
||||
new BlockDustParticle(
|
||||
world,
|
||||
pos.getX() + px,
|
||||
pos.getY() + py,
|
||||
pos.getZ() + pz,
|
||||
fx - 0.5,
|
||||
fy - 0.5,
|
||||
fz - 0.5,
|
||||
storedState, // ✅ texture comes from stored
|
||||
pos
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Inject(method = "addBlockBreakingParticles", at = @At("HEAD"), cancellable = true)
|
||||
private void redirectBreakingParticles(BlockPos pos, Direction direction, CallbackInfo ci) {
|
||||
if (world == null) return;
|
||||
|
||||
BlockState state = world.getBlockState(pos);
|
||||
if (!(state.getBlock() instanceof BlueprintStairsBlock ||
|
||||
state.getBlock() instanceof BlueprintSlabBlock ||
|
||||
state.getBlock() instanceof BlueprintDoorBlock ||
|
||||
state.getBlock() instanceof BlueprintTrapDoorBlock ||
|
||||
state.getBlock() instanceof BlueprintWallBlock ||
|
||||
state.getBlock() instanceof BlueprintFenceBlock)) {return;}
|
||||
|
||||
var be = world.getBlockEntity(pos);
|
||||
if (!(be instanceof BlueprintBlockEntity blueprint) || !blueprint.hasStoredBlock()) return;
|
||||
|
||||
BlockState storedState = Registries.BLOCK
|
||||
.get(new Identifier(blueprint.getStoredBlockId()))
|
||||
.getDefaultState();
|
||||
ci.cancel();
|
||||
|
||||
Box box = storedState.getOutlineShape(world, pos).getBoundingBox();
|
||||
int i = pos.getX(), j = pos.getY(), k = pos.getZ();
|
||||
Random random = Random.create();
|
||||
double d = i + random.nextDouble() * (box.maxX - box.minX - 0.2) + 0.1 + box.minX;
|
||||
double e = j + random.nextDouble() * (box.maxY - box.minY - 0.2) + 0.1 + box.minY;
|
||||
double g = k + random.nextDouble() * (box.maxZ - box.minZ - 0.2) + 0.1 + box.minZ;
|
||||
if (direction == Direction.DOWN) e = j + box.minY - 0.1;
|
||||
if (direction == Direction.UP) e = j + box.maxY + 0.1;
|
||||
if (direction == Direction.NORTH) g = k + box.minZ - 0.1;
|
||||
if (direction == Direction.SOUTH) g = k + box.maxZ + 0.1;
|
||||
if (direction == Direction.WEST) d = i + box.minX - 0.1;
|
||||
if (direction == Direction.EAST) d = i + box.maxX + 0.1;
|
||||
|
||||
((ParticleManager)(Object)this).addParticle(
|
||||
new BlockDustParticle(world, d, e, g, 0, 0, 0, storedState, pos).move(0.2f).scale(0.6f)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@
|
||||
"MouseMixin",
|
||||
"PackMixin",
|
||||
"PackScreenCloseMixin",
|
||||
"ParticleManagerMixin",
|
||||
"PlayerEntityRendererMixin",
|
||||
"PlayerHeldItemFeatureRendererMixin",
|
||||
"PlayerModelMixin",
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
package dev.tggamesyt.szar;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.DoorBlock;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.block.enums.DoubleBlockHalf;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockView;
|
||||
@@ -35,6 +39,14 @@ public class BlueprintBehavior {
|
||||
}
|
||||
|
||||
if (!held.isEmpty() && held.getItem() instanceof BlockItem blockItem && !blueprint.hasStoredBlock()) {
|
||||
if (blockItem.getBlock() instanceof BlueprintStairsBlock ||
|
||||
blockItem.getBlock() instanceof BlueprintSlabBlock ||
|
||||
blockItem.getBlock() instanceof BlueprintDoorBlock ||
|
||||
blockItem.getBlock() instanceof BlueprintTrapDoorBlock ||
|
||||
blockItem.getBlock() instanceof BlueprintWallBlock ||
|
||||
blockItem.getBlock() instanceof BlueprintFenceBlock) {
|
||||
return ActionResult.PASS;
|
||||
}
|
||||
String id = Registries.BLOCK.getId(blockItem.getBlock()).toString();
|
||||
blueprint.setStoredBlock(id);
|
||||
if (!player.isCreative()) held.decrement(1);
|
||||
@@ -50,12 +62,17 @@ public class BlueprintBehavior {
|
||||
public static float calcBreakingDelta(BlockState state, PlayerEntity player,
|
||||
BlockView world, BlockPos pos, float baseHardness) {
|
||||
BlockEntity be = world.getBlockEntity(pos);
|
||||
|
||||
if (!(be instanceof BlueprintBlockEntity blueprint) || !blueprint.hasStoredBlock()) {
|
||||
return baseHardness;
|
||||
}
|
||||
float hardness = blueprint.getStoredHardness();
|
||||
if (hardness < 0) return 0f; // unbreakable
|
||||
return player.getBlockBreakingSpeed(state) / hardness / 30f;
|
||||
|
||||
BlockState storedState = Registries.BLOCK
|
||||
.get(new Identifier(blueprint.getStoredBlockId()))
|
||||
.getDefaultState();
|
||||
|
||||
// Fully delegate to vanilla logic
|
||||
return storedState.calcBlockBreakingDelta(player, world, pos);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,11 +80,28 @@ public class BlueprintBehavior {
|
||||
*/
|
||||
public static void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||
BlockEntity be = world.getBlockEntity(pos);
|
||||
if (!(be instanceof BlueprintBlockEntity blueprint) || !blueprint.hasStoredBlock()) return;
|
||||
if (!player.isCreative()) {
|
||||
ItemStack drop = blueprint.getStoredDrop();
|
||||
if (!drop.isEmpty()) {
|
||||
dropStack(world, pos, drop);
|
||||
|
||||
if (!(be instanceof BlueprintBlockEntity blueprint) || !blueprint.hasStoredBlock()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Drop stored block
|
||||
if (!world.isClient) {
|
||||
Block.dropStack(world, pos, blueprint.getStoredDrop());
|
||||
}
|
||||
|
||||
// Handle doors (break other half properly)
|
||||
if (state.getBlock() instanceof DoorBlock) {
|
||||
DoubleBlockHalf half = state.get(DoorBlock.HALF);
|
||||
BlockPos otherPos = (half == DoubleBlockHalf.LOWER) ? pos.up() : pos.down();
|
||||
|
||||
BlockState otherState = world.getBlockState(otherPos);
|
||||
BlockEntity otherBe = world.getBlockEntity(otherPos);
|
||||
|
||||
if (otherBe instanceof BlueprintBlockEntity otherBlueprint && otherBlueprint.hasStoredBlock()) {
|
||||
if (!world.isClient) {
|
||||
Block.dropStack(world, otherPos, otherBlueprint.getStoredDrop());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,9 @@ public class BlueprintBlockEntity extends BlockEntity {
|
||||
public void clearStoredBlock() {
|
||||
this.storedBlockId = null;
|
||||
markDirty();
|
||||
if (world != null && !world.isClient) {
|
||||
world.updateListeners(pos, getCachedState(), getCachedState(), 3);
|
||||
}
|
||||
}
|
||||
|
||||
/** Gets the hardness of the stored block, or default if none. */
|
||||
|
||||
@@ -13,6 +13,8 @@ import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import static dev.tggamesyt.szar.Szar.MOD_ID;
|
||||
|
||||
public class BlueprintBlocks {
|
||||
|
||||
private static AbstractBlock.Settings settings() {
|
||||
@@ -20,29 +22,33 @@ public class BlueprintBlocks {
|
||||
.mapColor(MapColor.TERRACOTTA_LIGHT_BLUE)
|
||||
.strength(1.0f);
|
||||
}
|
||||
|
||||
public static final Item BLUEPRINT = Registry.register(
|
||||
Registries.ITEM,
|
||||
new Identifier(MOD_ID, "blueprint"),
|
||||
new Item(new Item.Settings())
|
||||
);
|
||||
public static final BlueprintStairsBlock BLUEPRINT_STAIRS =
|
||||
Registry.register(Registries.BLOCK, new Identifier(Szar.MOD_ID, "blueprint_stairs"),
|
||||
Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "blueprint_stairs"),
|
||||
new BlueprintStairsBlock(settings()));
|
||||
|
||||
public static final BlueprintSlabBlock BLUEPRINT_SLAB =
|
||||
Registry.register(Registries.BLOCK, new Identifier(Szar.MOD_ID, "blueprint_slab"),
|
||||
Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "blueprint_slab"),
|
||||
new BlueprintSlabBlock(settings()));
|
||||
|
||||
public static final BlueprintDoorBlock BLUEPRINT_DOOR =
|
||||
Registry.register(Registries.BLOCK, new Identifier(Szar.MOD_ID, "blueprint_door"),
|
||||
Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "blueprint_door"),
|
||||
new BlueprintDoorBlock(settings()));
|
||||
|
||||
public static final BlueprintTrapDoorBlock BLUEPRINT_TRAPDOOR =
|
||||
Registry.register(Registries.BLOCK, new Identifier(Szar.MOD_ID, "blueprint_trapdoor"),
|
||||
Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "blueprint_trapdoor"),
|
||||
new BlueprintTrapDoorBlock(settings()));
|
||||
|
||||
public static final BlueprintWallBlock BLUEPRINT_WALL =
|
||||
Registry.register(Registries.BLOCK, new Identifier(Szar.MOD_ID, "blueprint_wall"),
|
||||
Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "blueprint_wall"),
|
||||
new BlueprintWallBlock(AbstractBlock.Settings.copy(Blocks.STONE_BRICK_WALL)));
|
||||
|
||||
public static final BlueprintFenceBlock BLUEPRINT_FENCE =
|
||||
Registry.register(Registries.BLOCK, new Identifier(Szar.MOD_ID, "blueprint_fence"),
|
||||
Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "blueprint_fence"),
|
||||
new BlueprintFenceBlock(AbstractBlock.Settings.copy(Blocks.OAK_FENCE)));
|
||||
|
||||
public static final BlockEntityType<BlueprintBlockEntity> BLUEPRINT_STAIRS_BE_TYPE;
|
||||
@@ -54,51 +60,51 @@ public class BlueprintBlocks {
|
||||
|
||||
static {
|
||||
BLUEPRINT_STAIRS_BE_TYPE = Registry.register(Registries.BLOCK_ENTITY_TYPE,
|
||||
new Identifier(Szar.MOD_ID, "blueprint_stairs_be"),
|
||||
new Identifier(MOD_ID, "blueprint_stairs_be"),
|
||||
FabricBlockEntityTypeBuilder.create(BlueprintBlockEntity::new, BLUEPRINT_STAIRS).build());
|
||||
|
||||
BLUEPRINT_SLAB_BE_TYPE = Registry.register(Registries.BLOCK_ENTITY_TYPE,
|
||||
new Identifier(Szar.MOD_ID, "blueprint_slab_be"),
|
||||
new Identifier(MOD_ID, "blueprint_slab_be"),
|
||||
FabricBlockEntityTypeBuilder.create(BlueprintBlockEntity::new, BLUEPRINT_SLAB).build());
|
||||
|
||||
BLUEPRINT_DOOR_BE_TYPE = Registry.register(Registries.BLOCK_ENTITY_TYPE,
|
||||
new Identifier(Szar.MOD_ID, "blueprint_door_be"),
|
||||
new Identifier(MOD_ID, "blueprint_door_be"),
|
||||
FabricBlockEntityTypeBuilder.create(BlueprintBlockEntity::new, BLUEPRINT_DOOR).build());
|
||||
|
||||
BLUEPRINT_TRAPDOOR_BE_TYPE = Registry.register(Registries.BLOCK_ENTITY_TYPE,
|
||||
new Identifier(Szar.MOD_ID, "blueprint_trapdoor_be"),
|
||||
new Identifier(MOD_ID, "blueprint_trapdoor_be"),
|
||||
FabricBlockEntityTypeBuilder.create(BlueprintBlockEntity::new, BLUEPRINT_TRAPDOOR).build());
|
||||
|
||||
BLUEPRINT_WALL_BE_TYPE = Registry.register(Registries.BLOCK_ENTITY_TYPE,
|
||||
new Identifier(Szar.MOD_ID, "blueprint_wall_be"),
|
||||
new Identifier(MOD_ID, "blueprint_wall_be"),
|
||||
FabricBlockEntityTypeBuilder.create(BlueprintBlockEntity::new, BLUEPRINT_WALL).build());
|
||||
|
||||
BLUEPRINT_FENCE_BE_TYPE = Registry.register(Registries.BLOCK_ENTITY_TYPE,
|
||||
new Identifier(Szar.MOD_ID, "blueprint_fence_be"),
|
||||
new Identifier(MOD_ID, "blueprint_fence_be"),
|
||||
FabricBlockEntityTypeBuilder.create(BlueprintBlockEntity::new, BLUEPRINT_FENCE).build());
|
||||
}
|
||||
public static final BlockItem BLUEPRINT_STAIRS_ITEM = Registry.register(Registries.ITEM,
|
||||
new Identifier(Szar.MOD_ID, "blueprint_stairs"),
|
||||
new Identifier(MOD_ID, "blueprint_stairs"),
|
||||
new BlockItem(BLUEPRINT_STAIRS, new Item.Settings()));
|
||||
|
||||
public static final BlockItem BLUEPRINT_SLAB_ITEM = Registry.register(Registries.ITEM,
|
||||
new Identifier(Szar.MOD_ID, "blueprint_slab"),
|
||||
new Identifier(MOD_ID, "blueprint_slab"),
|
||||
new BlockItem(BLUEPRINT_SLAB, new Item.Settings()));
|
||||
|
||||
public static final BlockItem BLUEPRINT_DOOR_ITEM = Registry.register(Registries.ITEM,
|
||||
new Identifier(Szar.MOD_ID, "blueprint_door"),
|
||||
new Identifier(MOD_ID, "blueprint_door"),
|
||||
new BlockItem(BLUEPRINT_DOOR, new Item.Settings()));
|
||||
|
||||
public static final BlockItem BLUEPRINT_TRAPDOOR_ITEM = Registry.register(Registries.ITEM,
|
||||
new Identifier(Szar.MOD_ID, "blueprint_trapdoor"),
|
||||
new Identifier(MOD_ID, "blueprint_trapdoor"),
|
||||
new BlockItem(BLUEPRINT_TRAPDOOR, new Item.Settings()));
|
||||
|
||||
public static final BlockItem BLUEPRINT_WALL_ITEM = Registry.register(Registries.ITEM,
|
||||
new Identifier(Szar.MOD_ID, "blueprint_wall"),
|
||||
new Identifier(MOD_ID, "blueprint_wall"),
|
||||
new BlockItem(BLUEPRINT_WALL, new Item.Settings()));
|
||||
|
||||
public static final BlockItem BLUEPRINT_FENCE_ITEM = Registry.register(Registries.ITEM,
|
||||
new Identifier(Szar.MOD_ID, "blueprint_fence"),
|
||||
new Identifier(MOD_ID, "blueprint_fence"),
|
||||
new BlockItem(BLUEPRINT_FENCE, new Item.Settings()));
|
||||
public static void init() {} // just call this to trigger class loading
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.block.WallBlock;
|
||||
|
||||
public class BlueprintWallBlock extends WallBlock implements BlockEntityProvider {
|
||||
|
||||
|
||||
@@ -366,7 +366,7 @@ public class Szar implements ModInitializer {
|
||||
boolean showRacist = !ServerConfig.get("racist");
|
||||
boolean showGambling = !ServerConfig.get("gambling");
|
||||
boolean showNsfw = !ServerConfig.get("nsfw");
|
||||
// random ahh silly stuff
|
||||
// memes
|
||||
entries.add(Szar.POPTART);
|
||||
entries.add(Szar.NYAN_SPAWNEGG);
|
||||
entries.add(Szar.BAITER_DISC);
|
||||
@@ -374,6 +374,8 @@ public class Szar implements ModInitializer {
|
||||
entries.add(Szar.EFN_DISK);
|
||||
entries.add(Szar.FIRTANA);
|
||||
entries.add(Szar.HELLO_DISC);
|
||||
entries.add(Szar.KEBAB);
|
||||
// backrooms
|
||||
entries.add(Szar.TRACKER_BLOCK_ITEM);
|
||||
entries.add(Szar.PORTAL_BLOCK_ITEM);
|
||||
entries.add(Szar.WALL_ITEM);
|
||||
@@ -384,15 +386,15 @@ public class Szar implements ModInitializer {
|
||||
entries.add(Szar.BEAN);
|
||||
entries.add(Szar.CAN_OF_BEANS);
|
||||
entries.add(Szar.ALMOND_WATER);
|
||||
entries.add(Szar.KEBAB);
|
||||
|
||||
// blueprint stuff
|
||||
entries.add(BlueprintBlocks.BLUEPRINT);
|
||||
entries.add(BlueprintBlocks.BLUEPRINT_DOOR_ITEM);
|
||||
entries.add(BlueprintBlocks.BLUEPRINT_TRAPDOOR_ITEM);
|
||||
entries.add(BlueprintBlocks.BLUEPRINT_FENCE_ITEM);
|
||||
entries.add(BlueprintBlocks.BLUEPRINT_SLAB_ITEM);
|
||||
entries.add(BlueprintBlocks.BLUEPRINT_WALL_ITEM);
|
||||
entries.add(BlueprintBlocks.BLUEPRINT_STAIRS_ITEM);
|
||||
|
||||
// board games
|
||||
entries.add(Szar.TIC_TAC_TOE_ITEM);
|
||||
entries.add(Szar.CONNECT_FOUR_ITEM);
|
||||
entries.add(Szar.CHESS_ITEM);
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
{
|
||||
"multipart": [
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_post" } },
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_side", "uvlock": true } },
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_side", "y": 90, "uvlock": true } },
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_side", "y": 180, "uvlock": true } },
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_side", "y": 270, "uvlock": true } }
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_post" },
|
||||
"when": { "up": "true" } },
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_side", "uvlock": true },
|
||||
"when": { "north": "low" } },
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_side", "y": 90, "uvlock": true },
|
||||
"when": { "east": "low" } },
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_side", "y": 180, "uvlock": true },
|
||||
"when": { "south": "low" } },
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_side", "y": 270, "uvlock": true },
|
||||
"when": { "west": "low" } },
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_side_tall", "uvlock": true },
|
||||
"when": { "north": "tall" } },
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_side_tall", "y": 90, "uvlock": true },
|
||||
"when": { "east": "tall" } },
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_side_tall", "y": 180, "uvlock": true },
|
||||
"when": { "south": "tall" } },
|
||||
{ "apply": { "model": "szar:block/blueprint_wall_side_tall", "y": 270, "uvlock": true },
|
||||
"when": { "west": "tall" } }
|
||||
]
|
||||
}
|
||||
@@ -197,5 +197,6 @@
|
||||
"block.szar.blueprint_door": "Blueprint Door",
|
||||
"block.szar.blueprint_trapdoor": "Blueprint Trapdoor",
|
||||
"block.szar.blueprint_wall": "Blueprint Wall",
|
||||
"block.szar.blueprint_fence": "Blueprint Fence"
|
||||
"block.szar.blueprint_fence": "Blueprint Fence",
|
||||
"item.szar.blueprint": "Blueprint"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/fence_inventory",
|
||||
"textures": {
|
||||
"texture": "szar:block/blueprint"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/wall_inventory",
|
||||
"textures": {
|
||||
"wall": "szar:block/blueprint"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "szar:item/blueprint"
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
{ "parent": "minecraft:item/generated", "textures": { "layer0": "szar:block/blueprint" } }
|
||||
{ "parent": "minecraft:item/generated", "textures": { "layer0": "szar:block/blueprint_door" } }
|
||||
@@ -1 +1 @@
|
||||
{ "parent": "szar:block/blueprint_fence_post" }
|
||||
{ "parent": "szar:block/blueprint_fence_inventory" }
|
||||
@@ -1 +1 @@
|
||||
{ "parent": "szar:block/blueprint_wall_post" }
|
||||
{ "parent": "szar:block/blueprint_wall_inventory" }
|
||||
BIN
src/main/resources/assets/szar/textures/block/blueprint_door.png
Normal file
BIN
src/main/resources/assets/szar/textures/block/blueprint_door.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 984 B |
Binary file not shown.
|
Before Width: | Height: | Size: 756 B After Width: | Height: | Size: 854 B |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"szar:blueprint_fence"
|
||||
]
|
||||
}
|
||||
6
src/main/resources/data/minecraft/tags/blocks/walls.json
Normal file
6
src/main/resources/data/minecraft/tags/blocks/walls.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"szar:blueprint_wall"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"szar:blueprint_fence"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "szar:blueprint_door"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "szar:blueprint_fence"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "szar:blueprint_slab",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_count",
|
||||
"count": {
|
||||
"type": "minecraft:block_state_property",
|
||||
"block": "szar:blueprint_slab",
|
||||
"property": "type",
|
||||
"values": {
|
||||
"double": 2,
|
||||
"bottom": 1,
|
||||
"top": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "szar:blueprint_stairs"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "szar:blueprint_trapdoor"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "szar:blueprint_wall"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
20
src/main/resources/data/szar/recipes/blueprint.json
Normal file
20
src/main/resources/data/szar/recipes/blueprint.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
" B ",
|
||||
"BPB",
|
||||
" B "
|
||||
],
|
||||
"key": {
|
||||
"B": {
|
||||
"tag": "szar:blue"
|
||||
},
|
||||
"P": {
|
||||
"item": "minecraft:paper"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "szar:blueprint",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
17
src/main/resources/data/szar/recipes/blueprint_door.json
Normal file
17
src/main/resources/data/szar/recipes/blueprint_door.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"BB",
|
||||
"BB",
|
||||
"BB"
|
||||
],
|
||||
"key": {
|
||||
"B": {
|
||||
"item": "szar:blueprint"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "szar:blueprint_door",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
19
src/main/resources/data/szar/recipes/blueprint_fence.json
Normal file
19
src/main/resources/data/szar/recipes/blueprint_fence.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"BDB",
|
||||
"BDB"
|
||||
],
|
||||
"key": {
|
||||
"B": {
|
||||
"item": "szar:blueprint"
|
||||
},
|
||||
"D": {
|
||||
"tag": "szar:blue"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "szar:blueprint_fence",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
15
src/main/resources/data/szar/recipes/blueprint_slabs.json
Normal file
15
src/main/resources/data/szar/recipes/blueprint_slabs.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"BBB"
|
||||
],
|
||||
"key": {
|
||||
"B": {
|
||||
"item": "szar:blueprint"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "szar:blueprint_slab",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
17
src/main/resources/data/szar/recipes/blueprint_stairs.json
Normal file
17
src/main/resources/data/szar/recipes/blueprint_stairs.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"B ",
|
||||
"BB ",
|
||||
"BBB"
|
||||
],
|
||||
"key": {
|
||||
"B": {
|
||||
"item": "szar:blueprint"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "szar:blueprint_stairs",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
16
src/main/resources/data/szar/recipes/blueprint_trapdoor.json
Normal file
16
src/main/resources/data/szar/recipes/blueprint_trapdoor.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"BB",
|
||||
"BB"
|
||||
],
|
||||
"key": {
|
||||
"B": {
|
||||
"item": "szar:blueprint"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "szar:blueprint_trapdoor",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
16
src/main/resources/data/szar/recipes/blueprint_wall.json
Normal file
16
src/main/resources/data/szar/recipes/blueprint_wall.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"BBB",
|
||||
"BBB"
|
||||
],
|
||||
"key": {
|
||||
"B": {
|
||||
"item": "szar:blueprint"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "szar:blueprint_wall",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
8
src/main/resources/data/szar/tags/items/blue.json
Normal file
8
src/main/resources/data/szar/tags/items/blue.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:light_blue_dye",
|
||||
"minecraft:cyan_dye",
|
||||
"minecraft:blue_dye"
|
||||
]
|
||||
}
|
||||
@@ -7,4 +7,5 @@ accessible field net/minecraft/server/network/ServerPlayerInteractionManager pla
|
||||
accessible method net/minecraft/client/render/entity/LivingEntityRenderer addFeature (Lnet/minecraft/client/render/entity/feature/FeatureRenderer;)Z
|
||||
accessible field net/minecraft/client/render/entity/EntityRenderDispatcher renderers Ljava/util/Map;
|
||||
accessible method net/minecraft/world/GameRules$BooleanRule create (ZLjava/util/function/BiConsumer;)Lnet/minecraft/world/GameRules$Type;
|
||||
accessible method net/minecraft/client/render/block/BlockModelRenderer renderQuad (Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/client/render/VertexConsumer;Lnet/minecraft/client/util/math/MatrixStack$Entry;Lnet/minecraft/client/render/model/BakedQuad;FFFFIIIII)V
|
||||
accessible method net/minecraft/client/render/block/BlockModelRenderer renderQuad (Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/client/render/VertexConsumer;Lnet/minecraft/client/util/math/MatrixStack$Entry;Lnet/minecraft/client/render/model/BakedQuad;FFFFIIIII)V
|
||||
accessible field net/minecraft/client/particle/ParticleManager world Lnet/minecraft/client/world/ClientWorld;
|
||||
Reference in New Issue
Block a user