Skip to content

Commit

Permalink
Ore added and added recipes for blast furnace
Browse files Browse the repository at this point in the history
Bed Time :D
  • Loading branch information
darkwolfie37 committed Jan 30, 2024
1 parent 245b3fc commit 0ca850e
Show file tree
Hide file tree
Showing 22 changed files with 207 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/com/darkwolfie/silentvalkyrie/Main.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.darkwolfie.silentvalkyrie;

import com.darkwolfie.silentvalkyrie.block.ModBlocks;
import com.darkwolfie.silentvalkyrie.item.ModCreativeTabs;
import com.darkwolfie.silentvalkyrie.item.ModItems;
import com.mojang.logging.LogUtils;
Expand Down Expand Up @@ -34,6 +35,7 @@ public Main() {
modEventBus.addListener(this::commonSetup);

ModItems.register(modEventBus);
ModBlocks.register(modEventBus);

ModCreativeTabs.register(modEventBus);

Expand Down
42 changes: 42 additions & 0 deletions src/main/java/com/darkwolfie/silentvalkyrie/block/ModBlocks.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package com.darkwolfie.silentvalkyrie.block;

import com.darkwolfie.silentvalkyrie.Main;
import com.darkwolfie.silentvalkyrie.item.ModItems;
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.Blocks;
import net.minecraft.world.level.block.DropExperienceBlock;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

import java.util.function.Supplier;

public class ModBlocks {


public static final DeferredRegister<Block> BLOCKS =
DeferredRegister.create(ForgeRegistries.BLOCKS, Main.MODID);

public static final RegistryObject<Block> plutosteel_ORE = registerBlock("plutosteel_ore",
() -> new DropExperienceBlock(BlockBehaviour.Properties.copy(Blocks.STONE).strength(3f).requiresCorrectToolForDrops()));

private static <T extends Block> RegistryObject<T> registerBlock(String name, Supplier<T> block) {
RegistryObject<T> toReturn = BLOCKS.register(name, block);
registerBlockItem(name, toReturn);
return toReturn;
}

private static <T extends Block> RegistryObject<Item> registerBlockItem(String name, RegistryObject<T> block) {
return ModItems.Items.register(name, () -> new BlockItem(block.get(), new Item.Properties()));
}

public static void register(IEventBus eventBus) {
BLOCKS.register(eventBus);
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.darkwolfie.silentvalkyrie.item;

import com.darkwolfie.silentvalkyrie.Main;
import com.darkwolfie.silentvalkyrie.block.ModBlocks;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.CreativeModeTab;
Expand All @@ -19,6 +20,9 @@ public class ModCreativeTabs {
.title(Component.translatable("creativetab.sv.ore_tab_thing_ig"))
.displayItems((pParameters, pOutput) -> {
pOutput.accept(ModItems.PlutoSteel.get());
pOutput.accept(ModItems.MOLTEN_PLUTOSTEEL.get());
pOutput.accept(ModItems.HARDENED_PLUTOSTEEL.get());
pOutput.accept(ModBlocks.plutosteel_ORE.get());
})
.build());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ public class ModItems {

public static final RegistryObject<Item> PlutoSteel = Items.register("plutosteel",
() -> new Item(new Item.Properties()));
public static final RegistryObject<Item> MOLTEN_PLUTOSTEEL = Items.register("molten_plutosteel",
() -> new Item(new Item.Properties()));
public static final RegistryObject<Item> HARDENED_PLUTOSTEEL = Items.register("hardened_plutosteel",
() -> new Item(new Item.Properties()));


public static void register(IEventBus eventBus){
Items.register(eventBus);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "silentvalkyrie:block/plutosteel_ore"
}
}
}
6 changes: 6 additions & 0 deletions src/main/resources/assets/silentvalkyrie/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{

"item.silentvalkyrie.plutosteel": "PlutoSteel",
"item.silentvalkyrie.molten_plutosteel": "Molten PlutoSteel",
"item.silentvalkyrie.hardened_plutosteel": "Hardened PlutoSteel",

"block.silentvalkyrie.plutosteel_ore": "Plutosteel Ore",

"creativetab.sv.ore_tab_thing_ig": "Ores IG"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "silentvalkyrie:block/plutostoneore"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "silentvalkyrie:item/hardenedplutosteel"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "silentvalkyrie:item/moltenplutosteel"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "silentvalkyrie:item/plutosteel"
"layer0": "silentvalkyrie:item/plutostone"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "silentvalkyrie:block/plutosteel_ore"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [

]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [

]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [

]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"silentvalkyrie:plutosteel_ore"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"silentvalkyrie:plutosteel_ore"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [

]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"silentvalkyrie:plutosteel_ore"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [

]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
],
"name": "silentvalkyrie:plutosteel_ore"
},
{
"type": "minecraft:item",
"functions": [
{
"add": false,
"count": {
"type": "minecraft:uniform",
"max": 1.0,
"min": 1.0
},
"function": "minecraft:set_count"
},
{
"enchantment": "minecraft:fortune",
"formula": "minecraft:ore_drops",
"function": "minecraft:apply_bonus"
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "silentvalkyrie:molten_plutosteel"
}
]
}
],
"rolls": 1.0
}
],
"random_sequence": "silentvalkyrie:blocks/plutosteel_ore"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "minecraft:blasting",
"group": "molten_to_hardened",
"ingredient": {
"item": "silentvalkyrie:hardened_plutosteel"
},
"result": "silentvalkyrie:plutosteel",
"experience": 10,
"cookingtime": 200
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "minecraft:blasting",
"group": "molten_to_hardened",
"ingredient": {
"item": "silentvalkyrie:molten_plutosteel"
},
"result": "silentvalkyrie:hardened_plutosteel",
"experience": 10,
"cookingtime": 200
}

0 comments on commit 0ca850e

Please sign in to comment.