10/03/2025 - added Glowood Logs/planks/leaves/sapling and functional tree data-thing. - That's kinda it? Basics for adding more items/blocks are being worked on. I think next order of business is finishing up the basic blocks and then working on either items or entity blocks like the furnace or crafting table. Also decide if armour trims should be a thing, and if so what palettes to use. Also move the paintings off of the old b1.7.3 format art blob into seperate items(?), and add the mobs. After adding proper world gen for tree and ores do dark wheat and food stuffs I guess
This commit is contained in:
parent
c4566b19cf
commit
86bfbe6b15
7
changes.md
Normal file
7
changes.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Changes
|
||||||
|
|
||||||
|
10/03/2025
|
||||||
|
- added Glowood Logs/planks/leaves/sapling and functional tree data-thing.
|
||||||
|
- That's kinda it? Basics for adding more items/blocks are being worked on. I think next order of business is finishing up the basic blocks and then working on either items or entity blocks like the furnace or crafting table.
|
||||||
|
|
||||||
|
Also decide if armour trims should be a thing, and if so what palettes to use. Also move the paintings off of the old b1.7.3 format art blob into separate sprites(?), and add the mobs. After adding proper world gen for tree and ores do dark wheat and food stuffs I guess
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "nethercraft-classic:block/glowood_leaves"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"axis=x": {
|
||||||
|
"model": "nethercraft-classic:block/glowood_log_horizontal",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis=y": {
|
||||||
|
"model": "nethercraft-classic:block/glowood_log"
|
||||||
|
},
|
||||||
|
"axis=z": {
|
||||||
|
"model": "nethercraft-classic:block/glowood_log_horizontal",
|
||||||
|
"x": 90
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "nethercraft-classic:block/glowood_sapling"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:block/leaves",
|
||||||
|
"textures": {
|
||||||
|
"all": "nethercraft-classic:block/glowood_leaves"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_column",
|
||||||
|
"textures": {
|
||||||
|
"end": "nethercraft-classic:block/glowood_log_top",
|
||||||
|
"side": "nethercraft-classic:block/glowood_log"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_column_horizontal",
|
||||||
|
"textures": {
|
||||||
|
"end": "nethercraft-classic:block/glowood_log_top",
|
||||||
|
"side": "nethercraft-classic:block/glowood_log"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:block/cross",
|
||||||
|
"textures": {
|
||||||
|
"cross": "nethercraft-classic:block/glowood_sapling"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"parent": "nethercraft-classic:block/glowood_leaves"
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"parent": "nethercraft-classic:block/glowood_log"
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "nethercraft-classic:item/glowood_sapling"
|
||||||
|
}
|
||||||
|
}
|
5
src/main/generated/data/minecraft/tags/block/leaves.json
Normal file
5
src/main/generated/data/minecraft/tags/block/leaves.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"nethercraft-classic:glowood_leaves"
|
||||||
|
]
|
||||||
|
}
|
5
src/main/generated/data/minecraft/tags/block/logs.json
Normal file
5
src/main/generated/data/minecraft/tags/block/logs.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"nethercraft-classic:glowood_log"
|
||||||
|
]
|
||||||
|
}
|
5
src/main/generated/data/minecraft/tags/item/leaves.json
Normal file
5
src/main/generated/data/minecraft/tags/item/leaves.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"nethercraft-classic:glowood_leaves"
|
||||||
|
]
|
||||||
|
}
|
5
src/main/generated/data/minecraft/tags/item/logs.json
Normal file
5
src/main/generated/data/minecraft/tags/item/logs.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"nethercraft-classic:glowood_log"
|
||||||
|
]
|
||||||
|
}
|
5
src/main/generated/data/minecraft/tags/item/planks.json
Normal file
5
src/main/generated/data/minecraft/tags/item/planks.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"nethercraft-classic:glowood_planks"
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,132 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"bonus_rolls": 0.0,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:alternatives",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:any_of",
|
||||||
|
"terms": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:match_tool",
|
||||||
|
"predicate": {
|
||||||
|
"items": "minecraft:shears"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:match_tool",
|
||||||
|
"predicate": {
|
||||||
|
"predicates": {
|
||||||
|
"minecraft:enchantments": [
|
||||||
|
{
|
||||||
|
"enchantments": "minecraft:silk_touch",
|
||||||
|
"levels": {
|
||||||
|
"min": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "nethercraft-classic:glowood_leaves"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chances": [
|
||||||
|
0.0625
|
||||||
|
],
|
||||||
|
"condition": "minecraft:table_bonus",
|
||||||
|
"enchantment": "minecraft:fortune"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "nethercraft-classic:glowood_sapling"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rolls": 1.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bonus_rolls": 0.0,
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:inverted",
|
||||||
|
"term": {
|
||||||
|
"condition": "minecraft:any_of",
|
||||||
|
"terms": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:match_tool",
|
||||||
|
"predicate": {
|
||||||
|
"items": "minecraft:shears"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:match_tool",
|
||||||
|
"predicate": {
|
||||||
|
"predicates": {
|
||||||
|
"minecraft:enchantments": [
|
||||||
|
{
|
||||||
|
"enchantments": "minecraft:silk_touch",
|
||||||
|
"levels": {
|
||||||
|
"min": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"chances": [
|
||||||
|
0.02,
|
||||||
|
0.022222223,
|
||||||
|
0.025,
|
||||||
|
0.033333335,
|
||||||
|
0.1
|
||||||
|
],
|
||||||
|
"condition": "minecraft:table_bonus",
|
||||||
|
"enchantment": "minecraft:fortune"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"functions": [
|
||||||
|
{
|
||||||
|
"add": false,
|
||||||
|
"count": {
|
||||||
|
"type": "minecraft:uniform",
|
||||||
|
"max": 2.0,
|
||||||
|
"min": 1.0
|
||||||
|
},
|
||||||
|
"function": "minecraft:set_count"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"function": "minecraft:explosion_decay"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "minecraft:stick"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rolls": 1.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"bonus_rolls": 0.0,
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "nethercraft-classic:glowood_log"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rolls": 1.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"bonus_rolls": 0.0,
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "nethercraft-classic:glowood_sapling"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rolls": 1.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:tree",
|
||||||
|
"config": {
|
||||||
|
"decorators": [],
|
||||||
|
"dirt_provider": {
|
||||||
|
"type": "minecraft:simple_state_provider",
|
||||||
|
"state": {
|
||||||
|
"Name": "minecraft:netherrack"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"foliage_placer": {
|
||||||
|
"type": "minecraft:blob_foliage_placer",
|
||||||
|
"height": 3,
|
||||||
|
"offset": 0,
|
||||||
|
"radius": 2
|
||||||
|
},
|
||||||
|
"foliage_provider": {
|
||||||
|
"type": "minecraft:simple_state_provider",
|
||||||
|
"state": {
|
||||||
|
"Name": "nethercraft-classic:glowood_leaves",
|
||||||
|
"Properties": {
|
||||||
|
"distance": "7",
|
||||||
|
"persistent": "false",
|
||||||
|
"waterlogged": "false"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"force_dirt": false,
|
||||||
|
"ignore_vines": false,
|
||||||
|
"minimum_size": {
|
||||||
|
"type": "minecraft:two_layers_feature_size",
|
||||||
|
"limit": 1,
|
||||||
|
"lower_size": 0,
|
||||||
|
"upper_size": 1
|
||||||
|
},
|
||||||
|
"trunk_placer": {
|
||||||
|
"type": "minecraft:straight_trunk_placer",
|
||||||
|
"base_height": 4,
|
||||||
|
"height_rand_a": 2,
|
||||||
|
"height_rand_b": 0
|
||||||
|
},
|
||||||
|
"trunk_provider": {
|
||||||
|
"type": "minecraft:simple_state_provider",
|
||||||
|
"state": {
|
||||||
|
"Name": "nethercraft-classic:glowood_log",
|
||||||
|
"Properties": {
|
||||||
|
"axis": "y"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -7,6 +7,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
import xyz.ibatv.nethercraft.block.ModBlocks;
|
import xyz.ibatv.nethercraft.block.ModBlocks;
|
||||||
import xyz.ibatv.nethercraft.item.ModItemGroups;
|
import xyz.ibatv.nethercraft.item.ModItemGroups;
|
||||||
import xyz.ibatv.nethercraft.item.ModItems;
|
import xyz.ibatv.nethercraft.item.ModItems;
|
||||||
|
import xyz.ibatv.nethercraft.world.gen.ModWorldGeneration;
|
||||||
|
|
||||||
public class NethercraftClassic implements ModInitializer {
|
public class NethercraftClassic implements ModInitializer {
|
||||||
public static final String MOD_ID = "nethercraft-classic";
|
public static final String MOD_ID = "nethercraft-classic";
|
||||||
@ -29,5 +30,10 @@ public class NethercraftClassic implements ModInitializer {
|
|||||||
|
|
||||||
ModItems.registerModItems();
|
ModItems.registerModItems();
|
||||||
ModBlocks.registerModBlocks();
|
ModBlocks.registerModBlocks();
|
||||||
|
|
||||||
|
|
||||||
|
ModWorldGeneration.generateModWorldGen();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package xyz.ibatv.nethercraft;
|
||||||
|
|
||||||
|
import net.fabricmc.api.ClientModInitializer;
|
||||||
|
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
|
||||||
|
import net.minecraft.client.render.RenderLayer;
|
||||||
|
import xyz.ibatv.nethercraft.block.ModBlocks;
|
||||||
|
|
||||||
|
public class NethercraftClassicClient implements ClientModInitializer {
|
||||||
|
@Override
|
||||||
|
public void onInitializeClient() {
|
||||||
|
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.GLOWOOD_SAPLING, RenderLayer.getCutout());
|
||||||
|
}
|
||||||
|
}
|
@ -2,7 +2,11 @@ package xyz.ibatv.nethercraft;
|
|||||||
|
|
||||||
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
|
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
|
||||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
|
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
|
||||||
|
import net.minecraft.registry.RegistryBuilder;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
import xyz.ibatv.nethercraft.datagen.*;
|
import xyz.ibatv.nethercraft.datagen.*;
|
||||||
|
import xyz.ibatv.nethercraft.world.ModConfiguredFeatures;
|
||||||
|
import xyz.ibatv.nethercraft.world.ModPlacedFeatures;
|
||||||
|
|
||||||
public class NethercraftClassicDataGenerator implements DataGeneratorEntrypoint {
|
public class NethercraftClassicDataGenerator implements DataGeneratorEntrypoint {
|
||||||
@Override
|
@Override
|
||||||
@ -14,5 +18,13 @@ public class NethercraftClassicDataGenerator implements DataGeneratorEntrypoint
|
|||||||
pack.addProvider(ModLootTableProvider::new);
|
pack.addProvider(ModLootTableProvider::new);
|
||||||
pack.addProvider(ModModelProvider::new);
|
pack.addProvider(ModModelProvider::new);
|
||||||
pack.addProvider(ModRecipeProvider::new);
|
pack.addProvider(ModRecipeProvider::new);
|
||||||
|
pack.addProvider(ModRegistryDataGenerator::new);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void buildRegistry(RegistryBuilder registryBuilder) {
|
||||||
|
registryBuilder.addRegistry(RegistryKeys.CONFIGURED_FEATURE, ModConfiguredFeatures::bootstrap);
|
||||||
|
registryBuilder.addRegistry(RegistryKeys.PLACED_FEATURE, ModPlacedFeatures::bootstrap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,33 @@
|
|||||||
package xyz.ibatv.nethercraft.block;
|
package xyz.ibatv.nethercraft.block;
|
||||||
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
import net.minecraft.block.*;
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.item.BlockItem;
|
import net.minecraft.item.BlockItem;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.registry.Registries;
|
import net.minecraft.registry.Registries;
|
||||||
import net.minecraft.registry.Registry;
|
import net.minecraft.registry.Registry;
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import xyz.ibatv.nethercraft.NethercraftClassic;
|
import xyz.ibatv.nethercraft.NethercraftClassic;
|
||||||
|
import xyz.ibatv.nethercraft.block.custom.ModSaplingBlock;
|
||||||
|
import xyz.ibatv.nethercraft.world.tree.ModSaplingGenerators;
|
||||||
|
|
||||||
public class ModBlocks {
|
public class ModBlocks {
|
||||||
|
|
||||||
|
public static final Block GLOWOOD_LOG = registerBlock("glowood_log",
|
||||||
|
new PillarBlock(AbstractBlock.Settings.copy(Blocks.OAK_LOG)));
|
||||||
|
|
||||||
public static final Block GLOWOOD_PLANKS = registerBlock("glowood_planks",
|
public static final Block GLOWOOD_PLANKS = registerBlock("glowood_planks",
|
||||||
new Block(AbstractBlock.Settings.create().strength(4f).requiresTool().sounds(BlockSoundGroup.WOOD)));
|
new Block(AbstractBlock.Settings.copy(Blocks.OAK_PLANKS)));
|
||||||
|
public static final Block GLOWOOD_LEAVES = registerBlock("glowood_leaves",
|
||||||
|
new LeavesBlock(AbstractBlock.Settings.copy(Blocks.OAK_LEAVES)));
|
||||||
|
|
||||||
|
public static final Block GLOWOOD_SAPLING = registerBlock("glowood_sapling",
|
||||||
|
new ModSaplingBlock(ModSaplingGenerators.GLOWOOD, AbstractBlock.Settings.copy(Blocks.OAK_SAPLING), Blocks.NETHERRACK));
|
||||||
|
|
||||||
|
//public static final Block GLOWOOD_SAPLING = registerBlock("glowood_sapling",
|
||||||
|
// new SaplingBlock(ModSaplingGenerators.GLOWOOD, AbstractBlock.Settings.copy(Blocks.OAK_SAPLING)));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static Block registerBlockWithoutBlockItem(String name, Block block){
|
private static Block registerBlockWithoutBlockItem(String name, Block block){
|
||||||
return Registry.register(Registries.BLOCK, Identifier.of(NethercraftClassic.MOD_ID, name), block);
|
return Registry.register(Registries.BLOCK, Identifier.of(NethercraftClassic.MOD_ID, name), block);
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
package xyz.ibatv.nethercraft.block.custom;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.SaplingBlock;
|
||||||
|
import net.minecraft.block.SaplingGenerator;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.BlockView;
|
||||||
|
|
||||||
|
public class ModSaplingBlock extends SaplingBlock {
|
||||||
|
private final Block blockToPlaceOn;
|
||||||
|
|
||||||
|
|
||||||
|
public ModSaplingBlock(SaplingGenerator generator, Settings settings, Block block) {
|
||||||
|
super(generator, settings);
|
||||||
|
this.blockToPlaceOn = block;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean canPlantOnTop(BlockState floor, BlockView world, BlockPos pos) {
|
||||||
|
return floor.isOf(this.blockToPlaceOn);
|
||||||
|
}
|
||||||
|
}
|
@ -4,6 +4,7 @@ import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
|||||||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
|
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
|
||||||
import net.minecraft.registry.RegistryWrapper;
|
import net.minecraft.registry.RegistryWrapper;
|
||||||
import net.minecraft.registry.tag.BlockTags;
|
import net.minecraft.registry.tag.BlockTags;
|
||||||
|
import net.minecraft.registry.tag.ItemTags;
|
||||||
import xyz.ibatv.nethercraft.block.ModBlocks;
|
import xyz.ibatv.nethercraft.block.ModBlocks;
|
||||||
|
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
@ -24,5 +25,12 @@ public class ModBlockTagProvider extends FabricTagProvider.BlockTagProvider {
|
|||||||
|
|
||||||
//getOrCreateTagBuilder(BlockTags.NEEDS_IRON_TOOL)
|
//getOrCreateTagBuilder(BlockTags.NEEDS_IRON_TOOL)
|
||||||
// .add(ModBlocks.PROSPERITY_GEMSTONE_BLOCK)
|
// .add(ModBlocks.PROSPERITY_GEMSTONE_BLOCK)
|
||||||
|
|
||||||
|
|
||||||
|
getOrCreateTagBuilder(BlockTags.LOGS)
|
||||||
|
.add(ModBlocks.GLOWOOD_LOG);
|
||||||
|
|
||||||
|
getOrCreateTagBuilder(BlockTags.LEAVES)
|
||||||
|
.add(ModBlocks.GLOWOOD_LEAVES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@ package xyz.ibatv.nethercraft.datagen;
|
|||||||
|
|
||||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
|
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
|
||||||
|
import net.minecraft.registry.tag.ItemTags;
|
||||||
|
import xyz.ibatv.nethercraft.block.ModBlocks;
|
||||||
import xyz.ibatv.nethercraft.item.ModItems;
|
import xyz.ibatv.nethercraft.item.ModItems;
|
||||||
//import xyz.ibatv.nethercraft.util.ModTags;
|
//import xyz.ibatv.nethercraft.util.ModTags;
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
@ -23,5 +25,15 @@ public class ModItemTagProvider extends FabricTagProvider.ItemTagProvider {
|
|||||||
// .add(Items.COAL)
|
// .add(Items.COAL)
|
||||||
// .add(Items.STICK)
|
// .add(Items.STICK)
|
||||||
// .add(Items.APPLE);
|
// .add(Items.APPLE);
|
||||||
|
|
||||||
|
|
||||||
|
getOrCreateTagBuilder(ItemTags.LOGS)
|
||||||
|
.add(ModBlocks.GLOWOOD_LOG.asItem());
|
||||||
|
|
||||||
|
getOrCreateTagBuilder(ItemTags.PLANKS)
|
||||||
|
.add(ModBlocks.GLOWOOD_PLANKS.asItem());
|
||||||
|
|
||||||
|
getOrCreateTagBuilder(ItemTags.LEAVES)
|
||||||
|
.add(ModBlocks.GLOWOOD_LEAVES.asItem());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,11 @@ public class ModLootTableProvider extends FabricBlockLootTableProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void generate() {
|
public void generate() {
|
||||||
|
addDrop(ModBlocks.GLOWOOD_LOG);
|
||||||
addDrop(ModBlocks.GLOWOOD_PLANKS);
|
addDrop(ModBlocks.GLOWOOD_PLANKS);
|
||||||
|
addDrop(ModBlocks.GLOWOOD_SAPLING);
|
||||||
|
|
||||||
|
addDrop(ModBlocks.GLOWOOD_LEAVES, leavesDrops(ModBlocks.GLOWOOD_LEAVES, ModBlocks.GLOWOOD_SAPLING, 0.0625f));
|
||||||
|
|
||||||
//addDrop(ModBlocks.PROSPERITY_ORE, multipleOreDrops(ModBlocks.PROSPERITY_ORE, ModItems.PROSPERITY_SHARD, 1, 4));
|
//addDrop(ModBlocks.PROSPERITY_ORE, multipleOreDrops(ModBlocks.PROSPERITY_ORE, ModItems.PROSPERITY_SHARD, 1, 4));
|
||||||
//addDrop(ModBlocks.INFERIUM_ORE, multipleOreDrops(ModBlocks.INFERIUM_ORE, ModItems.INFERIUM_ESSENCE, 2, 4));
|
//addDrop(ModBlocks.INFERIUM_ORE, multipleOreDrops(ModBlocks.INFERIUM_ORE, ModItems.INFERIUM_ESSENCE, 2, 4));
|
||||||
|
@ -2,6 +2,7 @@ package xyz.ibatv.nethercraft.datagen;
|
|||||||
|
|
||||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider;
|
import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider;
|
||||||
|
import net.minecraft.data.client.TexturedModel;
|
||||||
import xyz.ibatv.nethercraft.block.ModBlocks;
|
import xyz.ibatv.nethercraft.block.ModBlocks;
|
||||||
import xyz.ibatv.nethercraft.item.ModItems;
|
import xyz.ibatv.nethercraft.item.ModItems;
|
||||||
import net.minecraft.data.client.BlockStateModelGenerator;
|
import net.minecraft.data.client.BlockStateModelGenerator;
|
||||||
@ -15,7 +16,11 @@ public class ModModelProvider extends FabricModelProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) {
|
public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) {
|
||||||
|
blockStateModelGenerator.registerLog(ModBlocks.GLOWOOD_LOG).log(ModBlocks.GLOWOOD_LOG);
|
||||||
|
|
||||||
blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.GLOWOOD_PLANKS);
|
blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.GLOWOOD_PLANKS);
|
||||||
|
blockStateModelGenerator.registerSingleton(ModBlocks.GLOWOOD_LEAVES, TexturedModel.LEAVES);
|
||||||
|
blockStateModelGenerator.registerTintableCrossBlockState(ModBlocks.GLOWOOD_SAPLING, BlockStateModelGenerator.TintType.NOT_TINTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
package xyz.ibatv.nethercraft.datagen;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.provider.FabricDynamicRegistryProvider;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.registry.RegistryWrapper;
|
||||||
|
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
|
public class ModRegistryDataGenerator extends FabricDynamicRegistryProvider {
|
||||||
|
public ModRegistryDataGenerator(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
|
||||||
|
super(output, registriesFuture);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void configure(RegistryWrapper.WrapperLookup registries, Entries entries) {
|
||||||
|
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.CONFIGURED_FEATURE));
|
||||||
|
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.PLACED_FEATURE));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
@ -18,7 +18,10 @@ public class ModItemGroups {
|
|||||||
.displayName(Text.translatable("itemgroup.nethercraft.nethercraft_group"))
|
.displayName(Text.translatable("itemgroup.nethercraft.nethercraft_group"))
|
||||||
.entries((displayContext, entries) -> {
|
.entries((displayContext, entries) -> {
|
||||||
//Blocks
|
//Blocks
|
||||||
|
entries.add(ModBlocks.GLOWOOD_LOG);
|
||||||
|
entries.add(ModBlocks.GLOWOOD_LEAVES);
|
||||||
entries.add(ModBlocks.GLOWOOD_PLANKS);
|
entries.add(ModBlocks.GLOWOOD_PLANKS);
|
||||||
|
entries.add(ModBlocks.GLOWOOD_SAPLING);
|
||||||
//Items
|
//Items
|
||||||
entries.add(ModItems.NETHERSTICK);
|
entries.add(ModItems.NETHERSTICK);
|
||||||
}).build());
|
}).build());
|
||||||
|
@ -0,0 +1,45 @@
|
|||||||
|
package xyz.ibatv.nethercraft.world;
|
||||||
|
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
|
import net.minecraft.registry.Registerable;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.util.math.intprovider.ConstantIntProvider;
|
||||||
|
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||||
|
import net.minecraft.world.gen.feature.Feature;
|
||||||
|
import net.minecraft.world.gen.feature.FeatureConfig;
|
||||||
|
import net.minecraft.world.gen.feature.TreeFeatureConfig;
|
||||||
|
import net.minecraft.world.gen.feature.size.TwoLayersFeatureSize;
|
||||||
|
import net.minecraft.world.gen.foliage.BlobFoliagePlacer;
|
||||||
|
import net.minecraft.world.gen.stateprovider.BlockStateProvider;
|
||||||
|
import net.minecraft.world.gen.trunk.StraightTrunkPlacer;
|
||||||
|
import xyz.ibatv.nethercraft.NethercraftClassic;
|
||||||
|
import xyz.ibatv.nethercraft.block.ModBlocks;
|
||||||
|
|
||||||
|
public class ModConfiguredFeatures {
|
||||||
|
// CF > PF > WG
|
||||||
|
|
||||||
|
public static final RegistryKey<ConfiguredFeature<?, ?>> GLOWOOD_KEY = registerKey("glowood");
|
||||||
|
|
||||||
|
public static void bootstrap(Registerable<ConfiguredFeature<?,?>> context) {
|
||||||
|
|
||||||
|
register(context, GLOWOOD_KEY, Feature.TREE, new TreeFeatureConfig.Builder(
|
||||||
|
BlockStateProvider.of(ModBlocks.GLOWOOD_LOG),
|
||||||
|
new StraightTrunkPlacer(4,2,0),
|
||||||
|
|
||||||
|
BlockStateProvider.of(ModBlocks.GLOWOOD_LEAVES),
|
||||||
|
new BlobFoliagePlacer(ConstantIntProvider.create(2), ConstantIntProvider.create(0), 3),
|
||||||
|
|
||||||
|
new TwoLayersFeatureSize(1, 0, 1)).dirtProvider(BlockStateProvider.of(Blocks.NETHERRACK)).build());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RegistryKey<ConfiguredFeature<?, ?>> registerKey(String name) {
|
||||||
|
return RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, Identifier.of(NethercraftClassic.MOD_ID, name));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static <FC extends FeatureConfig, F extends Feature<FC>> void register(Registerable<ConfiguredFeature<?, ?>> context,
|
||||||
|
RegistryKey<ConfiguredFeature<?, ?>> key, F feature, FC configuration) {
|
||||||
|
context.register(key, new ConfiguredFeature<>(feature, configuration));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package xyz.ibatv.nethercraft.world;
|
||||||
|
|
||||||
|
import net.minecraft.registry.Registerable;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.registry.entry.RegistryEntry;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||||
|
import net.minecraft.world.gen.feature.Feature;
|
||||||
|
import net.minecraft.world.gen.feature.FeatureConfig;
|
||||||
|
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||||
|
import net.minecraft.world.gen.placementmodifier.PlacementModifier;
|
||||||
|
import xyz.ibatv.nethercraft.NethercraftClassic;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ModPlacedFeatures {
|
||||||
|
|
||||||
|
public static void bootstrap(Registerable<PlacedFeature> context) {
|
||||||
|
var configuredFeatures = context.getRegistryLookup(RegistryKeys.CONFIGURED_FEATURE);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RegistryKey<PlacedFeature> registerKey(String name) {
|
||||||
|
return RegistryKey.of(RegistryKeys.PLACED_FEATURE, Identifier.of(NethercraftClassic.MOD_ID, name));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void register(Registerable<PlacedFeature> context, RegistryKey<PlacedFeature> key, RegistryEntry<ConfiguredFeature<?, ?>> configuration,
|
||||||
|
List<PlacementModifier> modifiers) {
|
||||||
|
context.register(key, new PlacedFeature(configuration, List.copyOf(modifiers)));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static <FC extends FeatureConfig, F extends Feature<FC>> void register(Registerable<PlacedFeature> context, RegistryKey<PlacedFeature> key,
|
||||||
|
RegistryEntry<ConfiguredFeature<?, ?>> configuration,
|
||||||
|
PlacementModifier... modifiers) {
|
||||||
|
register(context, key, configuration, List.of(modifiers));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
package xyz.ibatv.nethercraft.world.gen;
|
||||||
|
|
||||||
|
public class ModWorldGeneration {
|
||||||
|
public static void generateModWorldGen() {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package xyz.ibatv.nethercraft.world.tree;
|
||||||
|
|
||||||
|
import net.minecraft.block.SaplingGenerator;
|
||||||
|
import xyz.ibatv.nethercraft.NethercraftClassic;
|
||||||
|
import xyz.ibatv.nethercraft.world.ModConfiguredFeatures;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public class ModSaplingGenerators {
|
||||||
|
public static final SaplingGenerator GLOWOOD = new SaplingGenerator(NethercraftClassic.MOD_ID + ":glowood",
|
||||||
|
Optional.empty(), Optional.of(ModConfiguredFeatures.GLOWOOD_KEY), Optional.empty());
|
||||||
|
}
|
@ -4,5 +4,8 @@
|
|||||||
"item.nethercraft-classic.netherstick": "Netherstick",
|
"item.nethercraft-classic.netherstick": "Netherstick",
|
||||||
|
|
||||||
|
|
||||||
"block.nethercraft-classic.glowood_planks": "Glowood Planks"
|
"block.nethercraft-classic.glowood_log": "Glowood Log",
|
||||||
|
"block.nethercraft-classic.glowood_leaves": "Glowood Leaves",
|
||||||
|
"block.nethercraft-classic.glowood_planks": "Glowood Planks",
|
||||||
|
"block.nethercraft-classic.glowood_sapling": "Glowood Sapling"
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 416 B |
Binary file not shown.
After Width: | Height: | Size: 416 B |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
@ -21,6 +21,9 @@
|
|||||||
],
|
],
|
||||||
"fabric-datagen": [
|
"fabric-datagen": [
|
||||||
"xyz.ibatv.nethercraft.NethercraftClassicDataGenerator"
|
"xyz.ibatv.nethercraft.NethercraftClassicDataGenerator"
|
||||||
|
],
|
||||||
|
"client": [
|
||||||
|
"xyz.ibatv.nethercraft.NethercraftClassicClient"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mixins": [
|
"mixins": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user