diff --git a/gradle.properties b/gradle.properties index 6c09a02..37029dc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ loader_version=0.15.10 fabric_kotlin_version=1.10.19+kotlin.1.9.23 # Mod Properties -mod_version=1.1.1 +mod_version=1.3.0 maven_group=ace.actually.pirates archives_base_name=ValkyrienPirates diff --git a/src/main/java/ace/actually/pirates/Pirates.java b/src/main/java/ace/actually/pirates/Pirates.java index 1122bd5..d7ec4eb 100644 --- a/src/main/java/ace/actually/pirates/Pirates.java +++ b/src/main/java/ace/actually/pirates/Pirates.java @@ -29,6 +29,9 @@ import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; import net.minecraft.registry.RegistryKey; +import net.minecraft.sound.BlockSoundGroup; +import net.minecraft.sound.SoundEvent; +import net.minecraft.sound.SoundEvents; import net.minecraft.text.Text; import net.minecraft.util.Identifier; import net.minecraft.world.GameRules; @@ -88,11 +91,12 @@ private void registerEntityThings() } + private static final BlockSoundGroup Silent = new BlockSoundGroup(0, 0, SoundEvents.ENTITY_COD_AMBIENT, SoundEvents.ENTITY_COD_AMBIENT, SoundEvents.ENTITY_COD_AMBIENT, SoundEvents.ENTITY_COD_AMBIENT, SoundEvents.ENTITY_COD_AMBIENT); public static final MotionInvokingBlock MOTION_INVOKING_BLOCK = new MotionInvokingBlock(AbstractBlock.Settings.copy(Blocks.BIRCH_WOOD).noBlockBreakParticles().hardness(7).dropsNothing()); public static final CannonPrimingBlock CANNON_PRIMING_BLOCK = new CannonPrimingBlock(AbstractBlock.Settings.copy(Blocks.DISPENSER).hardness(5)); public static final DispenserCannonBlock DISPENSER_CANNON_BLOCK = new DispenserCannonBlock(AbstractBlock.Settings.copy(Blocks.DISPENSER).hardness(5)); - public static final CrewSpawnerBlock CREW_SPAWNER_BLOCK = new CrewSpawnerBlock(AbstractBlock.Settings.copy(Blocks.BIRCH_WOOD).noBlockBreakParticles().noCollision().dropsNothing()); + public static final CrewSpawnerBlock CREW_SPAWNER_BLOCK = new CrewSpawnerBlock(AbstractBlock.Settings.copy(Blocks.BIRCH_WOOD).noBlockBreakParticles().noCollision().dropsNothing().sounds(Silent)); private void registerBlocks() { Registry.register(Registries.BLOCK,new Identifier("pirates","cannon_priming_block"),CANNON_PRIMING_BLOCK); diff --git a/src/main/java/ace/actually/pirates/blocks/MotionInvokingBlock.java b/src/main/java/ace/actually/pirates/blocks/MotionInvokingBlock.java index 08acf71..517914c 100644 --- a/src/main/java/ace/actually/pirates/blocks/MotionInvokingBlock.java +++ b/src/main/java/ace/actually/pirates/blocks/MotionInvokingBlock.java @@ -75,6 +75,7 @@ private static void stopMotion(World world, BlockPos pos) if(ship!=null) { SeatedControllingPlayer seatedControllingPlayer = ship.getAttachment(SeatedControllingPlayer.class); + if (seatedControllingPlayer == null) return; seatedControllingPlayer.setLeftImpulse(0); seatedControllingPlayer.setForwardImpulse(0); seatedControllingPlayer.setCruise(false); diff --git a/src/main/java/ace/actually/pirates/blocks/entity/CannonPrimingBlockEntity.java b/src/main/java/ace/actually/pirates/blocks/entity/CannonPrimingBlockEntity.java index da203d6..faee369 100644 --- a/src/main/java/ace/actually/pirates/blocks/entity/CannonPrimingBlockEntity.java +++ b/src/main/java/ace/actually/pirates/blocks/entity/CannonPrimingBlockEntity.java @@ -8,6 +8,7 @@ import net.minecraft.state.property.Properties; import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.*; +import net.minecraft.world.GameRules; import net.minecraft.world.RaycastContext; import net.minecraft.world.World; import org.valkyrienskies.mod.common.VSGameUtilsKt; @@ -67,7 +68,9 @@ public void fire(World world, BlockPos pos, BlockState state) { { cooldownConfig = Integer.parseInt(ConfigUtils.config.getOrDefault("cannon-firing-pause","40")); } - fire(world, pos, state, cooldownConfig + (int) (Math.random() * 20)); + if(world.getGameRules().getBoolean(Pirates.PIRATES_IS_LIVE_WORLD)) { + fire(world, pos, state, cooldownConfig + (int) (Math.random() * 20)); + } } diff --git a/src/main/java/ace/actually/pirates/blocks/entity/CannonPrimingBlockEntityRenderer.java b/src/main/java/ace/actually/pirates/blocks/entity/CannonPrimingBlockEntityRenderer.java index 7ea2757..41eaac7 100644 --- a/src/main/java/ace/actually/pirates/blocks/entity/CannonPrimingBlockEntityRenderer.java +++ b/src/main/java/ace/actually/pirates/blocks/entity/CannonPrimingBlockEntityRenderer.java @@ -25,29 +25,24 @@ public CannonPrimingBlockEntityRenderer(BlockEntityRendererFactory.Context conte public void render(CannonPrimingBlockEntity entity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { if (entity.isRemoved()) return; - - BlockRenderManager blockRenderManager = MinecraftClient.getInstance().getBlockRenderManager(); - BlockState state = Objects.requireNonNull(entity.getWorld()).getBlockState(entity.getPos()); + if (state.get(Properties.DISARMED)) return; + + BlockRenderManager blockRenderManager = MinecraftClient.getInstance().getBlockRenderManager(); matrices.push(); - matrices.translate(0.5, 1.25, 0.5); -// matrices.scale(0.8f, 0.8f, 0.8f); + matrices.translate(0.5, 1.2501, 0.5); double rotationValue = (state.get(Properties.FACING).asRotation() * PI / 180) + entity.randomRotation + PI / 8; matrices.multiply(new Quaternionf(cos(rotationValue / 2), 0, sin(rotationValue / 2), 0)); - //matrices.multiply(new Quaternionf(0, 0, 1, 0)); matrices.multiply(new Quaternionf(cos(PI / 4), sin(PI / 4), 0, 0)); - - matrices.translate(-0.5 + 0.1875, -0.25, -0.5); - if (!state.get(Properties.DISARMED)) { - blockRenderManager.renderBlockAsEntity(Blocks.TORCH.getDefaultState(), matrices, vertexConsumers, 255, overlay); - } + blockRenderManager.renderBlockAsEntity(Blocks.TORCH.getDefaultState(), matrices, vertexConsumers, 255, overlay); + matrices.pop(); diff --git a/src/main/java/ace/actually/pirates/blocks/entity/CrewSpawnerBlockEntity.java b/src/main/java/ace/actually/pirates/blocks/entity/CrewSpawnerBlockEntity.java index 505dced..63da5da 100644 --- a/src/main/java/ace/actually/pirates/blocks/entity/CrewSpawnerBlockEntity.java +++ b/src/main/java/ace/actually/pirates/blocks/entity/CrewSpawnerBlockEntity.java @@ -59,7 +59,7 @@ private static void spawnCrew(World world, CrewSpawnerBlockEntity be) { Entity crew = getEntityFromState(world, be); if (crew != null) { - crew.setPosition(be.getPos().toCenterPos()); + crew.setPosition(be.getPos().toCenterPos().add(0,-0.5,0)); world.spawnEntity(crew); } diff --git a/src/main/java/ace/actually/pirates/blocks/entity/MotionInvokingBlockEntity.java b/src/main/java/ace/actually/pirates/blocks/entity/MotionInvokingBlockEntity.java index 617154c..b8a2466 100644 --- a/src/main/java/ace/actually/pirates/blocks/entity/MotionInvokingBlockEntity.java +++ b/src/main/java/ace/actually/pirates/blocks/entity/MotionInvokingBlockEntity.java @@ -133,6 +133,7 @@ public void setPattern(String loc) { private void utiliseInternalPattern(SeatedControllingPlayer seatedControllingPlayer, MotionInvokingBlockEntity be) { String[] instruction = be.instructions.getString(0).split(" "); + if (seatedControllingPlayer == null) return; switch (instruction[0]) { case "forward" -> seatedControllingPlayer.setForwardImpulse(Float.parseFloat(instruction[1])); case "left" -> seatedControllingPlayer.setLeftImpulse(Float.parseFloat(instruction[1])); diff --git a/src/main/java/ace/actually/pirates/util/ConfigUtils.java b/src/main/java/ace/actually/pirates/util/ConfigUtils.java index bab9344..fc51775 100644 --- a/src/main/java/ace/actually/pirates/util/ConfigUtils.java +++ b/src/main/java/ace/actually/pirates/util/ConfigUtils.java @@ -64,7 +64,7 @@ private static List makeDefaults() defaults.add("#general config for Valkyrien Pirates"); defaults.add("cannon-firing-pause=40"); defaults.add("#The max amount of blocks for the new ship builder, set to -1 to use the Eureka/VS version"); - defaults.add("max-ship-blocks=5000"); + defaults.add("max-ship-blocks=-1"); return defaults; } diff --git a/src/main/resources/data/pirates/loot_tables/barrels/cannoneer.json b/src/main/resources/data/pirates/loot_tables/barrels/cannoneer.json new file mode 100644 index 0000000..258b62c --- /dev/null +++ b/src/main/resources/data/pirates/loot_tables/barrels/cannoneer.json @@ -0,0 +1,140 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "rolls": 2, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "weight": 3, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1, + "max": 2 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:torch", + "weight": 2, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1, + "max": 2 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:flint_and_steel", + "weight": 1, + "quality": 2, + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ] + } + ] + }, + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:arrow", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 16 + } + } + ] + } + ] + }, + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:string", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 4 + } + } + ] + } + ] + }, + { + "rolls": 4, + "bonus_rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:gunpowder", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 4 + } + } + ] + } + ] + }, + { + "rolls": 4, + "bonus_rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "pirates:cannonball", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1, + "max": 16 + } + } + ] + } + ] + } + ] +} diff --git a/src/main/resources/data/pirates/loot_tables/barrels/carpenter.json b/src/main/resources/data/pirates/loot_tables/barrels/carpenter.json new file mode 100644 index 0000000..2217043 --- /dev/null +++ b/src/main/resources/data/pirates/loot_tables/barrels/carpenter.json @@ -0,0 +1,141 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "rolls": { + "type": "minecraft:uniform", + "min": 0, + "max": 2 + }, + "bonus_rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:oak_boat", + "weight": 1, + "quality": 1 + }, + { + "type": "minecraft:item", + "name": "minecraft:spruce_boat", + "weight": 2, + "quality": 1 + }, + { + "type": "minecraft:item", + "name": "minecraft:iron_axe", + "weight": 4, + "quality": 1 + } + ] + }, + { + "rolls": { + "type": "minecraft:uniform", + "min": 1, + "max": 6 + }, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:spruce_stairs", + "weight": 1, + "quality": 1 + }, + { + "type": "minecraft:item", + "name": "minecraft:ladder", + "weight": 1, + "quality": 1 + }, + { + "type": "minecraft:item", + "name": "minecraft:oak_trapdoor", + "weight": 2, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": 3 + } + ] + } + ], + "functions": [] + }, + { + "rolls": { + "type": "minecraft:uniform", + "min": 3, + "max": 6 + }, + "bonus_rolls": 2, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:oak_planks", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1, + "max": 6 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:stripped_oak_log", + "weight": 2, + "quality": 2, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1, + "max": 6 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:spruce_planks", + "weight": 3, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1, + "max": 6 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:stripped_spruce_log", + "weight": 6, + "quality": 2, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1, + "max": 12 + } + } + ] + } + ] + } + ] +} diff --git a/src/main/resources/data/pirates/loot_tables/barrels/cartographer.json b/src/main/resources/data/pirates/loot_tables/barrels/cartographer.json new file mode 100644 index 0000000..7f66099 --- /dev/null +++ b/src/main/resources/data/pirates/loot_tables/barrels/cartographer.json @@ -0,0 +1,135 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:compass", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 1 + } + } + ] + } + ] + }, + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:spyglass", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 1 + } + } + ] + } + ] + }, + { + "rolls": 4, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:book", + "weight": 2, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 4 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:feather", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 4 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:ink_sac", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 4 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:writable_book", + "weight": 1, + "quality": 1, + "functions": [] + }, + { + "type": "minecraft:item", + "name": "minecraft:map", + "weight": 3, + "quality": 1, + "functions": [] + } + ] + }, + { + "rolls": 4, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:paper", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 16 + } + } + ] + } + ] + } + ] +} diff --git a/src/main/resources/data/pirates/loot_tables/barrels/cook.json b/src/main/resources/data/pirates/loot_tables/barrels/cook.json new file mode 100644 index 0000000..78edf98 --- /dev/null +++ b/src/main/resources/data/pirates/loot_tables/barrels/cook.json @@ -0,0 +1,164 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "rolls": 8, + "bonus_rolls": 2, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:candle", + "weight": 2, + "quality": 2, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 4 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:cooked_cod", + "weight": 1, + "quality": 3, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 4 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:golden_apple", + "weight": 1, + "quality": 5 + }, + { + "type": "minecraft:item", + "name": "minecraft:suspicious_stew", + "weight": 2, + "quality": 4, + "functions": [] + }, + { + "type": "minecraft:item", + "name": "minecraft:dried_kelp", + "weight": 5, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 4 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "bread", + "weight": 10, + "quality": 3, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 4 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "potion", + "weight": 4, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_potion", + "id": "minecraft:water" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:rotten_flesh", + "weight": 5, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 4 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:cooked_porkchop", + "weight": 5, + "quality": 3, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 4 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:porkchop", + "weight": 7, + "quality": 2, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 4 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:cod", + "weight": 7, + "quality": 2, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 8 + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/pirates/loot_tables/barrels/fisher.json b/src/main/resources/data/pirates/loot_tables/barrels/fisher.json new file mode 100644 index 0000000..40455cf --- /dev/null +++ b/src/main/resources/data/pirates/loot_tables/barrels/fisher.json @@ -0,0 +1,57 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "rolls": { + "type": "minecraft:uniform", + "min": 0, + "max": 2 + }, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:water_bucket", + "weight": 1, + "quality": 1, + "functions": [] + } + ] + }, + { + "rolls": { + "type": "minecraft:uniform", + "min": 0, + "max": 3 + }, + "entries": [ + { + "type": "minecraft:loot_table", + "name": "minecraft:gameplay/fishing/treasure", + "weight": 2, + "quality": 2 + } + ], + "functions": [] + }, + { + "rolls": 6, + "entries": [ + { + "type": "minecraft:loot_table", + "name": "minecraft:gameplay/fishing/fish", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1, + "max": 6 + } + } + ] + } + ], + "functions": [] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/pirates/loot_tables/barrels/sailmaker.json b/src/main/resources/data/pirates/loot_tables/barrels/sailmaker.json new file mode 100644 index 0000000..cc594c5 --- /dev/null +++ b/src/main/resources/data/pirates/loot_tables/barrels/sailmaker.json @@ -0,0 +1,168 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:skull_banner_pattern", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 1 + } + } + ] + } + ] + }, + { + "rolls": 3, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:shears", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 1 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:black_banner", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 1 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:black_banner", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 1 + } + }, + { + "function": "minecraft:set_banner_pattern", + "patterns": [ + { + "pattern": "skull", + "color": "white" + } + ], + "append": true, + "conditions": [] + } + ] + } + ] + }, + { + "rolls": 4, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:dark_oak_fence", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 16 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:oak_fence", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 16 + } + } + ] + } + ] + }, + { + "rolls": 2, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:string", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 16 + } + } + ] + } + ] + }, + { + "rolls": 2, + "bonus_rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:white_wool", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 32 + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/pirates/loot_tables/barrels/sailor.json b/src/main/resources/data/pirates/loot_tables/barrels/sailor.json new file mode 100644 index 0000000..3af46fd --- /dev/null +++ b/src/main/resources/data/pirates/loot_tables/barrels/sailor.json @@ -0,0 +1,259 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "rolls": { + "type": "minecraft:uniform", + "min": 0, + "max": 1 + }, + "bonus_rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:potion", + "weight": 1, + "quality": 3, + "functions": [ + { + "function": "minecraft:set_potion", + "id": "minecraft:long_water_breathing" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:potion", + "weight": 3, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_potion", + "id": "minecraft:water_breathing" + } + ] + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 1 + } + } + ] + }, + { + "rolls": { + "type": "minecraft:uniform", + "min": 0, + "max": { + "type": "minecraft:uniform", + "min": 0, + "max": 1 + } + }, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:leather_helmet", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_enchantments", + "enchantments": {}, + "conditions": [ + { + "condition": "minecraft:random_chance_with_looting", + "chance": 0.5, + "looting_multiplier": 0.3 + } + ] + } + ] + } + ] + }, + { + "rolls": { + "type": "minecraft:uniform", + "min": 0, + "max": 1 + }, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:writable_book", + "weight": 1, + "quality": 1 + } + ] + }, + { + "rolls": 2, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:book", + "weight": 3, + "quality": 2 + }, + { + "type": "minecraft:item", + "name": "minecraft:painting", + "weight": 1, + "quality": 1 + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0, + "max": 2 + } + } + ] + }, + { + "rolls": 2, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:white_wool", + "weight": 1, + "quality": 1, + "functions": [] + }, + { + "type": "minecraft:item", + "name": "minecraft:string", + "weight": 1, + "quality": 1, + "functions": [] + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1, + "max": 5 + } + } + ] + }, + { + "rolls": { + "type": "minecraft:uniform", + "min": 1, + "max": 3 + }, + "bonus_rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:dried_kelp", + "weight": 2, + "quality": 1 + }, + { + "type": "minecraft:item", + "name": "minecraft:bread", + "weight": 2, + "quality": 2 + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1, + "max": 3 + } + } + ] + }, + { + "rolls": { + "type": "minecraft:uniform", + "min": 0, + "max": 1 + }, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:leather_boots", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_enchantments", + "enchantments": { + "minecraft:depth_strider": { + "type": "minecraft:uniform", + "min": 1, + "max": 3 + } + }, + "conditions": [ + { + "condition": "minecraft:random_chance_with_looting", + "chance": 0.5, + "looting_multiplier": 0.3 + } + ] + } + ] + } + ] + }, + { + "rolls": { + "min": 1, + "max": 4 + }, + "bonus_rolls": 2, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:arrow", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1, + "max": 3 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:gold_nugget", + "weight": 3, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1, + "max": 16 + } + } + ] + } + ] + } + ] +} diff --git a/src/main/resources/data/pirates/loot_tables/cannon/cannonball.json b/src/main/resources/data/pirates/loot_tables/cannon/cannonball.json new file mode 100644 index 0000000..0e4c49b --- /dev/null +++ b/src/main/resources/data/pirates/loot_tables/cannon/cannonball.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "pirates:cannonball", + "weight": 1, + "quality": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 8, + "max": 24 + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/pirates/structures/anetum-contatum.nbt b/src/main/resources/data/pirates/structures/anetum-contatum.nbt new file mode 100644 index 0000000..41ab544 Binary files /dev/null and b/src/main/resources/data/pirates/structures/anetum-contatum.nbt differ diff --git a/src/main/resources/data/pirates/structures/antelope.nbt b/src/main/resources/data/pirates/structures/antelope.nbt new file mode 100644 index 0000000..3456c31 Binary files /dev/null and b/src/main/resources/data/pirates/structures/antelope.nbt differ diff --git a/src/main/resources/data/pirates/structures/barnacle-hopper.nbt b/src/main/resources/data/pirates/structures/barnacle-hopper.nbt new file mode 100644 index 0000000..7b3964f Binary files /dev/null and b/src/main/resources/data/pirates/structures/barnacle-hopper.nbt differ diff --git a/src/main/resources/data/pirates/structures/deep-sea-moray.nbt b/src/main/resources/data/pirates/structures/deep-sea-moray.nbt new file mode 100644 index 0000000..74ef207 Binary files /dev/null and b/src/main/resources/data/pirates/structures/deep-sea-moray.nbt differ diff --git a/src/main/resources/data/pirates/structures/eye-of-horus.nbt b/src/main/resources/data/pirates/structures/eye-of-horus.nbt new file mode 100644 index 0000000..47ab4e8 Binary files /dev/null and b/src/main/resources/data/pirates/structures/eye-of-horus.nbt differ diff --git a/src/main/resources/data/pirates/structures/midnight-barracuda.nbt b/src/main/resources/data/pirates/structures/midnight-barracuda.nbt new file mode 100644 index 0000000..c46c024 Binary files /dev/null and b/src/main/resources/data/pirates/structures/midnight-barracuda.nbt differ diff --git a/src/main/resources/data/pirates/structures/revenge.nbt b/src/main/resources/data/pirates/structures/revenge.nbt new file mode 100644 index 0000000..49b4b89 Binary files /dev/null and b/src/main/resources/data/pirates/structures/revenge.nbt differ diff --git a/src/main/resources/data/pirates/structures/ship1.nbt b/src/main/resources/data/pirates/structures/ship1.nbt deleted file mode 100644 index 9c1d1a6..0000000 Binary files a/src/main/resources/data/pirates/structures/ship1.nbt and /dev/null differ diff --git a/src/main/resources/data/pirates/structures/ship2.nbt b/src/main/resources/data/pirates/structures/ship2.nbt deleted file mode 100644 index 5a72bf5..0000000 Binary files a/src/main/resources/data/pirates/structures/ship2.nbt and /dev/null differ diff --git a/src/main/resources/data/pirates/structures/ship3.nbt b/src/main/resources/data/pirates/structures/ship3.nbt deleted file mode 100644 index 234515c..0000000 Binary files a/src/main/resources/data/pirates/structures/ship3.nbt and /dev/null differ diff --git a/src/main/resources/data/pirates/structures/the-heart-attack.nbt b/src/main/resources/data/pirates/structures/the-heart-attack.nbt new file mode 100644 index 0000000..bfff89f Binary files /dev/null and b/src/main/resources/data/pirates/structures/the-heart-attack.nbt differ diff --git a/src/main/resources/data/pirates/structures/the-phantom-leviathan.nbt b/src/main/resources/data/pirates/structures/the-phantom-leviathan.nbt new file mode 100644 index 0000000..6c26219 Binary files /dev/null and b/src/main/resources/data/pirates/structures/the-phantom-leviathan.nbt differ diff --git a/src/main/resources/data/pirates/structures/whydah.nbt b/src/main/resources/data/pirates/structures/whydah.nbt new file mode 100644 index 0000000..eb24469 Binary files /dev/null and b/src/main/resources/data/pirates/structures/whydah.nbt differ diff --git a/src/main/resources/data/pirates/structures/whydah_ghost.nbt b/src/main/resources/data/pirates/structures/whydah_ghost.nbt new file mode 100644 index 0000000..66b6fc8 Binary files /dev/null and b/src/main/resources/data/pirates/structures/whydah_ghost.nbt differ diff --git a/src/main/resources/data/pirates/structures/wrecked-antelope.nbt b/src/main/resources/data/pirates/structures/wrecked-antelope.nbt new file mode 100644 index 0000000..e1e54d3 Binary files /dev/null and b/src/main/resources/data/pirates/structures/wrecked-antelope.nbt differ diff --git a/src/main/resources/data/pirates/structures/wrecked-deep-sea-moray.nbt b/src/main/resources/data/pirates/structures/wrecked-deep-sea-moray.nbt new file mode 100644 index 0000000..dac715f Binary files /dev/null and b/src/main/resources/data/pirates/structures/wrecked-deep-sea-moray.nbt differ diff --git a/src/main/resources/data/pirates/structures/wrecked-midnight-barracuda.nbt b/src/main/resources/data/pirates/structures/wrecked-midnight-barracuda.nbt new file mode 100644 index 0000000..c5ec153 Binary files /dev/null and b/src/main/resources/data/pirates/structures/wrecked-midnight-barracuda.nbt differ diff --git a/src/main/resources/data/pirates/structures/wrecked-whydah.nbt b/src/main/resources/data/pirates/structures/wrecked-whydah.nbt new file mode 100644 index 0000000..d0c3119 Binary files /dev/null and b/src/main/resources/data/pirates/structures/wrecked-whydah.nbt differ diff --git a/src/main/resources/data/pirates/tags/worldgen/biome/shallow_n_warm.json b/src/main/resources/data/pirates/tags/worldgen/biome/shallow_n_warm.json new file mode 100644 index 0000000..a06d715 --- /dev/null +++ b/src/main/resources/data/pirates/tags/worldgen/biome/shallow_n_warm.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + "minecraft:cold_ocean", + "minecraft:ocean", + "minecraft:lukewarm_ocean", + "minecraft:warm_ocean" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/pirates/worldgen/structure/wreck0.json b/src/main/resources/data/pirates/worldgen/structure/wreck0.json new file mode 100644 index 0000000..8b352b0 --- /dev/null +++ b/src/main/resources/data/pirates/worldgen/structure/wreck0.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:jigsaw", + "biomes": "#pirates:shallow_n_warm", + "adapt_noise": false, + "spawn_overrides": {}, + "terrain_adaptation": "none", + "start_pool": "pirates:wreck0", + "size": 7, + "step": "surface_structures", + "start_height": { + "absolute": -42 + }, + "project_start_to_heightmap": "WORLD_SURFACE_WG", + "max_distance_from_center": 50, + "use_expansion_hack": false +} \ No newline at end of file diff --git a/src/main/resources/data/pirates/worldgen/structure/wreck1.json b/src/main/resources/data/pirates/worldgen/structure/wreck1.json new file mode 100644 index 0000000..d74aaa4 --- /dev/null +++ b/src/main/resources/data/pirates/worldgen/structure/wreck1.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:jigsaw", + "biomes": "#pirates:shallow_n_warm", + "adapt_noise": false, + "spawn_overrides": {}, + "terrain_adaptation": "none", + "start_pool": "pirates:wreck1", + "size": 7, + "step": "surface_structures", + "start_height": { + "absolute": -73 + }, + "project_start_to_heightmap": "WORLD_SURFACE_WG", + "max_distance_from_center": 50, + "use_expansion_hack": false +} \ No newline at end of file diff --git a/src/main/resources/data/pirates/worldgen/structure/wreck2.json b/src/main/resources/data/pirates/worldgen/structure/wreck2.json new file mode 100644 index 0000000..8813a55 --- /dev/null +++ b/src/main/resources/data/pirates/worldgen/structure/wreck2.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:jigsaw", + "biomes": "#pirates:shallow_n_warm", + "adapt_noise": false, + "spawn_overrides": {}, + "terrain_adaptation": "none", + "start_pool": "pirates:wreck2", + "size": 7, + "step": "surface_structures", + "start_height": { + "absolute": -8 + }, + "project_start_to_heightmap": "OCEAN_FLOOR_WG", + "max_distance_from_center": 50, + "use_expansion_hack": false +} \ No newline at end of file diff --git a/src/main/resources/data/pirates/worldgen/structure/wreck3.json b/src/main/resources/data/pirates/worldgen/structure/wreck3.json new file mode 100644 index 0000000..23afe4f --- /dev/null +++ b/src/main/resources/data/pirates/worldgen/structure/wreck3.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:jigsaw", + "biomes": "#pirates:shallow_n_warm", + "adapt_noise": false, + "spawn_overrides": {}, + "terrain_adaptation": "none", + "start_pool": "pirates:wreck3", + "size": 7, + "step": "surface_structures", + "start_height": { + "absolute": -64 + }, + "project_start_to_heightmap": "WORLD_SURFACE_WG", + "max_distance_from_center": 50, + "use_expansion_hack": false +} \ No newline at end of file diff --git a/src/main/resources/data/pirates/worldgen/structure_set/structures.json b/src/main/resources/data/pirates/worldgen/structure_set/ships.json similarity index 100% rename from src/main/resources/data/pirates/worldgen/structure_set/structures.json rename to src/main/resources/data/pirates/worldgen/structure_set/ships.json diff --git a/src/main/resources/data/pirates/worldgen/structure_set/wrecks.json b/src/main/resources/data/pirates/worldgen/structure_set/wrecks.json new file mode 100644 index 0000000..e926094 --- /dev/null +++ b/src/main/resources/data/pirates/worldgen/structure_set/wrecks.json @@ -0,0 +1,30 @@ +{ + "structures": [ + { + "structure": "pirates:wreck0", + "weight": 1 + }, + { + "structure": "pirates:wreck1", + "weight": 1 + }, + { + "structure": "pirates:wreck2", + "weight": 2 + }, + { + "structure": "pirates:wreck3", + "weight": 1 + } + ], + "placement": { + "type": "random_spread", + "exclusion_zone": { + "chunk_count": 8, + "other_set": "pirates:ships" + }, + "spacing": 40, + "separation": 20, + "salt": 3634534 + } +} \ No newline at end of file diff --git a/src/main/resources/data/pirates/worldgen/template_pool/ship.json b/src/main/resources/data/pirates/worldgen/template_pool/ship.json index be779fd..e25bad0 100644 --- a/src/main/resources/data/pirates/worldgen/template_pool/ship.json +++ b/src/main/resources/data/pirates/worldgen/template_pool/ship.json @@ -1,13 +1,40 @@ { - "name": "pirates:ship1", + "name": "pirates:ships", "fallback": "minecraft:empty", "elements": [ { - "weight": 5, + "weight": 3, + "element": { + "element_type": "minecraft:single_pool_element", + "projection": "rigid", + "location": "pirates:deep-sea-moray", + "processors": "minecraft:empty" + } + }, + { + "weight": 2, "element": { "element_type": "minecraft:single_pool_element", "projection": "rigid", - "location": "pirates:ship1", + "location": "pirates:barnacle-hopper", + "processors": "minecraft:empty" + } + }, + { + "weight": 2, + "element": { + "element_type": "minecraft:single_pool_element", + "projection": "rigid", + "location": "pirates:midnight-barracuda", + "processors": "minecraft:empty" + } + }, + { + "weight": 1, + "element": { + "element_type": "minecraft:single_pool_element", + "projection": "rigid", + "location": "pirates:eye-of-horus", "processors": "minecraft:empty" } }, @@ -16,7 +43,52 @@ "element": { "element_type": "minecraft:single_pool_element", "projection": "rigid", - "location": "pirates:ship2", + "location": "pirates:antelope", + "processors": "minecraft:empty" + } + }, + { + "weight": 1, + "element": { + "element_type": "minecraft:single_pool_element", + "projection": "rigid", + "location": "pirates:anetum-contatum", + "processors": "minecraft:empty" + } + }, + { + "weight": 1, + "element": { + "element_type": "minecraft:single_pool_element", + "projection": "rigid", + "location": "pirates:the-heart-attack", + "processors": "minecraft:empty" + } + }, + { + "weight": 2, + "element": { + "element_type": "minecraft:single_pool_element", + "projection": "rigid", + "location": "pirates:whydah", + "processors": "minecraft:empty" + } + }, + { + "weight": 1, + "element": { + "element_type": "minecraft:single_pool_element", + "projection": "rigid", + "location": "pirates:whydah_ghost", + "processors": "minecraft:empty" + } + }, + { + "weight": 2, + "element": { + "element_type": "minecraft:single_pool_element", + "projection": "rigid", + "location": "pirates:revenge", "processors": "minecraft:empty" } }, @@ -25,7 +97,7 @@ "element": { "element_type": "minecraft:single_pool_element", "projection": "rigid", - "location": "pirates:ship3", + "location": "pirates:the-phantom-leviathan", "processors": "minecraft:empty" } } diff --git a/src/main/resources/data/pirates/worldgen/template_pool/wreck0.json b/src/main/resources/data/pirates/worldgen/template_pool/wreck0.json new file mode 100644 index 0000000..2b19a3f --- /dev/null +++ b/src/main/resources/data/pirates/worldgen/template_pool/wreck0.json @@ -0,0 +1,15 @@ +{ + "name": "pirates:wrecks", + "fallback": "minecraft:empty", + "elements": [ + { + "weight": 2, + "element": { + "element_type": "minecraft:single_pool_element", + "projection": "rigid", + "location": "pirates:wrecked-midnight-barracuda", + "processors": "minecraft:empty" + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/pirates/worldgen/template_pool/wreck1.json b/src/main/resources/data/pirates/worldgen/template_pool/wreck1.json new file mode 100644 index 0000000..710fe2f --- /dev/null +++ b/src/main/resources/data/pirates/worldgen/template_pool/wreck1.json @@ -0,0 +1,15 @@ +{ + "name": "pirates:wrecks", + "fallback": "minecraft:empty", + "elements": [ + { + "weight": 2, + "element": { + "element_type": "minecraft:single_pool_element", + "projection": "rigid", + "location": "pirates:wrecked-antelope", + "processors": "minecraft:empty" + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/pirates/worldgen/template_pool/wreck2.json b/src/main/resources/data/pirates/worldgen/template_pool/wreck2.json new file mode 100644 index 0000000..484f036 --- /dev/null +++ b/src/main/resources/data/pirates/worldgen/template_pool/wreck2.json @@ -0,0 +1,15 @@ +{ + "name": "pirates:wrecks", + "fallback": "minecraft:empty", + "elements": [ + { + "weight": 2, + "element": { + "element_type": "minecraft:single_pool_element", + "projection": "rigid", + "location": "pirates:wrecked-deep-sea-moray", + "processors": "minecraft:empty" + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/pirates/worldgen/template_pool/wreck3.json b/src/main/resources/data/pirates/worldgen/template_pool/wreck3.json new file mode 100644 index 0000000..007d55f --- /dev/null +++ b/src/main/resources/data/pirates/worldgen/template_pool/wreck3.json @@ -0,0 +1,15 @@ +{ + "name": "pirates:wrecks", + "fallback": "minecraft:empty", + "elements": [ + { + "weight": 2, + "element": { + "element_type": "minecraft:single_pool_element", + "projection": "rigid", + "location": "pirates:wrecked-whydah", + "processors": "minecraft:empty" + } + } + ] +} \ No newline at end of file