# Changes
Some checks failed
build / build (push) Has been cancelled

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:
IveBeenAlone 2025-03-10 19:04:04 -04:00
parent c4566b19cf
commit 86bfbe6b15
40 changed files with 563 additions and 5 deletions

7
changes.md Normal file
View 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

View File

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "nethercraft-classic:block/glowood_leaves"
}
}
}

View File

@ -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
}
}
}

View File

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "nethercraft-classic:block/glowood_sapling"
}
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/leaves",
"textures": {
"all": "nethercraft-classic:block/glowood_leaves"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column",
"textures": {
"end": "nethercraft-classic:block/glowood_log_top",
"side": "nethercraft-classic:block/glowood_log"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column_horizontal",
"textures": {
"end": "nethercraft-classic:block/glowood_log_top",
"side": "nethercraft-classic:block/glowood_log"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cross",
"textures": {
"cross": "nethercraft-classic:block/glowood_sapling"
}
}

View File

@ -0,0 +1,3 @@
{
"parent": "nethercraft-classic:block/glowood_leaves"
}

View File

@ -0,0 +1,3 @@
{
"parent": "nethercraft-classic:block/glowood_log"
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "nethercraft-classic:item/glowood_sapling"
}
}

View File

@ -0,0 +1,5 @@
{
"values": [
"nethercraft-classic:glowood_leaves"
]
}

View File

@ -0,0 +1,5 @@
{
"values": [
"nethercraft-classic:glowood_log"
]
}

View File

@ -0,0 +1,5 @@
{
"values": [
"nethercraft-classic:glowood_leaves"
]
}

View File

@ -0,0 +1,5 @@
{
"values": [
"nethercraft-classic:glowood_log"
]
}

View File

@ -0,0 +1,5 @@
{
"values": [
"nethercraft-classic:glowood_planks"
]
}

View File

@ -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
}
]
}

View File

@ -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
}
]
}

View File

@ -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
}
]
}

View File

@ -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"
}
}
}
}
}

View File

@ -7,6 +7,7 @@ import org.slf4j.LoggerFactory;
import xyz.ibatv.nethercraft.block.ModBlocks;
import xyz.ibatv.nethercraft.item.ModItemGroups;
import xyz.ibatv.nethercraft.item.ModItems;
import xyz.ibatv.nethercraft.world.gen.ModWorldGeneration;
public class NethercraftClassic implements ModInitializer {
public static final String MOD_ID = "nethercraft-classic";
@ -29,5 +30,10 @@ public class NethercraftClassic implements ModInitializer {
ModItems.registerModItems();
ModBlocks.registerModBlocks();
ModWorldGeneration.generateModWorldGen();
}
}

View File

@ -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());
}
}

View File

@ -2,7 +2,11 @@ package xyz.ibatv.nethercraft;
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
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.world.ModConfiguredFeatures;
import xyz.ibatv.nethercraft.world.ModPlacedFeatures;
public class NethercraftClassicDataGenerator implements DataGeneratorEntrypoint {
@Override
@ -14,5 +18,13 @@ public class NethercraftClassicDataGenerator implements DataGeneratorEntrypoint
pack.addProvider(ModLootTableProvider::new);
pack.addProvider(ModModelProvider::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);
}
}

View File

@ -1,19 +1,33 @@
package xyz.ibatv.nethercraft.block;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.*;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.Identifier;
import xyz.ibatv.nethercraft.NethercraftClassic;
import xyz.ibatv.nethercraft.block.custom.ModSaplingBlock;
import xyz.ibatv.nethercraft.world.tree.ModSaplingGenerators;
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",
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){
return Registry.register(Registries.BLOCK, Identifier.of(NethercraftClassic.MOD_ID, name), block);

View File

@ -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);
}
}

View File

@ -4,6 +4,7 @@ import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.BlockTags;
import net.minecraft.registry.tag.ItemTags;
import xyz.ibatv.nethercraft.block.ModBlocks;
import java.util.concurrent.CompletableFuture;
@ -24,5 +25,12 @@ public class ModBlockTagProvider extends FabricTagProvider.BlockTagProvider {
//getOrCreateTagBuilder(BlockTags.NEEDS_IRON_TOOL)
// .add(ModBlocks.PROSPERITY_GEMSTONE_BLOCK)
getOrCreateTagBuilder(BlockTags.LOGS)
.add(ModBlocks.GLOWOOD_LOG);
getOrCreateTagBuilder(BlockTags.LEAVES)
.add(ModBlocks.GLOWOOD_LEAVES);
}
}

View File

@ -3,6 +3,8 @@ package xyz.ibatv.nethercraft.datagen;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
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.util.ModTags;
import net.minecraft.item.Items;
@ -23,5 +25,15 @@ public class ModItemTagProvider extends FabricTagProvider.ItemTagProvider {
// .add(Items.COAL)
// .add(Items.STICK)
// .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());
}
}

View File

@ -30,7 +30,11 @@ public class ModLootTableProvider extends FabricBlockLootTableProvider {
@Override
public void generate() {
addDrop(ModBlocks.GLOWOOD_LOG);
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.INFERIUM_ORE, multipleOreDrops(ModBlocks.INFERIUM_ORE, ModItems.INFERIUM_ESSENCE, 2, 4));

View File

@ -2,6 +2,7 @@ package xyz.ibatv.nethercraft.datagen;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
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.item.ModItems;
import net.minecraft.data.client.BlockStateModelGenerator;
@ -15,7 +16,11 @@ public class ModModelProvider extends FabricModelProvider {
@Override
public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) {
blockStateModelGenerator.registerLog(ModBlocks.GLOWOOD_LOG).log(ModBlocks.GLOWOOD_LOG);
blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.GLOWOOD_PLANKS);
blockStateModelGenerator.registerSingleton(ModBlocks.GLOWOOD_LEAVES, TexturedModel.LEAVES);
blockStateModelGenerator.registerTintableCrossBlockState(ModBlocks.GLOWOOD_SAPLING, BlockStateModelGenerator.TintType.NOT_TINTED);
}
@Override

View File

@ -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 "";
}
}

View File

@ -18,7 +18,10 @@ public class ModItemGroups {
.displayName(Text.translatable("itemgroup.nethercraft.nethercraft_group"))
.entries((displayContext, entries) -> {
//Blocks
entries.add(ModBlocks.GLOWOOD_LOG);
entries.add(ModBlocks.GLOWOOD_LEAVES);
entries.add(ModBlocks.GLOWOOD_PLANKS);
entries.add(ModBlocks.GLOWOOD_SAPLING);
//Items
entries.add(ModItems.NETHERSTICK);
}).build());

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -0,0 +1,8 @@
package xyz.ibatv.nethercraft.world.gen;
public class ModWorldGeneration {
public static void generateModWorldGen() {
}
}

View File

@ -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());
}

View File

@ -4,5 +4,8 @@
"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"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

View File

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

View File

@ -21,6 +21,9 @@
],
"fabric-datagen": [
"xyz.ibatv.nethercraft.NethercraftClassicDataGenerator"
],
"client": [
"xyz.ibatv.nethercraft.NethercraftClassicClient"
]
},
"mixins": [