-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2bf1dfe
commit 2abe07f
Showing
50 changed files
with
890 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/main/java/com/lumiscosity/rounded/worldgen/OceanRockFeature.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package com.lumiscosity.rounded.worldgen; | ||
|
||
import com.mojang.serialization.Codec; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.registry.tag.BlockTags; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.util.math.Direction; | ||
import net.minecraft.util.math.random.Random; | ||
import net.minecraft.world.StructureWorldAccess; | ||
import net.minecraft.world.gen.feature.Feature; | ||
import net.minecraft.world.gen.feature.SimpleBlockFeatureConfig; | ||
import net.minecraft.world.gen.feature.util.FeatureContext; | ||
|
||
public class OceanRockFeature extends Feature<SimpleBlockFeatureConfig> { | ||
public OceanRockFeature(Codec<SimpleBlockFeatureConfig> codec) { | ||
super(codec); | ||
} | ||
|
||
@Override | ||
public boolean generate(FeatureContext<SimpleBlockFeatureConfig> context) { | ||
BlockPos origin = context.getOrigin(); | ||
StructureWorldAccess structureWorldAccess = context.getWorld(); | ||
Random random = context.getRandom(); | ||
|
||
SimpleBlockFeatureConfig SimpleBlockFeatureConfig; | ||
for (SimpleBlockFeatureConfig = context.getConfig(); origin.getY() > structureWorldAccess.getBottomY() + 3; origin = origin.down()) { | ||
if (!structureWorldAccess.isAir(origin.down())) { | ||
BlockState blockState = structureWorldAccess.getBlockState(origin.down()); | ||
if (isSoil(blockState) || isStone(blockState) || blockState.isIn(BlockTags.BASE_STONE_NETHER)) { | ||
break; | ||
} | ||
} | ||
} | ||
|
||
if (origin.getY() <= structureWorldAccess.getBottomY() + 3) { | ||
return false; | ||
} else { | ||
int[] heights = { | ||
random.nextInt(7), random.nextInt(8), random.nextInt(7), | ||
random.nextInt(8), random.nextInt(9), random.nextInt(8), | ||
random.nextInt(7), random.nextInt(8), random.nextInt(7) | ||
}; | ||
|
||
BlockPos.Mutable pos = new BlockPos.Mutable(); | ||
for (int i = 0; i < 9; i++) { | ||
pos.set(origin.getX() + i % 3,origin.getY() - random.nextInt(3),origin.getZ() + i / 3); | ||
for (int j = 0; j < heights[i]; j++) { | ||
structureWorldAccess.setBlockState(pos, SimpleBlockFeatureConfig.toPlace().get(random, pos), Block.NOTIFY_ALL); | ||
pos.move(Direction.UP); | ||
} | ||
} | ||
|
||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"#minecraft:is_nether" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/data/minecraft/tags/blocks/enderman_holdable.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"rounded:lustershroom" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/data/minecraft/tags/blocks/sword_efficient.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"rounded:lustershroom" | ||
] | ||
} |
32 changes: 32 additions & 0 deletions
32
src/main/resources/data/rounded/advancements/recipes/building_blocks/bladderwrack_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_log": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": ["rounded:bladderwrack"] | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
}, | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "rounded:bladderwrack_block" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_the_recipe", | ||
"has_log" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"rounded:bladderwrack_block" | ||
] | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...sources/data/rounded/advancements/recipes/building_blocks/chiseled_prismarine_bricks.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_log": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": ["minecraft:prismarine_bricks"] | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_log" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"rounded:chiseled_prismarine_bricks", | ||
"rounded:stonecutter/chiseled_prismarine_bricks" | ||
] | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
.../resources/data/rounded/advancements/recipes/building_blocks/dead_bladderwrack_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_log": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": ["rounded:dead_bladderwrack"] | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
}, | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "rounded:dead_bladderwrack_block" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_the_recipe", | ||
"has_log" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"rounded:dead_bladderwrack_block" | ||
] | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...esources/data/rounded/advancements/recipes/building_blocks/furnace/smooth_prismarine.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_log": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": ["minecraft:prismarine"] | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
}, | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "rounded:furnace/smooth_prismarine" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_the_recipe", | ||
"has_log" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"rounded:furnace/smooth_prismarine" | ||
] | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/main/resources/data/rounded/advancements/recipes/building_blocks/moisture_detector.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_log": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": ["rounded:smooth_prismarine"] | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
}, | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "rounded:moisture_detector" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_the_recipe", | ||
"has_log" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"rounded:moisture_detector" | ||
] | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/main/resources/data/rounded/advancements/recipes/building_blocks/prismarine_lantern.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_log": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": ["minecraft:prismarine_crystals"] | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
}, | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "rounded:prismarine_lantern" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_the_recipe", | ||
"has_log" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"rounded:prismarine_lantern" | ||
] | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...n/resources/data/rounded/advancements/recipes/building_blocks/smooth_prismarine_slab.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_log": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": ["rounded:smooth_prismarine"] | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_log" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"rounded:smooth_prismarine_slab", | ||
"rounded:stonecutter/smooth_prismarine_slab" | ||
] | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/main/resources/data/rounded/loot_tables/blocks/bladderwrack.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"type": "minecraft:block", | ||
"pools": [ | ||
{ | ||
"bonus_rolls": 0.0, | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:match_tool", | ||
"predicate": { | ||
"predicates": { | ||
"minecraft:enchantments": [ | ||
{ | ||
"enchantments": "minecraft:silk_touch", | ||
"levels": { | ||
"min": 1 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"name": "rounded:bladderwrack" | ||
} | ||
], | ||
"rolls": 1.0 | ||
} | ||
], | ||
"random_sequence": "rounded:blocks/bladderwrack" | ||
} |
Oops, something went wrong.