mirror of
https://github.com/MinecraftForge/MinecraftForge
synced 2026-08-22 04:26:10 -04:00
Forge 1.19.3
Created a CreativeModeTabEvent to register creative mode tabs and populate entries per tab Moved datapack registries to DataPackRegistryEvent.NewRegistry event instead of tying them to ForgeRegistry Made it easier for mods to datagen datapack builtin entries with DatapackBuiltinEntriesProvider Provided access to lookupProvider for datagen Updated dependencies to match versions used by vanilla and update JarJar to 0.3.18 Added a test mod for the new CreativeModeTabEvent Throws better error message for Forge registries in tag datagen Deleted ForgeRegistryTagsProvider Updated ClientChatReceivedEvent and ServerChatEvent for Mojang changes Added patches for both sign related methods in ModelLayers Changed RegisterShadersEvent to use ResourceProvider Migrated old Mojang math types to JOML Co-authored-by: Marc Hermans <marc.hermans@ldtteam.com> Co-authored-by: LexManos <LexManos@gmail.com> Co-authored-by: sciwhiz12 <arnoldnunag12@gmail.com> Co-authored-by: coehlrich <coehlrich@users.noreply.github.com>
This commit is contained in:
parent
617ecb7ad3
commit
8255d7aed3
726 changed files with 7615 additions and 6653 deletions
|
|
@ -3,7 +3,7 @@ package com.example.examplemod;
|
|||
import com.mojang.logging.LogUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
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;
|
||||
|
|
@ -11,15 +11,13 @@ import net.minecraft.world.level.block.state.BlockBehaviour;
|
|||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.CreativeModeTabEvent;
|
||||
import net.minecraftforge.event.server.ServerStartingEvent;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.InterModComms;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent;
|
||||
import net.minecraftforge.event.server.ServerStartingEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
|
@ -42,7 +40,7 @@ public class ExampleMod
|
|||
// Creates a new Block with the id "examplemod:example_block", combining the namespace and path
|
||||
public static final RegistryObject<Block> EXAMPLE_BLOCK = BLOCKS.register("example_block", () -> new Block(BlockBehaviour.Properties.of(Material.STONE)));
|
||||
// Creates a new BlockItem with the id "examplemod:example_block", combining the namespace and path
|
||||
public static final RegistryObject<Item> EXAMPLE_BLOCK_ITEM = ITEMS.register("example_block", () -> new BlockItem(EXAMPLE_BLOCK.get(), new Item.Properties().tab(CreativeModeTab.TAB_BUILDING_BLOCKS)));
|
||||
public static final RegistryObject<Item> EXAMPLE_BLOCK_ITEM = ITEMS.register("example_block", () -> new BlockItem(EXAMPLE_BLOCK.get(), new Item.Properties()));
|
||||
|
||||
public ExampleMod()
|
||||
{
|
||||
|
|
@ -58,6 +56,10 @@ public class ExampleMod
|
|||
|
||||
// Register ourselves for server and other game events we are interested in
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
// Register the item to a creative tab
|
||||
modEventBus.addListener((CreativeModeTabEvent.BuildContents event) -> event.registerSimple(CreativeModeTabs.BUILDING_BLOCKS,
|
||||
EXAMPLE_BLOCK_ITEM.get()));
|
||||
}
|
||||
|
||||
private void commonSetup(final FMLCommonSetupEvent event)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue