Skip to content

Commit

Permalink
nulberry mod finished
Browse files Browse the repository at this point in the history
  • Loading branch information
natanmaia95 committed Aug 20, 2024
1 parent 17a5603 commit 559d43b
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mod_name=Nulberry Mod
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=All Rights Reserved
# The mod version. See https://semver.org/
mod_version=0.1.0
mod_version=1.0.0
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/nateplays/nulberry/NulberryMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.nateplays.nulberry.block.ModBlocks;
import com.nateplays.nulberry.item.ModItems;
import net.minecraft.core.registries.Registries;
import net.neoforged.neoforge.event.server.ServerAboutToStartEvent;
import org.slf4j.Logger;

import com.mojang.logging.LogUtils;
Expand Down Expand Up @@ -72,6 +74,15 @@ public void onServerStarting(ServerStartingEvent event)

}

@SubscribeEvent
public void onServerAboutToStart(ServerAboutToStartEvent event) {
// var biomes = event.getServer().registryAccess().registryOrThrow(Registries.BIOME);
//
// biomes.holders().forEach(biome -> {
// ModWorldGen.addFeatures(biome);
// });
}

// You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent
@EventBusSubscriber(modid = MODID, bus = EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public static class ClientModEvents
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"type": "neoforge:add_features",
"biomes": "#nulberry:spawns_nulberries",
"features": "nulberry:patch_nulberry_bush",
"step": "vegetal_decoration"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"values": [
"minecraft:snowy_plains",
"minecraft:ice_spikes",
"minecraft:grove",
"minecraft:frozen_river",
"minecraft:snowy_beach",
"#minecraft:is_forest",
"#minecraft:is_taiga",
"#minecraft:is_jungle",
"#minecraft:is_river",
"#minecraft:is_mountain"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"type": "minecraft:random_patch",
"config": {
"feature": {
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "nulberry:nulberry_bush",
"Properties": {
"age": "3"
}
}
}
}
},
"placement": [
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": ["minecraft:air", "minecraft:snow"]
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:grass_block",
"offset": [
0,
-1,
0
]
}
]
}
}
]
},
"tries": 18,
"xz_spread": 3,
"y_spread": 3
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"feature": "nulberry:patch_nulberry_bush",
"placement": [
{
"type": "minecraft:rarity_filter",
"chance": 40
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
}
]
}

0 comments on commit 559d43b

Please sign in to comment.