Skip to content

Commit

Permalink
video 5 done (recipes, loot)
Browse files Browse the repository at this point in the history
  • Loading branch information
natanmaia95 committed Aug 24, 2024
1 parent f84ebb9 commit b51e85a
Show file tree
Hide file tree
Showing 19 changed files with 233 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ public class ModBlocks {
public static final DeferredBlock<Block> MACHALITE_ORE = registerBlock("machalite_ore",
() -> new DropExperienceBlock(
UniformInt.of(2,4),
BlockBehaviour.Properties.of().strength(4f,2f).requiresCorrectToolForDrops().sound(SoundType.STONE)
BlockBehaviour.Properties.of().strength(4f,2f).sound(SoundType.STONE)
.requiresCorrectToolForDrops()
));

public static final DeferredBlock<Block> MACHALITE_BLOCK = registerBlock("machalite_block",
() -> new Block(
BlockBehaviour.Properties.of().strength(4f,2f).sound(SoundType.METAL)
.requiresCorrectToolForDrops()
));

public static final DeferredBlock<Block> NULBERRY_BUSH = registerBlock("nulberry_bush", NulberryBushBlock::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class ModCreativeModeTabs {
.displayItems((itemDisplayParameters, output) -> {
output.accept(ModBlocks.EARTH_CRYSTAL_ORE);
output.accept(ModBlocks.MACHALITE_ORE);
output.accept(ModBlocks.MACHALITE_BLOCK);
output.accept(ModBlocks.NULBERRY_BUSH);
})
.build());
Expand All @@ -35,6 +36,7 @@ public class ModCreativeModeTabs {
.displayItems((itemDisplayParameters, output) -> {
output.accept(ModItems.EARTH_CRYSTAL);
output.accept(ModItems.MALACHITE_CHUNK);
output.accept(ModItems.MALACHITE_INGOT);
output.accept(ModItems.NULBERRY);
})
.backgroundTexture(ResourceLocation.fromNamespaceAndPath(MyNeoForgeMod.MODID, "textures/block/earth_crystal_ore.png"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public class ModItems {
() -> new Item(new Item.Properties()));
public static final DeferredItem<Item> MALACHITE_CHUNK = ITEMS.register("machalite_chunk",
() -> new Item(new Item.Properties()));
public static final DeferredItem<Item> MALACHITE_INGOT = ITEMS.register("machalite_ingot",
() -> new Item(new Item.Properties()));
public static final DeferredItem<Item> NULBERRY = ITEMS.register("nulberry",
() -> new NulberryItem(new Item.Properties()));

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "my_neoforge_mod:block/machalite_block"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "my_neoforge_mod:block/machalite_block"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "my_neoforge_mod:block/machalite_block"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "my_neoforge_mod:item/machalite_ingot"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"replace": false,
"values": [
"my_neoforge_mod:earth_crystal_ore",
"my_neoforge_mod:machalite_ore",
"my_neoforge_mod:machalite_block"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"replace": false,
"values": [
"my_neoforge_mod:earth_crystal_ore",
"my_neoforge_mod:machalite_ore",
"my_neoforge_mod:machalite_block"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"name": "my_neoforge_mod:earth_crystal_ore"
},
{
"type": "minecraft:item",
"functions": [
{
"add": false,
"count": {
"type": "minecraft:uniform",
"max": 2.0,
"min": 1.0
},
"function": "minecraft:set_count"
},
{
"enchantment": "minecraft:fortune",
"formula": "minecraft:ore_drops",
"function": "minecraft:apply_bonus"
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "my_neoforge_mod:earth_crystal"
}
]
}
],
"rolls": 1.0
}
],
"random_sequence": "minecraft:blocks/copper_ore"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [{"condition": "minecraft:survives_explosion"}],
"entries": [
{
"type": "minecraft:item",
"name": "my_neoforge_mod:machalite_block"
}
],
"rolls": 1.0
}
],
"random_sequence": "my_neoforge_mod:blocks/machalite_block"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"name": "my_neoforge_mod:machalite_ore"
},
{
"type": "minecraft:item",
"functions": [
{
"enchantment": "minecraft:fortune",
"formula": "minecraft:ore_drops",
"function": "minecraft:apply_bonus"
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "my_neoforge_mod:machalite_chunk"
}
]
}
],
"rolls": 1.0
}
],
"random_sequence": "minecraft:blocks/machalite_ore"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"X": { "item": "my_neoforge_mod:machalite_ingot" }
},
"pattern": [
"XXX",
"XXX",
"XXX"
],
"result": {
"count": 1,
"id": "my_neoforge_mod:machalite_block"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "minecraft:blasting",
"category": "misc",
"cookingtime": 100,
"experience": 0.7,
"group": "machalite_ingot",
"ingredient": {
"item": "my_neoforge_mod:machalite_chunk"
},
"result": {
"id": "my_neoforge_mod:machalite_ingot"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "crafting_shapeless",
"category": "misc",
"ingredients": [
{ "item": "my_neoforge_mod:machalite_block"}
],
"result": {
"count": 9,
"id": "my_neoforge_mod:machalite_ingot"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "minecraft:smelting",
"category": "misc",
"cookingtime": 200,
"experience": 0.7,
"group": "machalite_ingot",
"ingredient": {
"item": "my_neoforge_mod:machalite_chunk"
},
"result": {
"id": "my_neoforge_mod:machalite_ingot"
}
}

0 comments on commit b51e85a

Please sign in to comment.