jeweler's hammer
this entry is very temporary, petra, replace as you see fit
This commit is contained in:
parent
ebbe80b9d1
commit
0e38543cc7
15 changed files with 157 additions and 8 deletions
|
@ -246,6 +246,7 @@ a1308cfa2e67684f5ba14a9726830936f76d68e2 assets/hexcasting/models/item/focus_wid
|
||||||
991af62ccdc4c063321cc7994e0a106a432d1487 assets/hexcasting/models/item/impetus_look.json
|
991af62ccdc4c063321cc7994e0a106a432d1487 assets/hexcasting/models/item/impetus_look.json
|
||||||
199a1c37b3fdb1e7da93408bbe85c5a2222e264e assets/hexcasting/models/item/impetus_rightclick.json
|
199a1c37b3fdb1e7da93408bbe85c5a2222e264e assets/hexcasting/models/item/impetus_rightclick.json
|
||||||
458550229be6036be246e290e99b643caa8b3f8a assets/hexcasting/models/item/impetus_storedplayer.json
|
458550229be6036be246e290e99b643caa8b3f8a assets/hexcasting/models/item/impetus_storedplayer.json
|
||||||
|
597a4f9921c40e40f33af722098edf1dc8ed4477 assets/hexcasting/models/item/jeweler_hammer.json
|
||||||
891f2cf2aab18f85e5601ae37248b5d454918fef assets/hexcasting/models/item/lens.json
|
891f2cf2aab18f85e5601ae37248b5d454918fef assets/hexcasting/models/item/lens.json
|
||||||
22ec49ee56e2d0d9fca4473f965c64b82d712f79 assets/hexcasting/models/item/patchouli_book.json
|
22ec49ee56e2d0d9fca4473f965c64b82d712f79 assets/hexcasting/models/item/patchouli_book.json
|
||||||
d7dd348ef3d402a0e6d1c601581e30e99f9bcc87 assets/hexcasting/models/item/phial_large_0.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
|
7351200c8e3eb24772852c578286384c8aab61bd data/hexcasting/advancements/recipes/hexcasting/empty_directrix.json
|
||||||
023c32e8834eb313c4fa94a84a8f6390ee951ef0 data/hexcasting/advancements/recipes/hexcasting/empty_impetus.json
|
023c32e8834eb313c4fa94a84a8f6390ee951ef0 data/hexcasting/advancements/recipes/hexcasting/empty_impetus.json
|
||||||
f089ab17470c5fa0065438c5533d5fafb3ee8eaf data/hexcasting/advancements/recipes/hexcasting/focus.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
|
fc57d15e9f9f11347a2170dd06053954345368d2 data/hexcasting/advancements/recipes/hexcasting/lens.json
|
||||||
82be04125e60a28701de5bb6bc7855bb46fa9d0f data/hexcasting/advancements/recipes/hexcasting/pride_colorizer_0.json
|
82be04125e60a28701de5bb6bc7855bb46fa9d0f data/hexcasting/advancements/recipes/hexcasting/pride_colorizer_0.json
|
||||||
13fc3b9e91486b3b0ca56b4ef7d5ddb8920aa7fe data/hexcasting/advancements/recipes/hexcasting/pride_colorizer_1.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
|
a952d33cda8b805237052b602cf066683c4bf261 data/hexcasting/recipes/empty_directrix.json
|
||||||
b7c248d2627c2a2b398d1c50181c1e0863612424 data/hexcasting/recipes/empty_impetus.json
|
b7c248d2627c2a2b398d1c50181c1e0863612424 data/hexcasting/recipes/empty_impetus.json
|
||||||
7eaf7ee280d1982ecbaf5175cea5c5a7c7804f98 data/hexcasting/recipes/focus.json
|
7eaf7ee280d1982ecbaf5175cea5c5a7c7804f98 data/hexcasting/recipes/focus.json
|
||||||
|
bbe78a0adf15bbcf5fb2d8089b24499ff7229858 data/hexcasting/recipes/jeweler_hammer.json
|
||||||
2397e64bd5fa2af12bb4f0f7efbc55f387c07a2b data/hexcasting/recipes/lens.json
|
2397e64bd5fa2af12bb4f0f7efbc55f387c07a2b data/hexcasting/recipes/lens.json
|
||||||
0ea329526c81c1e4064bab61721ab4586cfcf706 data/hexcasting/recipes/pride_colorizer_0.json
|
0ea329526c81c1e4064bab61721ab4586cfcf706 data/hexcasting/recipes/pride_colorizer_0.json
|
||||||
c742a0a5fba2388263bfccfb49c60277d817f8cd data/hexcasting/recipes/pride_colorizer_1.json
|
c742a0a5fba2388263bfccfb49c60277d817f8cd data/hexcasting/recipes/pride_colorizer_1.json
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:item/handheld",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "hexcasting:item/jeweler_hammer"
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package at.petrak.hexcasting.common.items;
|
||||||
|
|
||||||
|
import at.petrak.hexcasting.common.lib.HexItems;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.PickaxeItem;
|
||||||
|
import net.minecraft.world.item.Tier;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
|
||||||
|
public class ItemJewelerHammer extends PickaxeItem {
|
||||||
|
public ItemJewelerHammer(Tier tier, int damageMod, float attackSpeedMod, Properties props) {
|
||||||
|
super(tier, damageMod, attackSpeedMod, props);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean shouldFailToBreak(Player player, BlockState state, BlockPos pos) {
|
||||||
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
return stack.is(HexItems.JEWELER_HAMMER) && Block.isShapeFullBlock(state.getShape(player.level, pos));
|
||||||
|
}
|
||||||
|
}
|
|
@ -12,9 +12,7 @@ import at.petrak.hexcasting.xplat.IXplatAbstractions;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
import net.minecraft.world.entity.EquipmentSlot;
|
||||||
import net.minecraft.world.food.FoodProperties;
|
import net.minecraft.world.food.FoodProperties;
|
||||||
import net.minecraft.world.item.DyeColor;
|
import net.minecraft.world.item.*;
|
||||||
import net.minecraft.world.item.Item;
|
|
||||||
import net.minecraft.world.item.ItemStack;
|
|
||||||
|
|
||||||
import java.util.EnumMap;
|
import java.util.EnumMap;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
|
@ -59,6 +57,7 @@ public class HexItems {
|
||||||
public static final ItemTrinket TRINKET = make("trinket", new ItemTrinket(unstackable()));
|
public static final ItemTrinket TRINKET = make("trinket", new ItemTrinket(unstackable()));
|
||||||
public static final ItemArtifact ARTIFACT = make("artifact", new ItemArtifact(unstackable()));
|
public static final ItemArtifact ARTIFACT = make("artifact", new ItemArtifact(unstackable()));
|
||||||
|
|
||||||
|
public static final ItemJewelerHammer JEWELER_HAMMER = make("jeweler_hammer", new ItemJewelerHammer(Tiers.IRON, 0, -2.8F, props().stacksTo(1)));
|
||||||
|
|
||||||
public static final ItemScroll SCROLL = make("scroll", new ItemScroll(props()));
|
public static final ItemScroll SCROLL = make("scroll", new ItemScroll(props()));
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
"item.hexcasting.scroll.of": "Ancient Scroll of %s",
|
"item.hexcasting.scroll.of": "Ancient Scroll of %s",
|
||||||
"item.hexcasting.scroll.empty": "Empty Scroll",
|
"item.hexcasting.scroll.empty": "Empty Scroll",
|
||||||
"item.hexcasting.abacus": "Abacus",
|
"item.hexcasting.abacus": "Abacus",
|
||||||
|
"item.hexcasting.jeweler_hammer": "Jeweler's Hammer",
|
||||||
"item.hexcasting.sub_sandwich": "Submarine Sandwich",
|
"item.hexcasting.sub_sandwich": "Submarine Sandwich",
|
||||||
"item.hexcasting.dye_colorizer_white": "White Pigment",
|
"item.hexcasting.dye_colorizer_white": "White Pigment",
|
||||||
"item.hexcasting.dye_colorizer_orange": "Orange Pigment",
|
"item.hexcasting.dye_colorizer_orange": "Orange Pigment",
|
||||||
|
@ -604,6 +605,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.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.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.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.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/$.",
|
"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 |
|
@ -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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -86,9 +86,5 @@
|
||||||
"output": "",
|
"output": "",
|
||||||
"text": "hexcasting.page.blockworks.extinguish"
|
"text": "hexcasting.page.blockworks.extinguish"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"extra_recipe_mappings": {
|
|
||||||
"hexcasting:conjured": 5,
|
|
||||||
"hexcasting:conjured_block": 4
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
package at.petrak.hexcasting.fabric.mixin;
|
||||||
|
|
||||||
|
import at.petrak.hexcasting.common.items.ItemJewelerHammer;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.level.BlockGetter;
|
||||||
|
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@Mixin(BlockBehaviour.class)
|
||||||
|
public class FabricBlockBehaviorMixin {
|
||||||
|
@Inject(method = "getDestroyProgress", at = @At("HEAD"), cancellable = true)
|
||||||
|
private void destroyProgress(BlockState blockState, Player player, BlockGetter blockGetter, BlockPos blockPos, CallbackInfoReturnable<Float> cir) {
|
||||||
|
if (ItemJewelerHammer.shouldFailToBreak(player, blockState, blockPos))
|
||||||
|
cir.setReturnValue(0F);
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,6 +6,7 @@
|
||||||
"package": "at.petrak.hexcasting.fabric.mixin",
|
"package": "at.petrak.hexcasting.fabric.mixin",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"FabricAxeItemMixin",
|
"FabricAxeItemMixin",
|
||||||
|
"FabricBlockBehaviorMixin",
|
||||||
"FabricIngredientMixin",
|
"FabricIngredientMixin",
|
||||||
"FabricItemEntityMixin",
|
"FabricItemEntityMixin",
|
||||||
"FabricVillagerTurnIntoWitchMixin"
|
"FabricVillagerTurnIntoWitchMixin"
|
||||||
|
|
|
@ -11,6 +11,7 @@ import at.petrak.hexcasting.common.casting.RegisterPatterns;
|
||||||
import at.petrak.hexcasting.common.casting.operators.spells.great.OpFlight;
|
import at.petrak.hexcasting.common.casting.operators.spells.great.OpFlight;
|
||||||
import at.petrak.hexcasting.common.command.PatternResLocArgument;
|
import at.petrak.hexcasting.common.command.PatternResLocArgument;
|
||||||
import at.petrak.hexcasting.common.entities.HexEntities;
|
import at.petrak.hexcasting.common.entities.HexEntities;
|
||||||
|
import at.petrak.hexcasting.common.items.ItemJewelerHammer;
|
||||||
import at.petrak.hexcasting.common.lib.*;
|
import at.petrak.hexcasting.common.lib.*;
|
||||||
import at.petrak.hexcasting.common.misc.Brainsweeping;
|
import at.petrak.hexcasting.common.misc.Brainsweeping;
|
||||||
import at.petrak.hexcasting.common.misc.PlayerPositionRecorder;
|
import at.petrak.hexcasting.common.misc.PlayerPositionRecorder;
|
||||||
|
@ -163,6 +164,9 @@ public class ForgeHexInitializer {
|
||||||
|
|
||||||
evBus.addListener((RegisterCommandsEvent evt) -> HexCommands.register(evt.getDispatcher()));
|
evBus.addListener((RegisterCommandsEvent evt) -> HexCommands.register(evt.getDispatcher()));
|
||||||
|
|
||||||
|
evBus.addListener((PlayerEvent.BreakSpeed evt) ->
|
||||||
|
evt.setCanceled(ItemJewelerHammer.shouldFailToBreak(evt.getPlayer(), evt.getState(), evt.getPos())));
|
||||||
|
|
||||||
// === Events implemented in other ways on Fabric
|
// === Events implemented in other ways on Fabric
|
||||||
|
|
||||||
// On Fabric this should be auto-synced
|
// On Fabric this should be auto-synced
|
||||||
|
|
|
@ -32,6 +32,7 @@ public class HexItemModels extends PaucalItemModelProvider {
|
||||||
simpleItem(HexItems.CHARGED_AMETHYST);
|
simpleItem(HexItems.CHARGED_AMETHYST);
|
||||||
simpleItem(HexItems.SUBMARINE_SANDWICH);
|
simpleItem(HexItems.SUBMARINE_SANDWICH);
|
||||||
simpleItem(HexItems.ABACUS);
|
simpleItem(HexItems.ABACUS);
|
||||||
|
brandishedItem(HexItems.JEWELER_HAMMER);
|
||||||
|
|
||||||
simpleItem(modLoc("scroll_pristine"));
|
simpleItem(modLoc("scroll_pristine"));
|
||||||
simpleItem(modLoc("scroll_ancient"));
|
simpleItem(modLoc("scroll_ancient"));
|
||||||
|
|
|
@ -165,8 +165,23 @@ public class HexRecipes extends PaucalRecipeProvider {
|
||||||
.pattern("SSS")
|
.pattern("SSS")
|
||||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST)).save(recipes);
|
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST)).save(recipes);
|
||||||
|
|
||||||
|
<<<<<<< HEAD:Forge/src/main/java/at/petrak/hexcasting/forge/datagen/HexRecipes.java
|
||||||
ShapedRecipeBuilder.shaped(HexBlocks.SLATE_BLOCK)
|
ShapedRecipeBuilder.shaped(HexBlocks.SLATE_BLOCK)
|
||||||
.define('S', HexItems.SLATE)
|
.define('S', HexItems.SLATE)
|
||||||
|
=======
|
||||||
|
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())
|
||||||
|
>>>>>>> 65b04c03 (jeweler's hammer):src/main/java/at/petrak/hexcasting/datagen/HexRecipes.java
|
||||||
.pattern("S")
|
.pattern("S")
|
||||||
.pattern("S")
|
.pattern("S")
|
||||||
.unlockedBy("has_item", has(HexItems.SLATE))
|
.unlockedBy("has_item", has(HexItems.SLATE))
|
||||||
|
|
Loading…
Reference in a new issue