Skip to content

Commit

Permalink
Feature/world ships (#10541)
Browse files Browse the repository at this point in the history
Spawn Raider Ship structures in the world
  • Loading branch information
Raycoms authored Dec 22, 2024
1 parent 3c8a387 commit 5f82e61
Show file tree
Hide file tree
Showing 12 changed files with 141 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ public class MineColoniesStructures
public static final DeferredRegister<StructureType<?>> DEFERRED_REGISTRY_STRUCTURE = DeferredRegister.create(Registries.STRUCTURE_TYPE, Constants.MOD_ID);

/**
* Registers the base structure itself and sets what its path is. In this case,
* this base structure will have the resourcelocation of structure_tutorial:sky_structures.
* Empty colony structure.
*/
public static final RegistryObject<StructureType<EmptyColonyStructure>> EMPTY_COLONY = DEFERRED_REGISTRY_STRUCTURE.register("empty_colony", () -> () -> COLONY_CODEC);
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"#minecraft:is_ocean"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"processors": [
{
"blocks": [
{
"Name": "structurize:blocksubstitution"
},
{
"Name": "minecolonies:blockwaypoint"
}
],
"processor_type": "minecraft:block_ignore"
},
{
"rules": [
{
"output_state": {
"Name": "minecraft:grass_block"
},
"input_predicate": {
"block": "structurize:blocksolidsubstitution",
"predicate_type": "minecraft:block_match"
},
"location_predicate": {
"predicate_type": "minecraft:always_true"
}
},
{
"output_state": {
"Name": "minecraft:water"
},
"input_predicate": {
"block": "structurize:blockfluidsubstitution",
"predicate_type": "minecraft:block_match"
},
"location_predicate": {
"predicate_type": "minecraft:always_true"
}
}
],
"processor_type": "minecraft:rule"
}
]
}
16 changes: 16 additions & 0 deletions src/main/resources/data/minecolonies/worldgen/structure/ship.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:jigsaw",
"biomes": "#minecolonies:has_structure/ship",
"adapt_noise": false,
"start_pool": "minecolonies:ship_pool",
"spawn_overrides": {},
"size": 1,
"step": "surface_structures",

"start_height": {
"absolute": -3
},
"project_start_to_heightmap": "WORLD_SURFACE_WG",
"max_distance_from_center": 16,
"use_expansion_hack": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"structures": [
{
"structure": "minecolonies:ship",
"weight": 1
}
],
"placement": {
"salt": 1225566777,
"spacing": 55,
"separation": 25,
"type": "minecraft:random_spread"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "minecolonies:start_pool",
"fallback": "minecraft:empty",
"elements": [
{
"weight": 1,
"element": {
"location": "minecolonies:ships/large_pirate_ship",
"processors": "minecolonies:placeholder_replacement",
"projection": "rigid",
"element_type": "minecraft:single_pool_element"
}
},
{
"weight": 1,
"element": {
"location": "minecolonies:ships/medium_pirate_ship",
"processors": "minecolonies:placeholder_replacement",
"projection": "rigid",
"element_type": "minecraft:single_pool_element"
}
},
{
"weight": 1,
"element": {
"location": "minecolonies:ships/small_pirate_ship",
"processors": "minecolonies:placeholder_replacement",
"projection": "rigid",
"element_type": "minecraft:single_pool_element"
}
},
{
"weight": 1,
"element": {
"location": "minecolonies:ships/large_norse_ship",
"processors": "minecolonies:placeholder_replacement",
"projection": "rigid",
"element_type": "minecraft:single_pool_element"
}
},
{
"weight": 1,
"element": {
"location": "minecolonies:ships/medium_norse_ship",
"processors": "minecolonies:placeholder_replacement",
"projection": "rigid",
"element_type": "minecraft:single_pool_element"
}
},
{
"weight": 1,
"element": {
"location": "minecolonies:ships/small_norse_ship",
"processors": "minecolonies:placeholder_replacement",
"projection": "rigid",
"element_type": "minecraft:single_pool_element"
}
}
]
}

0 comments on commit 5f82e61

Please sign in to comment.