blueprint
This commit is contained in:
@@ -6,7 +6,7 @@ minecraft_version=1.20.1
|
|||||||
yarn_mappings=1.20.1+build.10
|
yarn_mappings=1.20.1+build.10
|
||||||
loader_version=0.18.3
|
loader_version=0.18.3
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=26.3.23
|
mod_version=26.3.25
|
||||||
maven_group=dev.tggamesyt
|
maven_group=dev.tggamesyt
|
||||||
archives_base_name=szar
|
archives_base_name=szar
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|||||||
@@ -0,0 +1,102 @@
|
|||||||
|
package dev.tggamesyt.szar.client;
|
||||||
|
|
||||||
|
import dev.tggamesyt.szar.BlueprintBlockEntity;
|
||||||
|
import net.minecraft.block.BlockRenderType;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
|
import net.minecraft.client.render.block.BlockRenderManager;
|
||||||
|
import net.minecraft.client.render.block.entity.BlockEntityRenderer;
|
||||||
|
import net.minecraft.client.render.block.entity.BlockEntityRendererFactory;
|
||||||
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.util.math.random.Random;
|
||||||
|
|
||||||
|
public class BlueprintBlockEntityRenderer implements BlockEntityRenderer<BlueprintBlockEntity> {
|
||||||
|
|
||||||
|
public BlueprintBlockEntityRenderer(BlockEntityRendererFactory.Context ctx) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render(BlueprintBlockEntity entity, float tickDelta, MatrixStack matrices,
|
||||||
|
VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||||
|
if (!entity.hasStoredBlock()) return;
|
||||||
|
|
||||||
|
String storedId = entity.getStoredBlockId();
|
||||||
|
if (storedId == null) return;
|
||||||
|
|
||||||
|
var block = Registries.BLOCK.get(new Identifier(storedId));
|
||||||
|
if (block == null) return;
|
||||||
|
|
||||||
|
BlockState storedState = block.getDefaultState();
|
||||||
|
if (storedState.getRenderType() == BlockRenderType.INVISIBLE) return;
|
||||||
|
|
||||||
|
// Get the shape/state of the blueprint block itself
|
||||||
|
BlockState blueprintState = entity.getCachedState();
|
||||||
|
|
||||||
|
// We want to render the stored block's TEXTURE but on the blueprint block's SHAPE.
|
||||||
|
// The way to do this: find the model for the blueprint block shape,
|
||||||
|
// but swap in the stored block's sprite via a custom render layer.
|
||||||
|
// Simplest approach: render the blueprint block's model with the stored block's
|
||||||
|
// textures by remapping the sprite.
|
||||||
|
|
||||||
|
BlockRenderManager renderer = MinecraftClient.getInstance().getBlockRenderManager();
|
||||||
|
|
||||||
|
matrices.push();
|
||||||
|
|
||||||
|
// Render the blueprint shape using the stored block's texture
|
||||||
|
// by temporarily using the stored block's model sprites on our shape
|
||||||
|
renderWithStoredTexture(entity, blueprintState, storedState, matrices, vertexConsumers, light, overlay, renderer);
|
||||||
|
|
||||||
|
matrices.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void renderWithStoredTexture(BlueprintBlockEntity entity, BlockState blueprintState,
|
||||||
|
BlockState storedState, MatrixStack matrices,
|
||||||
|
VertexConsumerProvider vertexConsumers, int light, int overlay,
|
||||||
|
BlockRenderManager renderer) {
|
||||||
|
// Get the first (main) sprite from the stored block's model
|
||||||
|
var storedModel = renderer.getModel(storedState);
|
||||||
|
var blueprintModel = renderer.getModel(blueprintState);
|
||||||
|
|
||||||
|
var sprites = storedModel.getParticleSprite(); // main texture of stored block
|
||||||
|
|
||||||
|
// Render blueprint model quads, replacing its texture with stored block's sprite
|
||||||
|
var random = Random.create();
|
||||||
|
random.setSeed(42L);
|
||||||
|
|
||||||
|
var bufferSource = vertexConsumers;
|
||||||
|
var layer = net.minecraft.client.render.RenderLayers.getBlockLayer(blueprintState);
|
||||||
|
var consumer = bufferSource.getBuffer(layer);
|
||||||
|
|
||||||
|
for (var direction : new net.minecraft.util.math.Direction[]{
|
||||||
|
null,
|
||||||
|
net.minecraft.util.math.Direction.UP,
|
||||||
|
net.minecraft.util.math.Direction.DOWN,
|
||||||
|
net.minecraft.util.math.Direction.NORTH,
|
||||||
|
net.minecraft.util.math.Direction.SOUTH,
|
||||||
|
net.minecraft.util.math.Direction.EAST,
|
||||||
|
net.minecraft.util.math.Direction.WEST
|
||||||
|
}) {
|
||||||
|
random.setSeed(42L);
|
||||||
|
var quads = blueprintModel.getQuads(blueprintState, direction, random);
|
||||||
|
for (var quad : quads) {
|
||||||
|
// Emit the quad but with the stored block's sprite UV remapped
|
||||||
|
emitQuadWithSprite(consumer, matrices, quad, sprites, light, overlay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void emitQuadWithSprite(net.minecraft.client.render.VertexConsumer consumer,
|
||||||
|
MatrixStack matrices,
|
||||||
|
net.minecraft.client.render.model.BakedQuad quad,
|
||||||
|
net.minecraft.client.texture.Sprite sprite,
|
||||||
|
int light, int overlay) {
|
||||||
|
// Re-emit the quad geometry but remap UVs to the new sprite
|
||||||
|
consumer.quad(matrices.peek(), quad, 1f, 1f, 1f, light, overlay);
|
||||||
|
// Note: this uses the quad's original UVs which point to the blueprint texture.
|
||||||
|
// For full texture remapping you'd need to manually rewrite vertex data.
|
||||||
|
// This gives correct shape with blueprint texture as fallback —
|
||||||
|
// see note below for full UV remapping.
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,10 +21,6 @@ import java.util.*;
|
|||||||
|
|
||||||
public class ChessScreen extends Screen {
|
public class ChessScreen extends Screen {
|
||||||
|
|
||||||
// Board background texture
|
|
||||||
private static final Identifier BOARD_TEX =
|
|
||||||
new Identifier("szar", "textures/gui/chess_board.png");
|
|
||||||
|
|
||||||
// Piece textures — one per piece type
|
// Piece textures — one per piece type
|
||||||
// Naming: chess_wp.png (white pawn), chess_bn.png (black knight) etc.
|
// Naming: chess_wp.png (white pawn), chess_bn.png (black knight) etc.
|
||||||
private static final Map<Piece, Identifier> PIECE_TEXTURES = new HashMap<>();
|
private static final Map<Piece, Identifier> PIECE_TEXTURES = new HashMap<>();
|
||||||
|
|||||||
@@ -90,6 +90,12 @@ public class SzarClient implements ClientModInitializer {
|
|||||||
);
|
);
|
||||||
@Override
|
@Override
|
||||||
public void onInitializeClient() {
|
public void onInitializeClient() {
|
||||||
|
BlockEntityRendererFactories.register(BlueprintBlocks.BLUEPRINT_STAIRS_BE_TYPE, BlueprintBlockEntityRenderer::new);
|
||||||
|
BlockEntityRendererFactories.register(BlueprintBlocks.BLUEPRINT_SLAB_BE_TYPE, BlueprintBlockEntityRenderer::new);
|
||||||
|
BlockEntityRendererFactories.register(BlueprintBlocks.BLUEPRINT_DOOR_BE_TYPE, BlueprintBlockEntityRenderer::new);
|
||||||
|
BlockEntityRendererFactories.register(BlueprintBlocks.BLUEPRINT_TRAPDOOR_BE_TYPE, BlueprintBlockEntityRenderer::new);
|
||||||
|
BlockEntityRendererFactories.register(BlueprintBlocks.BLUEPRINT_WALL_BE_TYPE, BlueprintBlockEntityRenderer::new);
|
||||||
|
BlockEntityRendererFactories.register(BlueprintBlocks.BLUEPRINT_FENCE_BE_TYPE, BlueprintBlockEntityRenderer::new);
|
||||||
ClientPlayNetworking.registerGlobalReceiver(Szar.CHESS_OPEN_SCREEN, (client, handler, buf, sender) -> {
|
ClientPlayNetworking.registerGlobalReceiver(Szar.CHESS_OPEN_SCREEN, (client, handler, buf, sender) -> {
|
||||||
BlockPos pos = buf.readBlockPos();
|
BlockPos pos = buf.readBlockPos();
|
||||||
ChessBlockEntity.State state = ChessBlockEntity.readStateFromBuf(buf);
|
ChessBlockEntity.State state = ChessBlockEntity.readStateFromBuf(buf);
|
||||||
@@ -312,6 +318,7 @@ public class SzarClient implements ClientModInitializer {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
ThirdpersonModelRegisterer.register(new Identifier(MOD_ID, "weed_joint"), new Identifier(MOD_ID, "weed_joint_in_hand"));
|
ThirdpersonModelRegisterer.register(new Identifier(MOD_ID, "weed_joint"), new Identifier(MOD_ID, "weed_joint_in_hand"));
|
||||||
|
ThirdpersonModelRegisterer.register(new Identifier(MOD_ID, "empty_joint"), new Identifier(MOD_ID, "empty_joint_in_hand"));
|
||||||
ThirdpersonModelRegisterer.register(new Identifier(MOD_ID, "fasz"), new Identifier(MOD_ID, "fasz_in_hand"));
|
ThirdpersonModelRegisterer.register(new Identifier(MOD_ID, "fasz"), new Identifier(MOD_ID, "fasz_in_hand"));
|
||||||
ThirdpersonModelRegisterer.register(new Identifier(MOD_ID, "slot_machine"), new Identifier(MOD_ID, "slot_machine_3d"));
|
ThirdpersonModelRegisterer.register(new Identifier(MOD_ID, "slot_machine"), new Identifier(MOD_ID, "slot_machine_3d"));
|
||||||
ClientTickEvents.END_CLIENT_TICK.register(client -> {
|
ClientTickEvents.END_CLIENT_TICK.register(client -> {
|
||||||
|
|||||||
84
src/main/java/dev/tggamesyt/szar/BlueprintBehavior.java
Normal file
84
src/main/java/dev/tggamesyt/szar/BlueprintBehavior.java
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
package dev.tggamesyt.szar;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
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.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.BlockView;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BlueprintBehavior {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call from your block's onUse().
|
||||||
|
* Right click with a block → stores it, consumes one from stack.
|
||||||
|
* Right click with empty hand → clears stored block.
|
||||||
|
*/
|
||||||
|
public static ActionResult onUse(BlockState state, World world, BlockPos pos,
|
||||||
|
PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||||
|
if (world.isClient) return ActionResult.SUCCESS;
|
||||||
|
|
||||||
|
BlockEntity be = world.getBlockEntity(pos);
|
||||||
|
if (!(be instanceof BlueprintBlockEntity blueprint)) return ActionResult.PASS;
|
||||||
|
|
||||||
|
ItemStack held = player.getStackInHand(hand);
|
||||||
|
|
||||||
|
if (held.isEmpty()) {
|
||||||
|
// Clear stored block
|
||||||
|
blueprint.clearStoredBlock();
|
||||||
|
return ActionResult.SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (held.getItem() instanceof BlockItem blockItem) {
|
||||||
|
String id = Registries.BLOCK.getId(blockItem.getBlock()).toString();
|
||||||
|
blueprint.setStoredBlock(id);
|
||||||
|
if (!player.isCreative()) held.decrement(1);
|
||||||
|
return ActionResult.SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ActionResult.PASS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call from your block's calcBlockBreakingDelta() to apply stored hardness.
|
||||||
|
*/
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call from your block's onBreak() to drop the stored block instead.
|
||||||
|
*/
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void dropStack(World world, BlockPos pos, ItemStack stack) {
|
||||||
|
net.minecraft.entity.ItemEntity entity = new net.minecraft.entity.ItemEntity(
|
||||||
|
world,
|
||||||
|
pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5,
|
||||||
|
stack
|
||||||
|
);
|
||||||
|
world.spawnEntity(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
86
src/main/java/dev/tggamesyt/szar/BlueprintBlockEntity.java
Normal file
86
src/main/java/dev/tggamesyt/szar/BlueprintBlockEntity.java
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
package dev.tggamesyt.szar;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NbtCompound;
|
||||||
|
import net.minecraft.network.packet.s2c.play.BlockEntityUpdateS2CPacket;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
public class BlueprintBlockEntity extends BlockEntity {
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
private String storedBlockId = null;
|
||||||
|
|
||||||
|
public BlueprintBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||||
|
super(type, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasStoredBlock() {
|
||||||
|
return storedBlockId != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
public String getStoredBlockId() {
|
||||||
|
return storedBlockId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStoredBlock(String blockId) {
|
||||||
|
this.storedBlockId = blockId;
|
||||||
|
markDirty();
|
||||||
|
if (world != null && !world.isClient) {
|
||||||
|
world.updateListeners(pos, getCachedState(), getCachedState(), 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearStoredBlock() {
|
||||||
|
this.storedBlockId = null;
|
||||||
|
markDirty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Gets the hardness of the stored block, or default if none. */
|
||||||
|
public float getStoredHardness() {
|
||||||
|
if (storedBlockId == null) return 1.0f;
|
||||||
|
var block = Registries.BLOCK.get(new Identifier(storedBlockId));
|
||||||
|
return block.getDefaultState().getHardness(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Gets the blast resistance of the stored block, or default if none. */
|
||||||
|
public float getStoredResistance() {
|
||||||
|
if (storedBlockId == null) return 1.0f;
|
||||||
|
return Registries.BLOCK.get(new Identifier(storedBlockId)).getBlastResistance();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Returns an ItemStack of the stored block for dropping. */
|
||||||
|
public ItemStack getStoredDrop() {
|
||||||
|
if (storedBlockId == null) return ItemStack.EMPTY;
|
||||||
|
var block = Registries.BLOCK.get(new Identifier(storedBlockId));
|
||||||
|
return new ItemStack(block.asItem());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void writeNbt(NbtCompound nbt) {
|
||||||
|
super.writeNbt(nbt);
|
||||||
|
if (storedBlockId != null) nbt.putString("StoredBlock", storedBlockId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readNbt(NbtCompound nbt) {
|
||||||
|
super.readNbt(nbt);
|
||||||
|
storedBlockId = nbt.contains("StoredBlock") ? nbt.getString("StoredBlock") : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NbtCompound toInitialChunkDataNbt() {
|
||||||
|
return createNbt();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockEntityUpdateS2CPacket toUpdatePacket() {
|
||||||
|
return BlockEntityUpdateS2CPacket.create(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
106
src/main/java/dev/tggamesyt/szar/BlueprintBlocks.java
Normal file
106
src/main/java/dev/tggamesyt/szar/BlueprintBlocks.java
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
package dev.tggamesyt.szar;
|
||||||
|
|
||||||
|
import dev.tggamesyt.szar.Szar;
|
||||||
|
import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;
|
||||||
|
import net.minecraft.block.AbstractBlock;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.MapColor;
|
||||||
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
|
import net.minecraft.item.BlockItem;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.registry.Registry;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
public class BlueprintBlocks {
|
||||||
|
|
||||||
|
private static AbstractBlock.Settings settings() {
|
||||||
|
return AbstractBlock.Settings.create()
|
||||||
|
.mapColor(MapColor.TERRACOTTA_LIGHT_BLUE)
|
||||||
|
.strength(1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final BlueprintStairsBlock BLUEPRINT_STAIRS =
|
||||||
|
Registry.register(Registries.BLOCK, new Identifier(Szar.MOD_ID, "blueprint_stairs"),
|
||||||
|
new BlueprintStairsBlock(settings()));
|
||||||
|
|
||||||
|
public static final BlueprintSlabBlock BLUEPRINT_SLAB =
|
||||||
|
Registry.register(Registries.BLOCK, new Identifier(Szar.MOD_ID, "blueprint_slab"),
|
||||||
|
new BlueprintSlabBlock(settings()));
|
||||||
|
|
||||||
|
public static final BlueprintDoorBlock BLUEPRINT_DOOR =
|
||||||
|
Registry.register(Registries.BLOCK, new Identifier(Szar.MOD_ID, "blueprint_door"),
|
||||||
|
new BlueprintDoorBlock(settings()));
|
||||||
|
|
||||||
|
public static final BlueprintTrapDoorBlock BLUEPRINT_TRAPDOOR =
|
||||||
|
Registry.register(Registries.BLOCK, new Identifier(Szar.MOD_ID, "blueprint_trapdoor"),
|
||||||
|
new BlueprintTrapDoorBlock(settings()));
|
||||||
|
|
||||||
|
public static final BlueprintWallBlock BLUEPRINT_WALL =
|
||||||
|
Registry.register(Registries.BLOCK, new Identifier(Szar.MOD_ID, "blueprint_wall"),
|
||||||
|
new BlueprintWallBlock(settings()));
|
||||||
|
|
||||||
|
public static final BlueprintFenceBlock BLUEPRINT_FENCE =
|
||||||
|
Registry.register(Registries.BLOCK, new Identifier(Szar.MOD_ID, "blueprint_fence"),
|
||||||
|
new BlueprintFenceBlock(settings()));
|
||||||
|
|
||||||
|
public static final BlockEntityType<BlueprintBlockEntity> BLUEPRINT_STAIRS_BE_TYPE =
|
||||||
|
Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(Szar.MOD_ID, "blueprint_stairs_be"),
|
||||||
|
FabricBlockEntityTypeBuilder.create(
|
||||||
|
(pos, state) -> new BlueprintBlockEntity(null, pos, state),
|
||||||
|
BLUEPRINT_STAIRS).build());
|
||||||
|
|
||||||
|
public static final BlockEntityType<BlueprintBlockEntity> BLUEPRINT_SLAB_BE_TYPE =
|
||||||
|
Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(Szar.MOD_ID, "blueprint_slab_be"),
|
||||||
|
FabricBlockEntityTypeBuilder.create(
|
||||||
|
(pos, state) -> new BlueprintBlockEntity(null, pos, state),
|
||||||
|
BLUEPRINT_SLAB).build());
|
||||||
|
|
||||||
|
public static final BlockEntityType<BlueprintBlockEntity> BLUEPRINT_DOOR_BE_TYPE =
|
||||||
|
Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(Szar.MOD_ID, "blueprint_door_be"),
|
||||||
|
FabricBlockEntityTypeBuilder.create(
|
||||||
|
(pos, state) -> new BlueprintBlockEntity(null, pos, state),
|
||||||
|
BLUEPRINT_DOOR).build());
|
||||||
|
|
||||||
|
public static final BlockEntityType<BlueprintBlockEntity> BLUEPRINT_TRAPDOOR_BE_TYPE =
|
||||||
|
Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(Szar.MOD_ID, "blueprint_trapdoor_be"),
|
||||||
|
FabricBlockEntityTypeBuilder.create(
|
||||||
|
(pos, state) -> new BlueprintBlockEntity(null, pos, state),
|
||||||
|
BLUEPRINT_TRAPDOOR).build());
|
||||||
|
|
||||||
|
public static final BlockEntityType<BlueprintBlockEntity> BLUEPRINT_WALL_BE_TYPE =
|
||||||
|
Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(Szar.MOD_ID, "blueprint_wall_be"),
|
||||||
|
FabricBlockEntityTypeBuilder.create(
|
||||||
|
(pos, state) -> new BlueprintBlockEntity(null, pos, state),
|
||||||
|
BLUEPRINT_WALL).build());
|
||||||
|
|
||||||
|
public static final BlockEntityType<BlueprintBlockEntity> BLUEPRINT_FENCE_BE_TYPE =
|
||||||
|
Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(Szar.MOD_ID, "blueprint_fence_be"),
|
||||||
|
FabricBlockEntityTypeBuilder.create(
|
||||||
|
(pos, state) -> new BlueprintBlockEntity(null, pos, state),
|
||||||
|
BLUEPRINT_FENCE).build());
|
||||||
|
public static final BlockItem BLUEPRINT_STAIRS_ITEM = Registry.register(Registries.ITEM,
|
||||||
|
new Identifier(Szar.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 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 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 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 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 BlockItem(BLUEPRINT_FENCE, new Item.Settings()));
|
||||||
|
public static void init() {} // just call this to trigger class loading
|
||||||
|
}
|
||||||
45
src/main/java/dev/tggamesyt/szar/BlueprintDoorBlock.java
Normal file
45
src/main/java/dev/tggamesyt/szar/BlueprintDoorBlock.java
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
package dev.tggamesyt.szar;
|
||||||
|
|
||||||
|
import net.minecraft.block.*;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.block.enums.Instrument;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.BlockView;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BlueprintDoorBlock extends DoorBlock implements BlockEntityProvider {
|
||||||
|
|
||||||
|
public BlueprintDoorBlock(Settings settings) {
|
||||||
|
super(settings, BlockSetType.STONE); // placeholder wood type sound
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
return new BlueprintBlockEntity(BlueprintBlocks.BLUEPRINT_DOOR_BE_TYPE, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ActionResult onUse(BlockState state, World world, BlockPos pos,
|
||||||
|
PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||||
|
ActionResult behavior = BlueprintBehavior.onUse(state, world, pos, player, hand, hit);
|
||||||
|
if (behavior != ActionResult.PASS) return behavior;
|
||||||
|
return super.onUse(state, world, pos, player, hand, hit); // allow opening/closing
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float calcBlockBreakingDelta(BlockState state, PlayerEntity player,
|
||||||
|
BlockView world, BlockPos pos) {
|
||||||
|
return BlueprintBehavior.calcBreakingDelta(state, player, world, pos,
|
||||||
|
super.calcBlockBreakingDelta(state, player, world, pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||||
|
BlueprintBehavior.onBreak(world, pos, state, player);
|
||||||
|
super.onBreak(world, pos, state, player);
|
||||||
|
}
|
||||||
|
}
|
||||||
42
src/main/java/dev/tggamesyt/szar/BlueprintFenceBlock.java
Normal file
42
src/main/java/dev/tggamesyt/szar/BlueprintFenceBlock.java
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
package dev.tggamesyt.szar;
|
||||||
|
|
||||||
|
import net.minecraft.block.*;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.BlockView;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BlueprintFenceBlock extends FenceBlock implements BlockEntityProvider {
|
||||||
|
|
||||||
|
public BlueprintFenceBlock(Settings settings) {
|
||||||
|
super(settings);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
return new BlueprintBlockEntity(BlueprintBlocks.BLUEPRINT_FENCE_BE_TYPE, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ActionResult onUse(BlockState state, World world, BlockPos pos,
|
||||||
|
PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||||
|
return BlueprintBehavior.onUse(state, world, pos, player, hand, hit);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float calcBlockBreakingDelta(BlockState state, PlayerEntity player,
|
||||||
|
BlockView world, BlockPos pos) {
|
||||||
|
return BlueprintBehavior.calcBreakingDelta(state, player, world, pos,
|
||||||
|
super.calcBlockBreakingDelta(state, player, world, pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||||
|
BlueprintBehavior.onBreak(world, pos, state, player);
|
||||||
|
super.onBreak(world, pos, state, player);
|
||||||
|
}
|
||||||
|
}
|
||||||
42
src/main/java/dev/tggamesyt/szar/BlueprintSlabBlock.java
Normal file
42
src/main/java/dev/tggamesyt/szar/BlueprintSlabBlock.java
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
package dev.tggamesyt.szar;
|
||||||
|
|
||||||
|
import net.minecraft.block.*;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.BlockView;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BlueprintSlabBlock extends SlabBlock implements BlockEntityProvider {
|
||||||
|
|
||||||
|
public BlueprintSlabBlock(Settings settings) {
|
||||||
|
super(settings);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
return new BlueprintBlockEntity(BlueprintBlocks.BLUEPRINT_SLAB_BE_TYPE, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ActionResult onUse(BlockState state, World world, BlockPos pos,
|
||||||
|
PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||||
|
return BlueprintBehavior.onUse(state, world, pos, player, hand, hit);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float calcBlockBreakingDelta(BlockState state, PlayerEntity player,
|
||||||
|
BlockView world, BlockPos pos) {
|
||||||
|
return BlueprintBehavior.calcBreakingDelta(state, player, world, pos,
|
||||||
|
super.calcBlockBreakingDelta(state, player, world, pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||||
|
BlueprintBehavior.onBreak(world, pos, state, player);
|
||||||
|
super.onBreak(world, pos, state, player);
|
||||||
|
}
|
||||||
|
}
|
||||||
42
src/main/java/dev/tggamesyt/szar/BlueprintStairsBlock.java
Normal file
42
src/main/java/dev/tggamesyt/szar/BlueprintStairsBlock.java
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
package dev.tggamesyt.szar;
|
||||||
|
|
||||||
|
import net.minecraft.block.*;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.BlockView;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BlueprintStairsBlock extends StairsBlock implements BlockEntityProvider {
|
||||||
|
|
||||||
|
public BlueprintStairsBlock(Settings settings) {
|
||||||
|
super(Blocks.STONE.getDefaultState(), settings);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
return new BlueprintBlockEntity(BlueprintBlocks.BLUEPRINT_STAIRS_BE_TYPE, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ActionResult onUse(BlockState state, World world, BlockPos pos,
|
||||||
|
PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||||
|
return BlueprintBehavior.onUse(state, world, pos, player, hand, hit);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float calcBlockBreakingDelta(BlockState state, PlayerEntity player,
|
||||||
|
BlockView world, BlockPos pos) {
|
||||||
|
return BlueprintBehavior.calcBreakingDelta(state, player, world, pos,
|
||||||
|
super.calcBlockBreakingDelta(state, player, world, pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||||
|
BlueprintBehavior.onBreak(world, pos, state, player);
|
||||||
|
super.onBreak(world, pos, state, player);
|
||||||
|
}
|
||||||
|
}
|
||||||
44
src/main/java/dev/tggamesyt/szar/BlueprintTrapDoorBlock.java
Normal file
44
src/main/java/dev/tggamesyt/szar/BlueprintTrapDoorBlock.java
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
package dev.tggamesyt.szar;
|
||||||
|
|
||||||
|
import net.minecraft.block.*;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.BlockView;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BlueprintTrapDoorBlock extends TrapdoorBlock implements BlockEntityProvider {
|
||||||
|
|
||||||
|
public BlueprintTrapDoorBlock(Settings settings) {
|
||||||
|
super(settings, BlockSetType.STONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
return new BlueprintBlockEntity(BlueprintBlocks.BLUEPRINT_TRAPDOOR_BE_TYPE, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ActionResult onUse(BlockState state, World world, BlockPos pos,
|
||||||
|
PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||||
|
ActionResult behavior = BlueprintBehavior.onUse(state, world, pos, player, hand, hit);
|
||||||
|
if (behavior != ActionResult.PASS) return behavior;
|
||||||
|
return super.onUse(state, world, pos, player, hand, hit);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float calcBlockBreakingDelta(BlockState state, PlayerEntity player,
|
||||||
|
BlockView world, BlockPos pos) {
|
||||||
|
return BlueprintBehavior.calcBreakingDelta(state, player, world, pos,
|
||||||
|
super.calcBlockBreakingDelta(state, player, world, pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||||
|
BlueprintBehavior.onBreak(world, pos, state, player);
|
||||||
|
super.onBreak(world, pos, state, player);
|
||||||
|
}
|
||||||
|
}
|
||||||
42
src/main/java/dev/tggamesyt/szar/BlueprintWallBlock.java
Normal file
42
src/main/java/dev/tggamesyt/szar/BlueprintWallBlock.java
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
package dev.tggamesyt.szar;
|
||||||
|
|
||||||
|
import net.minecraft.block.*;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.BlockView;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BlueprintWallBlock extends WallBlock implements BlockEntityProvider {
|
||||||
|
|
||||||
|
public BlueprintWallBlock(Settings settings) {
|
||||||
|
super(settings);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
return new BlueprintBlockEntity(BlueprintBlocks.BLUEPRINT_WALL_BE_TYPE, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ActionResult onUse(BlockState state, World world, BlockPos pos,
|
||||||
|
PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||||
|
return BlueprintBehavior.onUse(state, world, pos, player, hand, hit);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float calcBlockBreakingDelta(BlockState state, PlayerEntity player,
|
||||||
|
BlockView world, BlockPos pos) {
|
||||||
|
return BlueprintBehavior.calcBreakingDelta(state, player, world, pos,
|
||||||
|
super.calcBlockBreakingDelta(state, player, world, pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||||
|
BlueprintBehavior.onBreak(world, pos, state, player);
|
||||||
|
super.onBreak(world, pos, state, player);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,7 +28,7 @@ import static dev.tggamesyt.szar.Szar.MOD_ID;
|
|||||||
|
|
||||||
public class Joint extends SpyglassItem {
|
public class Joint extends SpyglassItem {
|
||||||
public Joint(Settings settings) {
|
public Joint(Settings settings) {
|
||||||
super(settings.maxDamage(20)); // max durability
|
super(settings.maxDamage(8)); // max durability
|
||||||
}
|
}
|
||||||
private static final int COOLDOWN_TICKS = 20 * 5;
|
private static final int COOLDOWN_TICKS = 20 * 5;
|
||||||
@Override
|
@Override
|
||||||
@@ -72,7 +72,24 @@ public class Joint extends SpyglassItem {
|
|||||||
Szar.PLAYER_ADDICTION_LEVEL.put(user.getUuid(), true);
|
Szar.PLAYER_ADDICTION_LEVEL.put(user.getUuid(), true);
|
||||||
}
|
}
|
||||||
// Consume 1 durability
|
// Consume 1 durability
|
||||||
stack.damage(1, user, p -> p.sendToolBreakStatus(user.getActiveHand()));
|
int currentDamage = stack.getDamage();
|
||||||
|
int maxDamage = stack.getMaxDamage();
|
||||||
|
|
||||||
|
if (currentDamage + 1 >= maxDamage) {
|
||||||
|
// About to break — give empty joint instead
|
||||||
|
stack.setCount(0); // remove the joint
|
||||||
|
if (user instanceof PlayerEntity player) {
|
||||||
|
ItemStack emptyJoint = new ItemStack(Szar.EMPTY_JOINT);
|
||||||
|
if (!player.getInventory().insertStack(emptyJoint)) {
|
||||||
|
// Inventory full, drop it at player's feet
|
||||||
|
player.dropItem(emptyJoint, false);
|
||||||
|
}
|
||||||
|
player.sendToolBreakStatus(user.getActiveHand());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
stack.damage(1, user, p -> p.sendToolBreakStatus(user.getActiveHand()));
|
||||||
|
}
|
||||||
|
|
||||||
if (user instanceof PlayerEntity player && !world.isClient) {
|
if (user instanceof PlayerEntity player && !world.isClient) {
|
||||||
player.getItemCooldownManager().set(this, COOLDOWN_TICKS);
|
player.getItemCooldownManager().set(this, COOLDOWN_TICKS);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,6 +288,14 @@ public class PlaneEntity extends Entity {
|
|||||||
@Override
|
@Override
|
||||||
public void updatePassengerPosition(Entity passenger, PositionUpdater updater) {
|
public void updatePassengerPosition(Entity passenger, PositionUpdater updater) {
|
||||||
passenger.setPosition(getX(), getY() + 0.8, getZ());
|
passenger.setPosition(getX(), getY() + 0.8, getZ());
|
||||||
|
|
||||||
|
if (passenger instanceof PlayerEntity player) {
|
||||||
|
float planeYaw = this.getYaw();
|
||||||
|
float relativeYaw = MathHelper.wrapDegrees(player.getYaw() - planeYaw);
|
||||||
|
float clampedRelative = MathHelper.clamp(relativeYaw, -85f, 85f);
|
||||||
|
player.setYaw(planeYaw + clampedRelative);
|
||||||
|
player.setHeadYaw(planeYaw + clampedRelative);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void playServerAnimation(PlaneAnimation anim) {
|
private void playServerAnimation(PlaneAnimation anim) {
|
||||||
if (this.currentServerAnimation == anim) return;
|
if (this.currentServerAnimation == anim) return;
|
||||||
|
|||||||
117
src/main/java/dev/tggamesyt/szar/ServerConfig.java
Normal file
117
src/main/java/dev/tggamesyt/szar/ServerConfig.java
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
package dev.tggamesyt.szar;
|
||||||
|
|
||||||
|
import com.google.gson.*;
|
||||||
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
import java.nio.file.*;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
public class ServerConfig {
|
||||||
|
|
||||||
|
private static final Path CONFIG_PATH =
|
||||||
|
FabricLoader.getInstance().getConfigDir().resolve("szar/config.json");
|
||||||
|
private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();
|
||||||
|
|
||||||
|
// ── Registry ──────────────────────────────────────────────────────────────
|
||||||
|
private static final LinkedHashMap<String, Boolean> VALUES = new LinkedHashMap<>();
|
||||||
|
private static final LinkedHashMap<String, Boolean> DEFAULTS = new LinkedHashMap<>();
|
||||||
|
private static final LinkedHashMap<String, Map<String, Boolean>> PRESETS = new LinkedHashMap<>();
|
||||||
|
private static String activePreset = "minor";
|
||||||
|
|
||||||
|
// ── Registration (call from ServerSettings.init()) ────────────────────────
|
||||||
|
|
||||||
|
public static void registerSetting(String id, boolean defaultValue) {
|
||||||
|
DEFAULTS.put(id, defaultValue);
|
||||||
|
VALUES.put(id, defaultValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void registerPreset(String id, Map<String, Boolean> values) {
|
||||||
|
PRESETS.put(id, values == null ? null : new LinkedHashMap<>(values));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Accessors ─────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
public static boolean get(String id) {
|
||||||
|
return VALUES.getOrDefault(id, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void set(String id, boolean value) {
|
||||||
|
if (!VALUES.containsKey(id)) throw new IllegalArgumentException("Unknown setting: " + id);
|
||||||
|
VALUES.put(id, value);
|
||||||
|
// If this doesn't match any preset anymore, switch to custom
|
||||||
|
activePreset = detectPreset();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getActivePreset() { return activePreset; }
|
||||||
|
|
||||||
|
public static Set<String> getSettingIds() { return VALUES.keySet(); }
|
||||||
|
|
||||||
|
public static Map<String, Boolean> snapshot() { return Collections.unmodifiableMap(VALUES); }
|
||||||
|
|
||||||
|
public static boolean hasPreset(String id) { return PRESETS.containsKey(id); }
|
||||||
|
|
||||||
|
public static Set<String> getPresetIds() { return PRESETS.keySet(); }
|
||||||
|
|
||||||
|
/** Applies a preset by id. Returns false if unknown. */
|
||||||
|
public static boolean applyPreset(String presetId) {
|
||||||
|
Map<String, Boolean> preset = PRESETS.get(presetId);
|
||||||
|
if (preset == null && !PRESETS.containsKey(presetId)) return false; // unknown
|
||||||
|
activePreset = presetId;
|
||||||
|
if (preset != null) { // null = "custom", don't touch values
|
||||||
|
preset.forEach((id, val) -> {
|
||||||
|
if (VALUES.containsKey(id)) VALUES.put(id, val);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String detectPreset() {
|
||||||
|
for (Map.Entry<String, Map<String, Boolean>> entry : PRESETS.entrySet()) {
|
||||||
|
Map<String, Boolean> pValues = entry.getValue();
|
||||||
|
if (pValues == null) continue; // skip custom
|
||||||
|
if (pValues.equals(VALUES)) return entry.getKey();
|
||||||
|
}
|
||||||
|
return "custom";
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Save / Load ───────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
public static void save() {
|
||||||
|
JsonObject root = loadRawRoot();
|
||||||
|
|
||||||
|
JsonObject server = new JsonObject();
|
||||||
|
server.addProperty("preset", activePreset);
|
||||||
|
JsonObject vals = new JsonObject();
|
||||||
|
VALUES.forEach(vals::addProperty);
|
||||||
|
server.add("values", vals);
|
||||||
|
root.add("server", server);
|
||||||
|
|
||||||
|
CONFIG_PATH.getParent().toFile().mkdirs();
|
||||||
|
try (Writer w = Files.newBufferedWriter(CONFIG_PATH)) {
|
||||||
|
GSON.toJson(root, w);
|
||||||
|
} catch (IOException e) { e.printStackTrace(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void load() {
|
||||||
|
JsonObject root = loadRawRoot();
|
||||||
|
if (!root.has("server")) { save(); return; }
|
||||||
|
|
||||||
|
JsonObject server = root.getAsJsonObject("server");
|
||||||
|
if (server.has("preset")) activePreset = server.get("preset").getAsString();
|
||||||
|
if (server.has("values")) {
|
||||||
|
JsonObject vals = server.getAsJsonObject("values");
|
||||||
|
VALUES.forEach((id, def) -> {
|
||||||
|
if (vals.has(id)) VALUES.put(id, vals.get(id).getAsBoolean());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static JsonObject loadRawRoot() {
|
||||||
|
if (!Files.exists(CONFIG_PATH)) return new JsonObject();
|
||||||
|
try (Reader r = Files.newBufferedReader(CONFIG_PATH)) {
|
||||||
|
JsonObject obj = GSON.fromJson(r, JsonObject.class);
|
||||||
|
return obj != null ? obj : new JsonObject();
|
||||||
|
} catch (IOException e) { return new JsonObject(); }
|
||||||
|
}
|
||||||
|
}
|
||||||
31
src/main/java/dev/tggamesyt/szar/ServerSettings.java
Normal file
31
src/main/java/dev/tggamesyt/szar/ServerSettings.java
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
package dev.tggamesyt.szar;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class ServerSettings {
|
||||||
|
|
||||||
|
public static void init() {
|
||||||
|
// registerSetting(id, defaultValue) ← must match client setting ids
|
||||||
|
ServerConfig.registerSetting("racist", true);
|
||||||
|
ServerConfig.registerSetting("gambling", true);
|
||||||
|
ServerConfig.registerSetting("nsfw", true);
|
||||||
|
|
||||||
|
// registerPreset(id, Map<settingId, value>) ← null map = "custom"
|
||||||
|
ServerConfig.registerPreset("18+", Map.of(
|
||||||
|
"racist", false,
|
||||||
|
"gambling", false,
|
||||||
|
"nsfw", false
|
||||||
|
));
|
||||||
|
ServerConfig.registerPreset("17+", Map.of(
|
||||||
|
"racist", false,
|
||||||
|
"gambling", false,
|
||||||
|
"nsfw", true
|
||||||
|
));
|
||||||
|
ServerConfig.registerPreset("minor", Map.of(
|
||||||
|
"racist", true,
|
||||||
|
"gambling", true,
|
||||||
|
"nsfw", true
|
||||||
|
));
|
||||||
|
ServerConfig.registerPreset("custom", null);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package dev.tggamesyt.szar;
|
package dev.tggamesyt.szar;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import com.mojang.authlib.minecraft.client.MinecraftClient;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import net.fabricmc.api.ModInitializer;
|
import net.fabricmc.api.ModInitializer;
|
||||||
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
|
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
|
||||||
@@ -362,14 +363,15 @@ public class Szar implements ModInitializer {
|
|||||||
.displayName(Text.translatable("itemgroup.szar_group"))
|
.displayName(Text.translatable("itemgroup.szar_group"))
|
||||||
.icon(() -> new ItemStack(Szar.CANNABIS_ITEM)) // icon item
|
.icon(() -> new ItemStack(Szar.CANNABIS_ITEM)) // icon item
|
||||||
.entries((displayContext, entries) -> {
|
.entries((displayContext, entries) -> {
|
||||||
|
boolean showRacist = !ServerConfig.get("racist");
|
||||||
|
boolean showGambling = !ServerConfig.get("gambling");
|
||||||
|
boolean showNsfw = !ServerConfig.get("nsfw");
|
||||||
// random ahh silly stuff
|
// random ahh silly stuff
|
||||||
entries.add(Szar.POPTART);
|
entries.add(Szar.POPTART);
|
||||||
entries.add(Szar.NYAN_SPAWNEGG);
|
entries.add(Szar.NYAN_SPAWNEGG);
|
||||||
entries.add(Szar.BAITER_DISC);
|
entries.add(Szar.BAITER_DISC);
|
||||||
entries.add(Szar.MERL_SPAWNEGG);
|
entries.add(Szar.MERL_SPAWNEGG);
|
||||||
entries.add(Szar.EFN_DISK);
|
entries.add(Szar.EFN_DISK);
|
||||||
entries.add(Szar.SLOT_MACHINE);
|
|
||||||
entries.add(Szar.ROULETTE);
|
|
||||||
entries.add(Szar.FIRTANA);
|
entries.add(Szar.FIRTANA);
|
||||||
entries.add(Szar.HELLO_DISC);
|
entries.add(Szar.HELLO_DISC);
|
||||||
entries.add(Szar.TRACKER_BLOCK_ITEM);
|
entries.add(Szar.TRACKER_BLOCK_ITEM);
|
||||||
@@ -383,9 +385,22 @@ public class Szar implements ModInitializer {
|
|||||||
entries.add(Szar.CAN_OF_BEANS);
|
entries.add(Szar.CAN_OF_BEANS);
|
||||||
entries.add(Szar.ALMOND_WATER);
|
entries.add(Szar.ALMOND_WATER);
|
||||||
entries.add(Szar.KEBAB);
|
entries.add(Szar.KEBAB);
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
entries.add(Szar.TIC_TAC_TOE_ITEM);
|
entries.add(Szar.TIC_TAC_TOE_ITEM);
|
||||||
entries.add(Szar.CONNECT_FOUR_ITEM);
|
entries.add(Szar.CONNECT_FOUR_ITEM);
|
||||||
entries.add(Szar.CHESS_ITEM);
|
entries.add(Szar.CHESS_ITEM);
|
||||||
|
// gambing
|
||||||
|
if (showGambling) {
|
||||||
|
entries.add(Szar.SLOT_MACHINE);
|
||||||
|
entries.add(Szar.ROULETTE);
|
||||||
|
}
|
||||||
// crazy weponary
|
// crazy weponary
|
||||||
entries.add(Szar.BULLET_ITEM);
|
entries.add(Szar.BULLET_ITEM);
|
||||||
entries.add(Szar.AK47);
|
entries.add(Szar.AK47);
|
||||||
@@ -398,12 +413,17 @@ public class Szar implements ModInitializer {
|
|||||||
entries.add(Szar.ATOM);
|
entries.add(Szar.ATOM);
|
||||||
entries.add(Szar.WHEEL);
|
entries.add(Szar.WHEEL);
|
||||||
entries.add(Szar.PLANE);
|
entries.add(Szar.PLANE);
|
||||||
|
// police
|
||||||
|
entries.add(Szar.POLICE_SPAWNEGG);
|
||||||
|
entries.add(Szar.KEY_ITEM);
|
||||||
|
entries.add(Szar.HANDCUFF_ITEM);
|
||||||
// drugs
|
// drugs
|
||||||
entries.add(Szar.BEER);
|
entries.add(Szar.BEER);
|
||||||
entries.add(Szar.CHEMICAL_WORKBENCH_ITEM);
|
entries.add(Szar.CHEMICAL_WORKBENCH_ITEM);
|
||||||
entries.add(Szar.CANNABIS_ITEM);
|
entries.add(Szar.CANNABIS_ITEM);
|
||||||
entries.add(Szar.WEED_ITEM);
|
entries.add(Szar.WEED_ITEM);
|
||||||
entries.add(Szar.WEED_JOINT_ITEM);
|
entries.add(Szar.WEED_JOINT_ITEM);
|
||||||
|
entries.add(Szar.EMPTY_JOINT);
|
||||||
// war guys
|
// war guys
|
||||||
entries.add(Szar.HITTER_SPAWNEGG);
|
entries.add(Szar.HITTER_SPAWNEGG);
|
||||||
entries.add(Szar.NAZI_SPAWNEGG);
|
entries.add(Szar.NAZI_SPAWNEGG);
|
||||||
@@ -412,33 +432,35 @@ public class Szar implements ModInitializer {
|
|||||||
entries.add(Szar.ERIKA_DISC);
|
entries.add(Szar.ERIKA_DISC);
|
||||||
entries.add(Szar.USSR_DISC);
|
entries.add(Szar.USSR_DISC);
|
||||||
// racism
|
// racism
|
||||||
entries.add(Szar.CIGANYBLOCK);
|
if (showRacist) {
|
||||||
entries.add(Szar.NWORD_PASS);
|
entries.add(Szar.CIGANYBLOCK);
|
||||||
entries.add(Szar.NIGGER_SPAWNEGG);
|
entries.add(Szar.NWORD_PASS);
|
||||||
entries.add(Szar.GYPSY_SPAWNEGG);
|
entries.add(Szar.NIGGER_SPAWNEGG);
|
||||||
entries.add(Szar.TERRORIST_SPAWNEGG);
|
entries.add(Szar.GYPSY_SPAWNEGG);
|
||||||
entries.add(Szar.POLICE_SPAWNEGG);
|
entries.add(Szar.TERRORIST_SPAWNEGG);
|
||||||
entries.add(Szar.KEY_ITEM);
|
|
||||||
entries.add(Szar.HANDCUFF_ITEM);
|
// niggerite shits at the end
|
||||||
// niggerite shits at the end
|
entries.add(Szar.NIGGERITE_INGOT);
|
||||||
entries.add(Szar.NIGGERITE_INGOT);
|
entries.add(Szar.NIGGERITE_SWORD);
|
||||||
entries.add(Szar.NIGGERITE_SWORD);
|
entries.add(Szar.NIGGERITE_AXE);
|
||||||
entries.add(Szar.NIGGERITE_AXE);
|
entries.add(Szar.NIGGERITE_PICKAXE);
|
||||||
entries.add(Szar.NIGGERITE_PICKAXE);
|
entries.add(Szar.NIGGERITE_SHOVEL);
|
||||||
entries.add(Szar.NIGGERITE_SHOVEL);
|
entries.add(Szar.NIGGERITE_HOE);
|
||||||
entries.add(Szar.NIGGERITE_HOE);
|
entries.add(Szar.NIGGERITE_HELMET);
|
||||||
entries.add(Szar.NIGGERITE_HELMET);
|
entries.add(Szar.NIGGERITE_CHESTPLATE);
|
||||||
entries.add(Szar.NIGGERITE_CHESTPLATE);
|
entries.add(Szar.NIGGERITE_LEGGINGS);
|
||||||
entries.add(Szar.NIGGERITE_LEGGINGS);
|
entries.add(Szar.NIGGERITE_BOOTS);
|
||||||
entries.add(Szar.NIGGERITE_BOOTS);
|
entries.add(Szar.NIGGERITE_BLOCK);
|
||||||
entries.add(Szar.NIGGERITE_BLOCK);
|
}
|
||||||
// nsfw
|
// nsfw
|
||||||
entries.add(Szar.EPSTEIN_FILES);
|
if (showNsfw) {
|
||||||
entries.add(Szar.EPSTEIN_SPAWNEGG);
|
entries.add(Szar.EPSTEIN_FILES);
|
||||||
entries.add(Szar.FASZITEM);
|
entries.add(Szar.EPSTEIN_SPAWNEGG);
|
||||||
entries.add(Szar.CNDM);
|
entries.add(Szar.FASZITEM);
|
||||||
entries.add(Szar.LATEX);
|
entries.add(Szar.CNDM);
|
||||||
entries.add(Szar.WHITE_LIQUID);
|
entries.add(Szar.LATEX);
|
||||||
|
entries.add(Szar.WHITE_LIQUID);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.build()
|
.build()
|
||||||
);
|
);
|
||||||
@@ -1349,6 +1371,13 @@ public class Szar implements ModInitializer {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
SzarGameRules.register();
|
||||||
|
ServerSettings.init();
|
||||||
|
ServerConfig.load();
|
||||||
|
|
||||||
|
ServerLifecycleEvents.SERVER_STARTED.register(SzarGameRules::pushToGameRules);
|
||||||
|
|
||||||
|
BlueprintBlocks.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Block TIC_TAC_TOE_BLOCK = Registry.register(
|
public static final Block TIC_TAC_TOE_BLOCK = Registry.register(
|
||||||
@@ -2002,6 +2031,11 @@ public class Szar implements ModInitializer {
|
|||||||
new Identifier(MOD_ID, "weed_joint"),
|
new Identifier(MOD_ID, "weed_joint"),
|
||||||
new Joint(new Item.Settings())
|
new Joint(new Item.Settings())
|
||||||
);
|
);
|
||||||
|
public static final Item EMPTY_JOINT = Registry.register(
|
||||||
|
Registries.ITEM,
|
||||||
|
new Identifier(MOD_ID, "empty_joint"),
|
||||||
|
new Item(new Item.Settings())
|
||||||
|
);
|
||||||
public static final Item CIGANYBLOCK = Registry.register(
|
public static final Item CIGANYBLOCK = Registry.register(
|
||||||
Registries.ITEM,
|
Registries.ITEM,
|
||||||
new Identifier(MOD_ID, "cigany"),
|
new Identifier(MOD_ID, "cigany"),
|
||||||
|
|||||||
48
src/main/java/dev/tggamesyt/szar/SzarGameRules.java
Normal file
48
src/main/java/dev/tggamesyt/szar/SzarGameRules.java
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
package dev.tggamesyt.szar;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.gamerule.v1.GameRuleRegistry;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.world.GameRules;
|
||||||
|
|
||||||
|
public class SzarGameRules {
|
||||||
|
|
||||||
|
public static GameRules.Key<GameRules.BooleanRule> RULE_RACIST;
|
||||||
|
public static GameRules.Key<GameRules.BooleanRule> RULE_GAMBLING;
|
||||||
|
public static GameRules.Key<GameRules.BooleanRule> RULE_NSFW;
|
||||||
|
|
||||||
|
public static void register() {
|
||||||
|
RULE_RACIST = GameRuleRegistry.register(
|
||||||
|
"szarBlockRacist",
|
||||||
|
GameRules.Category.PLAYER,
|
||||||
|
GameRules.BooleanRule.create(false, (server, rule) -> onRuleChanged(server))
|
||||||
|
);
|
||||||
|
RULE_GAMBLING = GameRuleRegistry.register(
|
||||||
|
"szarBlockGambling",
|
||||||
|
GameRules.Category.PLAYER,
|
||||||
|
GameRules.BooleanRule.create(false, (server, rule) -> onRuleChanged(server))
|
||||||
|
);
|
||||||
|
RULE_NSFW = GameRuleRegistry.register(
|
||||||
|
"szarBlockNsfw",
|
||||||
|
GameRules.Category.PLAYER,
|
||||||
|
GameRules.BooleanRule.create(true, (server, rule) -> onRuleChanged(server))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void onRuleChanged(MinecraftServer server) {
|
||||||
|
GameRules rules = server.getGameRules();
|
||||||
|
ServerConfig.set("racist", rules.getBoolean(RULE_RACIST));
|
||||||
|
ServerConfig.set("gambling", rules.getBoolean(RULE_GAMBLING));
|
||||||
|
ServerConfig.set("nsfw", rules.getBoolean(RULE_NSFW));
|
||||||
|
ServerConfig.save();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Call on world load to push saved ServerConfig values back into gamerules. */
|
||||||
|
public static void pushToGameRules(MinecraftServer server) {
|
||||||
|
GameRules rules = server.getGameRules();
|
||||||
|
rules.get(RULE_RACIST).set(ServerConfig.get("racist"), server);
|
||||||
|
rules.get(RULE_GAMBLING).set(ServerConfig.get("gambling"), server);
|
||||||
|
rules.get(RULE_NSFW).set(ServerConfig.get("nsfw"), server);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"facing=east,half=lower,hinge=left,open=false": { "model": "szar:block/blueprint_door_bottom_left" },
|
||||||
|
"facing=east,half=lower,hinge=left,open=true": { "model": "szar:block/blueprint_door_bottom_left_open", "y": 90 },
|
||||||
|
"facing=east,half=lower,hinge=right,open=false": { "model": "szar:block/blueprint_door_bottom_right" },
|
||||||
|
"facing=east,half=lower,hinge=right,open=true": { "model": "szar:block/blueprint_door_bottom_right_open", "y": 270 },
|
||||||
|
"facing=east,half=upper,hinge=left,open=false": { "model": "szar:block/blueprint_door_top_left" },
|
||||||
|
"facing=east,half=upper,hinge=left,open=true": { "model": "szar:block/blueprint_door_top_left_open", "y": 90 },
|
||||||
|
"facing=east,half=upper,hinge=right,open=false": { "model": "szar:block/blueprint_door_top_right" },
|
||||||
|
"facing=east,half=upper,hinge=right,open=true": { "model": "szar:block/blueprint_door_top_right_open", "y": 270 },
|
||||||
|
"facing=north,half=lower,hinge=left,open=false": { "model": "szar:block/blueprint_door_bottom_left", "y": 270 },
|
||||||
|
"facing=north,half=lower,hinge=left,open=true": { "model": "szar:block/blueprint_door_bottom_left_open" },
|
||||||
|
"facing=north,half=lower,hinge=right,open=false":{ "model": "szar:block/blueprint_door_bottom_right", "y": 270 },
|
||||||
|
"facing=north,half=lower,hinge=right,open=true": { "model": "szar:block/blueprint_door_bottom_right_open" },
|
||||||
|
"facing=north,half=upper,hinge=left,open=false": { "model": "szar:block/blueprint_door_top_left", "y": 270 },
|
||||||
|
"facing=north,half=upper,hinge=left,open=true": { "model": "szar:block/blueprint_door_top_left_open" },
|
||||||
|
"facing=north,half=upper,hinge=right,open=false":{ "model": "szar:block/blueprint_door_top_right", "y": 270 },
|
||||||
|
"facing=north,half=upper,hinge=right,open=true": { "model": "szar:block/blueprint_door_top_right_open" },
|
||||||
|
"facing=south,half=lower,hinge=left,open=false": { "model": "szar:block/blueprint_door_bottom_left", "y": 90 },
|
||||||
|
"facing=south,half=lower,hinge=left,open=true": { "model": "szar:block/blueprint_door_bottom_left_open", "y": 180 },
|
||||||
|
"facing=south,half=lower,hinge=right,open=false":{ "model": "szar:block/blueprint_door_bottom_right", "y": 90 },
|
||||||
|
"facing=south,half=lower,hinge=right,open=true": { "model": "szar:block/blueprint_door_bottom_right_open", "y": 180 },
|
||||||
|
"facing=south,half=upper,hinge=left,open=false": { "model": "szar:block/blueprint_door_top_left", "y": 90 },
|
||||||
|
"facing=south,half=upper,hinge=left,open=true": { "model": "szar:block/blueprint_door_top_left_open", "y": 180 },
|
||||||
|
"facing=south,half=upper,hinge=right,open=false":{ "model": "szar:block/blueprint_door_top_right", "y": 90 },
|
||||||
|
"facing=south,half=upper,hinge=right,open=true": { "model": "szar:block/blueprint_door_top_right_open", "y": 180 },
|
||||||
|
"facing=west,half=lower,hinge=left,open=false": { "model": "szar:block/blueprint_door_bottom_left", "y": 180 },
|
||||||
|
"facing=west,half=lower,hinge=left,open=true": { "model": "szar:block/blueprint_door_bottom_left_open", "y": 270 },
|
||||||
|
"facing=west,half=lower,hinge=right,open=false": { "model": "szar:block/blueprint_door_bottom_right", "y": 180 },
|
||||||
|
"facing=west,half=lower,hinge=right,open=true": { "model": "szar:block/blueprint_door_bottom_right_open", "y": 90 },
|
||||||
|
"facing=west,half=upper,hinge=left,open=false": { "model": "szar:block/blueprint_door_top_left", "y": 180 },
|
||||||
|
"facing=west,half=upper,hinge=left,open=true": { "model": "szar:block/blueprint_door_top_left_open", "y": 270 },
|
||||||
|
"facing=west,half=upper,hinge=right,open=false": { "model": "szar:block/blueprint_door_top_right", "y": 180 },
|
||||||
|
"facing=west,half=upper,hinge=right,open=true": { "model": "szar:block/blueprint_door_top_right_open", "y": 90 }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"multipart": [
|
||||||
|
{ "apply": { "model": "szar:block/blueprint_fence_post" } },
|
||||||
|
{ "apply": { "model": "szar:block/blueprint_fence_side", "uvlock": true },
|
||||||
|
"when": { "north": "true" } },
|
||||||
|
{ "apply": { "model": "szar:block/blueprint_fence_side", "y": 90, "uvlock": true },
|
||||||
|
"when": { "east": "true" } },
|
||||||
|
{ "apply": { "model": "szar:block/blueprint_fence_side", "y": 180, "uvlock": true },
|
||||||
|
"when": { "south": "true" } },
|
||||||
|
{ "apply": { "model": "szar:block/blueprint_fence_side", "y": 270, "uvlock": true },
|
||||||
|
"when": { "west": "true" } }
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"type=bottom": { "model": "szar:block/blueprint_slab" },
|
||||||
|
"type=double": { "model": "szar:block/blueprint_slab_double" },
|
||||||
|
"type=top": { "model": "szar:block/blueprint_slab_top" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"facing=east,half=bottom,shape=inner_left": { "model": "szar:block/blueprint_stairs_inner", "y": 270, "uvlock": true },
|
||||||
|
"facing=east,half=bottom,shape=inner_right": { "model": "szar:block/blueprint_stairs_inner" },
|
||||||
|
"facing=east,half=bottom,shape=outer_left": { "model": "szar:block/blueprint_stairs_outer", "y": 270, "uvlock": true },
|
||||||
|
"facing=east,half=bottom,shape=outer_right": { "model": "szar:block/blueprint_stairs_outer" },
|
||||||
|
"facing=east,half=bottom,shape=straight": { "model": "szar:block/blueprint_stairs" },
|
||||||
|
"facing=east,half=top,shape=inner_left": { "model": "szar:block/blueprint_stairs_inner", "x": 180, "uvlock": true },
|
||||||
|
"facing=east,half=top,shape=inner_right": { "model": "szar:block/blueprint_stairs_inner", "x": 180, "y": 90, "uvlock": true },
|
||||||
|
"facing=east,half=top,shape=outer_left": { "model": "szar:block/blueprint_stairs_outer", "x": 180, "uvlock": true },
|
||||||
|
"facing=east,half=top,shape=outer_right": { "model": "szar:block/blueprint_stairs_outer", "x": 180, "y": 90, "uvlock": true },
|
||||||
|
"facing=east,half=top,shape=straight": { "model": "szar:block/blueprint_stairs", "x": 180, "uvlock": true },
|
||||||
|
"facing=north,half=bottom,shape=inner_left": { "model": "szar:block/blueprint_stairs_inner", "y": 180, "uvlock": true },
|
||||||
|
"facing=north,half=bottom,shape=inner_right": { "model": "szar:block/blueprint_stairs_inner", "y": 270, "uvlock": true },
|
||||||
|
"facing=north,half=bottom,shape=outer_left": { "model": "szar:block/blueprint_stairs_outer", "y": 180, "uvlock": true },
|
||||||
|
"facing=north,half=bottom,shape=outer_right": { "model": "szar:block/blueprint_stairs_outer", "y": 270, "uvlock": true },
|
||||||
|
"facing=north,half=bottom,shape=straight": { "model": "szar:block/blueprint_stairs", "y": 270, "uvlock": true },
|
||||||
|
"facing=north,half=top,shape=inner_left": { "model": "szar:block/blueprint_stairs_inner", "x": 180, "y": 270, "uvlock": true },
|
||||||
|
"facing=north,half=top,shape=inner_right": { "model": "szar:block/blueprint_stairs_inner", "x": 180, "uvlock": true },
|
||||||
|
"facing=north,half=top,shape=outer_left": { "model": "szar:block/blueprint_stairs_outer", "x": 180, "y": 270, "uvlock": true },
|
||||||
|
"facing=north,half=top,shape=outer_right": { "model": "szar:block/blueprint_stairs_outer", "x": 180, "uvlock": true },
|
||||||
|
"facing=north,half=top,shape=straight": { "model": "szar:block/blueprint_stairs", "x": 180, "y": 270, "uvlock": true },
|
||||||
|
"facing=south,half=bottom,shape=inner_left": { "model": "szar:block/blueprint_stairs_inner" },
|
||||||
|
"facing=south,half=bottom,shape=inner_right": { "model": "szar:block/blueprint_stairs_inner", "y": 90, "uvlock": true },
|
||||||
|
"facing=south,half=bottom,shape=outer_left": { "model": "szar:block/blueprint_stairs_outer" },
|
||||||
|
"facing=south,half=bottom,shape=outer_right": { "model": "szar:block/blueprint_stairs_outer", "y": 90, "uvlock": true },
|
||||||
|
"facing=south,half=bottom,shape=straight": { "model": "szar:block/blueprint_stairs", "y": 90, "uvlock": true },
|
||||||
|
"facing=south,half=top,shape=inner_left": { "model": "szar:block/blueprint_stairs_inner", "x": 180, "y": 90, "uvlock": true },
|
||||||
|
"facing=south,half=top,shape=inner_right": { "model": "szar:block/blueprint_stairs_inner", "x": 180, "y": 180, "uvlock": true },
|
||||||
|
"facing=south,half=top,shape=outer_left": { "model": "szar:block/blueprint_stairs_outer", "x": 180, "y": 90, "uvlock": true },
|
||||||
|
"facing=south,half=top,shape=outer_right": { "model": "szar:block/blueprint_stairs_outer", "x": 180, "y": 180, "uvlock": true },
|
||||||
|
"facing=south,half=top,shape=straight": { "model": "szar:block/blueprint_stairs", "x": 180, "y": 90, "uvlock": true },
|
||||||
|
"facing=west,half=bottom,shape=inner_left": { "model": "szar:block/blueprint_stairs_inner", "y": 90, "uvlock": true },
|
||||||
|
"facing=west,half=bottom,shape=inner_right": { "model": "szar:block/blueprint_stairs_inner", "y": 180, "uvlock": true },
|
||||||
|
"facing=west,half=bottom,shape=outer_left": { "model": "szar:block/blueprint_stairs_outer", "y": 90, "uvlock": true },
|
||||||
|
"facing=west,half=bottom,shape=outer_right": { "model": "szar:block/blueprint_stairs_outer", "y": 180, "uvlock": true },
|
||||||
|
"facing=west,half=bottom,shape=straight": { "model": "szar:block/blueprint_stairs", "y": 180, "uvlock": true },
|
||||||
|
"facing=west,half=top,shape=inner_left": { "model": "szar:block/blueprint_stairs_inner", "x": 180, "y": 180, "uvlock": true },
|
||||||
|
"facing=west,half=top,shape=inner_right": { "model": "szar:block/blueprint_stairs_inner", "x": 180, "y": 270, "uvlock": true },
|
||||||
|
"facing=west,half=top,shape=outer_left": { "model": "szar:block/blueprint_stairs_outer", "x": 180, "y": 180, "uvlock": true },
|
||||||
|
"facing=west,half=top,shape=outer_right": { "model": "szar:block/blueprint_stairs_outer", "x": 180, "y": 270, "uvlock": true },
|
||||||
|
"facing=west,half=top,shape=straight": { "model": "szar:block/blueprint_stairs", "x": 180, "y": 180, "uvlock": true }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"facing=east,half=bottom,open=false": { "model": "szar:block/blueprint_trapdoor_bottom" },
|
||||||
|
"facing=east,half=bottom,open=true": { "model": "szar:block/blueprint_trapdoor_open", "y": 90 },
|
||||||
|
"facing=east,half=top,open=false": { "model": "szar:block/blueprint_trapdoor_top" },
|
||||||
|
"facing=east,half=top,open=true": { "model": "szar:block/blueprint_trapdoor_open", "y": 90 },
|
||||||
|
"facing=north,half=bottom,open=false": { "model": "szar:block/blueprint_trapdoor_bottom" },
|
||||||
|
"facing=north,half=bottom,open=true": { "model": "szar:block/blueprint_trapdoor_open" },
|
||||||
|
"facing=north,half=top,open=false": { "model": "szar:block/blueprint_trapdoor_top" },
|
||||||
|
"facing=north,half=top,open=true": { "model": "szar:block/blueprint_trapdoor_open" },
|
||||||
|
"facing=south,half=bottom,open=false": { "model": "szar:block/blueprint_trapdoor_bottom" },
|
||||||
|
"facing=south,half=bottom,open=true": { "model": "szar:block/blueprint_trapdoor_open", "y": 180 },
|
||||||
|
"facing=south,half=top,open=false": { "model": "szar:block/blueprint_trapdoor_top" },
|
||||||
|
"facing=south,half=top,open=true": { "model": "szar:block/blueprint_trapdoor_open", "y": 180 },
|
||||||
|
"facing=west,half=bottom,open=false": { "model": "szar:block/blueprint_trapdoor_bottom" },
|
||||||
|
"facing=west,half=bottom,open=true": { "model": "szar:block/blueprint_trapdoor_open", "y": 270 },
|
||||||
|
"facing=west,half=top,open=false": { "model": "szar:block/blueprint_trapdoor_top" },
|
||||||
|
"facing=west,half=top,open=true": { "model": "szar:block/blueprint_trapdoor_open", "y": 270 }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"multipart": [
|
||||||
|
{ "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" } }
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -189,5 +189,13 @@
|
|||||||
|
|
||||||
"block.szar.tictactoe": "Tic Tac Toe",
|
"block.szar.tictactoe": "Tic Tac Toe",
|
||||||
"block.szar.connectfour": "Connect Four",
|
"block.szar.connectfour": "Connect Four",
|
||||||
"block.szar.chess": "Chess"
|
"block.szar.chess": "Chess",
|
||||||
|
"item.szar.empty_joint": "Empty Joint",
|
||||||
|
|
||||||
|
"block.szar.blueprint_stairs": "Blueprint Stairs",
|
||||||
|
"block.szar.blueprint_slab": "Blueprint Slab",
|
||||||
|
"block.szar.blueprint_door": "Blueprint Door",
|
||||||
|
"block.szar.blueprint_trapdoor": "Blueprint Trapdoor",
|
||||||
|
"block.szar.blueprint_wall": "Blueprint Wall",
|
||||||
|
"block.szar.blueprint_fence": "Blueprint Fence"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/door_bottom_left",
|
||||||
|
"textures": { "bottom": "szar:block/blueprint", "top": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/door_bottom_left_open",
|
||||||
|
"textures": { "bottom": "szar:block/blueprint", "top": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/door_bottom_right",
|
||||||
|
"textures": { "bottom": "szar:block/blueprint", "top": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/door_bottom_right_open",
|
||||||
|
"textures": { "bottom": "szar:block/blueprint", "top": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/door_top_left",
|
||||||
|
"textures": { "bottom": "szar:block/blueprint", "top": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/door_top_left_open",
|
||||||
|
"textures": { "bottom": "szar:block/blueprint", "top": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/door_top_right",
|
||||||
|
"textures": { "bottom": "szar:block/blueprint", "top": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/door_top_right_open",
|
||||||
|
"textures": { "bottom": "szar:block/blueprint", "top": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/fence_post",
|
||||||
|
"textures": { "texture": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/fence_side",
|
||||||
|
"textures": { "texture": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/slab",
|
||||||
|
"textures": { "bottom": "szar:block/blueprint", "top": "szar:block/blueprint", "side": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/cube_all",
|
||||||
|
"textures": { "all": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/slab_top",
|
||||||
|
"textures": { "bottom": "szar:block/blueprint", "top": "szar:block/blueprint", "side": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/stairs",
|
||||||
|
"textures": { "bottom": "szar:block/blueprint", "top": "szar:block/blueprint", "side": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/inner_stairs",
|
||||||
|
"textures": { "bottom": "szar:block/blueprint", "top": "szar:block/blueprint", "side": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/outer_stairs",
|
||||||
|
"textures": { "bottom": "szar:block/blueprint", "top": "szar:block/blueprint", "side": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/template_trapdoor_bottom",
|
||||||
|
"textures": { "texture": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/template_trapdoor_open",
|
||||||
|
"textures": { "texture": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/template_trapdoor_top",
|
||||||
|
"textures": { "texture": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/template_wall_post",
|
||||||
|
"textures": { "wall": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/template_wall_side",
|
||||||
|
"textures": { "wall": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{ "parent": "minecraft:block/template_wall_side_tall",
|
||||||
|
"textures": { "wall": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{ "parent": "minecraft:item/generated", "textures": { "layer0": "szar:block/blueprint" } }
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{ "parent": "szar:block/blueprint_fence_post" }
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{ "parent": "szar:block/blueprint_slab" }
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{ "parent": "szar:block/blueprint_stairs" }
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{ "parent": "szar:block/blueprint_trapdoor_bottom" }
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{ "parent": "szar:block/blueprint_wall_post" }
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "szar:item/empty_joint"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"format_version": "1.9.0",
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"textures": {
|
||||||
|
"0": "szar:item/emptyjoint3d",
|
||||||
|
"particle": "szar:item/emptyjoint3d"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [7, 8.5, 7],
|
||||||
|
"to": [9, 13.5, 9],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [7, 8.5, 7]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 2, 5], "texture": "#0"},
|
||||||
|
"east": {"uv": [2, 0, 4, 5], "texture": "#0"},
|
||||||
|
"south": {"uv": [4, 0, 6, 5], "texture": "#0"},
|
||||||
|
"west": {"uv": [6, 0, 8, 5], "texture": "#0"},
|
||||||
|
"up": {"uv": [10, 2, 8, 0], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6.9, 2.4, 6.9],
|
||||||
|
"to": [9.1, 8.6, 9.1],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [6.9, 2.4, 6.9]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 5, 2, 12], "texture": "#0"},
|
||||||
|
"east": {"uv": [2, 5, 4, 12], "texture": "#0"},
|
||||||
|
"south": {"uv": [4, 5, 6, 12], "texture": "#0"},
|
||||||
|
"west": {"uv": [6, 5, 8, 12], "texture": "#0"},
|
||||||
|
"up": {"uv": [10, 2, 8, 0], "texture": "#0"},
|
||||||
|
"down": {"uv": [10, 2, 8, 4], "texture": "#0"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"gui_light": "front",
|
||||||
|
"display": {
|
||||||
|
"thirdperson_righthand": {
|
||||||
|
"translation": [0, -2, 0]
|
||||||
|
},
|
||||||
|
"ground": {
|
||||||
|
"rotation": [90, 0, 0]
|
||||||
|
},
|
||||||
|
"gui": {
|
||||||
|
"rotation": [-67.5, 0, 45],
|
||||||
|
"scale": [1.5, 1.5, 1.5]
|
||||||
|
},
|
||||||
|
"head": {
|
||||||
|
"rotation": [90, 0, 0],
|
||||||
|
"translation": [0, 0, -16],
|
||||||
|
"scale": [1.6, 1.6, 1.6]
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"translation": [0, 0, -1.5],
|
||||||
|
"scale": [1.5, 1.5, 1.5]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 562 B After Width: | Height: | Size: 566 B |
BIN
src/main/resources/assets/szar/textures/item/empty_joint.png
Normal file
BIN
src/main/resources/assets/szar/textures/item/empty_joint.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 297 B |
BIN
src/main/resources/assets/szar/textures/item/emptyjoint3d.png
Normal file
BIN
src/main/resources/assets/szar/textures/item/emptyjoint3d.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 200 B |
17
src/main/resources/data/szar/recipes/empty_joint.json
Normal file
17
src/main/resources/data/szar/recipes/empty_joint.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
" P ",
|
||||||
|
"P P",
|
||||||
|
" P "
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"P": {
|
||||||
|
"item": "minecraft:paper"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "szar:empty_joint",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"type": "minecraft:crafting_shaped",
|
"type": "minecraft:crafting_shaped",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
"WP ",
|
" P ",
|
||||||
"PWP",
|
"PWP",
|
||||||
" PW"
|
" P "
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"W": {
|
"P": {
|
||||||
"item": "szar:weed"
|
"item": "szar:weed"
|
||||||
},
|
},
|
||||||
"P": {
|
"W": {
|
||||||
"item": "minecraft:paper"
|
"item": "szar:empty_joint"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
|
|||||||
@@ -6,3 +6,4 @@ accessible class net/minecraft/client/gui/hud/InGameHud$HeartType
|
|||||||
accessible field net/minecraft/server/network/ServerPlayerInteractionManager player Lnet/minecraft/server/network/ServerPlayerEntity;
|
accessible field net/minecraft/server/network/ServerPlayerInteractionManager player Lnet/minecraft/server/network/ServerPlayerEntity;
|
||||||
accessible method net/minecraft/client/render/entity/LivingEntityRenderer addFeature (Lnet/minecraft/client/render/entity/feature/FeatureRenderer;)Z
|
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 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;
|
||||||
Reference in New Issue
Block a user