From 5bbfc74a48c69a590363addbebb15d38652ba3db Mon Sep 17 00:00:00 2001 From: Martin Prokoph Date: Wed, 24 Jul 2024 10:49:06 +0200 Subject: [PATCH] Preparations for Polymer addon --- gradle.properties | 2 +- .../motschen/rocks/RocksDataGen.java | 1 - .../motschen/rocks/RocksMain.java | 58 ++++++---- .../motschen/rocks/block/NetherGeyser.java | 2 +- .../motschen/rocks/block/OverworldGeyser.java | 2 +- .../motschen/rocks/block/Pinecone.java | 2 +- .../motschen/rocks/block/Rock.java | 2 +- .../motschen/rocks/block/Seashell.java | 2 +- .../motschen/rocks/block/Starfish.java | 2 +- .../motschen/rocks/block/Stick.java | 2 +- .../blockentity/NetherGeyserBlockEntity.java | 13 ++- .../OverworldGeyserBlockEntity.java | 13 ++- .../motschen/rocks/util/ParticleUtil.java | 15 +++ .../RegistryUtil.java} | 16 ++- .../motschen/rocks/world/FeatureRegistry.java | 2 +- .../configured_feature/MiscFeatures.java | 3 +- .../configured_feature/NetherFeatures.java | 3 +- .../configured_feature/RockFeatures.java | 3 +- .../configured_feature/StickFeatures.java | 4 +- .../assets/rocks/models/block/geyser_off.json | 34 +----- .../rocks/models/block/large_oak_stick.json | 41 +------ .../rocks/models/block/seashell_pink.json | 41 +------ .../rocks/models/item/acacia_stick.json | 6 +- .../rocks/models/item/bamboo_stick.json | 6 +- .../assets/rocks/models/item/birch_stick.json | 6 +- .../rocks/models/item/cherry_stick.json | 6 +- .../rocks/models/item/crimson_stick.json | 6 +- .../rocks/models/item/dark_oak_stick.json | 6 +- .../assets/rocks/models/item/geyser.json | 105 +++++++++++++++++- .../rocks/models/item/jungle_stick.json | 6 +- .../rocks/models/item/mangrove_stick.json | 6 +- .../rocks/models/item/nether_geyser.json | 6 +- .../assets/rocks/models/item/oak_stick.json | 85 +++++++++++++- .../assets/rocks/models/item/seashell.json | 83 +++++++++++++- .../rocks/models/item/spruce_stick.json | 6 +- .../rocks/models/item/warped_stick.json | 6 +- 36 files changed, 423 insertions(+), 179 deletions(-) create mode 100644 src/main/java/eu/midnightdust/motschen/rocks/util/ParticleUtil.java rename src/main/java/eu/midnightdust/motschen/rocks/{RocksRegistryUtils.java => util/RegistryUtil.java} (83%) diff --git a/gradle.properties b/gradle.properties index 7c2b6bf..871f425 100755 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx2G loader_version=0.15.11 # Mod Properties - mod_version = 1.8.1 + mod_version = 1.8.2 maven_group = eu.midnightdust.motschen archives_base_name = rocks release_type=release diff --git a/src/main/java/eu/midnightdust/motschen/rocks/RocksDataGen.java b/src/main/java/eu/midnightdust/motschen/rocks/RocksDataGen.java index b8afc0a..6ff9bb5 100644 --- a/src/main/java/eu/midnightdust/motschen/rocks/RocksDataGen.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/RocksDataGen.java @@ -1,6 +1,5 @@ package eu.midnightdust.motschen.rocks; -import eu.midnightdust.motschen.rocks.world.FeatureInjector; import eu.midnightdust.motschen.rocks.world.configured_feature.MiscFeatures; import eu.midnightdust.motschen.rocks.world.configured_feature.NetherFeatures; import eu.midnightdust.motschen.rocks.world.configured_feature.RockFeatures; diff --git a/src/main/java/eu/midnightdust/motschen/rocks/RocksMain.java b/src/main/java/eu/midnightdust/motschen/rocks/RocksMain.java index cb3adbd..f89d9fc 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/RocksMain.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/RocksMain.java @@ -10,9 +10,10 @@ import eu.midnightdust.motschen.rocks.config.RocksConfig; import eu.midnightdust.motschen.rocks.world.*; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; -import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; import net.minecraft.block.Block; -import net.minecraft.item.*; +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroup; +import net.minecraft.item.ItemStack; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; import net.minecraft.registry.RegistryKey; @@ -24,8 +25,8 @@ import net.minecraft.util.Identifier; import java.util.ArrayList; import java.util.List; -import static eu.midnightdust.motschen.rocks.RocksRegistryUtils.registerBlockWithItem; -import static eu.midnightdust.motschen.rocks.RocksRegistryUtils.registerItem; +import static eu.midnightdust.motschen.rocks.util.RegistryUtil.registerBlockWithItem; +import static eu.midnightdust.motschen.rocks.util.RegistryUtil.registerItem; public class RocksMain implements ModInitializer { public static final String MOD_ID = "rocks"; @@ -64,15 +65,15 @@ public class RocksMain implements ModInitializer { public static Block Geyser = new OverworldGeyser(); public static Block NetherGeyser = new NetherGeyser(); - public static Item CobblestoneSplitter = new Item(new Item.Settings()); - public static Item GraniteSplitter = new Item(new Item.Settings()); - public static Item DioriteSplitter = new Item(new Item.Settings()); - public static Item AndesiteSplitter = new Item(new Item.Settings()); - public static Item SandStoneSplitter = new Item(new Item.Settings()); - public static Item RedSandStoneSplitter = new Item(new Item.Settings()); - public static Item EndStoneSplitter = new Item(new Item.Settings()); - public static Item NetherrackSplitter = new Item(new Item.Settings()); - public static Item SoulSoilSplitter = new Item(new Item.Settings()); + public static Item CobblestoneSplitter; + public static Item GraniteSplitter; + public static Item DioriteSplitter; + public static Item AndesiteSplitter; + public static Item SandStoneSplitter; + public static Item RedSandStoneSplitter; + public static Item EndStoneSplitter; + public static Item NetherrackSplitter; + public static Item SoulSoilSplitter; public static List groupItems = new ArrayList<>(); public static ItemGroup RocksGroup; public static final RegistryKey ROCKS_GROUP = RegistryKey.of(RegistryKeys.ITEM_GROUP, Identifier.of(MOD_ID, "rocks")); @@ -111,6 +112,16 @@ public class RocksMain implements ModInitializer { registerBlockWithItem(Identifier.of(MOD_ID,"seashell"), Seashell); registerBlockWithItem(Identifier.of(MOD_ID,"starfish"), Starfish); + CobblestoneSplitter = simpleItem(); + GraniteSplitter = simpleItem(); + DioriteSplitter = simpleItem(); + AndesiteSplitter = simpleItem(); + SandStoneSplitter = simpleItem(); + RedSandStoneSplitter = simpleItem(); + EndStoneSplitter = simpleItem(); + NetherrackSplitter = simpleItem(); + SoulSoilSplitter = simpleItem(); + registerItem(Identifier.of(MOD_ID,"cobblestone_splitter"), CobblestoneSplitter); registerItem(Identifier.of(MOD_ID,"granite_splitter"), GraniteSplitter); registerItem(Identifier.of(MOD_ID,"diorite_splitter"), DioriteSplitter); @@ -121,15 +132,20 @@ public class RocksMain implements ModInitializer { registerItem(Identifier.of(MOD_ID,"netherrack_splitter"), NetherrackSplitter); registerItem(Identifier.of(MOD_ID,"soul_soil_splitter"), SoulSoilSplitter); - RocksGroup = FabricItemGroup.builder().displayName(Text.translatable("itemGroup.rocks.rocks")).icon(() -> new ItemStack(RocksMain.Rock)).entries(((displayContext, entries) -> { - List visibleGroupItems = new ArrayList<>(groupItems); - entries.addAll(visibleGroupItems); - })).build(); - Registry.register(Registries.ITEM_GROUP, ROCKS_GROUP, RocksGroup); - new FeatureRegistry<>(); + registerItemGroup(); + + new FeatureRegistry(); FeatureInjector.init(); BlockEntityInit.init(); } - - + public static Identifier id(String path) { + return Identifier.of(MOD_ID, path); + } + public static Item simpleItem() { + return new Item(new Item.Settings()); + } + public static void registerItemGroup() { + RocksGroup = FabricItemGroup.builder().displayName(Text.translatable("itemGroup.rocks.rocks")).icon(() -> new ItemStack(RocksMain.Rock)).entries(((displayContext, entries) -> entries.addAll(groupItems))).build(); + Registry.register(Registries.ITEM_GROUP, ROCKS_GROUP, RocksGroup); + } } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/block/NetherGeyser.java b/src/main/java/eu/midnightdust/motschen/rocks/block/NetherGeyser.java index 89ae128..9485de7 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/block/NetherGeyser.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/block/NetherGeyser.java @@ -28,7 +28,7 @@ public class NetherGeyser extends BlockWithEntity implements BlockEntityProvider public static final BooleanProperty ACTIVE = BooleanProperty.of("active"); public NetherGeyser() { - super(AbstractBlock.Settings.copy(Blocks.STONE).strength(10).noCollision().nonOpaque().sounds(BlockSoundGroup.STONE)); + super(AbstractBlock.Settings.copy(Blocks.STONE).strength(10).noCollision().dynamicBounds().nonOpaque().sounds(BlockSoundGroup.STONE)); this.setDefaultState(this.stateManager.getDefaultState().with(ACTIVE, false)); } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/block/OverworldGeyser.java b/src/main/java/eu/midnightdust/motschen/rocks/block/OverworldGeyser.java index e001c91..12a72a0 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/block/OverworldGeyser.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/block/OverworldGeyser.java @@ -32,7 +32,7 @@ public class OverworldGeyser extends BlockWithEntity implements BlockEntityProvi public static final BooleanProperty SNOWY = Properties.SNOWY; public OverworldGeyser() { - super(AbstractBlock.Settings.copy(Blocks.STONE).strength(10).noCollision().nonOpaque().sounds(BlockSoundGroup.STONE)); + super(AbstractBlock.Settings.copy(Blocks.STONE).strength(10).noCollision().dynamicBounds().nonOpaque().sounds(BlockSoundGroup.STONE)); this.setDefaultState(this.stateManager.getDefaultState().with(ACTIVE, false).with(SNOWY, false)); } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/block/Pinecone.java b/src/main/java/eu/midnightdust/motschen/rocks/block/Pinecone.java index 7212ace..5c772ac 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/block/Pinecone.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/block/Pinecone.java @@ -16,7 +16,7 @@ public class Pinecone extends Block { private static final VoxelShape SHAPE; public Pinecone() { - super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.WOOD)); + super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().dynamicBounds().sounds(BlockSoundGroup.WOOD)); this.setDefaultState(this.stateManager.getDefaultState()); } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/block/Rock.java b/src/main/java/eu/midnightdust/motschen/rocks/block/Rock.java index 1a08b40..7435f0b 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/block/Rock.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/block/Rock.java @@ -28,7 +28,7 @@ public class Rock extends Block { private static final EnumProperty ROCK_VARIATION = RocksMain.ROCK_VARIATION; public Rock() { - super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.STONE)); + super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().dynamicBounds().sounds(BlockSoundGroup.STONE)); this.setDefaultState(this.stateManager.getDefaultState().with(ROCK_VARIATION, RockVariation.TINY)); } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/block/Seashell.java b/src/main/java/eu/midnightdust/motschen/rocks/block/Seashell.java index f059769..389c4ad 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/block/Seashell.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/block/Seashell.java @@ -33,7 +33,7 @@ public class Seashell extends Block implements Waterloggable { public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED; public Seashell() { - super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.STONE)); + super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().dynamicBounds().sounds(BlockSoundGroup.STONE)); this.setDefaultState(this.stateManager.getDefaultState().with(SEASHELL_VARIATION, SeashellVariation.PINK).with(WATERLOGGED, false)); } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/block/Starfish.java b/src/main/java/eu/midnightdust/motschen/rocks/block/Starfish.java index 4dc301a..b0c5e09 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/block/Starfish.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/block/Starfish.java @@ -39,7 +39,7 @@ public class Starfish extends Block implements Waterloggable { public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED; public Starfish() { - super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.CORAL)); + super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().dynamicBounds().sounds(BlockSoundGroup.CORAL)); this.setDefaultState(this.stateManager.getDefaultState().with(STARFISH_VARIATION, StarfishVariation.RED).with(WATERLOGGED, false)); } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/block/Stick.java b/src/main/java/eu/midnightdust/motschen/rocks/block/Stick.java index fcf95a2..667ab9c 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/block/Stick.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/block/Stick.java @@ -31,7 +31,7 @@ public class Stick extends Block { public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED; public Stick() { - super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.WOOD)); + super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().dynamicBounds().sounds(BlockSoundGroup.WOOD)); this.setDefaultState(this.stateManager.getDefaultState().with(STICK_VARIATION, StickVariation.SMALL).with(WATERLOGGED, false)); } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/block/blockentity/NetherGeyserBlockEntity.java b/src/main/java/eu/midnightdust/motschen/rocks/block/blockentity/NetherGeyserBlockEntity.java index dcaaf5b..73135ef 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/block/blockentity/NetherGeyserBlockEntity.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/block/blockentity/NetherGeyserBlockEntity.java @@ -3,11 +3,14 @@ package eu.midnightdust.motschen.rocks.block.blockentity; import eu.midnightdust.motschen.rocks.RocksMain; import eu.midnightdust.motschen.rocks.block.NetherGeyser; import eu.midnightdust.motschen.rocks.config.RocksConfig; +import eu.midnightdust.motschen.rocks.util.ParticleUtil; +import net.fabricmc.fabric.api.networking.v1.PlayerLookup; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.particle.ParticleTypes; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; public class NetherGeyserBlockEntity extends BlockEntity { @@ -18,7 +21,7 @@ public class NetherGeyserBlockEntity extends BlockEntity { } public static void tick(World world, BlockPos pos, BlockState state, NetherGeyserBlockEntity blockEntity) { - assert world != null; + if (world == null || world.isClient) return; if (world.getBlockState(pos).getBlock() == RocksMain.NetherGeyser) { PlayerEntity player = world.getClosestPlayer(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 3, true); PlayerEntity player2 = world.getClosestPlayer(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 1, true); @@ -44,9 +47,11 @@ public class NetherGeyserBlockEntity extends BlockEntity { } if (state.get(NetherGeyser.ACTIVE)) { - world.addParticle(ParticleTypes.LAVA, pos.getX() + 0.5, pos.getY() + 0.1, pos.getZ() + 0.5, 1, 1.5, 1); - world.addParticle(ParticleTypes.LAVA, pos.getX() + 0.5, pos.getY() + 1.0, pos.getZ() + 0.5, 1, 1.5, 1); - world.addParticle(ParticleTypes.SMOKE, pos.getX() + 0.5, pos.getY() + 0.1, pos.getZ() + 0.5, 0, 0.3, 0); + PlayerLookup.tracking(blockEntity).forEach(watchingPlayer -> { + ParticleUtil.spawnParticle(watchingPlayer, ParticleTypes.LAVA, new Vec3d(pos.getX() + 0.5, pos.getY() + 0.1, pos.getZ() + 0.5), new Vec3d(1, 1.5d, 1), 1); + ParticleUtil.spawnParticle(watchingPlayer, ParticleTypes.LAVA, new Vec3d(pos.getX() + 0.5, pos.getY() + 1.0, pos.getZ() + 0.5), new Vec3d(1, 1.5d, 1), 1); + ParticleUtil.spawnParticle(watchingPlayer, ParticleTypes.SMOKE, new Vec3d(pos.getX() + 0.5, pos.getY() + 0.1, pos.getZ() + 0.5), new Vec3d(0, 0.3, 0), 1); + }); } } } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/block/blockentity/OverworldGeyserBlockEntity.java b/src/main/java/eu/midnightdust/motschen/rocks/block/blockentity/OverworldGeyserBlockEntity.java index 9ec85f3..f804acf 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/block/blockentity/OverworldGeyserBlockEntity.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/block/blockentity/OverworldGeyserBlockEntity.java @@ -3,6 +3,8 @@ package eu.midnightdust.motschen.rocks.block.blockentity; import eu.midnightdust.motschen.rocks.RocksMain; import eu.midnightdust.motschen.rocks.block.OverworldGeyser; import eu.midnightdust.motschen.rocks.config.RocksConfig; +import eu.midnightdust.motschen.rocks.util.ParticleUtil; +import net.fabricmc.fabric.api.networking.v1.PlayerLookup; import net.minecraft.block.BlockState; import net.minecraft.block.GrassBlock; import net.minecraft.block.entity.BlockEntity; @@ -12,6 +14,7 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.particle.ParticleTypes; import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3d; import net.minecraft.world.BlockStateRaycastContext; import net.minecraft.world.World; @@ -23,7 +26,7 @@ public class OverworldGeyserBlockEntity extends BlockEntity { } public static void tick(World world, BlockPos pos, BlockState state, OverworldGeyserBlockEntity blockEntity) { - assert world != null; + if (world == null || world.isClient) return; if (world.getBlockState(pos).getBlock() == RocksMain.Geyser) { PlayerEntity player = world.getClosestPlayer(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 3, true); PlayerEntity player2 = world.getClosestPlayer(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 8, true); @@ -46,9 +49,11 @@ public class OverworldGeyserBlockEntity extends BlockEntity { } if (state.get(OverworldGeyser.ACTIVE)) { - world.addParticle(ParticleTypes.SPIT, pos.getX() + 0.5, pos.getY() + 0.1, pos.getZ() + 0.5, 0, 1.0, 0); - world.addParticle(ParticleTypes.SPIT, pos.getX() + 0.5, pos.getY() + 0.3, pos.getZ() + 0.5, 0, 1.0, 0); - world.addParticle(ParticleTypes.SPLASH, pos.getX() + 0.5, pos.getY() + 1.0, pos.getZ() + 0.5, -0.01, 1.5, -0.01); + PlayerLookup.tracking(blockEntity).forEach(watchingPlayer -> { + ParticleUtil.spawnParticle(watchingPlayer, ParticleTypes.SPIT, new Vec3d(pos.getX() + 0.5, pos.getY() + 0.1, pos.getZ() + 0.5), new Vec3d(0, 16.0, 0), 0.3f); + ParticleUtil.spawnParticle(watchingPlayer, ParticleTypes.SPIT, new Vec3d(pos.getX() + 0.5, pos.getY() + 2.3, pos.getZ() + 0.5), new Vec3d(0, 64.0, 0), 0.1f); + ParticleUtil.spawnParticle(watchingPlayer, ParticleTypes.SPLASH, new Vec3d(pos.getX() + 0.5, pos.getY() + 1.0, pos.getZ() + 0.5), new Vec3d(-0.01, 16.5, -0.01), 0.3f); + }); } } } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/util/ParticleUtil.java b/src/main/java/eu/midnightdust/motschen/rocks/util/ParticleUtil.java new file mode 100644 index 0000000..eac7783 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/rocks/util/ParticleUtil.java @@ -0,0 +1,15 @@ +package eu.midnightdust.motschen.rocks.util; + +import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; +import net.minecraft.network.packet.s2c.play.ParticleS2CPacket; +import net.minecraft.particle.ParticleEffect; +import net.minecraft.particle.ParticleType; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.util.math.Vec3d; + +public class ParticleUtil { + public static void spawnParticle(ServerPlayerEntity player, ParticleType type, Vec3d pos, Vec3d offset, float speed) { + ServerPlayNetworking.getSender(player).sendPacket(new ParticleS2CPacket((ParticleEffect) type, false, pos.x, pos.y, pos.z, + (float) offset.x / 16f, (float) offset.y / 16f, (float) offset.z / 16f, speed, 1)); + } +} diff --git a/src/main/java/eu/midnightdust/motschen/rocks/RocksRegistryUtils.java b/src/main/java/eu/midnightdust/motschen/rocks/util/RegistryUtil.java similarity index 83% rename from src/main/java/eu/midnightdust/motschen/rocks/RocksRegistryUtils.java rename to src/main/java/eu/midnightdust/motschen/rocks/util/RegistryUtil.java index bd0c275..eff5e16 100644 --- a/src/main/java/eu/midnightdust/motschen/rocks/RocksRegistryUtils.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/util/RegistryUtil.java @@ -1,5 +1,6 @@ -package eu.midnightdust.motschen.rocks; +package eu.midnightdust.motschen.rocks.util; +import eu.midnightdust.motschen.rocks.RocksMain; import eu.midnightdust.motschen.rocks.blockstates.StarfishVariation; import net.minecraft.block.Block; import net.minecraft.component.ComponentMap; @@ -8,17 +9,24 @@ import net.minecraft.component.type.BlockStateComponent; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.registry.*; +import net.minecraft.registry.Registerable; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import net.minecraft.util.Identifier; import net.minecraft.world.gen.feature.ConfiguredFeature; import net.minecraft.world.gen.feature.PlacedFeature; import static eu.midnightdust.motschen.rocks.RocksMain.STARFISH_VARIATION; -public class RocksRegistryUtils { +public class RegistryUtil { public static void registerBlockWithItem(Identifier id, Block block) { Registry.register(Registries.BLOCK, id, block); - registerItem(id, new BlockItem(block, new Item.Settings())); + registerItem(id, blockItem(block)); + } + public static Item blockItem(Block block) { + return new BlockItem(block, new Item.Settings()); } public static void registerItem(Identifier id, Item item) { Registry.register(Registries.ITEM, id, item); diff --git a/src/main/java/eu/midnightdust/motschen/rocks/world/FeatureRegistry.java b/src/main/java/eu/midnightdust/motschen/rocks/world/FeatureRegistry.java index 0f67346..19acee1 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/world/FeatureRegistry.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/world/FeatureRegistry.java @@ -15,7 +15,7 @@ import net.minecraft.world.gen.feature.Feature; import net.minecraft.world.gen.feature.FeatureConfig; import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider; -public class FeatureRegistry { +public class FeatureRegistry { public static final UnderwaterFeature UNDERWATER_STARFISH_FEATURE; public static final UnderwaterFeature UNDERWATER_SEASHELL_FEATURE; diff --git a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/MiscFeatures.java b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/MiscFeatures.java index 9814b8f..db56fd6 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/MiscFeatures.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/MiscFeatures.java @@ -4,7 +4,6 @@ import com.google.common.collect.ImmutableList; import eu.midnightdust.motschen.rocks.RocksMain; import eu.midnightdust.motschen.rocks.blockstates.SeashellVariation; import eu.midnightdust.motschen.rocks.blockstates.StarfishVariation; -import eu.midnightdust.motschen.rocks.config.RocksConfig; import eu.midnightdust.motschen.rocks.world.FeatureRegistry; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; @@ -20,7 +19,7 @@ import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider; import java.util.List; -import static eu.midnightdust.motschen.rocks.RocksRegistryUtils.register; +import static eu.midnightdust.motschen.rocks.util.RegistryUtil.register; public class MiscFeatures { public static List placementModifiers = List.of(RarityFilterPlacementModifier.of(1), diff --git a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/NetherFeatures.java b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/NetherFeatures.java index 6f6840b..fb1b835 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/NetherFeatures.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/NetherFeatures.java @@ -4,7 +4,6 @@ import com.google.common.collect.ImmutableList; import eu.midnightdust.motschen.rocks.RocksMain; import eu.midnightdust.motschen.rocks.blockstates.RockVariation; import eu.midnightdust.motschen.rocks.blockstates.StickVariation; -import eu.midnightdust.motschen.rocks.config.RocksConfig; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.registry.Registerable; @@ -18,7 +17,7 @@ import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider; import java.util.List; -import static eu.midnightdust.motschen.rocks.RocksRegistryUtils.register; +import static eu.midnightdust.motschen.rocks.util.RegistryUtil.register; public class NetherFeatures { diff --git a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/RockFeatures.java b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/RockFeatures.java index e576049..c35a96c 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/RockFeatures.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/RockFeatures.java @@ -3,7 +3,6 @@ package eu.midnightdust.motschen.rocks.world.configured_feature; import com.google.common.collect.ImmutableList; import eu.midnightdust.motschen.rocks.RocksMain; import eu.midnightdust.motschen.rocks.blockstates.RockVariation; -import eu.midnightdust.motschen.rocks.config.RocksConfig; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.registry.*; @@ -17,7 +16,7 @@ import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider; import java.util.List; -import static eu.midnightdust.motschen.rocks.RocksRegistryUtils.register; +import static eu.midnightdust.motschen.rocks.util.RegistryUtil.register; public class RockFeatures { public static ConfiguredFeature ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( diff --git a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/StickFeatures.java b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/StickFeatures.java index 36d2e8a..a04ad62 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/StickFeatures.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/StickFeatures.java @@ -3,14 +3,12 @@ package eu.midnightdust.motschen.rocks.world.configured_feature; import com.google.common.collect.ImmutableList; import eu.midnightdust.motschen.rocks.RocksMain; import eu.midnightdust.motschen.rocks.blockstates.StickVariation; -import eu.midnightdust.motschen.rocks.world.FeatureRegistry; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.registry.Registerable; import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.util.collection.DataPool; import net.minecraft.util.math.Vec3i; -import net.minecraft.world.gen.ProbabilityConfig; import net.minecraft.world.gen.blockpredicate.BlockPredicate; import net.minecraft.world.gen.feature.*; import net.minecraft.world.gen.placementmodifier.*; @@ -18,7 +16,7 @@ import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider; import java.util.List; -import static eu.midnightdust.motschen.rocks.RocksRegistryUtils.register; +import static eu.midnightdust.motschen.rocks.util.RegistryUtil.register; public class StickFeatures { public static ConfiguredFeature OAK_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( diff --git a/src/main/resources/assets/rocks/models/block/geyser_off.json b/src/main/resources/assets/rocks/models/block/geyser_off.json index 04c9b24..93e4d5b 100755 --- a/src/main/resources/assets/rocks/models/block/geyser_off.json +++ b/src/main/resources/assets/rocks/models/block/geyser_off.json @@ -72,37 +72,5 @@ "down": {"uv": [0, 0, 4, 4], "texture": "#0"} } } - ], - "display": { - "thirdperson_righthand": { - "translation": [0, 2.25, -1.5], - "scale": [0.5, 0.5, 0.5] - }, - "thirdperson_lefthand": { - "translation": [0, 2.25, -1.5], - "scale": [0.5, 0.5, 0.5] - }, - "firstperson_righthand": { - "translation": [2.5, 8.25, -0.25] - }, - "firstperson_lefthand": { - "translation": [2.5, 8.25, -0.25] - }, - "ground": { - "translation": [0, 5.75, 0] - }, - "gui": { - "rotation": [45, 45, 0], - "translation": [0, 7.25, 0], - "scale": [1.5, 1.5, 1.5] - }, - "head": { - "translation": [0, 14.5, 0] - }, - "fixed": { - "rotation": [-90, 0, 0], - "translation": [0, 0, -12], - "scale": [1.5, 1.5, 1.5] - } - } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/block/large_oak_stick.json b/src/main/resources/assets/rocks/models/block/large_oak_stick.json index dc78891..ab66125 100755 --- a/src/main/resources/assets/rocks/models/block/large_oak_stick.json +++ b/src/main/resources/assets/rocks/models/block/large_oak_stick.json @@ -1,10 +1,9 @@ { "credit": "made by Motschen", "ambientocclusion": false, - "gui_light": "front", "textures": { "0": "block/oak_log", - "particle": "block/oak_log" + "particle": "#0" }, "elements": [ { @@ -46,41 +45,5 @@ "down": {"uv": [0, 3, 3, 4], "rotation": 270, "texture": "#0"} } } - ], - "display": { - "thirdperson_righthand": { - "rotation": [90, 0, 0], - "translation": [0, -1, 3.5], - "scale": [0.5, 0.5, 0.5] - }, - "thirdperson_lefthand": { - "rotation": [90, 0, 0], - "translation": [0.5, -1, 3.5], - "scale": [0.5, 0.5, 0.5] - }, - "firstperson_righthand": { - "rotation": [67, 0, 18], - "translation": [3.5, 2, 0.75] - }, - "firstperson_lefthand": { - "rotation": [67, 0, 18], - "translation": [6, 2, 0.75] - }, - "ground": { - "translation": [0, 4, 0], - "scale": [0.5, 0.5, 0.5] - }, - "gui": { - "rotation": [77, -90, -35], - "translation": [-1, -3.5, 0], - "scale": [1.25, 1.25, 1.25] - }, - "head": { - "translation": [0, 14.25, 0] - }, - "fixed": { - "rotation": [-90, 0, 0], - "translation": [0, 1.25, -7.75] - } - } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/block/seashell_pink.json b/src/main/resources/assets/rocks/models/block/seashell_pink.json index 62d4cc2..f447524 100755 --- a/src/main/resources/assets/rocks/models/block/seashell_pink.json +++ b/src/main/resources/assets/rocks/models/block/seashell_pink.json @@ -1,6 +1,6 @@ { "credit": "made by Motschen", - "gui_light": "front", + "parent": "block/block", "textures": { "0": "rocks:block/seashell", "particle": "rocks:block/seashell" @@ -43,42 +43,5 @@ "down": {"uv": [0, 6, 2, 10], "texture": "#0"} } } - ], - "display": { - "thirdperson_righthand": { - "rotation": [-103.5, 0, 0], - "translation": [-1.25, -4.25, -3.75], - "scale": [0.5, 0.5, 0.5] - }, - "thirdperson_lefthand": { - "rotation": [-103.5, 0, 0], - "translation": [0.25, -4.25, -3.75], - "scale": [0.5, 0.5, 0.5] - }, - "firstperson_righthand": { - "rotation": [-89, 0, 0], - "translation": [0, 1.25, -6.75] - }, - "firstperson_lefthand": { - "rotation": [-89, 0, 0], - "translation": [3, 1.25, -6.75] - }, - "ground": { - "rotation": [-92, 0, 0], - "translation": [-1.25, 0, -7.5] - }, - "gui": { - "rotation": [-72, 0, 160], - "translation": [-1.5, -6.25, 0], - "scale": [1.5, 1.5, 1.5] - }, - "head": { - "translation": [-1.5, 14, -2.75] - }, - "fixed": { - "rotation": [-90, 0, 0], - "translation": [-2.75, -3.75, -14], - "scale": [1.75, 1.75, 1.75] - } - } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/item/acacia_stick.json b/src/main/resources/assets/rocks/models/item/acacia_stick.json index 05b57a2..54caf28 100755 --- a/src/main/resources/assets/rocks/models/item/acacia_stick.json +++ b/src/main/resources/assets/rocks/models/item/acacia_stick.json @@ -1,3 +1,7 @@ { - "parent": "rocks:block/large_acacia_stick" + "parent": "rocks:item/oak_stick", + "textures": { + "0": "block/acacia_log", + "particle": "block/acacia_log" + } } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/item/bamboo_stick.json b/src/main/resources/assets/rocks/models/item/bamboo_stick.json index d0bffcf..4b524cc 100755 --- a/src/main/resources/assets/rocks/models/item/bamboo_stick.json +++ b/src/main/resources/assets/rocks/models/item/bamboo_stick.json @@ -1,3 +1,7 @@ { - "parent": "rocks:block/large_bamboo_stick" + "parent": "rocks:item/oak_stick", + "textures": { + "0": "block/bamboo_stalk", + "particle": "block/bamboo_stalk" + } } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/item/birch_stick.json b/src/main/resources/assets/rocks/models/item/birch_stick.json index ac0a5b2..1b69ba0 100755 --- a/src/main/resources/assets/rocks/models/item/birch_stick.json +++ b/src/main/resources/assets/rocks/models/item/birch_stick.json @@ -1,3 +1,7 @@ { - "parent": "rocks:block/large_birch_stick" + "parent": "rocks:item/oak_stick", + "textures": { + "0": "block/birch_log", + "particle": "block/birch_log" + } } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/item/cherry_stick.json b/src/main/resources/assets/rocks/models/item/cherry_stick.json index db7089b..965ac2a 100755 --- a/src/main/resources/assets/rocks/models/item/cherry_stick.json +++ b/src/main/resources/assets/rocks/models/item/cherry_stick.json @@ -1,3 +1,7 @@ { - "parent": "rocks:block/large_cherry_stick" + "parent": "rocks:item/oak_stick", + "textures": { + "0": "block/cherry_log", + "particle": "block/cherry_log" + } } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/item/crimson_stick.json b/src/main/resources/assets/rocks/models/item/crimson_stick.json index 9a73972..9da48b2 100755 --- a/src/main/resources/assets/rocks/models/item/crimson_stick.json +++ b/src/main/resources/assets/rocks/models/item/crimson_stick.json @@ -1,3 +1,7 @@ { - "parent": "rocks:block/large_crimson_stick" + "parent": "rocks:item/oak_stick", + "textures": { + "0": "block/crimson_stem", + "particle": "block/crimson_stem" + } } diff --git a/src/main/resources/assets/rocks/models/item/dark_oak_stick.json b/src/main/resources/assets/rocks/models/item/dark_oak_stick.json index 0c012e4..ee06b0c 100755 --- a/src/main/resources/assets/rocks/models/item/dark_oak_stick.json +++ b/src/main/resources/assets/rocks/models/item/dark_oak_stick.json @@ -1,3 +1,7 @@ { - "parent": "rocks:block/large_dark_oak_stick" + "parent": "rocks:item/oak_stick", + "textures": { + "0": "block/dark_oak_log", + "particle": "block/dark_oak_log" + } } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/item/geyser.json b/src/main/resources/assets/rocks/models/item/geyser.json index 98bb3fa..04c9b24 100755 --- a/src/main/resources/assets/rocks/models/item/geyser.json +++ b/src/main/resources/assets/rocks/models/item/geyser.json @@ -1,7 +1,108 @@ { "credit": "made by Motschen", - "parent": "rocks:block/geyser_off", + "parent": "block/block", "textures": { - "2": "block/magma" + "0": "block/snow", + "2": "block/black_concrete", + "particle": "block/snow" + }, + "elements": [ + { + "from": [5, 0, 5], + "to": [11, 1, 6], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 8, 13]}, + "faces": { + "north": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 1], "texture": "#0"} + } + }, + { + "from": [10, 0, 6], + "to": [11, 1, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 8, 14]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 1], "texture": "#0"}, + "up": {"uv": [0, 2, 1, 6], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "texture": "#0"} + } + }, + { + "from": [5, 0, 6], + "to": [6, 1, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 14]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 1], "texture": "#0"}, + "up": {"uv": [15, 1, 16, 5], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "texture": "#0"} + } + }, + { + "from": [5, 0, 10], + "to": [11, 1, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 8, 18]}, + "faces": { + "north": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "up": {"uv": [0, 5, 6, 6], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 1], "texture": "#0"} + } + }, + { + "from": [6, 0, 6], + "to": [10, 0.1, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 8, 13]}, + "faces": { + "north": {"uv": [0, 0, 4, 0.1], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 0.1], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 0.1], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 0.1], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#2"}, + "down": {"uv": [0, 0, 4, 4], "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "translation": [0, 2.25, -1.5], + "scale": [0.5, 0.5, 0.5] + }, + "thirdperson_lefthand": { + "translation": [0, 2.25, -1.5], + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_righthand": { + "translation": [2.5, 8.25, -0.25] + }, + "firstperson_lefthand": { + "translation": [2.5, 8.25, -0.25] + }, + "ground": { + "translation": [0, 5.75, 0] + }, + "gui": { + "rotation": [45, 45, 0], + "translation": [0, 7.25, 0], + "scale": [1.5, 1.5, 1.5] + }, + "head": { + "translation": [0, 14.5, 0] + }, + "fixed": { + "rotation": [-90, 0, 0], + "translation": [0, 0, -12], + "scale": [1.5, 1.5, 1.5] + } } } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/item/jungle_stick.json b/src/main/resources/assets/rocks/models/item/jungle_stick.json index 3e6bd7a..ec66c84 100755 --- a/src/main/resources/assets/rocks/models/item/jungle_stick.json +++ b/src/main/resources/assets/rocks/models/item/jungle_stick.json @@ -1,3 +1,7 @@ { - "parent": "rocks:block/large_jungle_stick" + "parent": "rocks:item/oak_stick", + "textures": { + "0": "block/jungle_log", + "particle": "block/jungle_log" + } } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/item/mangrove_stick.json b/src/main/resources/assets/rocks/models/item/mangrove_stick.json index a5c03c0..072dfbe 100755 --- a/src/main/resources/assets/rocks/models/item/mangrove_stick.json +++ b/src/main/resources/assets/rocks/models/item/mangrove_stick.json @@ -1,3 +1,7 @@ { - "parent": "rocks:block/large_mangrove_stick" + "parent": "rocks:item/oak_stick", + "textures": { + "0": "block/mangrove_log", + "particle": "block/mangrove_log" + } } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/item/nether_geyser.json b/src/main/resources/assets/rocks/models/item/nether_geyser.json index 06832b6..9213983 100755 --- a/src/main/resources/assets/rocks/models/item/nether_geyser.json +++ b/src/main/resources/assets/rocks/models/item/nether_geyser.json @@ -1,7 +1,9 @@ { "credit": "made by Motschen", - "parent": "rocks:block/nether_geyser_off", + "parent": "rocks:item/geyser", "textures": { - "2": "block/magma" + "0": "block/netherrack", + "2": "block/black_concrete", + "particle": "block/netherrack" } } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/item/oak_stick.json b/src/main/resources/assets/rocks/models/item/oak_stick.json index db093b4..dc78891 100755 --- a/src/main/resources/assets/rocks/models/item/oak_stick.json +++ b/src/main/resources/assets/rocks/models/item/oak_stick.json @@ -1,3 +1,86 @@ { - "parent": "rocks:block/large_oak_stick" + "credit": "made by Motschen", + "ambientocclusion": false, + "gui_light": "front", + "textures": { + "0": "block/oak_log", + "particle": "block/oak_log" + }, + "elements": [ + { + "from": [8, 0.01, 7], + "to": [20, 1.01, 9], + "rotation": {"angle": -45, "axis": "y", "origin": [12, 8, 0]}, + "faces": { + "north": {"uv": [0, 0, 12, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 2, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 12, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 2, 1], "texture": "#0"}, + "up": {"uv": [0, 4, 12, 6], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 12, 2], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [10, 0, 3], + "to": [11, 1, 6], + "rotation": {"angle": -22.5, "axis": "y", "origin": [3, 8, 8]}, + "faces": { + "north": {"uv": [0, 4, 1, 5], "texture": "#0"}, + "east": {"uv": [0, 4, 3, 5], "texture": "#0"}, + "south": {"uv": [0, 4, 1, 5], "texture": "#0"}, + "west": {"uv": [0, 4, 3, 5], "texture": "#0"}, + "up": {"uv": [0, 1, 3, 2], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 3, 3, 4], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [4, 0, 2], + "to": [5, 1, 5], + "rotation": {"angle": -22.5, "axis": "y", "origin": [-3, 8, 7]}, + "faces": { + "north": {"uv": [0, 4, 1, 5], "texture": "#0"}, + "east": {"uv": [0, 4, 3, 5], "texture": "#0"}, + "south": {"uv": [0, 4, 1, 5], "texture": "#0"}, + "west": {"uv": [0, 4, 3, 5], "texture": "#0"}, + "up": {"uv": [0, 1, 3, 2], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 3, 3, 4], "rotation": 270, "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [90, 0, 0], + "translation": [0, -1, 3.5], + "scale": [0.5, 0.5, 0.5] + }, + "thirdperson_lefthand": { + "rotation": [90, 0, 0], + "translation": [0.5, -1, 3.5], + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_righthand": { + "rotation": [67, 0, 18], + "translation": [3.5, 2, 0.75] + }, + "firstperson_lefthand": { + "rotation": [67, 0, 18], + "translation": [6, 2, 0.75] + }, + "ground": { + "translation": [0, 4, 0], + "scale": [0.5, 0.5, 0.5] + }, + "gui": { + "rotation": [77, -90, -35], + "translation": [-1, -3.5, 0], + "scale": [1.25, 1.25, 1.25] + }, + "head": { + "translation": [0, 14.25, 0] + }, + "fixed": { + "rotation": [-90, 0, 0], + "translation": [0, 1.25, -7.75] + } + } } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/item/seashell.json b/src/main/resources/assets/rocks/models/item/seashell.json index 09dec50..62d4cc2 100755 --- a/src/main/resources/assets/rocks/models/item/seashell.json +++ b/src/main/resources/assets/rocks/models/item/seashell.json @@ -1,3 +1,84 @@ { - "parent": "rocks:block/seashell_pink" + "credit": "made by Motschen", + "gui_light": "front", + "textures": { + "0": "rocks:block/seashell", + "particle": "rocks:block/seashell" + }, + "elements": [ + { + "from": [7, 0.01, 7], + "to": [12, 0.99, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 8, 15]}, + "faces": { + "north": {"uv": [1, 11, 4, 12], "texture": "#0"}, + "east": {"uv": [1, 6, 2, 12], "rotation": 90, "texture": "#0"}, + "south": {"uv": [2, 6, 7, 7], "texture": "#0"}, + "west": {"uv": [5, 6, 6, 12], "rotation": 90, "texture": "#0"}, + "up": {"uv": [2, 6, 7, 12], "rotation": 180, "texture": "#0"}, + "down": {"uv": [2, 6, 7, 12], "texture": "#0"} + } + }, + { + "from": [14, 0, 11], + "to": [16, 1, 15], + "rotation": {"angle": 22.5, "axis": "y", "origin": [7, 8, 19]}, + "faces": { + "north": {"uv": [1, 6, 3, 7], "texture": "#0"}, + "east": {"uv": [1, 6, 2, 10], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 6, 2, 7], "texture": "#0"}, + "up": {"uv": [1, 6, 3, 10], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 6, 2, 10], "texture": "#0"} + } + }, + { + "from": [4, 0, 6], + "to": [6, 1, 10], + "rotation": {"angle": -22.5, "axis": "y", "origin": [0, 8, 14]}, + "faces": { + "north": {"uv": [0, 6, 2, 7], "texture": "#0"}, + "south": {"uv": [1, 6, 3, 7], "texture": "#0"}, + "west": {"uv": [7, 6, 8, 10], "rotation": 90, "texture": "#0"}, + "up": {"uv": [6, 6, 8, 10], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 6, 2, 10], "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [-103.5, 0, 0], + "translation": [-1.25, -4.25, -3.75], + "scale": [0.5, 0.5, 0.5] + }, + "thirdperson_lefthand": { + "rotation": [-103.5, 0, 0], + "translation": [0.25, -4.25, -3.75], + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_righthand": { + "rotation": [-89, 0, 0], + "translation": [0, 1.25, -6.75] + }, + "firstperson_lefthand": { + "rotation": [-89, 0, 0], + "translation": [3, 1.25, -6.75] + }, + "ground": { + "rotation": [-92, 0, 0], + "translation": [-1.25, 0, -7.5] + }, + "gui": { + "rotation": [-72, 0, 160], + "translation": [-1.5, -6.25, 0], + "scale": [1.5, 1.5, 1.5] + }, + "head": { + "translation": [-1.5, 14, -2.75] + }, + "fixed": { + "rotation": [-90, 0, 0], + "translation": [-2.75, -3.75, -14], + "scale": [1.75, 1.75, 1.75] + } + } } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/item/spruce_stick.json b/src/main/resources/assets/rocks/models/item/spruce_stick.json index f378367..74aaa6d 100755 --- a/src/main/resources/assets/rocks/models/item/spruce_stick.json +++ b/src/main/resources/assets/rocks/models/item/spruce_stick.json @@ -1,3 +1,7 @@ { - "parent": "rocks:block/large_spruce_stick" + "parent": "rocks:item/oak_stick", + "textures": { + "0": "block/spruce_log", + "particle": "block/spruce_log" + } } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/models/item/warped_stick.json b/src/main/resources/assets/rocks/models/item/warped_stick.json index 910fb59..e05a029 100755 --- a/src/main/resources/assets/rocks/models/item/warped_stick.json +++ b/src/main/resources/assets/rocks/models/item/warped_stick.json @@ -1,3 +1,7 @@ { - "parent": "rocks:block/large_warped_stick" + "parent": "rocks:item/oak_stick", + "textures": { + "0": "block/warped_stem", + "particle": "block/warped_stem" + } }