Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
Clean-up, Fixes and new Datagen content (#67)
Browse files Browse the repository at this point in the history
Personal note: Make page
  • Loading branch information
JR1811 authored Oct 23, 2023
1 parent f991e7c commit 22e3db1
Show file tree
Hide file tree
Showing 59 changed files with 1,295 additions and 64 deletions.
10 changes: 10 additions & 0 deletions reference-mod/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ loom {
}
}

sourceSets {
main {
resources {
srcDirs += [
'src/main/generated'
]
}
}
}

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.20.1 2023-07-20T19:02:04.606533057 Reference Mod/Tags for minecraft:block
6112b2bee4639cef8ed9aa51b42ea9e4b20c54f3 data/referencemod/tags/blocks/awesome_blocks.json
// 1.20.1 2023-10-23T23:33:46.9158136 Reference Mod/Tags for minecraft:block
6112b2bee4639cef8ed9aa51b42ea9e4b20c54f3 data\referencemod\tags\blocks\awesome_blocks.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// 1.20.1 2023-07-20T19:02:04.607454972 Reference Mod/Block Loot Tables
92553f71dfe9db9fa01651953449e473dc22cc96 data/referencemod/loot_tables/blocks/condensed_oak_log.json
ae172abac3d98aabf9709f0a46ec02c79cc3bd0f data/referencemod/loot_tables/blocks/condensed_dirt.json
// 1.20.1 2023-10-23T23:33:46.9383231 Reference Mod/Block Loot Tables
92553f71dfe9db9fa01651953449e473dc22cc96 data\referencemod\loot_tables\blocks\condensed_oak_log.json
ae172abac3d98aabf9709f0a46ec02c79cc3bd0f data\referencemod\loot_tables\blocks\condensed_dirt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// 1.20.1 2023-10-23T23:33:46.9317712 Reference Mod/Model Definitions
6b1219ee7bbffb00ce64bc3e76e5c2b659c7cb36 assets\referencemod\blockstates\advanced_test_block.json
65c1d03dfa1df874200d3ed6e7d8b984496a8187 assets\referencemod\models\item\advanced_test_block.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.20.1 2023-07-20T19:02:04.607279483 Reference Mod/Language (en_us)
9cf66e577eec42de052be9e79029810fa89ef396 assets/referencemod/lang/en_us.json
// 1.20.1 2023-10-23T23:33:46.9317712 Reference Mod/Language (en_us)
02e0348a43ce83856bc06f60fa055b8bcc7b940d assets\referencemod\lang\en_us.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
{
"variants": {
"arrows=0,facing=east,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a0b2",
"y": 90
},
"arrows=0,facing=east,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a0b3",
"y": 90
},
"arrows=0,facing=east,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a0b1",
"y": 90
},
"arrows=0,facing=north,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a0b2"
},
"arrows=0,facing=north,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a0b3"
},
"arrows=0,facing=north,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a0b1"
},
"arrows=0,facing=south,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a0b2",
"y": 180
},
"arrows=0,facing=south,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a0b3",
"y": 180
},
"arrows=0,facing=south,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a0b1",
"y": 180
},
"arrows=0,facing=west,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a0b2",
"y": 270
},
"arrows=0,facing=west,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a0b3",
"y": 270
},
"arrows=0,facing=west,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a0b1",
"y": 270
},
"arrows=1,facing=east,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a1b2",
"y": 90
},
"arrows=1,facing=east,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a1b3",
"y": 90
},
"arrows=1,facing=east,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a1b1",
"y": 90
},
"arrows=1,facing=north,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a1b2"
},
"arrows=1,facing=north,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a1b3"
},
"arrows=1,facing=north,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a1b1"
},
"arrows=1,facing=south,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a1b2",
"y": 180
},
"arrows=1,facing=south,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a1b3",
"y": 180
},
"arrows=1,facing=south,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a1b1",
"y": 180
},
"arrows=1,facing=west,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a1b2",
"y": 270
},
"arrows=1,facing=west,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a1b3",
"y": 270
},
"arrows=1,facing=west,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a1b1",
"y": 270
},
"arrows=2,facing=east,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a2b2",
"y": 90
},
"arrows=2,facing=east,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a2b3",
"y": 90
},
"arrows=2,facing=east,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a2b1",
"y": 90
},
"arrows=2,facing=north,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a2b2"
},
"arrows=2,facing=north,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a2b3"
},
"arrows=2,facing=north,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a2b1"
},
"arrows=2,facing=south,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a2b2",
"y": 180
},
"arrows=2,facing=south,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a2b3",
"y": 180
},
"arrows=2,facing=south,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a2b1",
"y": 180
},
"arrows=2,facing=west,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a2b2",
"y": 270
},
"arrows=2,facing=west,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a2b3",
"y": 270
},
"arrows=2,facing=west,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a2b1",
"y": 270
},
"arrows=3,facing=east,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a3b2",
"y": 90
},
"arrows=3,facing=east,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a3b3",
"y": 90
},
"arrows=3,facing=east,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a3b1",
"y": 90
},
"arrows=3,facing=north,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a3b2"
},
"arrows=3,facing=north,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a3b3"
},
"arrows=3,facing=north,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a3b1"
},
"arrows=3,facing=south,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a3b2",
"y": 180
},
"arrows=3,facing=south,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a3b3",
"y": 180
},
"arrows=3,facing=south,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a3b1",
"y": 180
},
"arrows=3,facing=west,hitbox_size=big": {
"model": "referencemod:block/advanced_test_block_a3b2",
"y": 270
},
"arrows=3,facing=west,hitbox_size=full": {
"model": "referencemod:block/advanced_test_block_a3b3",
"y": 270
},
"arrows=3,facing=west,hitbox_size=small": {
"model": "referencemod:block/advanced_test_block_a3b1",
"y": 270
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
{
"block.referencemod.prismarine_lamp": "Prismarine Lamp"
"block.referencemod.advanced_test_block": "Advanced Test Block",
"block.referencemod.advanced_test_block.subtitle": "§3[SHIFT]§r to expand Tooltip window!",
"block.referencemod.advanced_test_block.subtitle.shift_0": "§3[Interact]§r with this block to cycle between arrows",
"block.referencemod.advanced_test_block.subtitle.shift_1": "§3[Sneak + Interact]§r with this block to change the VoxelShape",
"block.referencemod.condensed_dirt": "Condensed Dirt",
"block.referencemod.prismarine_lamp": "Prismarine Lamp",
"block.referencemod.test_block": "Test Block",
"item.referencemod.guidite_axe": "Guidite Axe",
"item.referencemod.guidite_boots": "Guidite Boots",
"item.referencemod.guidite_chestplate": "Guidite Chestplate",
"item.referencemod.guidite_helmet": "Guidite Helmet",
"item.referencemod.guidite_hoe": "Guidite Hoe",
"item.referencemod.guidite_leggings": "Guidite Leggings",
"item.referencemod.guidite_pickaxe": "Guidite Pickaxe",
"item.referencemod.guidite_shovel": "Guidite Shovel",
"item.referencemod.guidite_sword": "Guidite Sword",
"item.referencemod.lightning_stick": "Lightning Stick",
"item.referencemod.poop": "Poop",
"itemGroup.referencemod": "Fabric Community Wiki Items",
"sound.referencemod.metal_whistle": "Metal Whistle Sound"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecraft:item/barrier"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public void onInitialize() {
ModBlockEntities.registerBlockEntityTypes();
ModItems.initialize();
ModSounds.initializeSounds();
ModEvents.registerAllEvents();
ModEvents.registerCommon();
ModParticles.initialize();
TextUtil.initializeAllTextFunctions();

LoggerUtil.devLogger("All classes have been initialized");
LoggerUtil.devLogger("All common classes have been initialized");
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
package dev.mineblock11.fabric.referencemod;

import dev.mineblock11.fabric.referencemod.block.ModBlocks;
import dev.mineblock11.fabric.referencemod.event.ModEvents;
import dev.mineblock11.fabric.referencemod.particle.ModParticles;
import dev.mineblock11.fabric.referencemod.particle.custom.MyParticle;
import dev.mineblock11.fabric.referencemod.util.helper.LoggerUtil;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;

@Environment(EnvType.CLIENT)
public class MyModClient implements ClientModInitializer {
@Override
public void onInitializeClient() {
ParticleFactoryRegistry.getInstance().register(ModParticles.MY_PARTICLE, MyParticle.Factory::new);
ModEvents.registerClient();
ModBlocks.initializeClientRendering();
ModParticles.initializeClient();

LoggerUtil.devLogger("All client classes have been initialized");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
package dev.mineblock11.fabric.referencemod.block;

import dev.mineblock11.fabric.referencemod.MyMod;
import dev.mineblock11.fabric.referencemod.block.custom.AdvancedTestBlock;
import dev.mineblock11.fabric.referencemod.block.custom.PrismarineLampBlock;
import dev.mineblock11.fabric.referencemod.block.custom.TestBlock;
import dev.mineblock11.fabric.referencemod.util.helper.LoggerUtil;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.PillarBlock;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.registry.Registries;
Expand All @@ -15,26 +18,23 @@
import net.minecraft.util.Identifier;

public class ModBlocks {
public static final Block CONDENSED_DIRT = register("condensed_dirt", true,
new Block(AbstractBlock.Settings.create().sounds(BlockSoundGroup.GRASS)));

public static final Block CONDENSED_DIRT = register(
new Block(
AbstractBlock.Settings.create().sounds(BlockSoundGroup.GRASS)
), "condensed_dirt", true);
public static final PillarBlock CONDENSED_OAK_LOG = register("condensed_oak_log", true,
new PillarBlock(AbstractBlock.Settings.create().sounds(BlockSoundGroup.WOOD)));

public static final Block TEST_BLOCK = register(
new TestBlock(AbstractBlock.Settings.create()), "test_block", true
);
public static final PrismarineLampBlock PRISMARINE_LAMP = register("prismarine_lamp", true,
new PrismarineLampBlock());

public static final PillarBlock CONDENSED_OAK_LOG = register(
new PillarBlock(
AbstractBlock.Settings.create().sounds(BlockSoundGroup.WOOD)
), "condensed_oak_log", true);
public static final Block TEST_BLOCK = register("test_block", true,
new TestBlock(AbstractBlock.Settings.create()));

public static final PrismarineLampBlock PRISMARINE_LAMP = register(
new PrismarineLampBlock(), "prismarine_lamp", true
);
public static final Block ADVANCED_TEST_BLOCK = register("advanced_test_block", true,
new AdvancedTestBlock(AbstractBlock.Settings.create().nonOpaque()));

public static <T extends Block> T register(T block, String name, boolean registerItem) {

public static <T extends Block> T register( String name, boolean registerItem, T block) {
Identifier id = new Identifier(MyMod.MOD_ID, name);

if (registerItem) {
Expand All @@ -48,4 +48,8 @@ public static <T extends Block> T register(T block, String name, boolean registe
public static void initialize() {
LoggerUtil.devLogger("Initializing Blocks");
}

public static void initializeClientRendering() {
BlockRenderLayerMap.INSTANCE.putBlock(ADVANCED_TEST_BLOCK, RenderLayer.getCutout());
}
}
Loading

0 comments on commit 22e3db1

Please sign in to comment.