HammerTime
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "acesbs:block/prisma_steel_block"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "acesbs:block/prisma_steel_block"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/prisma_steel"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/prisma_steel_axe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "acesbs:block/prisma_steel_block"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/prisma_steel_hammer"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/prisma_steel_hoe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/prisma_steel_pickaxe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/prisma_steel_shovel"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/prisma_steel_sword"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"parent": "minecraft:item/handheld_rod",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/wand"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_prisma_steel_block": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "acesbs:prisma_steel_block"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "minecraft:prisma_steel"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_prisma_steel_block"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"minecraft:prisma_steel"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_prisma_steel": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "acesbs:prisma_steel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "acesbs:prisma_steel_sword"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_prisma_steel"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"acesbs:prisma_steel_sword"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_prisma_steel": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "acesbs:prisma_steel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "minecraft:prisma_steel_block"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_prisma_steel"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"minecraft:prisma_steel_block"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_prisma_steel": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "acesbs:prisma_steel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "acesbs:item.acesbs.prisma_steel_axe.left"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_prisma_steel"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"acesbs:item.acesbs.prisma_steel_axe.left"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_prisma_steel": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "acesbs:prisma_steel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "acesbs:item.acesbs.prisma_steel_axe.right"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_prisma_steel"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"acesbs:item.acesbs.prisma_steel_axe.right"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_prisma_steel": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "acesbs:prisma_steel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "acesbs:item.acesbs.prisma_steel_hoe.left"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_prisma_steel"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"acesbs:item.acesbs.prisma_steel_hoe.left"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_prisma_steel": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "acesbs:prisma_steel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "acesbs:item.acesbs.prisma_steel_hoe.right"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_prisma_steel"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"acesbs:item.acesbs.prisma_steel_hoe.right"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_prisma_steel": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "acesbs:prisma_steel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "acesbs:prisma_steel_hammer"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_prisma_steel"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"acesbs:prisma_steel_hammer"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_prisma_steel": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "acesbs:prisma_steel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "acesbs:prisma_steel_pickaxe"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_prisma_steel"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"acesbs:prisma_steel_pickaxe"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_prisma_steel": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "acesbs:prisma_steel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "acesbs:prisma_steel_shovel"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_prisma_steel"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"acesbs:prisma_steel_shovel"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "acesbs:prisma_steel_block"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "acesbs:prisma_steel"
|
||||
},
|
||||
"I": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
"## ",
|
||||
"#I ",
|
||||
" I "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "acesbs:prisma_steel_axe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "acesbs:prisma_steel"
|
||||
},
|
||||
"I": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
" ##",
|
||||
" I#",
|
||||
" I "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "acesbs:prisma_steel_axe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "acesbs:prisma_steel"
|
||||
},
|
||||
"I": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
"## ",
|
||||
" I ",
|
||||
" I "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "acesbs:prisma_steel_hoe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "acesbs:prisma_steel"
|
||||
},
|
||||
"I": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
" ##",
|
||||
" I ",
|
||||
" I "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "acesbs:prisma_steel_hoe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"category": "building",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "acesbs:prisma_steel_block"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"count": 9,
|
||||
"id": "acesbs:prisma_steel"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "misc",
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "acesbs:prisma_steel"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
"###",
|
||||
"###",
|
||||
"###"
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "acesbs:prisma_steel_block"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "acesbs:prisma_steel"
|
||||
},
|
||||
"B": {
|
||||
"item": "acesbs:prisma_steel_block"
|
||||
},
|
||||
"I": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
"B#B",
|
||||
" I ",
|
||||
" I "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "acesbs:prisma_steel_hammer"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "acesbs:prisma_steel"
|
||||
},
|
||||
"I": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
"###",
|
||||
" I ",
|
||||
" I "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "acesbs:prisma_steel_pickaxe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "acesbs:prisma_steel"
|
||||
},
|
||||
"I": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
" # ",
|
||||
" I ",
|
||||
" I "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "acesbs:prisma_steel_shovel"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "acesbs:prisma_steel"
|
||||
},
|
||||
"I": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
" # ",
|
||||
" # ",
|
||||
" I "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "acesbs:prisma_steel_sword"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"values": []
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"values": [
|
||||
"minecraft:coal",
|
||||
"minecraft:raw_copper",
|
||||
"minecraft:raw_iron",
|
||||
"minecraft:raw_gold",
|
||||
"minecraft:redstone",
|
||||
"minecraft:lapis_lazuli",
|
||||
"minecraft:emerald",
|
||||
"minecraft:diamond"
|
||||
]
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
"values": [
|
||||
"acesbs:entropy_block",
|
||||
"acesbs:stable_entropy_block",
|
||||
"acesbs:prisma_steel_block",
|
||||
"acesbs:entropy_ore"
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"values": [
|
||||
"acesbs:stable_entropy_block",
|
||||
"acesbs:entropy_ore",
|
||||
"acesbs:entropy_block"
|
||||
"acesbs:entropy_block",
|
||||
"acesbs:stable_entropy_block",
|
||||
"acesbs:prisma_steel_block"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"acesbs:prisma_steel_axe"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"acesbs:prisma_steel_hoe"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"acesbs:prisma_steel_pickaxe"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"acesbs:prisma_steel_shovel"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"acesbs:prisma_steel_sword"
|
||||
]
|
||||
}
|
||||
@@ -4,8 +4,10 @@ import com.acethewildfire.acesbs.block.ModBlocks;
|
||||
import com.acethewildfire.acesbs.component.ModDataComponentTypes;
|
||||
import com.acethewildfire.acesbs.item.ModItemGroups;
|
||||
import com.acethewildfire.acesbs.item.ModItems;
|
||||
import com.acethewildfire.acesbs.util.HammerUsageEvent;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
|
||||
import net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -29,5 +31,7 @@ public class AcesBS implements ModInitializer {
|
||||
ModBlocks.registerModBlocks();
|
||||
|
||||
ModDataComponentTypes.registerDataComponentsTypes();
|
||||
|
||||
PlayerBlockBreakEvents.BEFORE.register(new HammerUsageEvent());
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ Resources
|
||||
- Infernal Ashes
|
||||
- Raw End-tropy
|
||||
- Stable End-tropy
|
||||
- Prisma Steel (Stable Entropy + Iron)
|
||||
O Prisma Steel (Stable Entropy + Iron) (Needs recipe)
|
||||
- Chaos Silver (Stable Entropy + Gold)
|
||||
- Fractal Diamond (Stable Entropy + Diamond)
|
||||
- Ashen Steel (Ashes + Iron)
|
||||
@@ -33,6 +33,18 @@ Potions
|
||||
- Bottle o' Drunken Sailor
|
||||
- Energy Drink (Hyper Sugar)
|
||||
|
||||
Tools
|
||||
O Prisma Steel (May get a different Ore when mining)
|
||||
- Prisma Bucket (Stanlys bucket)
|
||||
- Chaos Silver (May get a different Ore when mining)
|
||||
- Fractal Diamond (May get a different Ore when mining)
|
||||
- Ashen Steel (Randomly Smelts Ores)
|
||||
- Everburn Gold (Randomly Smelts Ores)
|
||||
- Infernal Diamond (Randomly Smelts Ores)
|
||||
- Endtropite
|
||||
|
||||
- Hammers and Excavators of these materials.
|
||||
|
||||
Weapons
|
||||
- Big Iron
|
||||
- Thot Begon
|
||||
@@ -46,10 +58,14 @@ Blocks
|
||||
- (Rename) Block of Raw Entropy
|
||||
- Block of Raw End-tropy
|
||||
- Stable End-tropy Block
|
||||
- Blocks of (Instert Metal/Gem)
|
||||
- Decorative (Bricks)
|
||||
- Crystalized Entropy (Stained Glass version of Stable Entropy)
|
||||
|
||||
Workstations
|
||||
- Entropic Accumulator (For Metals and Stones)
|
||||
- Entropic Eviscerator (Extracts ores from stones)
|
||||
- Entropic Stabilizer (For making Stable Entropy)
|
||||
- Entropic Entangler (For Metals and Stones)
|
||||
|
||||
Mobs
|
||||
- Fren (Stable Entropy on a Creeper)
|
||||
|
||||
@@ -140,6 +140,18 @@ public class ModBlocks {
|
||||
.requiresTool()
|
||||
.sounds(BlockSoundGroup.LODESTONE)));
|
||||
|
||||
public static final Block PRISMA_STEEL_BLOCK = registerBlock(
|
||||
"prisma_steel_block",
|
||||
new Block(
|
||||
AbstractBlock.Settings.create()
|
||||
.mapColor(MapColor.IRON_GRAY)
|
||||
.instrument(NoteBlockInstrument.IRON_XYLOPHONE)
|
||||
.requiresTool()
|
||||
.strength(5.0F, 6.0F)
|
||||
.sounds(BlockSoundGroup.METAL)
|
||||
)
|
||||
);
|
||||
|
||||
private static Block registerBlock(String name, Block block){
|
||||
registerBlockItem(name, block);
|
||||
return Registry.register(Registries.BLOCK, Identifier.of(AcesBS.MOD_ID, name), block);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.acethewildfire.acesbs.datagen;
|
||||
|
||||
import com.acethewildfire.acesbs.block.ModBlocks;
|
||||
import com.acethewildfire.acesbs.util.ModTags;
|
||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
|
||||
import net.minecraft.registry.RegistryWrapper;
|
||||
@@ -18,11 +19,13 @@ public class ModBlockTagProvider extends FabricTagProvider.BlockTagProvider {
|
||||
getOrCreateTagBuilder(BlockTags.PICKAXE_MINEABLE)
|
||||
.add(ModBlocks.ENTROPY_BLOCK)
|
||||
.add(ModBlocks.STABLE_ENTROPY_BLOCK)
|
||||
.add(ModBlocks.PRISMA_STEEL_BLOCK)
|
||||
.add(ModBlocks.ENTROPY_ORE);
|
||||
getOrCreateTagBuilder(BlockTags.NEEDS_DIAMOND_TOOL)
|
||||
.add(ModBlocks.STABLE_ENTROPY_BLOCK)
|
||||
.add(ModBlocks.ENTROPY_ORE)
|
||||
.add(ModBlocks.ENTROPY_BLOCK);
|
||||
.add(ModBlocks.ENTROPY_BLOCK)
|
||||
.add(ModBlocks.STABLE_ENTROPY_BLOCK)
|
||||
.add(ModBlocks.PRISMA_STEEL_BLOCK);
|
||||
getOrCreateTagBuilder(BlockTags.AXE_MINEABLE)
|
||||
.add(ModBlocks.LEMONWOOD_PLANKS)
|
||||
.add(ModBlocks.LEMONWOOD_WALL)
|
||||
@@ -34,5 +37,8 @@ public class ModBlockTagProvider extends FabricTagProvider.BlockTagProvider {
|
||||
.add(ModBlocks.LEMONWOOD_FENCE_GATE);
|
||||
getOrCreateTagBuilder(BlockTags.WALLS)
|
||||
.add(ModBlocks.LEMONWOOD_WALL);
|
||||
getOrCreateTagBuilder(ModTags.Blocks.NEEDS_PRISMA_STEEL_TOOL);
|
||||
// Currently Broken
|
||||
// .addTag(BlockTags.NEEDS_IRON_TOOL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.acethewildfire.acesbs.datagen;
|
||||
|
||||
import com.acethewildfire.acesbs.item.ModItems;
|
||||
import com.acethewildfire.acesbs.util.ModTags;
|
||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.registry.RegistryWrapper;
|
||||
import net.minecraft.registry.tag.ItemTags;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@@ -18,5 +20,25 @@ public class ModItemTagProvider extends FabricTagProvider.ItemTagProvider {
|
||||
protected void configure(RegistryWrapper.WrapperLookup wrapperLookup) {
|
||||
getOrCreateTagBuilder(ModTags.Items.ENTROPY_CONVERTABLE)
|
||||
.add(Items.APPLE);
|
||||
getOrCreateTagBuilder(ModTags.Items.PRISMA_CONVERTABLE)
|
||||
.add(Items.COAL)
|
||||
.add(Items.RAW_COPPER)
|
||||
.add(Items.RAW_IRON)
|
||||
.add(Items.RAW_GOLD)
|
||||
.add(Items.REDSTONE)
|
||||
.add(Items.LAPIS_LAZULI)
|
||||
.add(Items.EMERALD)
|
||||
.add(Items.DIAMOND);
|
||||
getOrCreateTagBuilder(ItemTags.SWORDS)
|
||||
.add(ModItems.PRISMA_STEEL_SWORD);
|
||||
getOrCreateTagBuilder(ItemTags.AXES)
|
||||
.add(ModItems.PRISMA_STEEL_AXE);
|
||||
getOrCreateTagBuilder(ItemTags.PICKAXES)
|
||||
.add(ModItems.PRISMA_STEEL_PICKAXE);
|
||||
getOrCreateTagBuilder(ItemTags.SHOVELS)
|
||||
.add(ModItems.PRISMA_STEEL_SHOVEL);
|
||||
getOrCreateTagBuilder(ItemTags.HOES)
|
||||
.add(ModItems.PRISMA_STEEL_HOE);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ public class ModLootTableProvider extends FabricBlockLootTableProvider {
|
||||
public void generate() {
|
||||
addDrop(ModBlocks.ENTROPY_BLOCK);
|
||||
addDrop(ModBlocks.STABLE_ENTROPY_BLOCK);
|
||||
addDrop(ModBlocks.PRISMA_STEEL_BLOCK);
|
||||
|
||||
addDrop(ModBlocks.LEMONWOOD_PLANKS);
|
||||
addDrop(ModBlocks.LEMONWOOD_STAIRS);
|
||||
|
||||
@@ -20,6 +20,7 @@ public class ModModelProvider extends FabricModelProvider {
|
||||
// blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.ENTROPY_BLOCK);
|
||||
// Has a complex texture, use the default blockbench method.
|
||||
blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.STABLE_ENTROPY_BLOCK);
|
||||
blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.PRISMA_STEEL_BLOCK);
|
||||
|
||||
BlockStateModelGenerator.BlockTexturePool lemonwoodPool = blockStateModelGenerator.registerCubeAllModelTexturePool(ModBlocks.LEMONWOOD_PLANKS);
|
||||
|
||||
@@ -51,6 +52,14 @@ public class ModModelProvider extends FabricModelProvider {
|
||||
itemModelGenerator.register(ModItems.ORACLE_LEMON, Models.GENERATED);
|
||||
itemModelGenerator.register(ModItems.GREEN_BRICKS, Models.GENERATED);
|
||||
itemModelGenerator.register(ModItems.STABLE_ENTROPY, Models.GENERATED);
|
||||
itemModelGenerator.register(ModItems.WAND, Models.GENERATED);
|
||||
itemModelGenerator.register(ModItems.WAND, Models.HANDHELD_ROD);
|
||||
itemModelGenerator.register(ModItems.PRISMA_STEEL, Models.GENERATED);
|
||||
|
||||
itemModelGenerator.register(ModItems.PRISMA_STEEL_SWORD, Models.HANDHELD);
|
||||
itemModelGenerator.register(ModItems.PRISMA_STEEL_PICKAXE, Models.HANDHELD);
|
||||
itemModelGenerator.register(ModItems.PRISMA_STEEL_HAMMER, Models.HANDHELD);
|
||||
itemModelGenerator.register(ModItems.PRISMA_STEEL_AXE, Models.HANDHELD);
|
||||
itemModelGenerator.register(ModItems.PRISMA_STEEL_SHOVEL, Models.HANDHELD);
|
||||
itemModelGenerator.register(ModItems.PRISMA_STEEL_HOE, Models.HANDHELD);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,9 @@ import net.minecraft.block.Blocks;
|
||||
import net.minecraft.data.server.recipe.RecipeExporter;
|
||||
import net.minecraft.data.server.recipe.ShapedRecipeJsonBuilder;
|
||||
import net.minecraft.data.server.recipe.ShapelessRecipeJsonBuilder;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemConvertible;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.recipe.*;
|
||||
import net.minecraft.recipe.book.RecipeCategory;
|
||||
import net.minecraft.registry.RegistryWrapper;
|
||||
@@ -23,6 +25,84 @@ public class ModRecipeProvider extends FabricRecipeProvider {
|
||||
super(output, registriesFuture);
|
||||
}
|
||||
|
||||
private void SwordRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.COMBAT, result)
|
||||
.pattern(" # ")
|
||||
.pattern(" # ")
|
||||
.pattern(" I ")
|
||||
.input('#', headMaterial)
|
||||
.input('I', handleMaterial)
|
||||
.criterion(hasItem(criterionItem), conditionsFromItem(criterionItem))
|
||||
.offerTo(recipeExporter);
|
||||
}
|
||||
private void PickaxeRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result)
|
||||
.pattern("###")
|
||||
.pattern(" I ")
|
||||
.pattern(" I ")
|
||||
.input('#', headMaterial)
|
||||
.input('I', handleMaterial)
|
||||
.criterion(hasItem(criterionItem), conditionsFromItem(criterionItem))
|
||||
.offerTo(recipeExporter);
|
||||
}
|
||||
private void HammerRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible headMaterialBlock, ItemConvertible handleMaterial, ItemConvertible criterionItem){
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result)
|
||||
.pattern("B#B")
|
||||
.pattern(" I ")
|
||||
.pattern(" I ")
|
||||
.input('B', headMaterialBlock)
|
||||
.input('#', headMaterial)
|
||||
.input('I', handleMaterial)
|
||||
.criterion(hasItem(criterionItem), conditionsFromItem(criterionItem))
|
||||
.offerTo(recipeExporter);
|
||||
}
|
||||
private void AxeRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result)
|
||||
.pattern("## ")
|
||||
.pattern("#I ")
|
||||
.pattern(" I ")
|
||||
.input('#', headMaterial)
|
||||
.input('I', handleMaterial)
|
||||
.criterion(hasItem(criterionItem), conditionsFromItem(criterionItem))
|
||||
.offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, result.asItem().getName().getString() + ".left"));
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result)
|
||||
.pattern(" ##")
|
||||
.pattern(" I#")
|
||||
.pattern(" I ")
|
||||
.input('#', headMaterial)
|
||||
.input('I', handleMaterial)
|
||||
.criterion(hasItem(criterionItem), conditionsFromItem(criterionItem))
|
||||
.offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, result.asItem().getName().getString() + ".right"));
|
||||
}
|
||||
private void ShovelRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result)
|
||||
.pattern(" # ")
|
||||
.pattern(" I ")
|
||||
.pattern(" I ")
|
||||
.input('#', headMaterial)
|
||||
.input('I', handleMaterial)
|
||||
.criterion(hasItem(criterionItem), conditionsFromItem(criterionItem))
|
||||
.offerTo(recipeExporter);
|
||||
}
|
||||
private void HoeRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result)
|
||||
.pattern("## ")
|
||||
.pattern(" I ")
|
||||
.pattern(" I ")
|
||||
.input('#', headMaterial)
|
||||
.input('I', handleMaterial)
|
||||
.criterion(hasItem(criterionItem), conditionsFromItem(criterionItem))
|
||||
.offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, result.asItem().getName().getString() + ".left"));
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result)
|
||||
.pattern(" ##")
|
||||
.pattern(" I ")
|
||||
.pattern(" I ")
|
||||
.input('#', headMaterial)
|
||||
.input('I', handleMaterial)
|
||||
.criterion(hasItem(criterionItem), conditionsFromItem(criterionItem))
|
||||
.offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, result.asItem().getName().getString() + ".right"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(RecipeExporter recipeExporter) {
|
||||
|
||||
@@ -32,6 +112,7 @@ public class ModRecipeProvider extends FabricRecipeProvider {
|
||||
|
||||
offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.RAW_ENTROPY, RecipeCategory.DECORATIONS, ModBlocks.ENTROPY_BLOCK);
|
||||
offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.STABLE_ENTROPY, RecipeCategory.DECORATIONS, ModBlocks.STABLE_ENTROPY_BLOCK);
|
||||
offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.PRISMA_STEEL, RecipeCategory.DECORATIONS, ModBlocks.PRISMA_STEEL_BLOCK);
|
||||
|
||||
offerAllFoodCookingRecipes(recipeExporter, 200, ModItems.LEMON, ModItems.COOKED_LEMON, 0.35F);
|
||||
|
||||
@@ -80,6 +161,13 @@ public class ModRecipeProvider extends FabricRecipeProvider {
|
||||
.criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS))
|
||||
.offerTo(recipeExporter);
|
||||
|
||||
SwordRecipeJsonBuilder(recipeExporter, ModItems.PRISMA_STEEL_SWORD, ModItems.PRISMA_STEEL, Items.STICK, ModItems.PRISMA_STEEL);
|
||||
PickaxeRecipeJsonBuilder(recipeExporter, ModItems.PRISMA_STEEL_PICKAXE, ModItems.PRISMA_STEEL, Items.STICK, ModItems.PRISMA_STEEL);
|
||||
HammerRecipeJsonBuilder(recipeExporter, ModItems.PRISMA_STEEL_HAMMER, ModItems.PRISMA_STEEL, ModBlocks.PRISMA_STEEL_BLOCK, Items.STICK, ModItems.PRISMA_STEEL);
|
||||
AxeRecipeJsonBuilder(recipeExporter, ModItems.PRISMA_STEEL_AXE, ModItems.PRISMA_STEEL, Items.STICK, ModItems.PRISMA_STEEL);
|
||||
ShovelRecipeJsonBuilder(recipeExporter, ModItems.PRISMA_STEEL_SHOVEL, ModItems.PRISMA_STEEL, Items.STICK, ModItems.PRISMA_STEEL);
|
||||
HoeRecipeJsonBuilder(recipeExporter, ModItems.PRISMA_STEEL_HOE, ModItems.PRISMA_STEEL, Items.STICK, ModItems.PRISMA_STEEL);
|
||||
|
||||
// For 2+ recipes with the same RESULT use
|
||||
// .offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, "output_item_from_input_item"));
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ public class ModItemGroups {
|
||||
entries.add(ModItems.STABLE_ENTROPY);
|
||||
entries.add(ModItems.GREEN_BRICKS);
|
||||
entries.add(ModItems.WAND);
|
||||
entries.add(ModItems.PRISMA_STEEL);
|
||||
})
|
||||
.build());
|
||||
|
||||
@@ -36,6 +37,7 @@ public class ModItemGroups {
|
||||
entries.add(ModBlocks.ENTROPY_ORE);
|
||||
entries.add(ModBlocks.ENTROPY_BLOCK);
|
||||
entries.add(ModBlocks.STABLE_ENTROPY_BLOCK);
|
||||
entries.add(ModBlocks.PRISMA_STEEL_BLOCK);
|
||||
|
||||
entries.add(ModBlocks.LEMONWOOD_PLANKS);
|
||||
entries.add(ModBlocks.LEMONWOOD_STAIRS);
|
||||
@@ -53,6 +55,36 @@ public class ModItemGroups {
|
||||
})
|
||||
.build());
|
||||
|
||||
public static final ItemGroup ACES_BS_COMBAT = Registry.register(Registries.ITEM_GROUP,
|
||||
Identifier.of(AcesBS.MOD_ID, "combat"),
|
||||
FabricItemGroup.builder()
|
||||
.icon(() -> new ItemStack(ModItems.PRISMA_STEEL_SWORD))
|
||||
.displayName(Text.translatable("itemgroup.acesbs.combat"))
|
||||
.entries((displayContext, entries) -> {
|
||||
entries.add(ModItems.PRISMA_STEEL);
|
||||
entries.add(ModItems.PRISMA_STEEL_SWORD);
|
||||
|
||||
|
||||
})
|
||||
.build());
|
||||
|
||||
public static final ItemGroup ACES_BS_TOOLS = Registry.register(Registries.ITEM_GROUP,
|
||||
Identifier.of(AcesBS.MOD_ID, "tools"),
|
||||
FabricItemGroup.builder()
|
||||
.icon(() -> new ItemStack(ModItems.PRISMA_STEEL_PICKAXE))
|
||||
.displayName(Text.translatable("itemgroup.acesbs.tools"))
|
||||
.entries((displayContext, entries) -> {
|
||||
entries.add(ModItems.PRISMA_STEEL);
|
||||
entries.add(ModItems.PRISMA_STEEL_SHOVEL);
|
||||
entries.add(ModItems.PRISMA_STEEL_PICKAXE);
|
||||
entries.add(ModItems.PRISMA_STEEL_HAMMER);
|
||||
entries.add(ModItems.PRISMA_STEEL_AXE);
|
||||
entries.add(ModItems.PRISMA_STEEL_HOE);
|
||||
|
||||
|
||||
})
|
||||
.build());
|
||||
|
||||
|
||||
public static void registerItemGroups() {
|
||||
AcesBS.LOGGER.info("Registering Item Groups for " + AcesBS.MOD_ID);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.acethewildfire.acesbs.item;
|
||||
|
||||
import com.acethewildfire.acesbs.AcesBS;
|
||||
import com.acethewildfire.acesbs.item.custom.HammerItem;
|
||||
import com.acethewildfire.acesbs.item.custom.OracleLemon;
|
||||
import com.acethewildfire.acesbs.item.custom.Wand;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
@@ -8,8 +9,7 @@ import net.minecraft.component.DataComponentTypes;
|
||||
import net.minecraft.component.type.PotionContentsComponent;
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.item.tooltip.TooltipType;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.registry.Registries;
|
||||
@@ -42,6 +42,34 @@ public class ModItems {
|
||||
}
|
||||
});
|
||||
|
||||
public static final Item PRISMA_STEEL = registerItem("prisma_steel", new Item(new Item.Settings()));
|
||||
public static final Item PRISMA_STEEL_SWORD = registerItem("prisma_steel_sword",
|
||||
new SwordItem(ModToolMaterials.PRISMA_STEEL, new Item.Settings()
|
||||
.attributeModifiers(SwordItem.createAttributeModifiers(ModToolMaterials.PRISMA_STEEL, 3, -2.4f))));
|
||||
|
||||
public static final Item PRISMA_STEEL_SHOVEL = registerItem("prisma_steel_shovel",
|
||||
new ShovelItem(ModToolMaterials.PRISMA_STEEL, new Item.Settings()
|
||||
.attributeModifiers(ShovelItem.createAttributeModifiers(ModToolMaterials.PRISMA_STEEL, 1.5F, -3.0F)))
|
||||
);
|
||||
public static final Item PRISMA_STEEL_PICKAXE = registerItem("prisma_steel_pickaxe",
|
||||
new PickaxeItem(ModToolMaterials.PRISMA_STEEL, new Item.Settings()
|
||||
.attributeModifiers(PickaxeItem.createAttributeModifiers(ModToolMaterials.PRISMA_STEEL, 1.0F, -2.8F)))
|
||||
);
|
||||
|
||||
public static final Item PRISMA_STEEL_HAMMER = registerItem("prisma_steel_hammer",
|
||||
new HammerItem(ModToolMaterials.PRISMA_STEEL, new Item.Settings()
|
||||
.attributeModifiers(PickaxeItem.createAttributeModifiers(ModToolMaterials.PRISMA_STEEL, 7.0F, -3.4F)))
|
||||
);
|
||||
|
||||
public static final Item PRISMA_STEEL_AXE = registerItem("prisma_steel_axe",
|
||||
new AxeItem(ModToolMaterials.PRISMA_STEEL, new Item.Settings()
|
||||
.attributeModifiers(AxeItem.createAttributeModifiers(ModToolMaterials.PRISMA_STEEL, 6.0F, -3.1F)))
|
||||
);
|
||||
public static final Item PRISMA_STEEL_HOE = registerItem("prisma_steel_hoe",
|
||||
new HoeItem(ModToolMaterials.PRISMA_STEEL, new Item.Settings()
|
||||
.attributeModifiers(HoeItem.createAttributeModifiers(ModToolMaterials.PRISMA_STEEL, -2.0F, -1.0F)))
|
||||
);
|
||||
|
||||
private static Item registerItem(String name, Item item){
|
||||
return Registry.register(Registries.ITEM, Identifier.of(AcesBS.MOD_ID, name), item);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.acethewildfire.acesbs.item;
|
||||
|
||||
import com.acethewildfire.acesbs.util.ModTags;
|
||||
import com.google.common.base.Suppliers;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import net.minecraft.recipe.Ingredient;
|
||||
import net.minecraft.registry.tag.BlockTags;
|
||||
import net.minecraft.registry.tag.ItemTags;
|
||||
import net.minecraft.registry.tag.TagKey;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public enum ModToolMaterials implements ToolMaterial {
|
||||
// WOOD(BlockTags.INCORRECT_FOR_WOODEN_TOOL, 59, 2.0F, 0.0F, 15, () -> Ingredient.fromTag(ItemTags.PLANKS)),
|
||||
// STONE(BlockTags.INCORRECT_FOR_STONE_TOOL, 131, 4.0F, 1.0F, 5, () -> Ingredient.fromTag(ItemTags.STONE_TOOL_MATERIALS)),
|
||||
// IRON(BlockTags.INCORRECT_FOR_IRON_TOOL, 250, 6.0F, 2.0F, 14, () -> Ingredient.ofItems(Items.IRON_INGOT)),
|
||||
// DIAMOND(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 1561, 8.0F, 3.0F, 10, () -> Ingredient.ofItems(Items.DIAMOND)),
|
||||
// GOLD(BlockTags.INCORRECT_FOR_GOLD_TOOL, 32, 12.0F, 0.0F, 22, () -> Ingredient.ofItems(Items.GOLD_INGOT)),
|
||||
// NETHERITE(BlockTags.INCORRECT_FOR_NETHERITE_TOOL, 2031, 9.0F, 4.0F, 15, () -> Ingredient.ofItems(Items.NETHERITE_INGOT));
|
||||
|
||||
PRISMA_STEEL(ModTags.Blocks.INCORRECT_FOR_PRISMA_STEEL_TOOL, 750, 8.0F, 2.0F, 22, () -> Ingredient.ofItems(ModItems.PRISMA_STEEL));
|
||||
|
||||
private final TagKey<Block> inverseTag;
|
||||
private final int itemDurability;
|
||||
private final float miningSpeed;
|
||||
private final float attackDamage;
|
||||
private final int enchantability;
|
||||
private final Supplier<Ingredient> repairIngredient;
|
||||
|
||||
private ModToolMaterials(
|
||||
final TagKey<Block> inverseTag,
|
||||
final int itemDurability,
|
||||
final float miningSpeed,
|
||||
final float attackDamage,
|
||||
final int enchantability,
|
||||
final Supplier<Ingredient> repairIngredient
|
||||
) {
|
||||
this.inverseTag = inverseTag;
|
||||
this.itemDurability = itemDurability;
|
||||
this.miningSpeed = miningSpeed;
|
||||
this.attackDamage = attackDamage;
|
||||
this.enchantability = enchantability;
|
||||
this.repairIngredient = Suppliers.memoize(repairIngredient::get);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDurability() {
|
||||
return this.itemDurability;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMiningSpeedMultiplier() {
|
||||
return this.miningSpeed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAttackDamage() {
|
||||
return this.attackDamage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TagKey<Block> getInverseTag() {
|
||||
return this.inverseTag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnchantability() {
|
||||
return this.enchantability;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ingredient getRepairIngredient() {
|
||||
return this.repairIngredient.get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.acethewildfire.acesbs.item.custom;
|
||||
|
||||
import com.acethewildfire.acesbs.AcesBS;
|
||||
import com.acethewildfire.acesbs.item.ModItems;
|
||||
import com.acethewildfire.acesbs.util.ModTags;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.ItemEntity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.tag.BlockTags;
|
||||
import net.minecraft.registry.tag.TagKey;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.sound.SoundCategory;
|
||||
import net.minecraft.sound.SoundEvents;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class HammerItem extends MiningToolItem {
|
||||
|
||||
// private final Random r = new Random();
|
||||
|
||||
// private List<Item> replacementItems = new ArrayList<>();
|
||||
|
||||
public HammerItem(ToolMaterial material, Settings settings) {
|
||||
super(material, BlockTags.PICKAXE_MINEABLE, settings);
|
||||
}
|
||||
|
||||
// private boolean isValidItem(ItemStack stack) {
|
||||
// return stack.isIn(ModTags.Items.PRISMA_CONVERTABLE);
|
||||
// }
|
||||
|
||||
public static List<BlockPos> getBlocksToBeDestroyed(int range, BlockPos initalBlockPos, ServerPlayerEntity player) {
|
||||
List<BlockPos> positions = new ArrayList<>();
|
||||
HitResult hit = player.raycast(20, 0, false);
|
||||
if (hit.getType() == HitResult.Type.BLOCK) {
|
||||
BlockHitResult blockHit = (BlockHitResult) hit;
|
||||
|
||||
if (blockHit.getSide() == Direction.DOWN || blockHit.getSide() == Direction.UP) {
|
||||
for (int x = -range; x <= range; x++) {
|
||||
for (int y = -range; y <= range; y++) {
|
||||
positions.add(new BlockPos(initalBlockPos.getX() + x, initalBlockPos.getY(), initalBlockPos.getZ() + y));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (blockHit.getSide() == Direction.NORTH || blockHit.getSide() == Direction.SOUTH) {
|
||||
for (int x = -range; x <= range; x++) {
|
||||
for (int y = -range; y <= range; y++) {
|
||||
positions.add(new BlockPos(initalBlockPos.getX() + x, initalBlockPos.getY() + y, initalBlockPos.getZ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (blockHit.getSide() == Direction.EAST || blockHit.getSide() == Direction.WEST) {
|
||||
for (int x = -range; x <= range; x++) {
|
||||
for (int y = -range; y <= range; y++) {
|
||||
positions.add(new BlockPos(initalBlockPos.getX(), initalBlockPos.getY() + y, initalBlockPos.getZ() + x));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return positions;
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// public boolean postMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner) {
|
||||
// ItemStack nextItem = stack;
|
||||
// if(isValidItem(stack)){
|
||||
// int chance = r.nextInt(1,21); // 1-20
|
||||
// replacementItems.add(ModItems.RAW_ENTROPY);
|
||||
// replacementItems.add(ModItems.STABLE_ENTROPY);
|
||||
// replacementItems.add(ModItems.LEMON);
|
||||
// int itemIndex = r.nextInt(1, replacementItems.size()+1);
|
||||
//
|
||||
// ItemStack replacementStack = new ItemStack(replacementItems.get(itemIndex), stack.getCount());
|
||||
// if (chance == 20) {
|
||||
// nextItem = replacementStack;
|
||||
// }
|
||||
// }
|
||||
// return super.postMine(nextItem, world, state, pos, miner);
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.acethewildfire.acesbs.util;
|
||||
|
||||
import com.acethewildfire.acesbs.item.custom.HammerItem;
|
||||
import net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class HammerUsageEvent implements PlayerBlockBreakEvents.Before{
|
||||
// Done with the help of https://github.com/CoFH/CoFHCore/blob/c23d117dcd3b3b3408a138716b15507f709494cd/src/main/java/cofh/core/event/AreaEffectEvents.java
|
||||
private static final Set<BlockPos> HARVESTED_BLOCKS = new HashSet<>();
|
||||
|
||||
@Override
|
||||
public boolean beforeBlockBreak(World world, PlayerEntity player, BlockPos pos,
|
||||
BlockState state, @Nullable BlockEntity blockEntity) {
|
||||
ItemStack mainHandItem = player.getMainHandStack();
|
||||
|
||||
if(mainHandItem.getItem() instanceof HammerItem hammer && player instanceof ServerPlayerEntity serverPlayer) {
|
||||
if(HARVESTED_BLOCKS.contains(pos)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for(BlockPos position : HammerItem.getBlocksToBeDestroyed(1, pos, serverPlayer)) {
|
||||
if(pos == position || !hammer.isCorrectForDrops(mainHandItem, world.getBlockState(position))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
HARVESTED_BLOCKS.add(position);
|
||||
serverPlayer.interactionManager.tryBreakBlock(position);
|
||||
HARVESTED_BLOCKS.remove(position);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,11 @@ import net.minecraft.registry.tag.TagKey;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class ModTags {
|
||||
|
||||
public static class Blocks {
|
||||
public static final TagKey<Block> NEEDS_PRISMA_STEEL_TOOL = createTag("needs_prisma_steel_tool");
|
||||
public static final TagKey<Block> INCORRECT_FOR_PRISMA_STEEL_TOOL = createTag("incorrect_for_prisma_steel_tool");
|
||||
|
||||
private static TagKey<Block> createTag(String name){
|
||||
return TagKey.of(RegistryKeys.BLOCK, Identifier.of(AcesBS.MOD_ID, name));
|
||||
}
|
||||
@@ -16,6 +20,7 @@ public class ModTags {
|
||||
|
||||
public static class Items {
|
||||
public static final TagKey<Item> ENTROPY_CONVERTABLE = createTag("entropy_convertable");
|
||||
public static final TagKey<Item> PRISMA_CONVERTABLE = createTag("prisma_convertable");
|
||||
|
||||
private static TagKey<Item> createTag(String name){
|
||||
return TagKey.of(RegistryKeys.ITEM, Identifier.of(AcesBS.MOD_ID, name));
|
||||
|
||||
@@ -12,7 +12,16 @@
|
||||
"item.minecraft.lingering_potion.effect.blindness": "Lingering Potion of Blindness",
|
||||
"item.minecraft.tipped_arrow.effect.blindness": "Arrow of Blindness",
|
||||
|
||||
"item.acesbs.prisma_steel": "Prisma Steel",
|
||||
"item.acesbs.prisma_steel_sword": "Prisma Steel Sword",
|
||||
"item.acesbs.prisma_steel_pickaxe": "Prisma Steel Pickaxe",
|
||||
"item.acesbs.prisma_steel_hammer": "Prisma Steel Hammer",
|
||||
"item.acesbs.prisma_steel_axe": "Prisma Steel Axe",
|
||||
"item.acesbs.prisma_steel_shovel": "Prisma Steel Shovel",
|
||||
"item.acesbs.prisma_steel_hoe": "Prisma Steel Hoe",
|
||||
|
||||
"block.acesbs.entropy_block": "Block of Entropy",
|
||||
"block.acesbs.prisma_steel_block": "Block of Prisma Steel",
|
||||
"block.acesbs.entropy_ore": "Entropic Ore",
|
||||
"block.acesbs.stable_entropy_block": "Block of Stabilized Entropy",
|
||||
|
||||
@@ -31,6 +40,8 @@
|
||||
|
||||
"itemgroup.acesbs.items": "Ace's BS Items",
|
||||
"itemgroup.acesbs.blocks": "Ace's BS Blocks",
|
||||
"itemgroup.acesbs.combat": "Ace's BS Combat",
|
||||
"itemgroup.acesbs.tools": "Ace's BS Tools",
|
||||
|
||||
"tooltip.acesbs.entropy_block.tooltip": "Exerts an §o§4uncertain force§r when stepped on.",
|
||||
"tooltip.acesbs.stable_entropy_block.tooltip": "Exerts an §o§2upward force§r when stepped on.",
|
||||
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.4 KiB |