From 8faaaa18f0f176b656ad880b96a6f201ec4da5e0 Mon Sep 17 00:00:00 2001 From: Gugle Date: Sun, 28 Apr 2024 21:15:04 +0800 Subject: [PATCH 1/4] Update AnvilBlockMixin.java --- .../main/java/dev/dubhe/anvilcraft/mixin/AnvilBlockMixin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/common/src/main/java/dev/dubhe/anvilcraft/mixin/AnvilBlockMixin.java b/common/src/main/java/dev/dubhe/anvilcraft/mixin/AnvilBlockMixin.java index 87affe074..39e4cc393 100644 --- a/common/src/main/java/dev/dubhe/anvilcraft/mixin/AnvilBlockMixin.java +++ b/common/src/main/java/dev/dubhe/anvilcraft/mixin/AnvilBlockMixin.java @@ -11,6 +11,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.AnvilBlock; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.FallingBlock; import net.minecraft.world.level.block.state.BlockState; import org.jetbrains.annotations.NotNull; From 1899e1d2672874e411284b69e6a6a9d18f210f10 Mon Sep 17 00:00:00 2001 From: wdfaESfaef <2622389575@qq.com> Date: Sun, 28 Apr 2024 21:28:11 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=A1=A5=E9=BD=90=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E7=9A=84getCloneItemStack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dev/dubhe/anvilcraft/block/MeltGemCauldron.java | 11 +++++++++++ .../dev/dubhe/anvilcraft/block/SimpleChuteBlock.java | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/common/src/main/java/dev/dubhe/anvilcraft/block/MeltGemCauldron.java b/common/src/main/java/dev/dubhe/anvilcraft/block/MeltGemCauldron.java index 9f99f53cb..c01cb7dfc 100644 --- a/common/src/main/java/dev/dubhe/anvilcraft/block/MeltGemCauldron.java +++ b/common/src/main/java/dev/dubhe/anvilcraft/block/MeltGemCauldron.java @@ -2,9 +2,13 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.cauldron.CauldronInteraction; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.AbstractCauldronBlock; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.NotNull; public class MeltGemCauldron extends AbstractCauldronBlock { @@ -26,4 +30,11 @@ public boolean isFull(BlockState state) { public int getAnalogOutputSignal(BlockState state, Level level, BlockPos pos) { return 3; } + + @Override + public @NotNull ItemStack getCloneItemStack( + @NotNull BlockGetter level, @NotNull BlockPos pos, @NotNull BlockState state + ) { + return new ItemStack(Items.CAULDRON); + } } diff --git a/common/src/main/java/dev/dubhe/anvilcraft/block/SimpleChuteBlock.java b/common/src/main/java/dev/dubhe/anvilcraft/block/SimpleChuteBlock.java index f5a675270..89ef67536 100644 --- a/common/src/main/java/dev/dubhe/anvilcraft/block/SimpleChuteBlock.java +++ b/common/src/main/java/dev/dubhe/anvilcraft/block/SimpleChuteBlock.java @@ -117,6 +117,13 @@ public void neighborChanged( } } + @Override + public @NotNull ItemStack getCloneItemStack( + @NotNull BlockGetter level, @NotNull BlockPos pos, @NotNull BlockState state + ) { + return new ItemStack(ModBlocks.CHUTE); + } + @SuppressWarnings("deprecation") @Override public void tick( From 113a410ca30cd86e7501b4fbe80b5d3fcb6be950 Mon Sep 17 00:00:00 2001 From: Gugle Date: Sun, 28 Apr 2024 22:23:40 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=9A=87=E5=AE=B6=E9=92=A2=E7=B3=BB?= =?UTF-8?q?=E5=88=97=E5=B7=A5=E5=85=B7=E6=8B=A5=E6=9C=89=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=99=84=E9=AD=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/generator/lang/OtherLang.java | 8 +- .../dev/dubhe/anvilcraft/init/ModItems.java | 125 ++++-------------- .../anvilcraft/item/AmethystAxeItem.java | 19 +++ .../anvilcraft/item/AmethystHoeItem.java | 19 +++ .../anvilcraft/item/AmethystPickaxeItem.java | 19 +++ .../anvilcraft/item/AmethystShovelItem.java | 19 +++ .../anvilcraft/item/AmethystSwordItem.java | 19 +++ .../item/HasDefaultEnchantment.java | 43 ++++++ .../anvilcraft/item/RoyalAnvilHammerItem.java | 30 ++++- .../dubhe/anvilcraft/item/RoyalAxeItem.java | 37 ++++++ .../dubhe/anvilcraft/item/RoyalHoeItem.java | 37 ++++++ .../anvilcraft/item/RoyalPickaxeItem.java | 41 ++++++ .../anvilcraft/item/RoyalShovelItem.java | 37 ++++++ .../dubhe/anvilcraft/item/RoyalSwordItem.java | 37 ++++++ .../assets/anvilcraft/lang/en_ud.json | 1 + .../assets/anvilcraft/lang/en_us.json | 1 + .../anvilcraft/recipes/amethyst_shovel.json | 2 +- .../mixin/fabric/EnchantmentHelperMixin.java | 24 ++++ .../src/main/resources/anvilcraft.mixins.json | 1 + .../assets/anvilcraft/lang/en_ud.json | 1 + .../assets/anvilcraft/lang/en_us.json | 1 + .../anvilcraft/recipes/amethyst_shovel.json | 2 +- .../mixin/forge/ForgeItemStackMixin.java | 26 ++++ .../src/main/resources/anvilcraft.mixins.json | 3 +- 24 files changed, 447 insertions(+), 105 deletions(-) create mode 100644 common/src/main/java/dev/dubhe/anvilcraft/item/AmethystAxeItem.java create mode 100644 common/src/main/java/dev/dubhe/anvilcraft/item/AmethystHoeItem.java create mode 100644 common/src/main/java/dev/dubhe/anvilcraft/item/AmethystPickaxeItem.java create mode 100644 common/src/main/java/dev/dubhe/anvilcraft/item/AmethystShovelItem.java create mode 100644 common/src/main/java/dev/dubhe/anvilcraft/item/AmethystSwordItem.java create mode 100644 common/src/main/java/dev/dubhe/anvilcraft/item/HasDefaultEnchantment.java create mode 100644 common/src/main/java/dev/dubhe/anvilcraft/item/RoyalAxeItem.java create mode 100644 common/src/main/java/dev/dubhe/anvilcraft/item/RoyalHoeItem.java create mode 100644 common/src/main/java/dev/dubhe/anvilcraft/item/RoyalPickaxeItem.java create mode 100644 common/src/main/java/dev/dubhe/anvilcraft/item/RoyalShovelItem.java create mode 100644 common/src/main/java/dev/dubhe/anvilcraft/item/RoyalSwordItem.java create mode 100644 fabric/src/main/java/dev/dubhe/anvilcraft/mixin/fabric/EnchantmentHelperMixin.java create mode 100644 forge/src/main/java/dev/dubhe/anvilcraft/mixin/forge/ForgeItemStackMixin.java diff --git a/common/src/main/java/dev/dubhe/anvilcraft/data/generator/lang/OtherLang.java b/common/src/main/java/dev/dubhe/anvilcraft/data/generator/lang/OtherLang.java index fb044b44b..f30f90df1 100644 --- a/common/src/main/java/dev/dubhe/anvilcraft/data/generator/lang/OtherLang.java +++ b/common/src/main/java/dev/dubhe/anvilcraft/data/generator/lang/OtherLang.java @@ -1,12 +1,18 @@ package dev.dubhe.anvilcraft.data.generator.lang; import com.tterrag.registrate.providers.RegistrateLangProvider; +import org.jetbrains.annotations.NotNull; public class OtherLang { /** * @param provider 提供器 */ - public static void init(RegistrateLangProvider provider) { + public static void init(@NotNull RegistrateLangProvider provider) { + provider.add( + "item.anvilcraft.default_enchantment.tooltip", + "Has default enchantments:" + ); + provider.add( "item.anvilcraft.amethyst_pickaxe.tooltip", "Stone pickaxe quality, can mine iron ore, not diamonds!" diff --git a/common/src/main/java/dev/dubhe/anvilcraft/init/ModItems.java b/common/src/main/java/dev/dubhe/anvilcraft/init/ModItems.java index ca14d9ced..746fe5582 100644 --- a/common/src/main/java/dev/dubhe/anvilcraft/init/ModItems.java +++ b/common/src/main/java/dev/dubhe/anvilcraft/init/ModItems.java @@ -9,6 +9,11 @@ import dev.dubhe.anvilcraft.data.generator.recipe.TimeWarpRecipesLoader; import dev.dubhe.anvilcraft.data.recipe.anvil.AnvilRecipe; import dev.dubhe.anvilcraft.data.recipe.crafting.ShapedTagRecipeBuilder; +import dev.dubhe.anvilcraft.item.AmethystAxeItem; +import dev.dubhe.anvilcraft.item.AmethystHoeItem; +import dev.dubhe.anvilcraft.item.AmethystPickaxeItem; +import dev.dubhe.anvilcraft.item.AmethystShovelItem; +import dev.dubhe.anvilcraft.item.AmethystSwordItem; import dev.dubhe.anvilcraft.item.AnvilHammerItem; import dev.dubhe.anvilcraft.item.CapacitorItem; import dev.dubhe.anvilcraft.item.CrabClawItem; @@ -16,39 +21,33 @@ import dev.dubhe.anvilcraft.item.GeodeItem; import dev.dubhe.anvilcraft.item.MagnetItem; import dev.dubhe.anvilcraft.item.ModFoods; -import dev.dubhe.anvilcraft.item.ModTiers; import dev.dubhe.anvilcraft.item.RoyalAnvilHammerItem; +import dev.dubhe.anvilcraft.item.RoyalAxeItem; +import dev.dubhe.anvilcraft.item.RoyalHoeItem; +import dev.dubhe.anvilcraft.item.RoyalPickaxeItem; +import dev.dubhe.anvilcraft.item.RoyalShovelItem; +import dev.dubhe.anvilcraft.item.RoyalSwordItem; import dev.dubhe.anvilcraft.item.RoyalUpgradeTemplateItem; import dev.dubhe.anvilcraft.item.TopazItem; import dev.dubhe.anvilcraft.item.UtusanItem; -import net.minecraft.ChatFormatting; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.data.recipes.RecipeBuilder; import net.minecraft.data.recipes.RecipeCategory; import net.minecraft.data.recipes.ShapedRecipeBuilder; import net.minecraft.data.recipes.ShapelessRecipeBuilder; -import net.minecraft.network.chat.Component; import net.minecraft.tags.ItemTags; import net.minecraft.world.item.AxeItem; import net.minecraft.world.item.BowlFoodItem; import net.minecraft.world.item.HoeItem; import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.item.PickaxeItem; import net.minecraft.world.item.ShovelItem; import net.minecraft.world.item.SwordItem; -import net.minecraft.world.item.Tiers; -import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.world.item.enchantment.Enchantments; -import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.phys.Vec3; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import java.util.List; import java.util.Map; import static dev.dubhe.anvilcraft.AnvilCraft.REGISTRATE; @@ -72,28 +71,7 @@ public class ModItems { .item("geode", GeodeItem::new) .register(); public static final ItemEntry AMETHYST_PICKAXE = REGISTRATE - .item("amethyst_pickaxe", properties -> - new PickaxeItem(ModTiers.AMETHYST, 1, -2.8f, properties) { - @Override - public @NotNull ItemStack getDefaultInstance() { - ItemStack stack = super.getDefaultInstance(); - stack.enchant(Enchantments.BLOCK_FORTUNE, 3); - return stack; - } - - @Override - public void appendHoverText( - @NotNull ItemStack stack, - @Nullable Level level, - @NotNull List tooltipComponents, - @NotNull TooltipFlag isAdvanced - ) { - super.appendHoverText(stack, level, tooltipComponents, isAdvanced); - tooltipComponents - .add(Component.translatable("item.anvilcraft.amethyst_pickaxe.tooltip") - .withStyle(ChatFormatting.GRAY)); - } - }) + .item("amethyst_pickaxe", AmethystPickaxeItem::new) .recipe((ctx, provider) -> ShapedTagRecipeBuilder.shaped(RecipeCategory.TOOLS, ctx.get().asItem().getDefaultInstance()) .pattern("AAA") @@ -108,14 +86,7 @@ public void appendHoverText( .tag(ModItemTags.PICKAXES, ItemTags.CLUSTER_MAX_HARVESTABLES) .register(); public static final ItemEntry AMETHYST_AXE = REGISTRATE - .item("amethyst_axe", properties -> new AxeItem(ModTiers.AMETHYST, 7, -3.2f, properties) { - @Override - public @NotNull ItemStack getDefaultInstance() { - ItemStack stack = super.getDefaultInstance(); - stack.enchant(ModEnchantments.FELLING.get(), 1); - return stack; - } - }) + .item("amethyst_axe", AmethystAxeItem::new) .recipe((ctx, provider) -> ShapedTagRecipeBuilder.shaped(RecipeCategory.TOOLS, ctx.get().asItem().getDefaultInstance()) .pattern("AA") @@ -130,14 +101,7 @@ public void appendHoverText( .tag(ModItemTags.AXES) .register(); public static final ItemEntry AMETHYST_HOE = REGISTRATE - .item("amethyst_hoe", properties -> new HoeItem(ModTiers.AMETHYST, -1, -2.0f, properties) { - @Override - public @NotNull ItemStack getDefaultInstance() { - ItemStack stack = super.getDefaultInstance(); - stack.enchant(ModEnchantments.HARVEST.get(), 1); - return stack; - } - }) + .item("amethyst_hoe", AmethystHoeItem::new) .recipe((ctx, provider) -> ShapedTagRecipeBuilder.shaped(RecipeCategory.TOOLS, ctx.get().asItem().getDefaultInstance()) .pattern("AA") @@ -152,14 +116,7 @@ public void appendHoverText( .tag(ModItemTags.HOES) .register(); public static final ItemEntry AMETHYST_SWORD = REGISTRATE - .item("amethyst_sword", properties -> new SwordItem(ModTiers.AMETHYST, 3, -2.4f, properties) { - @Override - public @NotNull ItemStack getDefaultInstance() { - ItemStack stack = super.getDefaultInstance(); - stack.enchant(ModEnchantments.BEHEADING.get(), 1); - return stack; - } - }) + .item("amethyst_sword", AmethystSwordItem::new) .recipe((ctx, provider) -> ShapedTagRecipeBuilder.shaped(RecipeCategory.TOOLS, ctx.get().asItem().getDefaultInstance()) .pattern("A") @@ -174,14 +131,7 @@ public void appendHoverText( .tag(ModItemTags.SWORDS) .register(); public static final ItemEntry AMETHYST_SHOVEL = REGISTRATE - .item("amethyst_shovel", properties -> new ShovelItem(ModTiers.AMETHYST, 1.5f, -3.0f, properties) { - @Override - public @NotNull ItemStack getDefaultInstance() { - ItemStack stack = super.getDefaultInstance(); - stack.enchant(Enchantments.BLOCK_FORTUNE, 3); - return stack; - } - }) + .item("amethyst_shovel", AmethystShovelItem::new) .recipe((ctx, provider) -> ShapedTagRecipeBuilder.shaped(RecipeCategory.TOOLS, ctx.get().asItem().getDefaultInstance()) .pattern("A") @@ -384,53 +334,28 @@ public void appendHoverText( .register(); // 工具 public static final ItemEntry ROYAL_STEEL_PICKAXE = REGISTRATE - .item("royal_steel_pickaxe", properties -> new PickaxeItem(Tiers.DIAMOND, 1, -2.8f, - properties.durability(1561)) { - @Override - public @NotNull ItemStack getDefaultInstance() { - return super.getDefaultInstance(); - } - }) + .item("royal_steel_pickaxe", RoyalPickaxeItem::new) + .properties(properties -> properties.durability(1561)) .model((ctx, provider) -> provider.handheld(ctx)) .register(); public static final ItemEntry ROYAL_STEEL_AXE = REGISTRATE - .item("royal_steel_axe", properties -> new AxeItem(Tiers.DIAMOND, 5, -3.0f, - properties.durability(1561)) { - @Override - public @NotNull ItemStack getDefaultInstance() { - return super.getDefaultInstance(); - } - }) + .item("royal_steel_axe", RoyalAxeItem::new) + .properties(properties -> properties.durability(1561)) .model((ctx, provider) -> provider.handheld(ctx)) .register(); public static final ItemEntry ROYAL_STEEL_SHOVEL = REGISTRATE - .item("royal_steel_shovel", properties -> new ShovelItem(Tiers.DIAMOND, 1.5f, -3.0f, - properties.durability(1561)) { - @Override - public @NotNull ItemStack getDefaultInstance() { - return super.getDefaultInstance(); - } - }) + .item("royal_steel_shovel", RoyalShovelItem::new) + .properties(properties -> properties.durability(1561)) .model((ctx, provider) -> provider.handheld(ctx)) .register(); public static final ItemEntry ROYAL_STEEL_HOE = REGISTRATE - .item("royal_steel_hoe", properties -> new HoeItem(Tiers.DIAMOND, -3, 0, - properties.durability(1561)) { - @Override - public @NotNull ItemStack getDefaultInstance() { - return super.getDefaultInstance(); - } - }) + .item("royal_steel_hoe", RoyalHoeItem::new) + .properties(properties -> properties.durability(1561)) .model((ctx, provider) -> provider.handheld(ctx)) .register(); public static final ItemEntry ROYAL_STEEL_SWORD = REGISTRATE - .item("royal_steel_sword", properties -> new SwordItem(Tiers.DIAMOND, 3, -2.4f, - properties.durability(1561)) { - @Override - public @NotNull ItemStack getDefaultInstance() { - return super.getDefaultInstance(); - } - }) + .item("royal_steel_sword", RoyalSwordItem::new) + .properties(properties -> properties.durability(1561)) .model((ctx, provider) -> provider.handheld(ctx)) .register(); // 升级模板 diff --git a/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystAxeItem.java b/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystAxeItem.java new file mode 100644 index 000000000..9ebd92bc7 --- /dev/null +++ b/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystAxeItem.java @@ -0,0 +1,19 @@ +package dev.dubhe.anvilcraft.item; + +import dev.dubhe.anvilcraft.init.ModEnchantments; +import net.minecraft.world.item.AxeItem; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; + +public class AmethystAxeItem extends AxeItem { + public AmethystAxeItem(Properties properties) { + super(ModTiers.AMETHYST, 7, -3.2f, properties); + } + + @Override + public @NotNull ItemStack getDefaultInstance() { + ItemStack stack = super.getDefaultInstance(); + stack.enchant(ModEnchantments.FELLING.get(), 1); + return stack; + } +} diff --git a/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystHoeItem.java b/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystHoeItem.java new file mode 100644 index 000000000..c0f5f81a9 --- /dev/null +++ b/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystHoeItem.java @@ -0,0 +1,19 @@ +package dev.dubhe.anvilcraft.item; + +import dev.dubhe.anvilcraft.init.ModEnchantments; +import net.minecraft.world.item.HoeItem; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.NotNull; + +public class AmethystHoeItem extends HoeItem { + public AmethystHoeItem(Properties properties) { + super(ModTiers.AMETHYST, -1, -2.0f, properties); + } + + @Override + public @NotNull ItemStack getDefaultInstance() { + ItemStack stack = super.getDefaultInstance(); + stack.enchant(ModEnchantments.HARVEST.get(), 1); + return stack; + } +} diff --git a/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystPickaxeItem.java b/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystPickaxeItem.java new file mode 100644 index 000000000..eb9c89854 --- /dev/null +++ b/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystPickaxeItem.java @@ -0,0 +1,19 @@ +package dev.dubhe.anvilcraft.item; + +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.PickaxeItem; +import net.minecraft.world.item.enchantment.Enchantments; +import org.jetbrains.annotations.NotNull; + +public class AmethystPickaxeItem extends PickaxeItem { + public AmethystPickaxeItem(Properties properties) { + super(ModTiers.AMETHYST, 1, -2.8f, properties); + } + + @Override + public @NotNull ItemStack getDefaultInstance() { + ItemStack stack = super.getDefaultInstance(); + stack.enchant(Enchantments.BLOCK_FORTUNE, 3); + return stack; + } +} diff --git a/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystShovelItem.java b/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystShovelItem.java new file mode 100644 index 000000000..22cdb406c --- /dev/null +++ b/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystShovelItem.java @@ -0,0 +1,19 @@ +package dev.dubhe.anvilcraft.item; + +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ShovelItem; +import net.minecraft.world.item.enchantment.Enchantments; +import org.jetbrains.annotations.NotNull; + +public class AmethystShovelItem extends ShovelItem { + public AmethystShovelItem(Properties properties) { + super(ModTiers.AMETHYST, 1.5f, -3.0f, properties); + } + + @Override + public @NotNull ItemStack getDefaultInstance() { + ItemStack stack = super.getDefaultInstance(); + stack.enchant(Enchantments.BLOCK_EFFICIENCY, 3); + return stack; + } +} diff --git a/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystSwordItem.java b/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystSwordItem.java new file mode 100644 index 000000000..27380b572 --- /dev/null +++ b/common/src/main/java/dev/dubhe/anvilcraft/item/AmethystSwordItem.java @@ -0,0 +1,19 @@ +package dev.dubhe.anvilcraft.item; + +import dev.dubhe.anvilcraft.init.ModEnchantments; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.SwordItem; +import org.jetbrains.annotations.NotNull; + +public class AmethystSwordItem extends SwordItem { + public AmethystSwordItem(Properties properties) { + super(ModTiers.AMETHYST, 3, -2.4f, properties); + } + + @Override + public @NotNull ItemStack getDefaultInstance() { + ItemStack stack = super.getDefaultInstance(); + stack.enchant(ModEnchantments.BEHEADING.get(), 1); + return stack; + } +} diff --git a/common/src/main/java/dev/dubhe/anvilcraft/item/HasDefaultEnchantment.java b/common/src/main/java/dev/dubhe/anvilcraft/item/HasDefaultEnchantment.java new file mode 100644 index 000000000..bab58edb7 --- /dev/null +++ b/common/src/main/java/dev/dubhe/anvilcraft/item/HasDefaultEnchantment.java @@ -0,0 +1,43 @@ +package dev.dubhe.anvilcraft.item; + +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.enchantment.Enchantment; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 有默认附魔 + */ +public interface HasDefaultEnchantment { + Map getDefaultEnchantments(); + + default int getDefaultEnchantmentLevel(Enchantment enchantment) { + return this.getDefaultEnchantments().getOrDefault(enchantment, 0); + } + + /** + * @return 工具提示 + */ + default List getDefaultEnchantmentsTooltip() { + List list = new ArrayList<>(); + list.add( + Component + .translatable("item.anvilcraft.default_enchantment.tooltip") + .withStyle(ChatFormatting.GRAY) + ); + for (Map.Entry entry : getDefaultEnchantments().entrySet()) { + Enchantment enchantment = entry.getKey(); + Integer level = entry.getValue(); + list.add( + Component + .literal("- ") + .append(enchantment.getFullname(level)) + .withStyle(ChatFormatting.DARK_GRAY) + ); + } + return list; + } +} diff --git a/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalAnvilHammerItem.java b/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalAnvilHammerItem.java index c082da97d..abbdfa3ff 100644 --- a/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalAnvilHammerItem.java +++ b/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalAnvilHammerItem.java @@ -1,6 +1,18 @@ package dev.dubhe.anvilcraft.item; -public class RoyalAnvilHammerItem extends AnvilHammerItem { +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.item.enchantment.Enchantments; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.Map; + +public class RoyalAnvilHammerItem extends AnvilHammerItem implements HasDefaultEnchantment { /** * 初始化铁砧锤 * @@ -19,4 +31,20 @@ protected float getAttackDamageModifierAmount() { protected float calculateFallDamageBonus(float fallDistance) { return Math.min(80, fallDistance * 2); } + + @Override + public void appendHoverText( + @NotNull ItemStack stack, + @Nullable Level level, + @NotNull List tooltipComponents, + @NotNull TooltipFlag isAdvanced + ) { + super.appendHoverText(stack, level, tooltipComponents, isAdvanced); + tooltipComponents.addAll(this.getDefaultEnchantmentsTooltip()); + } + + @Override + public Map getDefaultEnchantments() { + return Map.of(Enchantments.UNBREAKING, 3); + } } diff --git a/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalAxeItem.java b/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalAxeItem.java new file mode 100644 index 000000000..662ec499c --- /dev/null +++ b/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalAxeItem.java @@ -0,0 +1,37 @@ +package dev.dubhe.anvilcraft.item; + +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.AxeItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Tiers; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.item.enchantment.Enchantments; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.Map; + +public class RoyalAxeItem extends AxeItem implements HasDefaultEnchantment { + public RoyalAxeItem(Properties properties) { + super(Tiers.DIAMOND, 5, -3.0f, properties); + } + + @Override + public void appendHoverText( + @NotNull ItemStack stack, + @Nullable Level level, + @NotNull List tooltipComponents, + @NotNull TooltipFlag isAdvanced + ) { + super.appendHoverText(stack, level, tooltipComponents, isAdvanced); + tooltipComponents.addAll(this.getDefaultEnchantmentsTooltip()); + } + + @Override + public Map getDefaultEnchantments() { + return Map.of(Enchantments.UNBREAKING, 3); + } +} diff --git a/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalHoeItem.java b/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalHoeItem.java new file mode 100644 index 000000000..e864e9f94 --- /dev/null +++ b/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalHoeItem.java @@ -0,0 +1,37 @@ +package dev.dubhe.anvilcraft.item; + +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.HoeItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Tiers; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.item.enchantment.Enchantments; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.Map; + +public class RoyalHoeItem extends HoeItem implements HasDefaultEnchantment { + public RoyalHoeItem(Properties properties) { + super(Tiers.DIAMOND, -3, 0, properties); + } + + @Override + public void appendHoverText( + @NotNull ItemStack stack, + @Nullable Level level, + @NotNull List tooltipComponents, + @NotNull TooltipFlag isAdvanced + ) { + super.appendHoverText(stack, level, tooltipComponents, isAdvanced); + tooltipComponents.addAll(this.getDefaultEnchantmentsTooltip()); + } + + @Override + public Map getDefaultEnchantments() { + return Map.of(Enchantments.UNBREAKING, 3); + } +} diff --git a/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalPickaxeItem.java b/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalPickaxeItem.java new file mode 100644 index 000000000..1ea86c322 --- /dev/null +++ b/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalPickaxeItem.java @@ -0,0 +1,41 @@ +package dev.dubhe.anvilcraft.item; + +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.PickaxeItem; +import net.minecraft.world.item.Tiers; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.item.enchantment.Enchantments; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.Map; + +public class RoyalPickaxeItem extends PickaxeItem implements HasDefaultEnchantment { + public RoyalPickaxeItem(Properties properties) { + super(Tiers.DIAMOND, 1, -2.8f, properties); + } + + @Override + public void appendHoverText( + @NotNull ItemStack stack, + @Nullable Level level, + @NotNull List tooltipComponents, + @NotNull TooltipFlag isAdvanced + ) { + super.appendHoverText(stack, level, tooltipComponents, isAdvanced); + tooltipComponents + .add(Component.translatable("item.anvilcraft.amethyst_pickaxe.tooltip") + .withStyle(ChatFormatting.GRAY)); + tooltipComponents.addAll(this.getDefaultEnchantmentsTooltip()); + } + + @Override + public Map getDefaultEnchantments() { + return Map.of(Enchantments.UNBREAKING, 3); + } +} diff --git a/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalShovelItem.java b/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalShovelItem.java new file mode 100644 index 000000000..b066410ae --- /dev/null +++ b/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalShovelItem.java @@ -0,0 +1,37 @@ +package dev.dubhe.anvilcraft.item; + +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ShovelItem; +import net.minecraft.world.item.Tiers; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.item.enchantment.Enchantments; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.Map; + +public class RoyalShovelItem extends ShovelItem implements HasDefaultEnchantment { + public RoyalShovelItem(Properties properties) { + super(Tiers.DIAMOND, 1.5f, -3.0f, properties); + } + + @Override + public void appendHoverText( + @NotNull ItemStack stack, + @Nullable Level level, + @NotNull List tooltipComponents, + @NotNull TooltipFlag isAdvanced + ) { + super.appendHoverText(stack, level, tooltipComponents, isAdvanced); + tooltipComponents.addAll(this.getDefaultEnchantmentsTooltip()); + } + + @Override + public Map getDefaultEnchantments() { + return Map.of(Enchantments.UNBREAKING, 3); + } +} diff --git a/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalSwordItem.java b/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalSwordItem.java new file mode 100644 index 000000000..a1bf6a1d5 --- /dev/null +++ b/common/src/main/java/dev/dubhe/anvilcraft/item/RoyalSwordItem.java @@ -0,0 +1,37 @@ +package dev.dubhe.anvilcraft.item; + +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.SwordItem; +import net.minecraft.world.item.Tiers; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.item.enchantment.Enchantments; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.Map; + +public class RoyalSwordItem extends SwordItem implements HasDefaultEnchantment { + public RoyalSwordItem(Properties properties) { + super(Tiers.DIAMOND, 3, -2.4f, properties); + } + + @Override + public void appendHoverText( + @NotNull ItemStack stack, + @Nullable Level level, + @NotNull List tooltipComponents, + @NotNull TooltipFlag isAdvanced + ) { + super.appendHoverText(stack, level, tooltipComponents, isAdvanced); + tooltipComponents.addAll(this.getDefaultEnchantmentsTooltip()); + } + + @Override + public Map getDefaultEnchantments() { + return Map.of(Enchantments.UNBREAKING, 3); + } +} diff --git a/fabric/src/generated/resources/assets/anvilcraft/lang/en_ud.json b/fabric/src/generated/resources/assets/anvilcraft/lang/en_ud.json index 06a220fb2..11ec759bc 100644 --- a/fabric/src/generated/resources/assets/anvilcraft/lang/en_ud.json +++ b/fabric/src/generated/resources/assets/anvilcraft/lang/en_ud.json @@ -69,6 +69,7 @@ "item.anvilcraft.creamy_bread_roll": "ןןoᴚ pɐǝɹᗺ ʎɯɐǝɹƆ", "item.anvilcraft.cursed_gold_ingot": "ʇobuI pןo⅁ pǝsɹnƆ", "item.anvilcraft.cursed_gold_nugget": "ʇǝbbnN pןo⅁ pǝsɹnƆ", + "item.anvilcraft.default_enchantment.tooltip": ":sʇuǝɯʇuɐɥɔuǝ ʇןnɐɟǝp sɐH", "item.anvilcraft.dough": "ɥbnoᗡ", "item.anvilcraft.elytra_frame": "ǝɯɐɹℲ ɐɹʇʎןƎ", "item.anvilcraft.elytra_membrane": "ǝuɐɹqɯǝW ɐɹʇʎןƎ", diff --git a/fabric/src/generated/resources/assets/anvilcraft/lang/en_us.json b/fabric/src/generated/resources/assets/anvilcraft/lang/en_us.json index b32bbb078..18e759f6e 100644 --- a/fabric/src/generated/resources/assets/anvilcraft/lang/en_us.json +++ b/fabric/src/generated/resources/assets/anvilcraft/lang/en_us.json @@ -69,6 +69,7 @@ "item.anvilcraft.creamy_bread_roll": "Creamy Bread Roll", "item.anvilcraft.cursed_gold_ingot": "Cursed Gold Ingot", "item.anvilcraft.cursed_gold_nugget": "Cursed Gold Nugget", + "item.anvilcraft.default_enchantment.tooltip": "Has default enchantments:", "item.anvilcraft.dough": "Dough", "item.anvilcraft.elytra_frame": "Elytra Frame", "item.anvilcraft.elytra_membrane": "Elytra Membrane", diff --git a/fabric/src/generated/resources/data/anvilcraft/recipes/amethyst_shovel.json b/fabric/src/generated/resources/data/anvilcraft/recipes/amethyst_shovel.json index 14f22dfe2..fcb1cc94f 100644 --- a/fabric/src/generated/resources/data/anvilcraft/recipes/amethyst_shovel.json +++ b/fabric/src/generated/resources/data/anvilcraft/recipes/amethyst_shovel.json @@ -15,7 +15,7 @@ "B" ], "result": { - "data": "{Damage:0,Enchantments:[{id:\"minecraft:fortune\",lvl:3s}]}", + "data": "{Damage:0,Enchantments:[{id:\"minecraft:efficiency\",lvl:3s}]}", "item": "anvilcraft:amethyst_shovel" }, "show_notification": true diff --git a/fabric/src/main/java/dev/dubhe/anvilcraft/mixin/fabric/EnchantmentHelperMixin.java b/fabric/src/main/java/dev/dubhe/anvilcraft/mixin/fabric/EnchantmentHelperMixin.java new file mode 100644 index 000000000..33bae92df --- /dev/null +++ b/fabric/src/main/java/dev/dubhe/anvilcraft/mixin/fabric/EnchantmentHelperMixin.java @@ -0,0 +1,24 @@ +package dev.dubhe.anvilcraft.mixin.fabric; + +import dev.dubhe.anvilcraft.item.HasDefaultEnchantment; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.item.enchantment.EnchantmentHelper; +import org.jetbrains.annotations.NotNull; +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(EnchantmentHelper.class) +abstract class EnchantmentHelperMixin { + @Inject(method = "getItemEnchantmentLevel", at = @At("RETURN"), cancellable = true) + private static void getItemEnchantmentLevel( + Enchantment enchantment, @NotNull ItemStack stack, CallbackInfoReturnable cir + ) { + if (!(stack.getItem() instanceof HasDefaultEnchantment item)) return; + int level = cir.getReturnValue(); + int defaultLevel = item.getDefaultEnchantmentLevel(enchantment); + cir.setReturnValue(Math.max(level, defaultLevel)); + } +} diff --git a/fabric/src/main/resources/anvilcraft.mixins.json b/fabric/src/main/resources/anvilcraft.mixins.json index 6b7eb33f2..2110c6f75 100644 --- a/fabric/src/main/resources/anvilcraft.mixins.json +++ b/fabric/src/main/resources/anvilcraft.mixins.json @@ -4,6 +4,7 @@ "package": "dev.dubhe.anvilcraft.mixin.fabric", "compatibilityLevel": "JAVA_17", "mixins": [ + "EnchantmentHelperMixin", "FallingBlockEntityMixin", "LightningBoltMixin", "PistonMovingBlockEntityMixin", diff --git a/forge/src/generated/resources/assets/anvilcraft/lang/en_ud.json b/forge/src/generated/resources/assets/anvilcraft/lang/en_ud.json index 06a220fb2..11ec759bc 100644 --- a/forge/src/generated/resources/assets/anvilcraft/lang/en_ud.json +++ b/forge/src/generated/resources/assets/anvilcraft/lang/en_ud.json @@ -69,6 +69,7 @@ "item.anvilcraft.creamy_bread_roll": "ןןoᴚ pɐǝɹᗺ ʎɯɐǝɹƆ", "item.anvilcraft.cursed_gold_ingot": "ʇobuI pןo⅁ pǝsɹnƆ", "item.anvilcraft.cursed_gold_nugget": "ʇǝbbnN pןo⅁ pǝsɹnƆ", + "item.anvilcraft.default_enchantment.tooltip": ":sʇuǝɯʇuɐɥɔuǝ ʇןnɐɟǝp sɐH", "item.anvilcraft.dough": "ɥbnoᗡ", "item.anvilcraft.elytra_frame": "ǝɯɐɹℲ ɐɹʇʎןƎ", "item.anvilcraft.elytra_membrane": "ǝuɐɹqɯǝW ɐɹʇʎןƎ", diff --git a/forge/src/generated/resources/assets/anvilcraft/lang/en_us.json b/forge/src/generated/resources/assets/anvilcraft/lang/en_us.json index b32bbb078..18e759f6e 100644 --- a/forge/src/generated/resources/assets/anvilcraft/lang/en_us.json +++ b/forge/src/generated/resources/assets/anvilcraft/lang/en_us.json @@ -69,6 +69,7 @@ "item.anvilcraft.creamy_bread_roll": "Creamy Bread Roll", "item.anvilcraft.cursed_gold_ingot": "Cursed Gold Ingot", "item.anvilcraft.cursed_gold_nugget": "Cursed Gold Nugget", + "item.anvilcraft.default_enchantment.tooltip": "Has default enchantments:", "item.anvilcraft.dough": "Dough", "item.anvilcraft.elytra_frame": "Elytra Frame", "item.anvilcraft.elytra_membrane": "Elytra Membrane", diff --git a/forge/src/generated/resources/data/anvilcraft/recipes/amethyst_shovel.json b/forge/src/generated/resources/data/anvilcraft/recipes/amethyst_shovel.json index 14f22dfe2..fcb1cc94f 100644 --- a/forge/src/generated/resources/data/anvilcraft/recipes/amethyst_shovel.json +++ b/forge/src/generated/resources/data/anvilcraft/recipes/amethyst_shovel.json @@ -15,7 +15,7 @@ "B" ], "result": { - "data": "{Damage:0,Enchantments:[{id:\"minecraft:fortune\",lvl:3s}]}", + "data": "{Damage:0,Enchantments:[{id:\"minecraft:efficiency\",lvl:3s}]}", "item": "anvilcraft:amethyst_shovel" }, "show_notification": true diff --git a/forge/src/main/java/dev/dubhe/anvilcraft/mixin/forge/ForgeItemStackMixin.java b/forge/src/main/java/dev/dubhe/anvilcraft/mixin/forge/ForgeItemStackMixin.java new file mode 100644 index 000000000..8c20272b9 --- /dev/null +++ b/forge/src/main/java/dev/dubhe/anvilcraft/mixin/forge/ForgeItemStackMixin.java @@ -0,0 +1,26 @@ +package dev.dubhe.anvilcraft.mixin.forge; + +import dev.dubhe.anvilcraft.item.HasDefaultEnchantment; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraftforge.common.extensions.IForgeItemStack; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(value = IForgeItemStack.class, remap = false) +abstract class ForgeItemStackMixin implements IForgeItemStack { + @Shadow + protected abstract ItemStack self(); + + @Inject(method = "getEnchantmentLevel", at = @At("RETURN"), cancellable = true) + private void getEnchantmentLevel(Enchantment enchantment, CallbackInfoReturnable cir) { + ItemStack self = self(); + if (!(self.getItem() instanceof HasDefaultEnchantment item)) return; + int level = cir.getReturnValue(); + int defaultLevel = item.getDefaultEnchantmentLevel(enchantment); + cir.setReturnValue(Math.max(level, defaultLevel)); + } +} diff --git a/forge/src/main/resources/anvilcraft.mixins.json b/forge/src/main/resources/anvilcraft.mixins.json index 5c77ffa8e..989928bd7 100644 --- a/forge/src/main/resources/anvilcraft.mixins.json +++ b/forge/src/main/resources/anvilcraft.mixins.json @@ -6,9 +6,10 @@ "mixins": [ "CraftingHelperMixin", "FallingBlockEntityMixin", + "ForgeItemStackMixin", + "LevelChunkMixin", "LightningBoltMixin", "MinecraftServerMixin", - "LevelChunkMixin", "PistonMovingBlockEntityMixin" ], "client": [ From 57256bf79e6747d97dcb5422459fcb0bfb80f96c Mon Sep 17 00:00:00 2001 From: XeKr <987820727@qq.com> Date: Sun, 28 Apr 2024 22:28:03 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=9F=B9=E9=92=B3=E8=B4=B4=E5=9B=BE?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../anvilcraft/models/block/block_placer.json | 80 ++++++++------ .../models/block/block_placer_on.json | 80 ++++++++------ .../anvilcraft/models/item/crab_claw.json | 102 +++++++++++------- .../models/item/crab_claw_holding_block.json | 102 +++++++++++------- .../models/item/crab_claw_holding_item.json | 102 +++++++++++------- .../textures/block/block_placer_claw.png | Bin 236 -> 0 bytes .../anvilcraft/textures/block/crab_claw.png | Bin 0 -> 232 bytes .../textures/block/crab_claw_in.png | Bin 0 -> 224 bytes .../textures/block/crab_claw_movable.png | Bin 0 -> 193 bytes .../textures/block/crab_claw_movable_in.png | Bin 0 -> 185 bytes .../anvilcraft/textures/item/crab_claw.png | Bin 236 -> 232 bytes .../anvilcraft/textures/item/crab_claw_in.png | Bin 0 -> 224 bytes .../textures/item/crab_claw_inventory.png | Bin 261 -> 245 bytes .../textures/item/crab_claw_movable.png | Bin 0 -> 193 bytes .../textures/item/crab_claw_movable_in.png | Bin 0 -> 185 bytes 15 files changed, 287 insertions(+), 179 deletions(-) delete mode 100644 common/src/main/resources/assets/anvilcraft/textures/block/block_placer_claw.png create mode 100644 common/src/main/resources/assets/anvilcraft/textures/block/crab_claw.png create mode 100644 common/src/main/resources/assets/anvilcraft/textures/block/crab_claw_in.png create mode 100644 common/src/main/resources/assets/anvilcraft/textures/block/crab_claw_movable.png create mode 100644 common/src/main/resources/assets/anvilcraft/textures/block/crab_claw_movable_in.png create mode 100644 common/src/main/resources/assets/anvilcraft/textures/item/crab_claw_in.png create mode 100644 common/src/main/resources/assets/anvilcraft/textures/item/crab_claw_movable.png create mode 100644 common/src/main/resources/assets/anvilcraft/textures/item/crab_claw_movable_in.png diff --git a/common/src/main/resources/assets/anvilcraft/models/block/block_placer.json b/common/src/main/resources/assets/anvilcraft/models/block/block_placer.json index 914cf7978..b403b893d 100644 --- a/common/src/main/resources/assets/anvilcraft/models/block/block_placer.json +++ b/common/src/main/resources/assets/anvilcraft/models/block/block_placer.json @@ -5,10 +5,13 @@ "particle": "anvilcraft:block/block_placer_back", "back": "anvilcraft:block/block_placer_back", "bottom": "anvilcraft:block/block_placer_bottom", - "claw": "anvilcraft:block/block_placer_claw", "face": "anvilcraft:block/block_placer_face", "side": "anvilcraft:block/block_placer_side", - "top": "anvilcraft:block/block_placer_top" + "top": "anvilcraft:block/block_placer_top", + "claw1": "anvilcraft:block/crab_claw", + "claw2": "anvilcraft:block/crab_claw_in", + "claw3": "anvilcraft:block/crab_claw_movable", + "claw4": "anvilcraft:block/crab_claw_movable_in" }, "elements": [ { @@ -64,42 +67,57 @@ } }, { - "from": [6.1, 5.1, 0.1], - "to": [9.9, 7, 11], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 9.5]}, + "from": [5, 5, 0], + "to": [11, 11, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 7]}, "faces": { - "north": {"uv": [12, 6, 16, 8], "texture": "#claw"}, - "east": {"uv": [11, 11, 0, 13], "texture": "#claw"}, - "south": {"uv": [12, 14, 16, 16], "texture": "#claw"}, - "west": {"uv": [0, 11, 11, 13], "texture": "#claw"}, - "up": {"uv": [13, 7, 2, 11], "rotation": 270, "texture": "#claw"}, - "down": {"uv": [11, 12, 0, 16], "rotation": 90, "texture": "#claw"} + "north": {"uv": [10, 0, 16, 6], "texture": "#claw1"}, + "east": {"uv": [10, 5, 0, 11], "texture": "#claw1"}, + "south": {"uv": [10, 6, 16, 12], "texture": "#claw1"}, + "west": {"uv": [0, 5, 10, 11], "texture": "#claw1"}, + "up": {"uv": [10, 0, 0, 6], "rotation": 270, "texture": "#claw1"}, + "down": {"uv": [10, 10, 0, 16], "rotation": 90, "texture": "#claw1"} } }, { - "from": [6, 7, 2], - "to": [10, 11, 11], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 9.5]}, + "name": "cube inverted", + "from": [11, 11, 7], + "to": [5, 5, 0], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 7]}, "faces": { - "north": {"uv": [12, 0, 16, 4], "texture": "#claw"}, - "east": {"uv": [11, 3, 2, 7], "texture": "#claw"}, - "south": {"uv": [12, 8, 16, 12], "texture": "#claw"}, - "west": {"uv": [2, 3, 11, 7], "texture": "#claw"}, - "up": {"uv": [11, 0, 2, 4], "rotation": 270, "texture": "#claw"}, - "down": {"uv": [12, 7, 3, 11], "rotation": 90, "texture": "#claw"} + "north": {"uv": [10, 12, 16, 6], "texture": "#claw2"}, + "east": {"uv": [0, 11, 10, 5], "texture": "#claw2"}, + "south": {"uv": [10, 6, 16, 0], "texture": "#claw2"}, + "west": {"uv": [7, 11, 0, 5], "texture": "#claw2"}, + "up": {"uv": [7, 16, 0, 10], "rotation": 90, "texture": "#claw2"}, + "down": {"uv": [7, 6, 0, 0], "rotation": 270, "texture": "#claw2"} } }, { - "from": [6, 5, 0], - "to": [10, 11, 2], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 9.5]}, + "from": [5.5, 5.1, 0.1], + "to": [10.5, 7.1, 7.1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 5.1, 6.1]}, "faces": { - "north": {"uv": [12, 0, 16, 6], "texture": "#claw"}, - "east": {"uv": [2, 3, 0, 9], "texture": "#claw"}, - "south": {"uv": [2, 7, 8, 11], "rotation": 270, "texture": "#claw"}, - "west": {"uv": [0, 3, 2, 9], "texture": "#claw"}, - "up": {"uv": [2, 0, 0, 4], "rotation": 270, "texture": "#claw"}, - "down": {"uv": [2, 12, 0, 16], "rotation": 90, "texture": "#claw"} + "north": {"uv": [7, 0, 12, 2], "texture": "#claw3"}, + "east": {"uv": [7, 5, 0, 7], "texture": "#claw3"}, + "south": {"uv": [7, 5, 12, 7], "texture": "#claw3"}, + "west": {"uv": [0, 5, 7, 7], "texture": "#claw3"}, + "up": {"uv": [0, 0, 7, 5], "rotation": 90, "texture": "#claw3"}, + "down": {"uv": [0, 7, 7, 12], "rotation": 270, "texture": "#claw3"} + } + }, + { + "name": "cube inverted", + "from": [10.5, 7.1, 5.1], + "to": [5.5, 5.1, 0.1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 5.1, 6.1]}, + "faces": { + "north": {"uv": [7, 7, 12, 5], "texture": "#claw4"}, + "east": {"uv": [0, 7, 5, 5], "texture": "#claw4"}, + "south": {"uv": [7, 2, 12, 0], "texture": "#claw4"}, + "west": {"uv": [5, 7, 0, 5], "texture": "#claw4"}, + "up": {"uv": [0, 12, 5, 7], "rotation": 270, "texture": "#claw4"}, + "down": {"uv": [0, 5, 5, 0], "rotation": 90, "texture": "#claw4"} } } ], @@ -112,9 +130,9 @@ }, { "name": "group", - "origin": [5, 4, 8], + "origin": [8, 5.1, 9.1], "color": 0, - "children": [5, 6, 7] + "children": [5, 6, 7, 8] } ] } \ No newline at end of file diff --git a/common/src/main/resources/assets/anvilcraft/models/block/block_placer_on.json b/common/src/main/resources/assets/anvilcraft/models/block/block_placer_on.json index 608539a00..ea86f674b 100644 --- a/common/src/main/resources/assets/anvilcraft/models/block/block_placer_on.json +++ b/common/src/main/resources/assets/anvilcraft/models/block/block_placer_on.json @@ -5,10 +5,13 @@ "particle": "anvilcraft:block/block_placer_back_on", "back": "anvilcraft:block/block_placer_back_on", "bottom": "anvilcraft:block/block_placer_bottom", - "claw": "anvilcraft:block/block_placer_claw", "face": "anvilcraft:block/block_placer_face", "side": "anvilcraft:block/block_placer_side_on", - "top": "anvilcraft:block/block_placer_top_on" + "top": "anvilcraft:block/block_placer_top_on", + "claw1": "anvilcraft:block/crab_claw", + "claw2": "anvilcraft:block/crab_claw_in", + "claw3": "anvilcraft:block/crab_claw_movable", + "claw4": "anvilcraft:block/crab_claw_movable_in" }, "elements": [ { @@ -64,42 +67,57 @@ } }, { - "from": [6.1, 5.1, -2.9], - "to": [9.9, 7, 8], - "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 8, 6]}, + "from": [5, 5, -2], + "to": [11, 11, 8], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 5, 5]}, "faces": { - "north": {"uv": [12, 6, 16, 8], "texture": "#claw"}, - "east": {"uv": [11, 11, 0, 13], "texture": "#claw"}, - "south": {"uv": [12, 14, 16, 16], "texture": "#claw"}, - "west": {"uv": [0, 11, 11, 13], "texture": "#claw"}, - "up": {"uv": [13, 7, 2, 11], "rotation": 270, "texture": "#claw"}, - "down": {"uv": [11, 12, 0, 16], "rotation": 90, "texture": "#claw"} + "north": {"uv": [10, 0, 16, 6], "texture": "#claw1"}, + "east": {"uv": [10, 5, 0, 11], "texture": "#claw1"}, + "south": {"uv": [10, 6, 16, 12], "texture": "#claw1"}, + "west": {"uv": [0, 5, 10, 11], "texture": "#claw1"}, + "up": {"uv": [10, 0, 0, 6], "rotation": 270, "texture": "#claw1"}, + "down": {"uv": [10, 10, 0, 16], "rotation": 90, "texture": "#claw1"} } }, { - "from": [6, 7, -1], - "to": [10, 11, 8], - "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 8, 6]}, + "name": "cube inverted", + "from": [11, 11, 5], + "to": [5, 5, -2], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 5, 5]}, "faces": { - "north": {"uv": [12, 0, 16, 4], "texture": "#claw"}, - "east": {"uv": [11, 3, 2, 7], "texture": "#claw"}, - "south": {"uv": [12, 8, 16, 12], "texture": "#claw"}, - "west": {"uv": [2, 3, 11, 7], "texture": "#claw"}, - "up": {"uv": [11, 0, 2, 4], "rotation": 270, "texture": "#claw"}, - "down": {"uv": [12, 7, 3, 11], "rotation": 90, "texture": "#claw"} + "north": {"uv": [10, 12, 16, 6], "texture": "#claw2"}, + "east": {"uv": [0, 11, 10, 5], "texture": "#claw2"}, + "south": {"uv": [10, 6, 16, 0], "texture": "#claw2"}, + "west": {"uv": [7, 11, 0, 5], "texture": "#claw2"}, + "up": {"uv": [7, 16, 0, 10], "rotation": 90, "texture": "#claw2"}, + "down": {"uv": [7, 6, 0, 0], "rotation": 270, "texture": "#claw2"} } }, { - "from": [6, 5, -3], - "to": [10, 11, -1], - "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 8, 6]}, + "from": [5.5, 5.1, -1.4], + "to": [10.5, 7.1, 5.6], + "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 5.1, 4.1]}, "faces": { - "north": {"uv": [12, 0, 16, 6], "texture": "#claw"}, - "east": {"uv": [2, 3, 0, 9], "texture": "#claw"}, - "south": {"uv": [2, 7, 8, 11], "rotation": 270, "texture": "#claw"}, - "west": {"uv": [0, 3, 2, 9], "texture": "#claw"}, - "up": {"uv": [2, 0, 0, 4], "rotation": 270, "texture": "#claw"}, - "down": {"uv": [2, 12, 0, 16], "rotation": 90, "texture": "#claw"} + "north": {"uv": [7, 0, 12, 2], "texture": "#claw3"}, + "east": {"uv": [7, 5, 0, 7], "texture": "#claw3"}, + "south": {"uv": [7, 5, 12, 7], "texture": "#claw3"}, + "west": {"uv": [0, 5, 7, 7], "texture": "#claw3"}, + "up": {"uv": [0, 0, 7, 5], "rotation": 90, "texture": "#claw3"}, + "down": {"uv": [0, 7, 7, 12], "rotation": 270, "texture": "#claw3"} + } + }, + { + "name": "cube inverted", + "from": [10.5, 7.1, 3.6], + "to": [5.5, 5.1, -1.4], + "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 5.1, 4.1]}, + "faces": { + "north": {"uv": [7, 7, 12, 5], "texture": "#claw4"}, + "east": {"uv": [0, 7, 5, 5], "texture": "#claw4"}, + "south": {"uv": [7, 2, 12, 0], "texture": "#claw4"}, + "west": {"uv": [5, 7, 0, 5], "texture": "#claw4"}, + "up": {"uv": [0, 12, 5, 7], "rotation": 270, "texture": "#claw4"}, + "down": {"uv": [0, 5, 5, 0], "rotation": 90, "texture": "#claw4"} } } ], @@ -112,9 +130,9 @@ }, { "name": "group", - "origin": [5, 4, 8], + "origin": [8, 5.1, 9.1], "color": 0, - "children": [5, 6, 7] + "children": [5, 6, 7, 8] } ] } \ No newline at end of file diff --git a/common/src/main/resources/assets/anvilcraft/models/item/crab_claw.json b/common/src/main/resources/assets/anvilcraft/models/item/crab_claw.json index 92d2da419..ca096c0a8 100644 --- a/common/src/main/resources/assets/anvilcraft/models/item/crab_claw.json +++ b/common/src/main/resources/assets/anvilcraft/models/item/crab_claw.json @@ -2,69 +2,85 @@ "credit": "Made by XeKr with Blockbench", "textures": { "0": "anvilcraft:item/crab_claw", + "1": "anvilcraft:item/crab_claw_in", + "2": "anvilcraft:item/crab_claw_movable", + "3": "anvilcraft:item/crab_claw_movable_in", "particle": "anvilcraft:item/crab_claw" }, "elements": [ { - "from": [6.1, 5.1, 2.6], - "to": [9.9, 7, 13.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 12]}, + "name": "cube inverted", + "from": [11, 11, 10], + "to": [5, 5, 3], + "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 10]}, "faces": { - "north": {"uv": [12, 6, 16, 8], "texture": "#0"}, - "east": {"uv": [11, 11, 0, 13], "texture": "#0"}, - "south": {"uv": [12, 14, 16, 16], "texture": "#0"}, - "west": {"uv": [0, 11, 11, 13], "texture": "#0"}, - "up": {"uv": [13, 7, 2, 11], "rotation": 270, "texture": "#0"}, - "down": {"uv": [11, 12, 0, 16], "rotation": 90, "texture": "#0"} + "north": {"uv": [10, 12, 16, 6], "texture": "#1"}, + "east": {"uv": [0, 11, 10, 5], "texture": "#1"}, + "south": {"uv": [10, 6, 16, 0], "texture": "#1"}, + "west": {"uv": [7, 11, 0, 5], "texture": "#1"}, + "up": {"uv": [7, 16, 0, 10], "rotation": 90, "texture": "#1"}, + "down": {"uv": [7, 6, 0, 0], "rotation": 270, "texture": "#1"} } }, { - "from": [6, 7, 4.5], - "to": [10, 11, 13.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 12]}, + "from": [5, 5, 3], + "to": [11, 11, 13], + "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 10]}, "faces": { - "north": {"uv": [12, 0, 16, 4], "texture": "#0"}, - "east": {"uv": [11, 3, 2, 7], "texture": "#0"}, - "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, - "west": {"uv": [2, 3, 11, 7], "texture": "#0"}, - "up": {"uv": [11, 0, 2, 4], "rotation": 270, "texture": "#0"}, - "down": {"uv": [12, 7, 3, 11], "rotation": 90, "texture": "#0"} + "north": {"uv": [10, 0, 16, 6], "texture": "#0"}, + "east": {"uv": [10, 5, 0, 11], "texture": "#0"}, + "south": {"uv": [10, 6, 16, 12], "texture": "#0"}, + "west": {"uv": [0, 5, 10, 11], "texture": "#0"}, + "up": {"uv": [10, 0, 0, 6], "rotation": 270, "texture": "#0"}, + "down": {"uv": [10, 10, 0, 16], "rotation": 90, "texture": "#0"} } }, { - "from": [6, 5, 2.5], - "to": [10, 11, 4.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 12]}, + "from": [5.5, 5.1, 3.1], + "to": [10.5, 7.1, 10.1], + "rotation": {"angle": 0, "axis": "z", "origin": [8, 5.1, 9.1]}, "faces": { - "north": {"uv": [12, 0, 16, 6], "texture": "#0"}, - "east": {"uv": [2, 3, 0, 9], "texture": "#0"}, - "south": {"uv": [2, 7, 8, 11], "rotation": 270, "texture": "#0"}, - "west": {"uv": [0, 3, 2, 9], "texture": "#0"}, - "up": {"uv": [2, 0, 0, 4], "rotation": 270, "texture": "#0"}, - "down": {"uv": [2, 12, 0, 16], "rotation": 90, "texture": "#0"} + "north": {"uv": [7, 0, 12, 2], "texture": "#2"}, + "east": {"uv": [7, 5, 0, 7], "texture": "#2"}, + "south": {"uv": [7, 5, 12, 7], "texture": "#2"}, + "west": {"uv": [0, 5, 7, 7], "texture": "#2"}, + "up": {"uv": [0, 0, 7, 5], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 7, 7, 12], "rotation": 270, "texture": "#2"} + } + }, + { + "name": "cube inverted", + "from": [10.5, 7.1, 8.1], + "to": [5.5, 5.1, 3.1], + "rotation": {"angle": 0, "axis": "z", "origin": [8, 5.1, 9.1]}, + "faces": { + "north": {"uv": [7, 7, 12, 5], "texture": "#3"}, + "east": {"uv": [0, 7, 5, 5], "texture": "#3"}, + "south": {"uv": [7, 2, 12, 0], "texture": "#3"}, + "west": {"uv": [5, 7, 0, 5], "texture": "#3"}, + "up": {"uv": [0, 12, 5, 7], "rotation": 270, "texture": "#3"}, + "down": {"uv": [0, 5, 5, 0], "rotation": 90, "texture": "#3"} } } ], "gui_light": "front", "display": { "thirdperson_righthand": { - "rotation": [30, 0, 0], - "translation": [0, 2.25, -2.25], + "translation": [0, -2, -2], "scale": [0.8, 0.8, 0.8] }, "thirdperson_lefthand": { - "rotation": [30, 0, 0], - "translation": [0, 2.25, -2.25], + "translation": [0, -2, -2], "scale": [0.8, 0.8, 0.8] }, "firstperson_righthand": { - "rotation": [30, 0, 0], - "translation": [1.13, 3.2, 1.13], + "rotation": [30, 0, -20], + "translation": [1.88, 2.7, 1.63], "scale": [0.68, 0.68, 0.68] }, "firstperson_lefthand": { - "rotation": [30, 0, 0], - "translation": [1.13, 3.2, 1.13], + "rotation": [30, 0, -20], + "translation": [1.88, 2.7, 1.63], "scale": [0.68, 0.68, 0.68] }, "ground": { @@ -72,10 +88,12 @@ "scale": [0.5, 0.5, 0.5] }, "gui": { - "rotation": [130.91, 48.6, -139.12] + "rotation": [135, 60, -90], + "translation": [0, 0, 0.75] }, "head": { - "translation": [0, 4.75, -9.25] + "translation": [0, -0.25, -6.5], + "scale": [2, 2, 2] }, "fixed": { "rotation": [0, -90, 0], @@ -85,9 +103,15 @@ "groups": [ { "name": "group", - "origin": [5, 4, 8], + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1] + }, + { + "name": "group", + "origin": [0, 0, 0], "color": 0, - "children": [0, 1, 2] + "children": [2, 3] } ] } \ No newline at end of file diff --git a/common/src/main/resources/assets/anvilcraft/models/item/crab_claw_holding_block.json b/common/src/main/resources/assets/anvilcraft/models/item/crab_claw_holding_block.json index 2a2bce41c..e7011dd03 100644 --- a/common/src/main/resources/assets/anvilcraft/models/item/crab_claw_holding_block.json +++ b/common/src/main/resources/assets/anvilcraft/models/item/crab_claw_holding_block.json @@ -2,69 +2,85 @@ "credit": "Made by XeKr with Blockbench", "textures": { "0": "anvilcraft:item/crab_claw", + "1": "anvilcraft:item/crab_claw_in", + "2": "anvilcraft:item/crab_claw_movable", + "3": "anvilcraft:item/crab_claw_movable_in", "particle": "anvilcraft:item/crab_claw" }, "elements": [ { - "from": [6.1, 5.1, 2.6], - "to": [9.9, 7, 13.5], - "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 8, 11.5]}, + "name": "cube inverted", + "from": [11, 11, 9], + "to": [5, 5, 2], + "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 5, 10]}, "faces": { - "north": {"uv": [12, 6, 16, 8], "texture": "#0"}, - "east": {"uv": [11, 11, 0, 13], "texture": "#0"}, - "south": {"uv": [12, 14, 16, 16], "texture": "#0"}, - "west": {"uv": [0, 11, 11, 13], "texture": "#0"}, - "up": {"uv": [13, 7, 2, 11], "rotation": 270, "texture": "#0"}, - "down": {"uv": [11, 12, 0, 16], "rotation": 90, "texture": "#0"} + "north": {"uv": [10, 12, 16, 6], "texture": "#1"}, + "east": {"uv": [0, 11, 10, 5], "texture": "#1"}, + "south": {"uv": [10, 6, 16, 0], "texture": "#1"}, + "west": {"uv": [7, 11, 0, 5], "texture": "#1"}, + "up": {"uv": [7, 16, 0, 10], "rotation": 90, "texture": "#1"}, + "down": {"uv": [7, 6, 0, 0], "rotation": 270, "texture": "#1"} } }, { - "from": [6, 7, 4.5], - "to": [10, 11, 13.5], - "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 8, 11.5]}, + "from": [5, 5, 2], + "to": [11, 11, 12], + "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 5, 10]}, "faces": { - "north": {"uv": [12, 0, 16, 4], "texture": "#0"}, - "east": {"uv": [11, 3, 2, 7], "texture": "#0"}, - "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, - "west": {"uv": [2, 3, 11, 7], "texture": "#0"}, - "up": {"uv": [11, 0, 2, 4], "rotation": 270, "texture": "#0"}, - "down": {"uv": [12, 7, 3, 11], "rotation": 90, "texture": "#0"} + "north": {"uv": [10, 0, 16, 6], "texture": "#0"}, + "east": {"uv": [10, 5, 0, 11], "texture": "#0"}, + "south": {"uv": [10, 6, 16, 12], "texture": "#0"}, + "west": {"uv": [0, 5, 10, 11], "texture": "#0"}, + "up": {"uv": [10, 0, 0, 6], "rotation": 270, "texture": "#0"}, + "down": {"uv": [10, 10, 0, 16], "rotation": 90, "texture": "#0"} } }, { - "from": [6, 5, 2.5], - "to": [10, 11, 4.5], - "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 8, 11.5]}, + "from": [5.5, 5.1, 3.6], + "to": [10.5, 7.1, 10.6], + "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 5.1, 9.1]}, "faces": { - "north": {"uv": [12, 0, 16, 6], "texture": "#0"}, - "east": {"uv": [2, 3, 0, 9], "texture": "#0"}, - "south": {"uv": [2, 7, 8, 11], "rotation": 270, "texture": "#0"}, - "west": {"uv": [0, 3, 2, 9], "texture": "#0"}, - "up": {"uv": [2, 0, 0, 4], "rotation": 270, "texture": "#0"}, - "down": {"uv": [2, 12, 0, 16], "rotation": 90, "texture": "#0"} + "north": {"uv": [7, 0, 12, 2], "texture": "#2"}, + "east": {"uv": [7, 5, 0, 7], "texture": "#2"}, + "south": {"uv": [7, 5, 12, 7], "texture": "#2"}, + "west": {"uv": [0, 5, 7, 7], "texture": "#2"}, + "up": {"uv": [0, 0, 7, 5], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 7, 7, 12], "rotation": 270, "texture": "#2"} + } + }, + { + "name": "cube inverted", + "from": [10.5, 7.1, 8.6], + "to": [5.5, 5.1, 3.6], + "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 5.1, 9.1]}, + "faces": { + "north": {"uv": [7, 7, 12, 5], "texture": "#3"}, + "east": {"uv": [0, 7, 5, 5], "texture": "#3"}, + "south": {"uv": [7, 2, 12, 0], "texture": "#3"}, + "west": {"uv": [5, 7, 0, 5], "texture": "#3"}, + "up": {"uv": [0, 12, 5, 7], "rotation": 270, "texture": "#3"}, + "down": {"uv": [0, 5, 5, 0], "rotation": 90, "texture": "#3"} } } ], "gui_light": "front", "display": { "thirdperson_righthand": { - "rotation": [30, 0, 0], - "translation": [0, 2.25, -2.25], + "translation": [0, -2, -2], "scale": [0.8, 0.8, 0.8] }, "thirdperson_lefthand": { - "rotation": [30, 0, 0], - "translation": [0, 2.25, -2.25], + "translation": [0, -2, -2], "scale": [0.8, 0.8, 0.8] }, "firstperson_righthand": { - "rotation": [30, 0, 0], - "translation": [1.13, 3.2, 1.13], + "rotation": [30, 0, -20], + "translation": [1.88, 2.7, 1.63], "scale": [0.68, 0.68, 0.68] }, "firstperson_lefthand": { - "rotation": [30, 0, 0], - "translation": [1.13, 3.2, 1.13], + "rotation": [30, 0, -20], + "translation": [1.88, 2.7, 1.63], "scale": [0.68, 0.68, 0.68] }, "ground": { @@ -72,10 +88,12 @@ "scale": [0.5, 0.5, 0.5] }, "gui": { - "rotation": [130.91, 48.6, -139.12] + "rotation": [135, 60, -90], + "translation": [0, 0, 0.75] }, "head": { - "translation": [0, 4.75, -9.25] + "translation": [0, -0.25, -6.5], + "scale": [2, 2, 2] }, "fixed": { "rotation": [0, -90, 0], @@ -85,9 +103,15 @@ "groups": [ { "name": "group", - "origin": [5, 4, 8], + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1] + }, + { + "name": "group", + "origin": [0, 0, 0], "color": 0, - "children": [0, 1, 2] + "children": [2, 3] } ] } \ No newline at end of file diff --git a/common/src/main/resources/assets/anvilcraft/models/item/crab_claw_holding_item.json b/common/src/main/resources/assets/anvilcraft/models/item/crab_claw_holding_item.json index dab6a296d..a41b7039a 100644 --- a/common/src/main/resources/assets/anvilcraft/models/item/crab_claw_holding_item.json +++ b/common/src/main/resources/assets/anvilcraft/models/item/crab_claw_holding_item.json @@ -2,69 +2,85 @@ "credit": "Made by XeKr with Blockbench", "textures": { "0": "anvilcraft:item/crab_claw", + "1": "anvilcraft:item/crab_claw_in", + "2": "anvilcraft:item/crab_claw_movable", + "3": "anvilcraft:item/crab_claw_movable_in", "particle": "anvilcraft:item/crab_claw" }, "elements": [ { - "from": [6.1, 5.1, 2.6], - "to": [9.9, 7, 13.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 11.5]}, + "name": "cube inverted", + "from": [11, 11, 10], + "to": [5, 5, 3], + "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 10]}, "faces": { - "north": {"uv": [12, 6, 16, 8], "texture": "#0"}, - "east": {"uv": [11, 11, 0, 13], "texture": "#0"}, - "south": {"uv": [12, 14, 16, 16], "texture": "#0"}, - "west": {"uv": [0, 11, 11, 13], "texture": "#0"}, - "up": {"uv": [13, 7, 2, 11], "rotation": 270, "texture": "#0"}, - "down": {"uv": [11, 12, 0, 16], "rotation": 90, "texture": "#0"} + "north": {"uv": [10, 12, 16, 6], "texture": "#1"}, + "east": {"uv": [0, 11, 10, 5], "texture": "#1"}, + "south": {"uv": [10, 6, 16, 0], "texture": "#1"}, + "west": {"uv": [7, 11, 0, 5], "texture": "#1"}, + "up": {"uv": [7, 16, 0, 10], "rotation": 90, "texture": "#1"}, + "down": {"uv": [7, 6, 0, 0], "rotation": 270, "texture": "#1"} } }, { - "from": [6, 7, 4.5], - "to": [10, 11, 13.5], - "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 8, 11.5]}, + "from": [5, 5, 3], + "to": [11, 11, 13], + "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 10]}, "faces": { - "north": {"uv": [12, 0, 16, 4], "texture": "#0"}, - "east": {"uv": [11, 3, 2, 7], "texture": "#0"}, - "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, - "west": {"uv": [2, 3, 11, 7], "texture": "#0"}, - "up": {"uv": [11, 0, 2, 4], "rotation": 270, "texture": "#0"}, - "down": {"uv": [12, 7, 3, 11], "rotation": 90, "texture": "#0"} + "north": {"uv": [10, 0, 16, 6], "texture": "#0"}, + "east": {"uv": [10, 5, 0, 11], "texture": "#0"}, + "south": {"uv": [10, 6, 16, 12], "texture": "#0"}, + "west": {"uv": [0, 5, 10, 11], "texture": "#0"}, + "up": {"uv": [10, 0, 0, 6], "rotation": 270, "texture": "#0"}, + "down": {"uv": [10, 10, 0, 16], "rotation": 90, "texture": "#0"} } }, { - "from": [6, 5, 2.5], - "to": [10, 11, 4.5], - "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 8, 11.5]}, + "from": [5.5, 5.1, 3.1], + "to": [10.5, 7.1, 10.1], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 5.1, 9.1]}, "faces": { - "north": {"uv": [12, 0, 16, 6], "texture": "#0"}, - "east": {"uv": [2, 3, 0, 9], "texture": "#0"}, - "south": {"uv": [2, 7, 8, 11], "rotation": 270, "texture": "#0"}, - "west": {"uv": [0, 3, 2, 9], "texture": "#0"}, - "up": {"uv": [2, 0, 0, 4], "rotation": 270, "texture": "#0"}, - "down": {"uv": [2, 12, 0, 16], "rotation": 90, "texture": "#0"} + "north": {"uv": [7, 0, 12, 2], "texture": "#2"}, + "east": {"uv": [7, 5, 0, 7], "texture": "#2"}, + "south": {"uv": [7, 5, 12, 7], "texture": "#2"}, + "west": {"uv": [0, 5, 7, 7], "texture": "#2"}, + "up": {"uv": [0, 0, 7, 5], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 7, 7, 12], "rotation": 270, "texture": "#2"} + } + }, + { + "name": "cube inverted", + "from": [10.5, 7.1, 8.1], + "to": [5.5, 5.1, 3.1], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 5.1, 9.1]}, + "faces": { + "north": {"uv": [7, 7, 12, 5], "texture": "#3"}, + "east": {"uv": [0, 7, 5, 5], "texture": "#3"}, + "south": {"uv": [7, 2, 12, 0], "texture": "#3"}, + "west": {"uv": [5, 7, 0, 5], "texture": "#3"}, + "up": {"uv": [0, 12, 5, 7], "rotation": 270, "texture": "#3"}, + "down": {"uv": [0, 5, 5, 0], "rotation": 90, "texture": "#3"} } } ], "gui_light": "front", "display": { "thirdperson_righthand": { - "rotation": [30, 0, 0], - "translation": [0, 2.25, -2.25], + "translation": [0, -2, -2], "scale": [0.8, 0.8, 0.8] }, "thirdperson_lefthand": { - "rotation": [30, 0, 0], - "translation": [0, 2.25, -2.25], + "translation": [0, -2, -2], "scale": [0.8, 0.8, 0.8] }, "firstperson_righthand": { - "rotation": [30, 11.25, -90], - "translation": [1.13, 3.2, 1.13], + "rotation": [30, 0, -70], + "translation": [1.88, 2.7, 1.63], "scale": [0.68, 0.68, 0.68] }, "firstperson_lefthand": { - "rotation": [30, 11.25, -90], - "translation": [1.13, 3.2, 1.13], + "rotation": [30, 0, -70], + "translation": [1.88, 2.7, 1.63], "scale": [0.68, 0.68, 0.68] }, "ground": { @@ -72,10 +88,12 @@ "scale": [0.5, 0.5, 0.5] }, "gui": { - "rotation": [130.91, 48.6, -139.12] + "rotation": [135, 60, -90], + "translation": [0, 0, 0.75] }, "head": { - "translation": [0, 4.75, -9.25] + "translation": [0, -0.25, -6.5], + "scale": [2, 2, 2] }, "fixed": { "rotation": [0, -90, 0], @@ -85,9 +103,15 @@ "groups": [ { "name": "group", - "origin": [5, 4, 8], + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1] + }, + { + "name": "group", + "origin": [0, 0, 0], "color": 0, - "children": [0, 1, 2] + "children": [2, 3] } ] } \ No newline at end of file diff --git a/common/src/main/resources/assets/anvilcraft/textures/block/block_placer_claw.png b/common/src/main/resources/assets/anvilcraft/textures/block/block_placer_claw.png deleted file mode 100644 index f060b028ecfed010d5183fd4513c63983a60c5d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 236 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!fo=>VS)*ETJMvtg!h7Drtzw7J*ml%*hk)J}h%j>1M$^)XJlhYFJTQWdfUtbw35No)z4*}Q$iB}p2AW} diff --git a/common/src/main/resources/assets/anvilcraft/textures/block/crab_claw.png b/common/src/main/resources/assets/anvilcraft/textures/block/crab_claw.png new file mode 100644 index 0000000000000000000000000000000000000000..5f4db165554bc97917c7a476ae83f1a973542c25 GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!fo(Ey(i*ES8I8MczEgB9-X?!7ZP=}wg;Q0B*cCtD!JUJ~RN z{2vS$q`aBkfI?xOE{-7;w@Ug0`3@*>IBQEFr-zn VEdOSxybfpsgQu&X%Q~loCIGvzQh5LX literal 0 HcmV?d00001 diff --git a/common/src/main/resources/assets/anvilcraft/textures/block/crab_claw_in.png b/common/src/main/resources/assets/anvilcraft/textures/block/crab_claw_in.png new file mode 100644 index 0000000000000000000000000000000000000000..565e98b22ac64632a71549576ec39ca8a04e575d GIT binary patch literal 224 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!fop#Yx{*IZqxWHm7z0Ztbw!BBY-ps=RpvQ{9)RubeF{2v4u zHt%1uA1D&!>EaktajU04kney3kJH8nf7jcr(aU~y{zqo*LIJ@gDn^H9vtJ9AE}bCF zePKh$0iTE5dmXs1-hQMZ?Y=DS^u9d|F*ju0S!LeGZ*WTgVO_x@!SG-m^HvG#m`6a< O89ZJ6T-G@yGywqHTS|HW literal 0 HcmV?d00001 diff --git a/common/src/main/resources/assets/anvilcraft/textures/block/crab_claw_movable.png b/common/src/main/resources/assets/anvilcraft/textures/block/crab_claw_movable.png new file mode 100644 index 0000000000000000000000000000000000000000..d5fea7e637526d0493371575f92ec4385828dd2d GIT binary patch literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!foo&cW^*BQ2wtAiEVG=zWx*Dh_k2&7m_g8YL2|Nqb6ptbS~ zkZL22WQ%mvv4FO#myJEmQyi literal 0 HcmV?d00001 diff --git a/common/src/main/resources/assets/anvilcraft/textures/item/crab_claw.png b/common/src/main/resources/assets/anvilcraft/textures/item/crab_claw.png index f060b028ecfed010d5183fd4513c63983a60c5d0..5f4db165554bc97917c7a476ae83f1a973542c25 100644 GIT binary patch delta 167 zcmaFE_=0hQXT4~EPl#)qhR_UK$<@IMcX#*RnVfW|%94SB;m3R@TOh?=666>B9}F0z zyqVpALSddRjv*DdO8Nu&4k&OqYhJkf|HSGOMu#{3>(KuysB7ez=9Y0O@%5=*wH2ED z4&fCItCQA$VQ!mpUd$@w%cg77{t5|8%-MV~Q-OWA!f$4SgOl3on0K>EFr-znEdOSx RybfpugQu&X%Q~loCIJ2@MR5QC delta 171 zcmV;c0960z0qg;gNq-wqOjJdNDj>~PHSD8W)p0!Di9%{17sWm=o-81-H7BgQGROb` z0B1==K~#9!bc{g`#4rd0O%ja%|Kd8NE43?i4uB^RjMdB_a~SM0j>+ZeEexI~(;aIz z&dP8MMeMs diff --git a/common/src/main/resources/assets/anvilcraft/textures/item/crab_claw_in.png b/common/src/main/resources/assets/anvilcraft/textures/item/crab_claw_in.png new file mode 100644 index 0000000000000000000000000000000000000000..017d786fa9a4d7c7226b6729441ab411e56f387c GIT binary patch literal 224 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!fop#Yx{*IZqxWHm7z0Ztbw!BBY-ps=RpvQ{9)RubeF{2v4u zHt%1uA1D&!>EaktajT{;kney2httXpzvC-?cAvSC@+Tu+pi4n@qToH74>qA0O?PfI zOk2vfPGsK&=AMAPx_z4pQ?s^RdCK_U(90WH3Dy4{etgeZ$ePE<#&Exbd0D{R(lnsy N44$rjF6*2UngC$RP6Yq} literal 0 HcmV?d00001 diff --git a/common/src/main/resources/assets/anvilcraft/textures/item/crab_claw_inventory.png b/common/src/main/resources/assets/anvilcraft/textures/item/crab_claw_inventory.png index 170785a12360971f220ef204ca55e07ce81429ad..3c68eba765a4cb75a1ec3d7803e2a1b536ded499 100644 GIT binary patch delta 180 zcmZo=`pP)LvtByDC&cyc?p_xu!PUVEGi)XAOisE}WtpcUts}t6z`)>L^`II^ah3%6 z1^F{cMoQp3^%v>9&04PvgHDalvDT*6G)lsWzJ?{NWCN bC6>Uj$dm2Xd~c3kpgjzpu6{1-oD!M<10_dv delta 196 zcmey$*vd4)vtA{@C&cw^nCZ_w4gYU#eX}^KO-o^;srtQ6r>liFNA2|I=_q6=h%+!S zEa{zc8c6Y!1o;L3M*s$)`{&L9#p69)978H@)ttY}*Py_`nxG?c?&IJ4<~hfugzZ_sv8GvxQ4+c?z`L`wP!42ul?eetzeW)T2k7iX0zj sUEq8X`~0QigKyj?_dlPugGGXY{UYb2r#xj@K)V<`UHx3vIVCg!0E8G?-v9sr diff --git a/common/src/main/resources/assets/anvilcraft/textures/item/crab_claw_movable.png b/common/src/main/resources/assets/anvilcraft/textures/item/crab_claw_movable.png new file mode 100644 index 0000000000000000000000000000000000000000..d5fea7e637526d0493371575f92ec4385828dd2d GIT binary patch literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!foo&cW^*BQ2wtAiEVG=zWx*Dh_k2&7m_g8YL2|Nqb6ptbS~ zkZL22WQ%mvv4FO#myJEmQyi literal 0 HcmV?d00001