Compare commits
2 Commits
d7c85d04bb
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12130a9602 | ||
|
|
4d6301ce95 |
@@ -7,6 +7,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
|
|
||||||
import de.jottyfan.minecraft.block.ModBlocks;
|
import de.jottyfan.minecraft.block.ModBlocks;
|
||||||
import de.jottyfan.minecraft.item.ModItems;
|
import de.jottyfan.minecraft.item.ModItems;
|
||||||
|
import de.jottyfan.minecraft.world.gen.ModOreGeneration;
|
||||||
|
|
||||||
public class Gtamfmd implements ModInitializer {
|
public class Gtamfmd implements ModInitializer {
|
||||||
public static final String MOD_ID = "gtamfmd";
|
public static final String MOD_ID = "gtamfmd";
|
||||||
@@ -16,6 +17,7 @@ public class Gtamfmd implements ModInitializer {
|
|||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
ModItems.registerModItems();
|
ModItems.registerModItems();
|
||||||
ModBlocks.registerModBlocks();
|
ModBlocks.registerModBlocks();
|
||||||
|
ModOreGeneration.generateOres();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ public class ModBlocks {
|
|||||||
public static final Block RUBY_BLOCK = registerBlock(Identifier.of(Gtamfmd.MOD_ID, "ruby_block"), x -> new Block(x));
|
public static final Block RUBY_BLOCK = registerBlock(Identifier.of(Gtamfmd.MOD_ID, "ruby_block"), x -> new Block(x));
|
||||||
public static final Block RUBY_ORE = registerBlock(Identifier.of(Gtamfmd.MOD_ID, "ruby_ore"),
|
public static final Block RUBY_ORE = registerBlock(Identifier.of(Gtamfmd.MOD_ID, "ruby_ore"),
|
||||||
x -> new Block(x.strength(4).requiresTool()));
|
x -> new Block(x.strength(4).requiresTool()));
|
||||||
|
public static final Block RUBY_DEEPSLATE_ORE = registerBlock(Identifier.of(Gtamfmd.MOD_ID, "ruby_deepslate_ore"),
|
||||||
|
x -> new Block(x.strength(4).requiresTool()));
|
||||||
public static final Block CHRISTMASTREE = registerBlock(Identifier.of(Gtamfmd.MOD_ID, "christmastree"),
|
public static final Block CHRISTMASTREE = registerBlock(Identifier.of(Gtamfmd.MOD_ID, "christmastree"),
|
||||||
x -> new ChristmasTree(x));
|
x -> new ChristmasTree(x));
|
||||||
|
|
||||||
@@ -45,6 +47,7 @@ public class ModBlocks {
|
|||||||
ItemGroupEvents.modifyEntriesEvent(ItemGroups.BUILDING_BLOCKS).register(entries -> {
|
ItemGroupEvents.modifyEntriesEvent(ItemGroups.BUILDING_BLOCKS).register(entries -> {
|
||||||
entries.add(RUBY_BLOCK);
|
entries.add(RUBY_BLOCK);
|
||||||
entries.add(RUBY_ORE);
|
entries.add(RUBY_ORE);
|
||||||
|
entries.add(RUBY_DEEPSLATE_ORE);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package de.jottyfan.minecraft.world;
|
||||||
|
|
||||||
|
import de.jottyfan.minecraft.Gtamfmd;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ModConfiguredFeatures {
|
||||||
|
public static final RegistryKey<ConfiguredFeature<?, ?>> RUBY_ORE_CF = registerKey("ruby_ore_cf");
|
||||||
|
|
||||||
|
private static RegistryKey<ConfiguredFeature<?, ?>> registerKey(String name) {
|
||||||
|
return RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, Identifier.of(Gtamfmd.MOD_ID, name));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package de.jottyfan.minecraft.world;
|
||||||
|
|
||||||
|
import de.jottyfan.minecraft.Gtamfmd;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ModPlacedFeatures {
|
||||||
|
public static final RegistryKey<PlacedFeature> RUBY_ORE_PF = registerKey("ruby_ore_pf");
|
||||||
|
|
||||||
|
private static RegistryKey<PlacedFeature> registerKey(String name) {
|
||||||
|
return RegistryKey.of(RegistryKeys.PLACED_FEATURE, Identifier.of(Gtamfmd.MOD_ID, name));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package de.jottyfan.minecraft.world.gen;
|
||||||
|
|
||||||
|
import de.jottyfan.minecraft.world.ModPlacedFeatures;
|
||||||
|
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
|
||||||
|
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
|
||||||
|
import net.minecraft.world.gen.GenerationStep;
|
||||||
|
|
||||||
|
public class ModOreGeneration {
|
||||||
|
public static void generateOres() {
|
||||||
|
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(),
|
||||||
|
GenerationStep.Feature.UNDERGROUND_ORES,
|
||||||
|
ModPlacedFeatures.RUBY_ORE_PF);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "gtamfmd:block/ruby_deepslate_ore"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "gtamfmd:block/ruby_deepslate_ore"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,5 +8,6 @@
|
|||||||
"item.gtamfmd.ruby_helmet": "Rubinhelm",
|
"item.gtamfmd.ruby_helmet": "Rubinhelm",
|
||||||
"item.gtamfmd.ruby_chestplate": "Rubinbrustpanzer",
|
"item.gtamfmd.ruby_chestplate": "Rubinbrustpanzer",
|
||||||
"item.gtamfmd.ruby_leggings": "Rubinhose",
|
"item.gtamfmd.ruby_leggings": "Rubinhose",
|
||||||
"item.gtamfmd.ruby_boots": "Rubinschuhe"
|
"item.gtamfmd.ruby_boots": "Rubinschuhe",
|
||||||
|
"item.gtamfmd.ruby_deepslate_ore": "Rubinerzklumpen"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,5 +8,6 @@
|
|||||||
"item.gtamfmd.ruby_helmet": "ruby helmet",
|
"item.gtamfmd.ruby_helmet": "ruby helmet",
|
||||||
"item.gtamfmd.ruby_chestplate": "ruby chestplate",
|
"item.gtamfmd.ruby_chestplate": "ruby chestplate",
|
||||||
"item.gtamfmd.ruby_leggings": "ruby leggings",
|
"item.gtamfmd.ruby_leggings": "ruby leggings",
|
||||||
"item.gtamfmd.ruby_boots": "ruby boots"
|
"item.gtamfmd.ruby_boots": "ruby boots",
|
||||||
|
"item.gtamfmd.ruby_deepslate_ore": "ruby deepslate ore"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "gtamfmd:block/ruby_deepslate_ore"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"parent": "gtamfmd:block/ruby_deepslate_ore"
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"bonus_rolls": 0.0,
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "gtamfmd:ruby_ore"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rolls": 1.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{ "type": "minecraft:ore",
|
||||||
|
"config": {
|
||||||
|
"discard_chance_on_air_exposure": 0.0,
|
||||||
|
"size": 20,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"state": { "Name": "gtamfmd:ruby_ore" },
|
||||||
|
"target": {
|
||||||
|
"predicate_type": "minecraft:tag_match",
|
||||||
|
"tag": "minecraft:stone_ore_replaceables"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"state": { "Name": "gtamfmd:ruby_deepslate_ore" },
|
||||||
|
"target": {
|
||||||
|
"predicate_type": "minecraft:tag_match",
|
||||||
|
"tag": "minecraft:deepslate_ore_replaceables"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"feature": "gtamfmd:ruby_ore_cf",
|
||||||
|
"placement": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:count",
|
||||||
|
"count": 16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:in_square"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:height_range",
|
||||||
|
"height": {
|
||||||
|
"type": "minecraft:trapezoid",
|
||||||
|
"max_inclusive": {
|
||||||
|
"absolute": 80
|
||||||
|
},
|
||||||
|
"min_inclusive": {
|
||||||
|
"absolute": -80
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:biome"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
"replace": false,
|
"replace": false,
|
||||||
"values": [
|
"values": [
|
||||||
"gtamfmd:ruby_block",
|
"gtamfmd:ruby_block",
|
||||||
"gtamfmd:ruby_ore"
|
"gtamfmd:ruby_ore",
|
||||||
|
"gtamfmd:ruby_deepslate_ore"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
"replace": false,
|
"replace": false,
|
||||||
"values": [
|
"values": [
|
||||||
"gtamfmd:ruby_block",
|
"gtamfmd:ruby_block",
|
||||||
"gtamfmd:ruby_ore"
|
"gtamfmd:ruby_ore",
|
||||||
|
"gtamfmd:ruby_deepslate_ore"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user