From 72de107cfae596067c6ebbbcf7893424b0b9b546 Mon Sep 17 00:00:00 2001 From: ExE Boss Date: Fri, 21 Apr 2017 12:24:55 +0200 Subject: [PATCH 1/2] Rename language files --- .../resources/assets/novablock/lang/{en_US.lang => en-US.lang} | 0 .../resources/assets/novaitem/lang/{en_US.lang => en-US.lang} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename block/src/main/resources/assets/novablock/lang/{en_US.lang => en-US.lang} (100%) rename item/src/main/resources/assets/novaitem/lang/{en_US.lang => en-US.lang} (100%) diff --git a/block/src/main/resources/assets/novablock/lang/en_US.lang b/block/src/main/resources/assets/novablock/lang/en-US.lang similarity index 100% rename from block/src/main/resources/assets/novablock/lang/en_US.lang rename to block/src/main/resources/assets/novablock/lang/en-US.lang diff --git a/item/src/main/resources/assets/novaitem/lang/en_US.lang b/item/src/main/resources/assets/novaitem/lang/en-US.lang similarity index 100% rename from item/src/main/resources/assets/novaitem/lang/en_US.lang rename to item/src/main/resources/assets/novaitem/lang/en-US.lang From ba8945898fcde241da77bc32d41aa64d6018afc0 Mon Sep 17 00:00:00 2001 From: ExE Boss Date: Fri, 21 Apr 2017 12:22:17 +0200 Subject: [PATCH 2/2] Remove Loadable --- .../java/nova/sample/block/BlockStateful.java | 12 +++- .../nova/sample/block/BlockStateless.java | 4 +- .../java/nova/sample/block/NovaBlock.java | 55 +++++++++++-------- .../assets/novablock/lang/en-US.lang | 4 +- .../java/nova/sample/entity/NovaEntity.java | 24 +++++++- .../main/java/nova/sample/gui/NovaGui.java | 39 +++++++++---- .../sample/gui/block/BlockSimpleTest.java | 3 +- .../nova/sample/item/ItemScrewdriver.java | 1 + .../main/java/nova/sample/item/NovaItem.java | 39 +++++++++---- .../resources/assets/novaitem/lang/en-US.lang | 2 +- .../nova/sample/worldgen/NovaWorldgen.java | 55 +++++++++++++------ .../novaexampleworldgen/lang/en-US.lang | 8 +++ 12 files changed, 169 insertions(+), 77 deletions(-) create mode 100644 worldgen/src/main/resources/assets/novaexampleworldgen/lang/en-US.lang diff --git a/block/src/main/java/nova/sample/block/BlockStateful.java b/block/src/main/java/nova/sample/block/BlockStateful.java index 5dd600f..dc30e7d 100644 --- a/block/src/main/java/nova/sample/block/BlockStateful.java +++ b/block/src/main/java/nova/sample/block/BlockStateful.java @@ -7,12 +7,14 @@ import nova.core.component.Passthrough; import nova.core.component.misc.Collider; import nova.core.component.renderer.StaticRenderer; +import nova.core.component.transform.Orientation; import nova.core.network.NetworkTarget; import nova.core.network.Packet; -import nova.core.network.Syncable; import nova.core.network.Sync; +import nova.core.network.Syncable; import nova.core.render.model.MeshModel; import nova.core.render.model.Model; +import nova.core.render.pipeline.OrientationRenderPipeline; import nova.core.retention.Storable; import nova.core.retention.Store; import nova.core.util.math.RotationUtil; @@ -31,9 +33,13 @@ public class BlockStateful extends Block implements Storable, Stateful, Syncable @Sync private double angle = 0; + @Store + @Sync + private Orientation orientation = new Orientation(this).hookBasedOnEntity(); + public BlockStateful() { components.add(new Collider(this).isOpaqueCube(false)); - components.add(new StaticRenderer().onRender(model -> { + components.add(new StaticRenderer().onRender(new OrientationRenderPipeline(orientation).build().andThen(model -> { Model grinderModel = NovaBlock.grinderModel.getModel(); grinderModel @@ -44,7 +50,7 @@ public BlockStateful() { ((MeshModel)grinderModel).bindAll(NovaBlock.grinderTexture); model.children.add(grinderModel); - })); + }))); components.add(new Category("buildingBlocks")); //components.add(new TestComponent()); diff --git a/block/src/main/java/nova/sample/block/BlockStateless.java b/block/src/main/java/nova/sample/block/BlockStateless.java index 846124f..e51cce6 100644 --- a/block/src/main/java/nova/sample/block/BlockStateless.java +++ b/block/src/main/java/nova/sample/block/BlockStateless.java @@ -23,13 +23,13 @@ public BlockStateless() { } public void onRightClick(RightClickEvent evt) { - System.out.println("Sending Packet: 1234"); + NovaBlock.logger.info("Sending Packet: 1234"); NovaBlock.networkManager.sync(this); } @Override public void read(Packet packet) { - System.out.println("Received packet: " + packet.readInt()); + NovaBlock.logger.info("Received packet: " + packet.readInt()); } @Override diff --git a/block/src/main/java/nova/sample/block/NovaBlock.java b/block/src/main/java/nova/sample/block/NovaBlock.java index baecc44..7eb60fd 100644 --- a/block/src/main/java/nova/sample/block/NovaBlock.java +++ b/block/src/main/java/nova/sample/block/NovaBlock.java @@ -2,19 +2,20 @@ import nova.core.block.BlockFactory; import nova.core.block.BlockManager; +import nova.core.event.bus.GlobalEvents; import nova.core.item.ItemFactory; import nova.core.item.ItemManager; -import nova.core.loader.Loadable; import nova.core.loader.Mod; import nova.core.network.NetworkManager; import nova.core.recipes.RecipeManager; -import nova.core.recipes.crafting.ItemIngredient; import nova.core.recipes.crafting.ShapedCraftingRecipe; +import nova.core.recipes.ingredient.ItemIngredient; import nova.core.render.RenderManager; import nova.core.render.model.ModelProvider; import nova.core.render.model.TechneModelProvider; import nova.core.render.texture.BlockTexture; import nova.core.render.texture.EntityTexture; +import org.slf4j.Logger; /** * A test Nova Mod @@ -22,7 +23,7 @@ * @author Calclavia */ @Mod(id = NovaBlock.MOD_ID, name = "Nova Example Block", version = "0.0.1", novaVersion = "0.0.1") -public class NovaBlock implements Loadable { +public class NovaBlock { public static final String MOD_ID = "novablock"; @@ -40,44 +41,52 @@ public class NovaBlock implements Loadable { public static ModelProvider grinderModel; public static NetworkManager networkManager; + public static Logger logger; - public final BlockManager blockManager; - public final ItemManager itemManager; - public final RenderManager renderManager; - public final RecipeManager recipeManager; - - public NovaBlock(BlockManager blockManager, - ItemManager itemManager, - RenderManager renderManager, - NetworkManager networkManager, - RecipeManager recipeManager) { - this.blockManager = blockManager; - this.itemManager = itemManager; - this.renderManager = renderManager; - this.recipeManager = recipeManager; + public final GlobalEvents events; + + public NovaBlock(Logger logger, + GlobalEvents events, + BlockManager blockManager, + ItemManager itemManager, + RenderManager renderManager, + NetworkManager networkManager, + RecipeManager recipeManager) { + this.events = events; + + this.events.on(RenderManager.Init.class).bind(evt -> this.registerRenderer(evt.manager)); + this.events.on(BlockManager.Init.class).bind(evt -> this.registerBlocks(evt.manager)); + this.events.on(ItemManager.Init.class).bind(evt -> this.registerItems(evt.manager)); + this.events.on(RecipeManager.Init.class).bind(evt -> this.registerRecipes(evt.manager)); NovaBlock.networkManager = networkManager; + NovaBlock.logger = logger; } - @Override - public void preInit() { + private void registerRenderer(RenderManager renderManager) { steelTexture = renderManager.registerTexture(new BlockTexture(MOD_ID, "block_steel")); grinderTexture = renderManager.registerTexture(new BlockTexture(MOD_ID, "grinder")); + grinderEntityTexture = renderManager.registerTexture(new EntityTexture(MOD_ID, "grinder_entity")); + grinderModel = renderManager.registerModel(new TechneModelProvider(MOD_ID, "grinder")); + } + + private void registerBlocks(BlockManager blockManager) { blockStateful = blockManager.register(MOD_ID + ":stateful", BlockStateful::new); blockStateless = blockManager.register(MOD_ID + ":simple", BlockStateless::new); + } + private void registerItems(ItemManager itemManager) { itemBlockStateful = itemManager.getItemFromBlock(blockStateful); itemBlockStateless = itemManager.getItemFromBlock(blockStateless); + } - grinderEntityTexture = renderManager.registerTexture(new EntityTexture(MOD_ID, "grinder_entity")); - grinderModel = renderManager.registerModel(new TechneModelProvider(MOD_ID, "grinder")); - + private void registerRecipes(RecipeManager recipeManager) { // try to add a recipe //ItemIngredient stickIngredient = ItemIngredient.forItem("minecraft:stick"); //TODO: This should be obtained from some dictonary too ItemIngredient stickIngredient = ItemIngredient.forDictionary("stickWood"); ItemIngredient ingotIngredient = ItemIngredient.forDictionary("ingotIron"); - recipeManager.addRecipe(new ShapedCraftingRecipe(itemBlockStateless.build(), "AAA-ABA-AAA", ingotIngredient, stickIngredient)); + recipeManager.addRecipe(new ShapedCraftingRecipe(itemBlockStateless, "AAA-ABA-AAA", ingotIngredient, stickIngredient)); } } diff --git a/block/src/main/resources/assets/novablock/lang/en-US.lang b/block/src/main/resources/assets/novablock/lang/en-US.lang index 49f3696..b315976 100644 --- a/block/src/main/resources/assets/novablock/lang/en-US.lang +++ b/block/src/main/resources/assets/novablock/lang/en-US.lang @@ -2,5 +2,5 @@ # @author Calclavia # Blocks -block.stateful.name=Stateful Block -block.simple.name=Stateless Block +block.novablock.stateful.name=Stateful Block +block.novablock.simple.name=Stateless Block diff --git a/entity/src/main/java/nova/sample/entity/NovaEntity.java b/entity/src/main/java/nova/sample/entity/NovaEntity.java index 2e98ea5..b169d05 100644 --- a/entity/src/main/java/nova/sample/entity/NovaEntity.java +++ b/entity/src/main/java/nova/sample/entity/NovaEntity.java @@ -1,9 +1,10 @@ package nova.sample.entity; import nova.core.entity.EntityManager; -import nova.core.loader.Loadable; +import nova.core.event.bus.GlobalEvents; import nova.core.loader.Mod; import nova.core.render.RenderManager; +import org.slf4j.Logger; /** * Used to test NOVA entities. @@ -11,16 +12,33 @@ * @author ExE Boss */ @Mod(id = NovaEntity.MOD_ID, name = "Nova Example Entity", version = "0.0.1", novaVersion = "0.0.1") -public class NovaEntity implements Loadable { +public class NovaEntity { public static final String MOD_ID = "novaentity"; + public final Logger logger; + public final GlobalEvents events; public final EntityManager entityManager; public final RenderManager renderManager; - public NovaEntity(EntityManager entityManager, + public NovaEntity(Logger logger, + GlobalEvents events, + EntityManager entityManager, RenderManager renderManager) { + this.logger = logger; + this.events = events; this.entityManager = entityManager; this.renderManager = renderManager; + + events.on(RenderManager.Init.class).bind(evt -> this.registerRenderer(evt.manager)); + events.on(EntityManager.Init.class).bind(evt -> this.registerEntities(evt.manager)); + } + + private void registerRenderer(RenderManager renderManager) { + + } + + private void registerEntities(EntityManager entityManager) { + } } diff --git a/gui/src/main/java/nova/sample/gui/NovaGui.java b/gui/src/main/java/nova/sample/gui/NovaGui.java index 3441428..284cc02 100644 --- a/gui/src/main/java/nova/sample/gui/NovaGui.java +++ b/gui/src/main/java/nova/sample/gui/NovaGui.java @@ -2,6 +2,7 @@ import nova.core.block.BlockFactory; import nova.core.block.BlockManager; +import nova.core.event.bus.GlobalEvents; import nova.gui.Background; import nova.gui.ComponentEvent.ActionEvent; import nova.gui.Gui; @@ -16,17 +17,17 @@ import nova.gui.layout.FlowLayout; import nova.core.item.ItemFactory; import nova.core.item.ItemManager; -import nova.core.loader.Loadable; import nova.core.loader.Mod; import nova.core.network.NetworkManager; import nova.core.network.NetworkTarget.Side; import nova.core.recipes.RecipeManager; -import nova.core.recipes.crafting.ItemIngredient; import nova.core.recipes.crafting.ShapedCraftingRecipe; +import nova.core.recipes.ingredient.ItemIngredient; import nova.core.render.Color; import nova.core.render.RenderManager; import nova.core.render.texture.BlockTexture; import nova.sample.gui.block.BlockSimpleTest; +import org.slf4j.Logger; /** * A test Nova Mod @@ -34,7 +35,7 @@ * @author Calclavia */ @Mod(id = NovaGui.MOD_ID, name = "Nova GUI example", version = "0.0.1", novaVersion = "0.0.1") -public class NovaGui implements Loadable { +public class NovaGui { public static final String MOD_ID = "novaexamplegui"; @@ -44,30 +45,41 @@ public class NovaGui implements Loadable { public static BlockTexture steelTexture; public static GuiManager guiFactory; public static NetworkManager networkManager; + public static Logger logger; + public final GlobalEvents events; public final BlockManager blockManager; public final ItemManager itemManager; public final RenderManager renderManager; public final RecipeManager recipeManager; - public NovaGui(BlockManager blockManager, + public NovaGui(Logger logger, + GlobalEvents events, + BlockManager blockManager, ItemManager itemManager, RenderManager renderManager, GuiManager guiFactory, RecipeManager recipeManager, NetworkManager networkManager) { + this.events = events; this.blockManager = blockManager; this.itemManager = itemManager; this.renderManager = renderManager; this.recipeManager = recipeManager; - NovaGui.networkManager = networkManager; + events.on(RenderManager.Init.class).bind(evt -> this.registerRenderer(evt.manager)); + events.on(BlockManager.Init.class).bind(evt -> this.registerBlocks(evt.manager)); + events.on(ItemManager.Init.class).bind(evt -> this.registerItems(evt.manager)); + events.on(RecipeManager.Init.class).bind(evt -> this.registerRecipes(evt.manager)); + events.on(GuiManager.Init.class).bind(evt -> this.registerGui(evt.manager)); + NovaGui.logger = logger; + NovaGui.networkManager = networkManager; NovaGui.guiFactory = guiFactory; } - public static void initializeGUI() { - guiFactory.register("testgui", () -> new Gui("testgui") + private void registerGui(GuiManager guiManager) { + guiManager.register("testgui", () -> new Gui("testgui") .add(new Button("testbutton2", "I'm EAST") .setMaximumSize(Integer.MAX_VALUE, 120) @@ -101,20 +113,23 @@ public static void initializeGUI() { ); } - @Override - public void preInit() { + private void registerBlocks(BlockManager blockManager) { blockTest = blockManager.register(MOD_ID + ":gui", BlockSimpleTest::new); + } + private void registerItems(ItemManager itemManager) { itemBlockTest = itemManager.getItemFromBlock(blockTest); + } + private void registerRenderer(RenderManager renderManager) { steelTexture = renderManager.registerTexture(new BlockTexture(MOD_ID, "block_steel")); + } + private void registerRecipes(RecipeManager recipeManager) { // try to add a recipe //ItemIngredient stickIngredient = ItemIngredient.forItem("minecraft:stick"); //TODO: This should be obtained from some dictonary too ItemIngredient stickIngredient = ItemIngredient.forDictionary("stickWood"); ItemIngredient ingotIngredient = ItemIngredient.forDictionary("ingotIron"); - recipeManager.addRecipe(new ShapedCraftingRecipe(itemBlockTest.build(), "AAA-ABA-AAA", ingotIngredient, stickIngredient)); - - initializeGUI(); + recipeManager.addRecipe(new ShapedCraftingRecipe(itemBlockTest, "AAA-ABA-AAA", ingotIngredient, stickIngredient)); } } diff --git a/gui/src/main/java/nova/sample/gui/block/BlockSimpleTest.java b/gui/src/main/java/nova/sample/gui/block/BlockSimpleTest.java index 5c962b4..aa07b3c 100644 --- a/gui/src/main/java/nova/sample/gui/block/BlockSimpleTest.java +++ b/gui/src/main/java/nova/sample/gui/block/BlockSimpleTest.java @@ -29,7 +29,6 @@ public BlockSimpleTest() { } public void onRightClick(RightClickEvent evt) { - NovaGui.initializeGUI(); NovaGui.guiFactory.showGui("testgui", evt.entity, position()); System.out.println("Sending Packet: 1234"); @@ -38,7 +37,7 @@ public void onRightClick(RightClickEvent evt) { @Override public void read(Packet packet) { - System.out.println("Received packet: " + packet.readInt()); + NovaGui.logger.info("Received packet: {}", packet.readInt()); } @Override diff --git a/item/src/main/java/nova/sample/item/ItemScrewdriver.java b/item/src/main/java/nova/sample/item/ItemScrewdriver.java index f098dd8..a0266d8 100644 --- a/item/src/main/java/nova/sample/item/ItemScrewdriver.java +++ b/item/src/main/java/nova/sample/item/ItemScrewdriver.java @@ -1,3 +1,4 @@ + package nova.sample.item; import nova.core.component.Category; diff --git a/item/src/main/java/nova/sample/item/NovaItem.java b/item/src/main/java/nova/sample/item/NovaItem.java index 297c921..1391d10 100644 --- a/item/src/main/java/nova/sample/item/NovaItem.java +++ b/item/src/main/java/nova/sample/item/NovaItem.java @@ -1,45 +1,60 @@ package nova.sample.item; +import nova.core.event.bus.GlobalEvents; import nova.core.item.ItemFactory; import nova.core.item.ItemManager; -import nova.core.loader.Loadable; import nova.core.loader.Mod; import nova.core.recipes.RecipeManager; -import nova.core.recipes.crafting.ItemIngredient; import nova.core.recipes.crafting.ShapedCraftingRecipe; +import nova.core.recipes.ingredient.ItemIngredient; import nova.core.render.RenderManager; import nova.core.render.texture.ItemTexture; +import org.slf4j.Logger; /** * Created by magik6k on 5/29/15. */ @Mod(id = NovaItem.MOD_ID, name = "Nova Example Item", version = "0.0.1", novaVersion = "0.0.1") -public class NovaItem implements Loadable { +public class NovaItem { public static final String MOD_ID = "novaitem"; public static ItemFactory itemScrewdriver; public static ItemTexture screwTexture; + public final Logger logger; + public final GlobalEvents events; public final ItemManager itemManager; public final RenderManager renderManager; public final RecipeManager recipeManager; - public NovaItem(ItemManager itemManager, - RenderManager renderManager, - RecipeManager recipeManager) { - this.itemManager = itemManager; - this.renderManager = renderManager; - this.recipeManager = recipeManager; + public NovaItem(Logger logger, + GlobalEvents events, + ItemManager itemManager, + RenderManager renderManager, + RecipeManager recipeManager) { + this.logger = logger; + this.events = events; + this.itemManager = itemManager; + this.renderManager = renderManager; + this.recipeManager = recipeManager; + + events.on(ItemManager.Init.class).bind(evt -> this.registerItems(evt.manager)); + events.on(RenderManager.Init.class).bind(evt -> this.registerRenderer(evt.manager)); + events.on(RecipeManager.Init.class).bind(evt -> this.registerRecipes(evt.manager)); } - @Override - public void preInit() { + private void registerRenderer(RenderManager blockManager) { screwTexture = renderManager.registerTexture(new ItemTexture(MOD_ID, "screwdriver")); + } + + private void registerItems(ItemManager blockManager) { itemScrewdriver = itemManager.register(MOD_ID + ":testscrewdriver", ItemScrewdriver::new); + } + private void registerRecipes(RecipeManager recipeManager) { //ItemIngredient stickIngredient = ItemIngredient.forItem("minecraft:stick"); //TODO: This should be obtained from some dictonary too ItemIngredient stickIngredient = ItemIngredient.forDictionary("stickWood"); ItemIngredient ingotIngredient = ItemIngredient.forDictionary("ingotIron"); - recipeManager.addRecipe(new ShapedCraftingRecipe(itemScrewdriver.build(), "A- B", true, ingotIngredient, stickIngredient)); + recipeManager.addRecipe(new ShapedCraftingRecipe(itemScrewdriver, "A- B", true, ingotIngredient, stickIngredient)); } } diff --git a/item/src/main/resources/assets/novaitem/lang/en-US.lang b/item/src/main/resources/assets/novaitem/lang/en-US.lang index 3eeaf0a..83a813a 100644 --- a/item/src/main/resources/assets/novaitem/lang/en-US.lang +++ b/item/src/main/resources/assets/novaitem/lang/en-US.lang @@ -2,4 +2,4 @@ # @author Calclavia # Items -item.testscrewdriver.name=Screwdriver +item.novaitem.testscrewdriver.name=Screwdriver diff --git a/worldgen/src/main/java/nova/sample/worldgen/NovaWorldgen.java b/worldgen/src/main/java/nova/sample/worldgen/NovaWorldgen.java index f754932..3b703b6 100644 --- a/worldgen/src/main/java/nova/sample/worldgen/NovaWorldgen.java +++ b/worldgen/src/main/java/nova/sample/worldgen/NovaWorldgen.java @@ -2,11 +2,14 @@ import nova.core.block.BlockFactory; import nova.core.block.BlockManager; +import nova.core.event.bus.GlobalEvents; +import nova.core.item.ItemDictionary; import nova.core.item.ItemFactory; import nova.core.item.ItemManager; -import nova.core.loader.Loadable; import nova.core.loader.Mod; import nova.core.recipes.RecipeManager; +import nova.core.recipes.ingredient.ItemIngredient; +import nova.core.recipes.smelting.BasicSmeltingRecipe; import nova.core.render.RenderManager; import nova.core.render.texture.BlockTexture; import nova.core.render.texture.ItemTexture; @@ -14,9 +17,10 @@ import nova.worldgen.WorldgenManager; import nova.worldgen.ore.Ore; import nova.worldgen.ore.OreHeight; +import org.slf4j.Logger; @Mod(id = NovaWorldgen.MOD_ID, name = "Nova Worldgen Example", version = "0.0.1", novaVersion = "0.0.1") -public class NovaWorldgen implements Loadable { +public class NovaWorldgen { public static final String MOD_ID = "novaexampleworldgen"; public static BlockFactory blockSteelOre; @@ -29,34 +33,51 @@ public class NovaWorldgen implements Loadable { public static BlockTexture steelOreTexture; public static ItemTexture steelIngotTexture; - public final BlockManager blockManager; - public final ItemManager itemManager; - public final RenderManager renderManager; - public final RecipeManager recipeManager; - public final WorldgenManager worldgenManager; + public final Logger logger; + public final GlobalEvents events; + public final ItemDictionary itemDictionary; - public NovaWorldgen(BlockManager blockManager, + public NovaWorldgen(Logger logger, + GlobalEvents events, + BlockManager blockManager, ItemManager itemManager, RenderManager renderManager, RecipeManager recipeManager, - WorldgenManager worldgenManager) { - this.blockManager = blockManager; - this.itemManager = itemManager; - this.renderManager = renderManager; - this.recipeManager = recipeManager; - this.worldgenManager = worldgenManager; + WorldgenManager worldgenManager, + ItemDictionary itemDictionary) { + this.logger = logger; + this.events = events; + this.itemDictionary = itemDictionary; + + events.on(RenderManager.Init.class).bind(evt -> this.registerRenderer(evt.manager)); + events.on(BlockManager.Init.class).bind(evt -> this.registerBlocks(evt.manager)); + events.on(ItemManager.Init.class).bind(evt -> this.registerItems(evt.manager)); + events.on(RecipeManager.Init.class).bind(evt -> this.registerRecipes(evt.manager)); + events.on(WorldgenManager.Init.class).bind(evt -> this.registerWorldgen(evt.manager)); } - @Override - public void preInit() { + private void registerRenderer(RenderManager renderManager) { steelOreTexture = renderManager.registerTexture(new BlockTexture(MOD_ID, "ore_steel")); steelIngotTexture = renderManager.registerTexture(new ItemTexture(MOD_ID, "ingot_steel")); + } + private void registerBlocks(BlockManager blockManager) { blockSteelOre = blockManager.register(MOD_ID + ":steel_ore", BlockSteelOre::new); - itemSteelIngot = itemManager.register(MOD_ID + ":steel_ingot", ItemSteelIngot::new); + } + private void registerItems(ItemManager itemManager) { + itemSteelIngot = itemManager.register(MOD_ID + ":steel_ingot", ItemSteelIngot::new); itemBlockSteelOre = itemManager.getItemFromBlock(blockSteelOre); + itemDictionary.add("oreSteel", itemBlockSteelOre.build()); + itemDictionary.add("ingotSteel", itemSteelIngot.build()); + } + + private void registerRecipes(RecipeManager recipeManager) { + recipeManager.addRecipe(new BasicSmeltingRecipe(itemSteelIngot, ItemIngredient.forBlock(blockSteelOre))); + } + + private void registerWorldgen(WorldgenManager worldgenManager) { oreSteel = worldgenManager.register(new Ore(MOD_ID + ":steel_ore", blockSteelOre, 1, 1, EnumSelector.of(OreHeight.class).blockAll().apart(OreHeight.DEEP).lock())); } diff --git a/worldgen/src/main/resources/assets/novaexampleworldgen/lang/en-US.lang b/worldgen/src/main/resources/assets/novaexampleworldgen/lang/en-US.lang new file mode 100644 index 0000000..b2809b3 --- /dev/null +++ b/worldgen/src/main/resources/assets/novaexampleworldgen/lang/en-US.lang @@ -0,0 +1,8 @@ +# NOVA Test Language File +# @author Calclavia + +# Blocks +block.novaexampleworldgen.steel_ore.name=Steel Ore + +# Items +item.novaexampleworldgen.steel_ingot.name=Steel Ingot