v1.0.0
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
// 1.21.1 2026-04-27T21:59:02.410882928 Loot Tables
|
||||
f21b2a97e8470cfc3d7538d1b0d7096f5748b6e2 data/processed_obsidian/loot_table/blocks/cracked_obsidian_bricks.json
|
||||
192ef7b15b8f072dda076e4d372d5cd97f350534 data/processed_obsidian/loot_table/blocks/cracked_obsidian_tiles.json
|
||||
414e5336e6618894bd7ba5b96acadb2c73c1ca6c data/processed_obsidian/loot_table/blocks/obsidian_bricks.json
|
||||
b4d935b7d05ed57eddf0fd99918848802e6c480b data/processed_obsidian/loot_table/blocks/obsidian_tiles.json
|
||||
ab1bf0e279315d8fddae0bcdc0230cba796f3ae2 data/processed_obsidian/loot_table/blocks/polished_obsidian.json
|
||||
@@ -0,0 +1,16 @@
|
||||
// 1.21.1 2026-04-27T21:59:02.409476133 Block States: processed_obsidian
|
||||
9bb3540d344f13b241649e506066c899757a51c3 assets/processed_obsidian/blockstates/cracked_obsidian_bricks.json
|
||||
12cec9d85e4fa8a8b4b858cd693a5e84d4e2d66f assets/processed_obsidian/blockstates/cracked_obsidian_tiles.json
|
||||
d65a588a6e6a4d76b19a0117bcdc056a4d0adcff assets/processed_obsidian/blockstates/obsidian_bricks.json
|
||||
919053c3d999feaadddf18752759893b3ff59d0f assets/processed_obsidian/blockstates/obsidian_tiles.json
|
||||
f3542d999e8f8d5d3e712fd1e8f118d14e267706 assets/processed_obsidian/blockstates/polished_obsidian.json
|
||||
e7e5049c8fa4f3b8448072df2b4a314c2b4b25c3 assets/processed_obsidian/models/block/cracked_obsidian_bricks.json
|
||||
0a0f072bda094f474fd7bb4f644fd9e5e68931b4 assets/processed_obsidian/models/block/cracked_obsidian_tiles.json
|
||||
a2eab4caa2e5693465abee4ffaf2986af544bd55 assets/processed_obsidian/models/block/obsidian_bricks.json
|
||||
3e998affb07ade0e5d9f68833e14f853a53ee3be assets/processed_obsidian/models/block/obsidian_tiles.json
|
||||
09dfebea8337980c0a2f6c191f8fce40c8eb9b78 assets/processed_obsidian/models/block/polished_obsidian.json
|
||||
389a1e7647cb6aa70b655da7288bb26b9c730e02 assets/processed_obsidian/models/item/cracked_obsidian_bricks.json
|
||||
bb4de85ab06ca071f0e43ebc2f052b9a1a67e185 assets/processed_obsidian/models/item/cracked_obsidian_tiles.json
|
||||
2addc681209cb4ce5b4ee177c59b60c5553c6af3 assets/processed_obsidian/models/item/obsidian_bricks.json
|
||||
bf5b8f2d160f16a8a6c21877f975419168b995b2 assets/processed_obsidian/models/item/obsidian_tiles.json
|
||||
2f8086bf61fe0688d8cb770ecfaee75bc7dadd01 assets/processed_obsidian/models/item/polished_obsidian.json
|
||||
@@ -0,0 +1,2 @@
|
||||
// 1.21.1 2026-04-27T21:59:02.410668709 Item Models: processed_obsidian
|
||||
e4b0a25a058313fe86e228b769ea1106b6f5bb56 assets/processed_obsidian/models/item/obsidian_dust.json
|
||||
@@ -0,0 +1,3 @@
|
||||
// 1.21.1 2026-04-27T21:59:02.410419363 Tags for minecraft:block mod id processed_obsidian
|
||||
b574cbc55e404661251d88d773cd79cc2d344983 data/minecraft/tags/block/mineable/pickaxe.json
|
||||
b574cbc55e404661251d88d773cd79cc2d344983 data/minecraft/tags/block/needs_diamond_tool.json
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "processed_obsidian:block/cracked_obsidian_bricks"
|
||||
}
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "processed_obsidian:block/cracked_obsidian_tiles"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "processed_obsidian:block/obsidian_bricks"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "processed_obsidian:block/obsidian_tiles"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "processed_obsidian:block/polished_obsidian"
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "processed_obsidian:block/cracked_obsidian_bricks"
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "processed_obsidian:block/cracked_obsidian_tiles"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "processed_obsidian:block/obsidian_bricks"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "processed_obsidian:block/obsidian_tiles"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "processed_obsidian:block/polished_obsidian"
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "processed_obsidian:block/cracked_obsidian_bricks"
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "processed_obsidian:block/cracked_obsidian_tiles"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "processed_obsidian:block/obsidian_bricks"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "processed_obsidian:item/obsidian_dust"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "processed_obsidian:block/obsidian_tiles"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "processed_obsidian:block/polished_obsidian"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"values": [
|
||||
"processed_obsidian:obsidian_tiles",
|
||||
"processed_obsidian:cracked_obsidian_tiles",
|
||||
"processed_obsidian:cracked_obsidian_bricks",
|
||||
"processed_obsidian:obsidian_bricks",
|
||||
"processed_obsidian:polished_obsidian"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"values": [
|
||||
"processed_obsidian:obsidian_tiles",
|
||||
"processed_obsidian:cracked_obsidian_tiles",
|
||||
"processed_obsidian:cracked_obsidian_bricks",
|
||||
"processed_obsidian:obsidian_bricks",
|
||||
"processed_obsidian:polished_obsidian"
|
||||
]
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "processed_obsidian:cracked_obsidian_bricks"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "processed_obsidian:blocks/cracked_obsidian_bricks"
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "processed_obsidian:cracked_obsidian_tiles"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "processed_obsidian:blocks/cracked_obsidian_tiles"
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "processed_obsidian:obsidian_bricks"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "processed_obsidian:blocks/obsidian_bricks"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "processed_obsidian:obsidian_tiles"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "processed_obsidian:blocks/obsidian_tiles"
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "processed_obsidian:polished_obsidian"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "processed_obsidian:blocks/polished_obsidian"
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package ovh.glitchlabs.processed_obsidian;
|
||||
|
||||
import com.mojang.logging.LogUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.food.FoodProperties;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.CreativeModeTabs;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.material.MapColor;
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
import net.neoforged.bus.api.IEventBus;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.ModContainer;
|
||||
import net.neoforged.fml.common.EventBusSubscriber;
|
||||
import net.neoforged.fml.common.Mod;
|
||||
import net.neoforged.fml.config.ModConfig;
|
||||
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.neoforged.neoforge.common.NeoForge;
|
||||
import net.neoforged.neoforge.event.BuildCreativeModeTabContentsEvent;
|
||||
import net.neoforged.neoforge.event.server.ServerStartingEvent;
|
||||
import net.neoforged.neoforge.registries.DeferredBlock;
|
||||
import net.neoforged.neoforge.registries.DeferredHolder;
|
||||
import net.neoforged.neoforge.registries.DeferredItem;
|
||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||
import org.slf4j.Logger;
|
||||
import ovh.glitchlabs.processed_obsidian.blocks.ModBlocks;
|
||||
import ovh.glitchlabs.processed_obsidian.items.ModItems;
|
||||
|
||||
@Mod(Processed_obsidian.MODID)
|
||||
public class Processed_obsidian {
|
||||
public static final String MODID = "processed_obsidian";
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
|
||||
// The constructor for the mod class is the first code that is run when your mod is loaded.
|
||||
// FML will recognize some parameter types like IEventBus or ModContainer and pass them in automatically.
|
||||
public Processed_obsidian(IEventBus modEventBus, ModContainer modContainer) {
|
||||
// Register the commonSetup method for modloading
|
||||
modEventBus.addListener(this::commonSetup);
|
||||
|
||||
// Register ourselves for server and other game events we are interested in.
|
||||
// Note that this is necessary if and only if we want *this* class (Processed_obsidian) to respond directly to events.
|
||||
// Do not add this line if there are no @SubscribeEvent-annotated functions in this class, like onServerStarting() below.
|
||||
NeoForge.EVENT_BUS.register(this);
|
||||
|
||||
ModBlocks.register(modEventBus);
|
||||
ModItems.register(modEventBus);
|
||||
|
||||
modEventBus.addListener(this::addCreative);
|
||||
|
||||
}
|
||||
|
||||
private void commonSetup(final FMLCommonSetupEvent event) {
|
||||
|
||||
}
|
||||
|
||||
private void addCreative(BuildCreativeModeTabContentsEvent event) {
|
||||
if (event.getTabKey() == CreativeModeTabs.BUILDING_BLOCKS) {
|
||||
event.accept(ModBlocks.CRACKED_OBSIDIAN_BRICKS.get());
|
||||
event.accept(ModBlocks.OBSIDIAN_BRICKS.get());
|
||||
event.accept(ModBlocks.OBSIDIAN_TILES.get());
|
||||
event.accept(ModBlocks.POLISHED_OBSIDIAN.get());
|
||||
event.accept(ModBlocks.CRACKED_OBSIDIAN_TILES.get());
|
||||
}
|
||||
if (event.getTabKey() == CreativeModeTabs.INGREDIENTS) {
|
||||
event.accept(ModItems.OBSIDIAN_DUST.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// You can use SubscribeEvent and let the Event Bus discover methods to call
|
||||
@SubscribeEvent
|
||||
public void onServerStarting(ServerStartingEvent event) {
|
||||
// Do something when the server starts
|
||||
LOGGER.info("HELLO from server starting");
|
||||
}
|
||||
|
||||
// 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 {
|
||||
@SubscribeEvent
|
||||
public static void onClientSetup(FMLClientSetupEvent event) {
|
||||
// Some client setup code
|
||||
LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package ovh.glitchlabs.processed_obsidian.blocks;
|
||||
|
||||
import net.minecraft.util.valueproviders.UniformInt;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.DropExperienceBlock;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
|
||||
import net.minecraft.world.level.material.MapColor;
|
||||
import net.neoforged.bus.api.IEventBus;
|
||||
import net.neoforged.neoforge.registries.DeferredBlock;
|
||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||
import ovh.glitchlabs.processed_obsidian.Processed_obsidian;
|
||||
import ovh.glitchlabs.processed_obsidian.items.ModItems;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class ModBlocks {
|
||||
public static final DeferredRegister.Blocks BLOCKS =
|
||||
DeferredRegister.createBlocks(Processed_obsidian.MODID);
|
||||
|
||||
public static final DeferredBlock<Block> OBSIDIAN_BRICKS = registerBlock("obsidian_bricks",
|
||||
() -> new Block(BlockBehaviour.Properties.of()
|
||||
.strength(50.0F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.explosionResistance(1200.0F)
|
||||
.instrument(NoteBlockInstrument.BASEDRUM)
|
||||
.mapColor(MapColor.COLOR_BLACK)
|
||||
));
|
||||
|
||||
public static final DeferredBlock<Block> CRACKED_OBSIDIAN_BRICKS = registerBlock("cracked_obsidian_bricks",
|
||||
() -> new Block(BlockBehaviour.Properties.of()
|
||||
.strength(50.0F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.explosionResistance(1200.0F)
|
||||
.instrument(NoteBlockInstrument.BASEDRUM)
|
||||
.mapColor(MapColor.COLOR_BLACK)
|
||||
));
|
||||
|
||||
public static final DeferredBlock<Block> OBSIDIAN_TILES = registerBlock("obsidian_tiles",
|
||||
() -> new Block(BlockBehaviour.Properties.of()
|
||||
.strength(50.0F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.explosionResistance(1200.0F)
|
||||
.instrument(NoteBlockInstrument.BASEDRUM)
|
||||
.mapColor(MapColor.COLOR_BLACK)
|
||||
));
|
||||
|
||||
public static final DeferredBlock<Block> CRACKED_OBSIDIAN_TILES = registerBlock("cracked_obsidian_tiles",
|
||||
() -> new Block(BlockBehaviour.Properties.of()
|
||||
.strength(50.0F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.explosionResistance(1200.0F)
|
||||
.instrument(NoteBlockInstrument.BASEDRUM)
|
||||
.mapColor(MapColor.COLOR_BLACK)
|
||||
));
|
||||
|
||||
public static final DeferredBlock<Block> POLISHED_OBSIDIAN = registerBlock("polished_obsidian",
|
||||
() -> new Block(BlockBehaviour.Properties.of()
|
||||
.strength(50.0F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.explosionResistance(1200.0F)
|
||||
.instrument(NoteBlockInstrument.BASEDRUM)
|
||||
.mapColor(MapColor.COLOR_BLACK)
|
||||
));
|
||||
|
||||
private static <T extends Block> DeferredBlock<T> registerBlock(String name, Supplier<T> block) {
|
||||
DeferredBlock<T> toReturn = BLOCKS.register(name, block);
|
||||
registerBlockItem(name, toReturn);
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
private static <T extends Block> void registerBlockItem(String name, DeferredBlock<T> block) {
|
||||
ModItems.ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties()));
|
||||
}
|
||||
|
||||
public static void register(IEventBus eventBus) {
|
||||
BLOCKS.register(eventBus);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package ovh.glitchlabs.processed_obsidian.datagen;
|
||||
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.data.loot.LootTableProvider;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.common.EventBusSubscriber;
|
||||
import net.neoforged.neoforge.common.data.BlockTagsProvider;
|
||||
import net.neoforged.neoforge.common.data.ExistingFileHelper;
|
||||
import net.neoforged.neoforge.data.event.GatherDataEvent;
|
||||
import ovh.glitchlabs.processed_obsidian.Processed_obsidian;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@EventBusSubscriber(modid = Processed_obsidian.MODID, bus = EventBusSubscriber.Bus.MOD)
|
||||
public class DataGenerators {
|
||||
@SubscribeEvent
|
||||
public static void gatherData(GatherDataEvent event) {
|
||||
DataGenerator generator = event.getGenerator();
|
||||
PackOutput packOutput = generator.getPackOutput();
|
||||
ExistingFileHelper existingFileHelper = event.getExistingFileHelper();
|
||||
CompletableFuture<HolderLookup.Provider> lookupProvider = event.getLookupProvider();
|
||||
|
||||
generator.addProvider(event.includeServer(), new LootTableProvider(packOutput, Collections.emptySet(),
|
||||
List.of(new LootTableProvider.SubProviderEntry(ModBlockLootTableProvider::new, LootContextParamSets.BLOCK)), lookupProvider));
|
||||
|
||||
BlockTagsProvider blockTagsProvider = new ModBlockTagProvider(packOutput, lookupProvider, existingFileHelper);
|
||||
generator.addProvider(event.includeServer(), blockTagsProvider);
|
||||
|
||||
generator.addProvider(event.includeClient(), new ModItemModelProvider(packOutput, existingFileHelper));
|
||||
generator.addProvider(event.includeClient(), new ModBlockStateProvider(packOutput, existingFileHelper));
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package ovh.glitchlabs.processed_obsidian.datagen;
|
||||
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.loot.BlockLootSubProvider;
|
||||
import net.minecraft.world.flag.FeatureFlags;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import ovh.glitchlabs.processed_obsidian.blocks.ModBlocks;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class ModBlockLootTableProvider extends BlockLootSubProvider {
|
||||
protected ModBlockLootTableProvider(HolderLookup.Provider registries) {
|
||||
super(Set.of(), FeatureFlags.REGISTRY.allFlags(), registries);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void generate() {
|
||||
dropSelf(ModBlocks.OBSIDIAN_BRICKS.get());
|
||||
dropSelf(ModBlocks.OBSIDIAN_TILES.get());
|
||||
dropSelf(ModBlocks.CRACKED_OBSIDIAN_BRICKS.get());
|
||||
dropSelf(ModBlocks.CRACKED_OBSIDIAN_TILES.get());
|
||||
dropSelf(ModBlocks.POLISHED_OBSIDIAN.get());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Iterable<Block> getKnownBlocks() {
|
||||
return ModBlocks.BLOCKS.getEntries().stream().map(Holder::value)::iterator;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package ovh.glitchlabs.processed_obsidian.datagen;
|
||||
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.neoforged.neoforge.client.model.generators.BlockStateProvider;
|
||||
import net.neoforged.neoforge.common.data.ExistingFileHelper;
|
||||
import net.neoforged.neoforge.registries.DeferredBlock;
|
||||
import ovh.glitchlabs.processed_obsidian.Processed_obsidian;
|
||||
import ovh.glitchlabs.processed_obsidian.blocks.ModBlocks;
|
||||
|
||||
public class ModBlockStateProvider extends BlockStateProvider {
|
||||
public ModBlockStateProvider(PackOutput output, ExistingFileHelper exFileHelper) {
|
||||
super(output, Processed_obsidian.MODID, exFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerStatesAndModels() {
|
||||
blockWithItem(ModBlocks.POLISHED_OBSIDIAN);
|
||||
blockWithItem(ModBlocks.CRACKED_OBSIDIAN_BRICKS);
|
||||
blockWithItem(ModBlocks.CRACKED_OBSIDIAN_TILES);
|
||||
blockWithItem(ModBlocks.OBSIDIAN_BRICKS);
|
||||
blockWithItem(ModBlocks.OBSIDIAN_TILES);
|
||||
}
|
||||
|
||||
private void blockWithItem(DeferredBlock<?> deferredBlock) {
|
||||
simpleBlockWithItem(deferredBlock.get(), cubeAll(deferredBlock.get()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package ovh.glitchlabs.processed_obsidian.datagen;
|
||||
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.neoforged.neoforge.common.data.BlockTagsProvider;
|
||||
import net.neoforged.neoforge.common.data.ExistingFileHelper;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ovh.glitchlabs.processed_obsidian.Processed_obsidian;
|
||||
import ovh.glitchlabs.processed_obsidian.blocks.ModBlocks;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class ModBlockTagProvider extends BlockTagsProvider {
|
||||
public ModBlockTagProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> lookupProvider, @Nullable ExistingFileHelper existingFileHelper) {
|
||||
super(output, lookupProvider, Processed_obsidian.MODID, existingFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addTags(HolderLookup.Provider provider) {
|
||||
tag(BlockTags.MINEABLE_WITH_PICKAXE)
|
||||
.add(ModBlocks.OBSIDIAN_TILES.get())
|
||||
.add(ModBlocks.CRACKED_OBSIDIAN_TILES.get())
|
||||
.add(ModBlocks.CRACKED_OBSIDIAN_BRICKS.get())
|
||||
.add(ModBlocks.OBSIDIAN_BRICKS.get())
|
||||
.add(ModBlocks.POLISHED_OBSIDIAN.get());
|
||||
|
||||
tag(BlockTags.NEEDS_DIAMOND_TOOL)
|
||||
.add(ModBlocks.OBSIDIAN_TILES.get())
|
||||
.add(ModBlocks.CRACKED_OBSIDIAN_TILES.get())
|
||||
.add(ModBlocks.CRACKED_OBSIDIAN_BRICKS.get())
|
||||
.add(ModBlocks.OBSIDIAN_BRICKS.get())
|
||||
.add(ModBlocks.POLISHED_OBSIDIAN.get());
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package ovh.glitchlabs.processed_obsidian.datagen;
|
||||
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.neoforged.neoforge.client.model.generators.ItemModelProvider;
|
||||
import net.neoforged.neoforge.common.data.ExistingFileHelper;
|
||||
import ovh.glitchlabs.processed_obsidian.Processed_obsidian;
|
||||
import ovh.glitchlabs.processed_obsidian.items.ModItems;
|
||||
|
||||
public class ModItemModelProvider extends ItemModelProvider {
|
||||
public ModItemModelProvider(PackOutput output, ExistingFileHelper existingFileHelper) {
|
||||
super(output, Processed_obsidian.MODID, existingFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerModels() {
|
||||
basicItem(ModItems.OBSIDIAN_DUST.get());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package ovh.glitchlabs.processed_obsidian.items;
|
||||
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.Rarity;
|
||||
import net.neoforged.bus.api.IEventBus;
|
||||
import net.neoforged.neoforge.registries.DeferredItem;
|
||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||
import ovh.glitchlabs.processed_obsidian.Processed_obsidian;
|
||||
|
||||
public class ModItems {
|
||||
public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(Processed_obsidian.MODID);
|
||||
|
||||
public static final DeferredItem<Item> OBSIDIAN_DUST = ITEMS.register("obsidian_dust",
|
||||
() -> new Item(new Item.Properties()
|
||||
.stacksTo(16)
|
||||
.rarity(Rarity.RARE)
|
||||
));
|
||||
|
||||
public static void register(IEventBus eventBus) {
|
||||
ITEMS.register(eventBus);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"block.processed_obsidian.cracked_obsidian_tiles": "Cracked Obsidian Tiles",
|
||||
"block.processed_obsidian.obsidian_tiles": "Obsidian Tiles",
|
||||
"block.processed_obsidian.polished_obsidian": "Polished Obsidian Tiles",
|
||||
"block.processed_obsidian.obsidian_bricks": "Obsidian Bricks",
|
||||
"block.processed_obsidian.cracked_obsidian_bricks": "Cracked Obsidian Bricks",
|
||||
"item.processed_obsidian.obsidian_dust": "Obsidian Dust"
|
||||
|
||||
}
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 476 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 402 B |
Binary file not shown.
|
After Width: | Height: | Size: 360 B |
Binary file not shown.
|
After Width: | Height: | Size: 362 B |
Binary file not shown.
|
After Width: | Height: | Size: 411 B |
Binary file not shown.
|
After Width: | Height: | Size: 313 B |
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"type": "minecraft:blasting",
|
||||
"group": "processed_obsidian",
|
||||
"category": "blocks",
|
||||
"cookingtime": 200,
|
||||
"experience": 0.1,
|
||||
"ingredient": {
|
||||
"item": "processed_obsidian:obsidian_bricks"
|
||||
},
|
||||
"result": {
|
||||
"id": "processed_obsidian:cracked_obsidian_bricks"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"type": "minecraft:blasting",
|
||||
"group": "processed_obsidian",
|
||||
"category": "blocks",
|
||||
"cookingtime": 200,
|
||||
"experience": 0.1,
|
||||
"ingredient": {
|
||||
"item": "processed_obsidian:obsidian_tiles"
|
||||
},
|
||||
"result": {
|
||||
"id": "processed_obsidian:cracked_obsidian_tiles"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"group": "processed_obsidian",
|
||||
"category": "building",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "minecraft:obsidian"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"id": "processed_obsidian:obsidian_dust",
|
||||
"count": 9
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"group": "processed_obsidian",
|
||||
"category": "building",
|
||||
"pattern": [
|
||||
"OOO",
|
||||
"OOO",
|
||||
"OOO"
|
||||
],
|
||||
"key": {
|
||||
"O": {
|
||||
"item": "processed_obsidian:obsidian_dust"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"id": "minecraft:obsidian",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"type": "minecraft:blasting",
|
||||
"group": "processed_obsidian",
|
||||
"category": "blocks",
|
||||
"cookingtime": 200,
|
||||
"experience": 0.3,
|
||||
"ingredient": {
|
||||
"item": "processed_obsidian:obsidian_dust"
|
||||
},
|
||||
"result": {
|
||||
"id": "processed_obsidian:obsidian_bricks"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"group": "processed_obsidian",
|
||||
"category": "building",
|
||||
"key": {
|
||||
"S": {
|
||||
"item": "processed_obsidian:obsidian_bricks"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
"SS",
|
||||
"SS"
|
||||
],
|
||||
"result": {
|
||||
"count": 4,
|
||||
"id": "processed_obsidian:obsidian_tiles"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"group": "processed_obsidian",
|
||||
"category": "building",
|
||||
"key": {
|
||||
"S": {
|
||||
"item": "minecraft:obsidian"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
"SS",
|
||||
"SS"
|
||||
],
|
||||
"result": {
|
||||
"count": 4,
|
||||
"id": "processed_obsidian:polished_obsidian"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "ovh.glitchlabs.processed_obsidian.mixin",
|
||||
"compatibilityLevel": "JAVA_21",
|
||||
"mixins": [
|
||||
],
|
||||
"client": [
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"overwrites": {
|
||||
"requireAnnotations": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
# This is an example mods.toml file. It contains the data relating to the loading mods.
|
||||
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
|
||||
# The overall format is standard TOML format, v0.5.0.
|
||||
# Note that there are a couple of TOML lists in this file.
|
||||
# Find more information on toml format here: https://github.com/toml-lang/toml
|
||||
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
|
||||
modLoader = "javafml" #mandatory
|
||||
# A version range to match for said mod loader - for regular FML @Mod it will be the the FML version. This is currently 47.
|
||||
loaderVersion = "${loader_version_range}" #mandatory
|
||||
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
|
||||
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
|
||||
license = "${mod_license}"
|
||||
# A URL to refer people to when problems occur with this mod
|
||||
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional
|
||||
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||
[[mods]] #mandatory
|
||||
# The modid of the mod
|
||||
modId = "${mod_id}" #mandatory
|
||||
# The version number of the mod
|
||||
version = "${mod_version}" #mandatory
|
||||
# A display name for the mod
|
||||
displayName = "${mod_name}" #mandatory
|
||||
# A URL to query for updates for this mod. See the JSON update specification https://docs.neoforge.net/docs/misc/updatechecker/
|
||||
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
|
||||
# A URL for the "homepage" for this mod, displayed in the mod UI
|
||||
displayURL = "https://www.glitchlabs.ovh" #optional
|
||||
# A file name (in the root of the mod JAR) containing a logo for display
|
||||
#logoFile="processed_obsidian.png" #optional
|
||||
# A text field displayed in the mod UI
|
||||
#credits="" #optional
|
||||
# A text field displayed in the mod UI
|
||||
authors = "${mod_authors}" #optional
|
||||
|
||||
# The description text for the mod (multi line!) (#mandatory)
|
||||
description = '''${mod_description}'''
|
||||
|
||||
# The [[mixins]] block allows you to declare your mixin config to FML so that it gets loaded.
|
||||
[[mixins]]
|
||||
config = "${mod_id}.mixins.json"
|
||||
|
||||
# The [[accessTransformers]] block allows you to declare where your AT file is.
|
||||
# If this block is omitted, a fallback attempt will be made to load an AT from META-INF/accesstransformer.cfg
|
||||
#[[accessTransformers]]
|
||||
#file="META-INF/accesstransformer.cfg"
|
||||
|
||||
# The coremods config file path is not configurable and is always loaded from META-INF/coremods.json
|
||||
|
||||
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
|
||||
[[dependencies."${mod_id}"]] #optional
|
||||
# the modid of the dependency
|
||||
modId = "neoforge" #mandatory
|
||||
# The type of the dependency. Can be one of "required", "optional", "incompatible" or "discouraged" (case insensitive).
|
||||
# 'required' requires the mod to exist, 'optional' does not
|
||||
# 'incompatible' will prevent the game from loading when the mod exists, and 'discouraged' will show a warning
|
||||
type = "required" #mandatory
|
||||
# Optional field describing why the dependency is required or why it is incompatible
|
||||
# reason="..."
|
||||
# The version range of the dependency
|
||||
versionRange = "${neo_version_range}" #mandatory
|
||||
# An ordering relationship for the dependency.
|
||||
# BEFORE - This mod is loaded BEFORE the dependency
|
||||
# AFTER - This mod is loaded AFTER the dependency
|
||||
ordering = "NONE"
|
||||
# Side this dependency is applied on - BOTH, CLIENT, or SERVER
|
||||
side = "BOTH"
|
||||
# Here's another dependency
|
||||
[[dependencies."${mod_id}"]]
|
||||
modId = "minecraft"
|
||||
type = "required"
|
||||
# This version range declares a minimum of the current minecraft version up to but not including the next major version
|
||||
versionRange = "${minecraft_version_range}"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
# Features are specific properties of the game environment, that you may want to declare you require. This example declares
|
||||
# that your mod requires GL version 3.2 or higher. Other features will be added. They are side aware so declaring this won't
|
||||
# stop your mod loading on the server for example.
|
||||
#[features."${mod_id}"]
|
||||
#openGLVersion="[3.2,)"
|
||||
Reference in New Issue
Block a user