From 9c48313990be4e51325238de1b53a59a02f367c3 Mon Sep 17 00:00:00 2001 From: TGGamesYT Date: Thu, 26 Mar 2026 18:03:52 +0100 Subject: [PATCH] update readme and make blueprints survival friendly --- README.md | 55 +++++--- gradle.properties | 2 +- .../client/mixin/ParticleManagerMixin.java | 130 ++++++++++++++++++ src/client/resources/szar.client.mixins.json | 1 + .../dev/tggamesyt/szar/BlueprintBehavior.java | 50 +++++-- .../tggamesyt/szar/BlueprintBlockEntity.java | 3 + .../dev/tggamesyt/szar/BlueprintBlocks.java | 44 +++--- .../tggamesyt/szar/BlueprintWallBlock.java | 1 + src/main/java/dev/tggamesyt/szar/Szar.java | 10 +- .../szar/blockstates/blueprint_wall.json | 23 +++- .../resources/assets/szar/lang/en_us.json | 3 +- .../block/blueprint_fence_inventory.json | 6 + .../block/blueprint_wall_inventory.json | 6 + .../assets/szar/models/item/blueprint.json | 6 + .../szar/models/item/blueprint_door.json | 2 +- .../szar/models/item/blueprint_fence.json | 2 +- .../szar/models/item/blueprint_wall.json | 2 +- .../szar/textures/block/blueprint_door.png | Bin 0 -> 984 bytes .../assets/szar/textures/item/blueprint.png | Bin 756 -> 854 bytes .../data/minecraft/tags/blocks/fences.json | 6 + .../data/minecraft/tags/blocks/walls.json | 6 + .../minecraft/tags/blocks/wooden_fences.json | 6 + .../loot_tables/blocks/blueprint_door.json | 14 ++ .../loot_tables/blocks/blueprint_fence.json | 14 ++ .../loot_tables/blocks/blueprint_slab.json | 29 ++++ .../loot_tables/blocks/blueprint_stairs.json | 14 ++ .../blocks/blueprint_trapdoor.json | 14 ++ .../loot_tables/blocks/blueprint_wall.json | 14 ++ .../data/szar/recipes/blueprint.json | 20 +++ .../data/szar/recipes/blueprint_door.json | 17 +++ .../data/szar/recipes/blueprint_fence.json | 19 +++ .../data/szar/recipes/blueprint_slabs.json | 15 ++ .../data/szar/recipes/blueprint_stairs.json | 17 +++ .../data/szar/recipes/blueprint_trapdoor.json | 16 +++ .../data/szar/recipes/blueprint_wall.json | 16 +++ .../resources/data/szar/tags/items/blue.json | 8 ++ src/main/resources/szar.accesswidener | 3 +- 37 files changed, 532 insertions(+), 62 deletions(-) create mode 100644 src/client/java/dev/tggamesyt/szar/client/mixin/ParticleManagerMixin.java create mode 100644 src/main/resources/assets/szar/models/block/blueprint_fence_inventory.json create mode 100644 src/main/resources/assets/szar/models/block/blueprint_wall_inventory.json create mode 100644 src/main/resources/assets/szar/models/item/blueprint.json create mode 100644 src/main/resources/assets/szar/textures/block/blueprint_door.png create mode 100644 src/main/resources/data/minecraft/tags/blocks/fences.json create mode 100644 src/main/resources/data/minecraft/tags/blocks/walls.json create mode 100644 src/main/resources/data/minecraft/tags/blocks/wooden_fences.json create mode 100644 src/main/resources/data/szar/loot_tables/blocks/blueprint_door.json create mode 100644 src/main/resources/data/szar/loot_tables/blocks/blueprint_fence.json create mode 100644 src/main/resources/data/szar/loot_tables/blocks/blueprint_slab.json create mode 100644 src/main/resources/data/szar/loot_tables/blocks/blueprint_stairs.json create mode 100644 src/main/resources/data/szar/loot_tables/blocks/blueprint_trapdoor.json create mode 100644 src/main/resources/data/szar/loot_tables/blocks/blueprint_wall.json create mode 100644 src/main/resources/data/szar/recipes/blueprint.json create mode 100644 src/main/resources/data/szar/recipes/blueprint_door.json create mode 100644 src/main/resources/data/szar/recipes/blueprint_fence.json create mode 100644 src/main/resources/data/szar/recipes/blueprint_slabs.json create mode 100644 src/main/resources/data/szar/recipes/blueprint_stairs.json create mode 100644 src/main/resources/data/szar/recipes/blueprint_trapdoor.json create mode 100644 src/main/resources/data/szar/recipes/blueprint_wall.json create mode 100644 src/main/resources/data/szar/tags/items/blue.json diff --git a/README.md b/README.md index d817519..d5cfd07 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,49 @@ ![Showcase](https://tggamesyt.dev/assets/szar.gif) # Szar +*Szar means Shit in Hungarian* -Ez egy privát, kísérleti fabric Minecraft 1.20.1 mod. +Szar is a private, experimental Fabric Minecraft 1.20.1 mod created as a school programming project and as a joke between classmates and friends. -## FIGYELMEZTETÉS -Ez a mod 18+ tartalmat tartalmaz, beleértve: -- sértő, rasszista vagy provokatív elemeket -- felnőtteknek szóló témákat -- illegális vagy valós életben elfogadhatatlan dolgok fiktív megjelenítését +The mod features a wide variety of over-the-top, humorous, and intentionally absurd ideas. Its content is entirely fictional and parody-style, designed for fun and creativity, and **not meant to be taken seriously**. -A mod **nem oktatási célú**, **nem támogatja**, és **nem népszerűsíti** ezeket a témákat. -Kizárólag saját használatra készült. +## Features -Ha ezek a tartalmak zavaróak számodra, **NE használd**. -A mod használata **kizárólag saját felelősségre történik**. +This mod includes (but is not limited to): + +- Crazy functional blocks +- Custom music discs +- Weapons such as guns +- Casinos with multiple gambling machines +- Police systems +- Drugs, memes, and historical figures +- Nukes and backrooms +- Board games +- And basically anything that would be “crazy in Minecraft” + +If you can imagine it being absurd or over-the-top in Minecraft, chances are this mod has it, if not, please contact me and it will! + +# Hungarian / Magyar +# Szar +*buzi ai forditas mer lusta vagyok* -# Shit +A Szar egy privát, kísérleti Fabric Minecraft 1.20.1 mod, amelyet iskolai programozási projektként és viccnek készítettek osztálytársak és barátok között. -This is a private, experimental 1.20.1 fabric Minecraft mod. +A mod számos túlzó, humoros és szándékosan abszurd ötletet tartalmaz. A tartalom teljesen fiktív és paródiaszerű, szórakoztatásra és kreativitásra készült, **nem szabad komolyan venni**. -## WARNING (EN) +### Funkciók -This mod contains **18+ content**, including the following: -- offensive, provocative, or otherwise inappropriate themes -- adult themed content -- fictional representations of content that would be unacceptable or illegal in real life +A mod tartalmaz (de nem kizárólagosan): -This mod is **not intended for public use**, does **not endorse** any of the themes depicted, and was created **for personal use only**. +- Őrült, funkcionális blokkok +- Egyedi zenélőlemezek +- Fegyverek, például pisztolyok +- Kaszinók többféle szerencsejáték géppel +- Rendőrségi rendszerek +- Drogok, mémek és történelmi személyek +- Nukleáris fegyverek és backroomból inspirált helyszínek +- Társasjátékok +- És gyakorlatilag bármi, ami “őrült” lenne a Minecraftban -If you find such content disturbing or offensive, **do not use this mod**. -Use at your **own responsibility**. +Ha el tudod képzelni, hogy valami túlzó vagy őrült lehet a Minecraftban, nagy valószínűséggel ez a mod tartalmazza, ha meg nem, akkor írj rám, és fogja! \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index eed3948..4abad65 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ minecraft_version=1.20.1 yarn_mappings=1.20.1+build.10 loader_version=0.18.3 # Mod Properties -mod_version=26.3.25.2 +mod_version=26.3.26 maven_group=dev.tggamesyt archives_base_name=szar # Dependencies diff --git a/src/client/java/dev/tggamesyt/szar/client/mixin/ParticleManagerMixin.java b/src/client/java/dev/tggamesyt/szar/client/mixin/ParticleManagerMixin.java new file mode 100644 index 0000000..e918684 --- /dev/null +++ b/src/client/java/dev/tggamesyt/szar/client/mixin/ParticleManagerMixin.java @@ -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) + ); + } +} \ No newline at end of file diff --git a/src/client/resources/szar.client.mixins.json b/src/client/resources/szar.client.mixins.json index b9a6424..66882fb 100644 --- a/src/client/resources/szar.client.mixins.json +++ b/src/client/resources/szar.client.mixins.json @@ -16,6 +16,7 @@ "MouseMixin", "PackMixin", "PackScreenCloseMixin", + "ParticleManagerMixin", "PlayerEntityRendererMixin", "PlayerHeldItemFeatureRendererMixin", "PlayerModelMixin", diff --git a/src/main/java/dev/tggamesyt/szar/BlueprintBehavior.java b/src/main/java/dev/tggamesyt/szar/BlueprintBehavior.java index f4608e0..eb2c1a5 100644 --- a/src/main/java/dev/tggamesyt/szar/BlueprintBehavior.java +++ b/src/main/java/dev/tggamesyt/szar/BlueprintBehavior.java @@ -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()); + } } } } diff --git a/src/main/java/dev/tggamesyt/szar/BlueprintBlockEntity.java b/src/main/java/dev/tggamesyt/szar/BlueprintBlockEntity.java index 48af502..624a44e 100644 --- a/src/main/java/dev/tggamesyt/szar/BlueprintBlockEntity.java +++ b/src/main/java/dev/tggamesyt/szar/BlueprintBlockEntity.java @@ -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. */ diff --git a/src/main/java/dev/tggamesyt/szar/BlueprintBlocks.java b/src/main/java/dev/tggamesyt/szar/BlueprintBlocks.java index e769228..27b1eb1 100644 --- a/src/main/java/dev/tggamesyt/szar/BlueprintBlocks.java +++ b/src/main/java/dev/tggamesyt/szar/BlueprintBlocks.java @@ -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 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 } diff --git a/src/main/java/dev/tggamesyt/szar/BlueprintWallBlock.java b/src/main/java/dev/tggamesyt/szar/BlueprintWallBlock.java index 734b4ed..8d84a3f 100644 --- a/src/main/java/dev/tggamesyt/szar/BlueprintWallBlock.java +++ b/src/main/java/dev/tggamesyt/szar/BlueprintWallBlock.java @@ -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 { diff --git a/src/main/java/dev/tggamesyt/szar/Szar.java b/src/main/java/dev/tggamesyt/szar/Szar.java index 4627980..4d4391b 100644 --- a/src/main/java/dev/tggamesyt/szar/Szar.java +++ b/src/main/java/dev/tggamesyt/szar/Szar.java @@ -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); diff --git a/src/main/resources/assets/szar/blockstates/blueprint_wall.json b/src/main/resources/assets/szar/blockstates/blueprint_wall.json index d41c07f..1a87b92 100644 --- a/src/main/resources/assets/szar/blockstates/blueprint_wall.json +++ b/src/main/resources/assets/szar/blockstates/blueprint_wall.json @@ -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" } } ] } \ No newline at end of file diff --git a/src/main/resources/assets/szar/lang/en_us.json b/src/main/resources/assets/szar/lang/en_us.json index 0bddfc8..ac7d9c3 100644 --- a/src/main/resources/assets/szar/lang/en_us.json +++ b/src/main/resources/assets/szar/lang/en_us.json @@ -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" } diff --git a/src/main/resources/assets/szar/models/block/blueprint_fence_inventory.json b/src/main/resources/assets/szar/models/block/blueprint_fence_inventory.json new file mode 100644 index 0000000..81d5bee --- /dev/null +++ b/src/main/resources/assets/szar/models/block/blueprint_fence_inventory.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/fence_inventory", + "textures": { + "texture": "szar:block/blueprint" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/szar/models/block/blueprint_wall_inventory.json b/src/main/resources/assets/szar/models/block/blueprint_wall_inventory.json new file mode 100644 index 0000000..caa470b --- /dev/null +++ b/src/main/resources/assets/szar/models/block/blueprint_wall_inventory.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/wall_inventory", + "textures": { + "wall": "szar:block/blueprint" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/szar/models/item/blueprint.json b/src/main/resources/assets/szar/models/item/blueprint.json new file mode 100644 index 0000000..5185885 --- /dev/null +++ b/src/main/resources/assets/szar/models/item/blueprint.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "szar:item/blueprint" + } +} diff --git a/src/main/resources/assets/szar/models/item/blueprint_door.json b/src/main/resources/assets/szar/models/item/blueprint_door.json index 4c643b5..716ea02 100644 --- a/src/main/resources/assets/szar/models/item/blueprint_door.json +++ b/src/main/resources/assets/szar/models/item/blueprint_door.json @@ -1 +1 @@ -{ "parent": "minecraft:item/generated", "textures": { "layer0": "szar:block/blueprint" } } \ No newline at end of file +{ "parent": "minecraft:item/generated", "textures": { "layer0": "szar:block/blueprint_door" } } \ No newline at end of file diff --git a/src/main/resources/assets/szar/models/item/blueprint_fence.json b/src/main/resources/assets/szar/models/item/blueprint_fence.json index 1b76c2a..2044c92 100644 --- a/src/main/resources/assets/szar/models/item/blueprint_fence.json +++ b/src/main/resources/assets/szar/models/item/blueprint_fence.json @@ -1 +1 @@ -{ "parent": "szar:block/blueprint_fence_post" } \ No newline at end of file +{ "parent": "szar:block/blueprint_fence_inventory" } \ No newline at end of file diff --git a/src/main/resources/assets/szar/models/item/blueprint_wall.json b/src/main/resources/assets/szar/models/item/blueprint_wall.json index 26441b5..965d61c 100644 --- a/src/main/resources/assets/szar/models/item/blueprint_wall.json +++ b/src/main/resources/assets/szar/models/item/blueprint_wall.json @@ -1 +1 @@ -{ "parent": "szar:block/blueprint_wall_post" } \ No newline at end of file +{ "parent": "szar:block/blueprint_wall_inventory" } \ No newline at end of file diff --git a/src/main/resources/assets/szar/textures/block/blueprint_door.png b/src/main/resources/assets/szar/textures/block/blueprint_door.png new file mode 100644 index 0000000000000000000000000000000000000000..c5545bc95f5c73d9675678232307fafe30b7f65c GIT binary patch literal 984 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`)Ym%P6qNh3p^r= z85sBugD~Uq{1qt-426v-9>hE{&S69ePu~iQ@^)>JLw)`r|23QrX=bnrWhOQrWhNin420}7^N8|DM76-$xK7opH~bG24H~b zgJkp#^$b8x2C=RDi!xJzt^iqSXJ`YKM-j8p2RQ`EVRjG^pkIM3c*uZ)2_CwsdB7ko z2Zo)_lo{N>D0%Mb;uvD#e{`~K{^bOL2Kn2ab7wpdm~3)zi;1sQQwUqj4G95mZEYdx zNBIUHnI}jHCLh&*(YEVSm`I2ttBcB#pG6xV)$A$EwoY5LNw+L-SM}FB#h0qBe%x0) z+WkDgfARjG-_FUMpJ(&v@$&O8Rvmih*nXTp@AI##(my_YTBNVI&n}ceg$_l;>p(2$?$bvvk9)s<|3Gk1dw4IzCu@ z!YFO8k&%d-P4?A2fYB@dO^wT1l_ALp|EG+EzKQ5`?Sa96utzg$8136yF8p|Vj zwcU>=h~>P0!zkpX)?Bu-!F=|kFI6n*=^0D4T34|KJ-R)KNoD4qNX5x#lh%Z2u3eWH zCD!;pIYcYPly_0Lt7FuM5AWEx%X=2Bsz~ZvmZ>pQhvj+8=?()PN3U}}A$2=i4mk7p z&-k|c#$3MU#mpQwcO2(??q|PfbZ?T#47Z6n3tKkcTT+7LKo*B-8&bItHaQ?a7N*4tg literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/szar/textures/item/blueprint.png b/src/main/resources/assets/szar/textures/item/blueprint.png index 72fc86e9f5bddd75e35c03610e3487a280e2dc58..bd99e0c821cc1e233e10270baebcf6e08b1a83dc 100644 GIT binary patch delta 411 zcmV;M0c8I41=a>3iBL{Q4GJ0x0000DNk~Le0000W0000W2nGNE0CReJ^synw0e=Bl zNklcj}egfID%Kb=y3-kX*ZMMjkeB;BJsR~{oG(y4}bmZvDq%Q>;K606L!f%l!f zQY4}WsI=gqe~*Fyb&Mv%c0U6!~i|OTd7kD&ofy7we1tG2;$MAXPmt7LQ0-G1WSqDjG`4V~-O0