jeweler's hammer

this entry is very temporary, petra, replace as you see fit
This commit is contained in:
yrsegal@gmail.com 2022-05-09 22:21:18 -04:00
parent a40a4381cc
commit 65b04c0372
13 changed files with 127 additions and 9 deletions

View file

@ -246,6 +246,7 @@ a1308cfa2e67684f5ba14a9726830936f76d68e2 assets/hexcasting/models/item/focus_wid
991af62ccdc4c063321cc7994e0a106a432d1487 assets/hexcasting/models/item/impetus_look.json
199a1c37b3fdb1e7da93408bbe85c5a2222e264e assets/hexcasting/models/item/impetus_rightclick.json
458550229be6036be246e290e99b643caa8b3f8a assets/hexcasting/models/item/impetus_storedplayer.json
597a4f9921c40e40f33af722098edf1dc8ed4477 assets/hexcasting/models/item/jeweler_hammer.json
891f2cf2aab18f85e5601ae37248b5d454918fef assets/hexcasting/models/item/lens.json
22ec49ee56e2d0d9fca4473f965c64b82d712f79 assets/hexcasting/models/item/patchouli_book.json
d7dd348ef3d402a0e6d1c601581e30e99f9bcc87 assets/hexcasting/models/item/phial_large_0.json
@ -371,6 +372,7 @@ ccc33b4f1a43c8ecd3352ad36ae2dd2191317b5b data/hexcasting/advancements/recipes/he
7351200c8e3eb24772852c578286384c8aab61bd data/hexcasting/advancements/recipes/hexcasting/empty_directrix.json
023c32e8834eb313c4fa94a84a8f6390ee951ef0 data/hexcasting/advancements/recipes/hexcasting/empty_impetus.json
f089ab17470c5fa0065438c5533d5fafb3ee8eaf data/hexcasting/advancements/recipes/hexcasting/focus.json
874ee348cf2542696b7768049529a2001f0820e7 data/hexcasting/advancements/recipes/hexcasting/jeweler_hammer.json
fc57d15e9f9f11347a2170dd06053954345368d2 data/hexcasting/advancements/recipes/hexcasting/lens.json
82be04125e60a28701de5bb6bc7855bb46fa9d0f data/hexcasting/advancements/recipes/hexcasting/pride_colorizer_0.json
13fc3b9e91486b3b0ca56b4ef7d5ddb8920aa7fe data/hexcasting/advancements/recipes/hexcasting/pride_colorizer_1.json
@ -501,6 +503,7 @@ db8a00478e1c4b0f9b143b5946d1ba25e489591d data/hexcasting/recipes/dynamic/seal_fo
a952d33cda8b805237052b602cf066683c4bf261 data/hexcasting/recipes/empty_directrix.json
b7c248d2627c2a2b398d1c50181c1e0863612424 data/hexcasting/recipes/empty_impetus.json
7eaf7ee280d1982ecbaf5175cea5c5a7c7804f98 data/hexcasting/recipes/focus.json
bbe78a0adf15bbcf5fb2d8089b24499ff7229858 data/hexcasting/recipes/jeweler_hammer.json
2397e64bd5fa2af12bb4f0f7efbc55f387c07a2b data/hexcasting/recipes/lens.json
0ea329526c81c1e4064bab61721ab4586cfcf706 data/hexcasting/recipes/pride_colorizer_0.json
c742a0a5fba2388263bfccfb49c60277d817f8cd data/hexcasting/recipes/pride_colorizer_1.json

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hexcasting:item/jeweler_hammer"
}
}

View file

@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"hexcasting:jeweler_hammer"
]
},
"criteria": {
"has_item": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:amethyst_shard"
]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "hexcasting:jeweler_hammer"
}
}
},
"requirements": [
[
"has_item",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,25 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"IAN",
" S ",
" S "
],
"key": {
"I": {
"item": "minecraft:iron_ingot"
},
"N": {
"item": "minecraft:iron_nugget"
},
"A": {
"item": "minecraft:amethyst_shard"
},
"S": {
"item": "minecraft:stick"
}
},
"result": {
"item": "hexcasting:jeweler_hammer"
}
}

View file

@ -14,6 +14,7 @@ import at.petrak.hexcasting.common.command.HexCommands
import at.petrak.hexcasting.common.command.PatternResLocArgument
import at.petrak.hexcasting.common.entities.HexEntities
import at.petrak.hexcasting.common.items.HexItems
import at.petrak.hexcasting.common.items.JewelerHammerHandler
import at.petrak.hexcasting.common.lib.HexCapabilityHandler
import at.petrak.hexcasting.common.lib.HexSounds
import at.petrak.hexcasting.common.misc.Brainsweeping
@ -93,6 +94,7 @@ object HexMod {
evBus.register(HexPlayerDataHelper::class.java)
evBus.register(OpFlight)
evBus.register(Brainsweeping::class.java)
evBus.register(JewelerHammerHandler::class.java)
DistExecutor.unsafeRunWhenOn(Dist.CLIENT) {
Runnable {

View file

@ -10,10 +10,7 @@ import at.petrak.hexcasting.common.items.magic.ItemCypher;
import at.petrak.hexcasting.common.items.magic.ItemManaBattery;
import at.petrak.hexcasting.common.items.magic.ItemTrinket;
import net.minecraft.world.food.FoodProperties;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.DyeColor;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.*;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
@ -76,6 +73,9 @@ public class HexItems {
public static final RegistryObject<ItemManaBattery> BATTERY = ITEMS.register("battery",
() -> new ItemManaBattery(props().stacksTo(1)));
public static final RegistryObject<PickaxeItem> JEWELER_HAMMER = ITEMS.register("jeweler_hammer",
() -> new PickaxeItem(Tiers.IRON, 0, -2.8F, props().stacksTo(1)));
public static final EnumMap<DyeColor, RegistryObject<ItemDyeColorizer>> DYE_COLORIZERS = new EnumMap<>(
DyeColor.class);
public static final RegistryObject<ItemPrideColorizer>[] PRIDE_COLORIZERS = new RegistryObject[14];

View file

@ -0,0 +1,18 @@
package at.petrak.hexcasting.common.items;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Block;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
public class JewelerHammerHandler {
@SubscribeEvent
public static void jewelerHammerBreakSpeed(PlayerEvent.BreakSpeed evt) {
ItemStack stack = evt.getPlayer().getMainHandItem();
if (stack.is(HexItems.JEWELER_HAMMER.get())) {
if (Block.isShapeFullBlock(evt.getState().getShape(evt.getPlayer().level, evt.getPos()))) {
evt.setCanceled(true);
}
}
}
}

View file

@ -28,6 +28,7 @@ public class HexItemModels extends PaucalItemModelProvider {
simpleItem(HexItems.CHARGED_AMETHYST.get());
simpleItem(HexItems.SUBMARINE_SANDWICH.get());
simpleItem(HexItems.ABACUS.get());
brandishedItem(HexItems.JEWELER_HAMMER.get());
simpleItem(modLoc("scroll_pristine"));
simpleItem(modLoc("scroll_ancient"));

View file

@ -166,6 +166,16 @@ public class HexRecipes extends PaucalRecipeProvider {
.pattern("SSS")
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST.get())).save(recipes);
ShapedRecipeBuilder.shaped(HexItems.JEWELER_HAMMER.get())
.define('I', Items.IRON_INGOT)
.define('N', Items.IRON_NUGGET)
.define('A', Items.AMETHYST_SHARD)
.define('S', Items.STICK)
.pattern("IAN")
.pattern(" S ")
.pattern(" S ")
.unlockedBy("has_item", has(Items.AMETHYST_SHARD)).save(recipes);
ShapedRecipeBuilder.shaped(HexBlocks.SLATE_BLOCK.get())
.define('S', HexItems.SLATE.get())
.pattern("S")

View file

@ -24,6 +24,7 @@
"item.hexcasting.scroll.of": "Ancient Scroll of %s",
"item.hexcasting.scroll.empty": "Empty Scroll",
"item.hexcasting.abacus": "Abacus",
"item.hexcasting.jeweler_hammer": "Jeweler's Hammer",
"item.hexcasting.sub_sandwich": "Submarine Sandwich",
"item.hexcasting.dye_colorizer_white": "White Pigment",
"item.hexcasting.dye_colorizer_orange": "Orange Pigment",
@ -603,6 +604,10 @@
"hexcasting.page.edified.2": "I would assume the wood would have some properties relevant to _Hexcasting. But, if it does, I cannot seem to find them. For all intents and purposes it appears to be just wood, albeit of a very strange color.$(br2)I suppose for now I will use it for decoration; the full suite of standard wood blocks can be crafted from them.$(br2)Of course, I can strip them with an axe as well.",
"hexcasting.page.edified.crafting.desc": "$(italic)Their smooth trunks, with white bark, gave the effect of enormous columns sustaining the weight of an immense foliage, full of shade and silence./$",
"hexcasting.entry.jeweler_hammer": "Jeweler's Hammer",
"hexcasting.page.jeweler_hammer.1": "After being careless with the sources of my _media one too many times, I have devised a tool to work around my clumsiness.$(br2)Using the delicate nature of crystallized _media as a fixture for a pickaxe, I can create the $(l:items/jeweler_hammer)$(item)Jeweler's Hammer/$. It acts like an $(item)Iron Pickaxe/$, for the most part, but can't break anything that takes up an entire block's space.",
"hexcasting.page.jeweler_hammer.crafting.desc": "$(italic)Carefully, she cracked the half ruby, letting the spren escape./$",
"hexcasting.entry.decoration": "Decorative Blocks",
"hexcasting.page.decoration.1": "In the course of my studies I have discovered some building blocks and trifles that I may find aesthetically pleasing. I've compiled the methods of making them here.",
"hexcasting.page.decoration.ancient_scroll.crafting.desc": "Brown dye works well enough to simulate the look of an $(l:items/scroll)$(item)ancient scroll/$.",

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

View file

@ -0,0 +1,18 @@
{
"name": "hexcasting.entry.jeweler_hammer",
"category": "hexcasting:items",
"icon": "hexcasting:jeweler_hammer",
"sortnum": 9,
"advancement": "hexcasting:root",
"pages": [
{
"type": "patchouli:text",
"text": "hexcasting.page.jeweler_hammer.1"
},
{
"type": "patchouli:crafting",
"recipe": "hexcasting:jeweler_hammer",
"text": "hexcasting.page.jeweler_hammer.crafting.desc"
}
]
}

View file

@ -86,9 +86,5 @@
"output": "",
"text": "hexcasting.page.blockworks.extinguish"
}
],
"extra_recipe_mappings": {
"hexcasting:conjured": 5,
"hexcasting:conjured_block": 4
}
]
}