From 59e9a76e49c878d7a55ac557edaa41e803dd3471 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Mon, 9 Mar 2020 17:46:04 +0100 Subject: [PATCH] Special Tool Tiers - Added Blazing, Shadow Steel and Gilded Rose Quartz tools with individual traits --- .../java/com/simibubi/create/AllItems.java | 24 ++++ .../java/com/simibubi/create/AllPackets.java | 4 +- .../foundation/item/AbstractToolItem.java | 116 ++++++++++++--- .../create/foundation/item/TooltipHelper.java | 17 ++- .../mixer/MechanicalMixerTileEntity.java | 17 +-- .../curiosities/tools/AllToolTiers.java | 20 +-- .../curiosities/tools/BlazingToolItem.java | 46 +++--- .../curiosities/tools/RoseQuartzToolItem.java | 15 ++ .../tools/ShadowSteelToolItem.java | 19 ++- .../modules/curiosities/tools/ToolEvents.java | 136 ++++++++++++++++++ .../resources/assets/create/lang/en_us.json | 12 +- .../create/models/item/rose_quartz_axe.json | 2 +- .../models/item/rose_quartz_pickaxe.json | 2 +- .../models/item/rose_quartz_shovel.json | 2 +- .../create/models/item/rose_quartz_sword.json | 2 +- .../create/models/item/rose_quartz_tool.json | 15 ++ .../create/models/item/zinc_handle.json | 6 + .../create/textures/item/rose_quartz_axe.png | Bin 479 -> 498 bytes .../textures/item/rose_quartz_pickaxe.png | Bin 527 -> 514 bytes .../textures/item/rose_quartz_shovel.png | Bin 489 -> 494 bytes .../textures/item/rose_quartz_sword.png | Bin 508 -> 503 bytes .../create/textures/item/tool_handle.png | Bin 0 -> 321 bytes .../curiosities/shadow_steel_mattock.json | 26 ++++ .../curiosities/shadow_steel_pickaxe.json | 26 ++++ .../curiosities/shadow_steel_sword.json | 26 ++++ .../recipes/crafting_shaped/zinc_handle.json | 16 +++ .../mechanical_crafting/rose_quartz_axe.json | 33 +++++ .../rose_quartz_pickaxe.json | 33 +++++ .../rose_quartz_shovel.json | 33 +++++ .../rose_quartz_sword.json | 33 +++++ .../create/recipes/mixing/blazing_axe.json | 29 ++++ .../recipes/mixing/blazing_pickaxe.json | 29 ++++ .../create/recipes/mixing/blazing_shovel.json | 29 ++++ .../create/recipes/mixing/blazing_sword.json | 29 ++++ 34 files changed, 725 insertions(+), 72 deletions(-) create mode 100644 src/main/java/com/simibubi/create/modules/curiosities/tools/ToolEvents.java create mode 100644 src/main/resources/assets/create/models/item/rose_quartz_tool.json create mode 100644 src/main/resources/assets/create/models/item/zinc_handle.json create mode 100644 src/main/resources/assets/create/textures/item/tool_handle.png create mode 100644 src/main/resources/data/create/recipes/crafting_shaped/curiosities/shadow_steel_mattock.json create mode 100644 src/main/resources/data/create/recipes/crafting_shaped/curiosities/shadow_steel_pickaxe.json create mode 100644 src/main/resources/data/create/recipes/crafting_shaped/curiosities/shadow_steel_sword.json create mode 100644 src/main/resources/data/create/recipes/crafting_shaped/zinc_handle.json create mode 100644 src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_axe.json create mode 100644 src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_pickaxe.json create mode 100644 src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_shovel.json create mode 100644 src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_sword.json create mode 100644 src/main/resources/data/create/recipes/mixing/blazing_axe.json create mode 100644 src/main/resources/data/create/recipes/mixing/blazing_pickaxe.json create mode 100644 src/main/resources/data/create/recipes/mixing/blazing_shovel.json create mode 100644 src/main/resources/data/create/recipes/mixing/blazing_sword.json diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index 0e7382866..289cd0cdb 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -1,5 +1,11 @@ package com.simibubi.create; +import static com.simibubi.create.foundation.item.AllToolTypes.AXE; +import static com.simibubi.create.foundation.item.AllToolTypes.HOE; +import static com.simibubi.create.foundation.item.AllToolTypes.PICKAXE; +import static com.simibubi.create.foundation.item.AllToolTypes.SHOVEL; +import static com.simibubi.create.foundation.item.AllToolTypes.SWORD; + import java.util.function.Function; import com.simibubi.create.foundation.item.IHaveCustomItemModel; @@ -15,7 +21,10 @@ import com.simibubi.create.modules.curiosities.RefinedRadianceItem; import com.simibubi.create.modules.curiosities.ShadowSteelItem; import com.simibubi.create.modules.curiosities.deforester.DeforesterItem; import com.simibubi.create.modules.curiosities.symmetry.SymmetryWandItem; +import com.simibubi.create.modules.curiosities.tools.BlazingToolItem; +import com.simibubi.create.modules.curiosities.tools.RoseQuartzToolItem; import com.simibubi.create.modules.curiosities.tools.SandPaperItem; +import com.simibubi.create.modules.curiosities.tools.ShadowSteelToolItem; import com.simibubi.create.modules.curiosities.zapper.blockzapper.BlockzapperItem; import com.simibubi.create.modules.curiosities.zapper.terrainzapper.TerrainzapperItem; import com.simibubi.create.modules.gardens.TreeFertilizerItem; @@ -86,6 +95,7 @@ public enum AllItems { WHISK, BRASS_HAND, SLOT_COVER, + ZINC_HANDLE, WRENCH(WrenchItem::new), GOGGLES(GogglesItem::new), @@ -100,6 +110,20 @@ public enum AllItems { DEFORESTER(DeforesterItem::new), SYMMETRY_WAND(SymmetryWandItem::new), + BLAZING_PICKAXE(p -> new BlazingToolItem(1, -2.8F, p, PICKAXE)), + BLAZING_SHOVEL(p -> new BlazingToolItem(1.5F, -3.0F, p, SHOVEL)), + BLAZING_AXE(p -> new BlazingToolItem(5.0F, -3.0F, p, AXE)), + BLAZING_SWORD(p -> new BlazingToolItem(3, -2.4F, p, SWORD)), + + ROSE_QUARTZ_PICKAXE(p -> new RoseQuartzToolItem(1, -2.8F, p, PICKAXE)), + ROSE_QUARTZ_SHOVEL(p -> new RoseQuartzToolItem(1.5F, -3.0F, p, SHOVEL)), + ROSE_QUARTZ_AXE(p -> new RoseQuartzToolItem(5.0F, -3.0F, p, AXE)), + ROSE_QUARTZ_SWORD(p -> new RoseQuartzToolItem(3, -2.4F, p, SWORD)), + + SHADOW_STEEL_PICKAXE(p -> new ShadowSteelToolItem(2.5F, -2.0F, p, PICKAXE)), + SHADOW_STEEL_MATTOCK(p -> new ShadowSteelToolItem(2.5F, -1.5F, p, SHOVEL, AXE, HOE)), + SHADOW_STEEL_SWORD(p -> new ShadowSteelToolItem(3, -2.0F, p, SWORD)), + ; private static class CategoryTracker { diff --git a/src/main/java/com/simibubi/create/AllPackets.java b/src/main/java/com/simibubi/create/AllPackets.java index 5e9173724..7ddc8c3c4 100644 --- a/src/main/java/com/simibubi/create/AllPackets.java +++ b/src/main/java/com/simibubi/create/AllPackets.java @@ -7,6 +7,7 @@ import java.util.function.Supplier; import com.simibubi.create.foundation.behaviour.filtering.FilteringCountUpdatePacket; import com.simibubi.create.foundation.behaviour.scrollvalue.ScrollValueUpdatePacket; import com.simibubi.create.foundation.command.ConfigureConfigPacket; +import com.simibubi.create.foundation.item.AbstractToolItem; import com.simibubi.create.foundation.packet.NbtPacket; import com.simibubi.create.foundation.packet.SimplePacketBase; import com.simibubi.create.foundation.utility.ServerSpeedProvider; @@ -45,7 +46,8 @@ public enum AllPackets { BEAM_EFFECT(ZapperBeamPacket.class, ZapperBeamPacket::new), CONFIGURE_CONFIG(ConfigureConfigPacket.class, ConfigureConfigPacket::new), CONTRAPTION_STALL(ContraptionStallPacket.class, ContraptionStallPacket::new), - + TOOL_HARVEST(AbstractToolItem.HarvestPacket.class, AbstractToolItem.HarvestPacket::new), + ; public static final ResourceLocation CHANNEL_NAME = new ResourceLocation(Create.ID, "network"); diff --git a/src/main/java/com/simibubi/create/foundation/item/AbstractToolItem.java b/src/main/java/com/simibubi/create/foundation/item/AbstractToolItem.java index 49dff47b6..51f3ffd55 100644 --- a/src/main/java/com/simibubi/create/foundation/item/AbstractToolItem.java +++ b/src/main/java/com/simibubi/create/foundation/item/AbstractToolItem.java @@ -8,24 +8,33 @@ import static com.simibubi.create.foundation.item.AllToolTypes.SWORD; import java.util.Collections; import java.util.List; +import java.util.function.Supplier; +import com.simibubi.create.foundation.packet.SimplePacketBase; + +import net.minecraft.block.Block; import net.minecraft.block.BlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.world.ClientWorld; +import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.IItemTier; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemUseContext; import net.minecraft.item.Items; import net.minecraft.item.ToolItem; +import net.minecraft.nbt.NBTUtil; +import net.minecraft.network.PacketBuffer; import net.minecraft.util.ActionResultType; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IWorld; import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.ToolType; -import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.common.Mod.EventBusSubscriber; +import net.minecraftforge.fml.DistExecutor; +import net.minecraftforge.fml.network.NetworkEvent.Context; -@EventBusSubscriber public abstract class AbstractToolItem extends ToolItem { protected AllToolTypes[] toolTypes; @@ -36,6 +45,37 @@ public abstract class AbstractToolItem extends ToolItem { toolTypes = types; } + @Override + public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) { + boolean canEnchant = super.canApplyAtEnchantingTable(stack, enchantment); + for (AllToolTypes type : toolTypes) { + switch (type) { + case AXE: + canEnchant |= enchantment.canApply(new ItemStack(Items.DIAMOND_AXE)); + break; + case HOE: + canEnchant |= enchantment.canApply(new ItemStack(Items.DIAMOND_HOE)); + break; + case PICKAXE: + canEnchant |= enchantment.canApply(new ItemStack(Items.DIAMOND_PICKAXE)); + break; + case SHEARS: + canEnchant |= enchantment.canApply(new ItemStack(Items.SHEARS)); + break; + case SHOVEL: + canEnchant |= enchantment.canApply(new ItemStack(Items.DIAMOND_SHOVEL)); + break; + case SWORD: + canEnchant |= enchantment.canApply(new ItemStack(Items.DIAMOND_SWORD)); + break; + default: + break; + } + } + + return canEnchant; + } + private static Properties setToolTypes(Properties builder, IItemTier tier, AllToolTypes... types) { for (AllToolTypes type : types) { if (type == PICKAXE) @@ -66,13 +106,13 @@ public abstract class AbstractToolItem extends ToolItem { @Override public boolean canHarvestBlock(ItemStack stack, BlockState state) { - return super.canHarvestBlock(stack, state) + return super.canHarvestBlock(stack, state) || getToolTypes(stack).contains(state.getHarvestTool()) || hasType(SWORD) && Items.WOODEN_SWORD.canHarvestBlock(stack, state); } @Override public boolean canPlayerBreakBlockWhileHolding(BlockState state, World worldIn, BlockPos pos, PlayerEntity player) { - return hasType(SWORD) && !player.isCreative(); + return !(hasType(SWORD) && !player.isCreative()); } @Override @@ -82,22 +122,60 @@ public abstract class AbstractToolItem extends ToolItem { return super.getDestroySpeed(stack, state); } - @SubscribeEvent - public static void onHarvestDrops(HarvestDropsEvent event) { - PlayerEntity harvester = event.getHarvester(); - if (harvester == null) - return; - - ItemStack tool = harvester.getHeldItemMainhand(); - if (tool.isEmpty() || !(tool.getItem() instanceof AbstractToolItem)) - return; - - if (event.getDrops() != null) - ((AbstractToolItem) tool.getItem()).modifyDrops(event.getDrops(), event.getWorld(), event.getPos(), tool, - event.getState()); + public boolean modifiesDrops() { + return false; } public void modifyDrops(final List drops, IWorld world, BlockPos pos, ItemStack tool, BlockState state) { } + public void spawnParticles(IWorld world, BlockPos pos, ItemStack tool, BlockState state) { + } + + public static class HarvestPacket extends SimplePacketBase { + + private BlockState state; + private ItemStack stack; + private BlockPos pos; + private boolean self; + + public HarvestPacket(BlockState state, ItemStack stack, BlockPos pos, boolean self) { + this.state = state; + this.stack = stack; + this.pos = pos; + this.self = self; + } + + public HarvestPacket(PacketBuffer buffer) { + state = NBTUtil.readBlockState(buffer.readCompoundTag()); + stack = buffer.readItemStack(); + pos = buffer.readBlockPos(); + self = buffer.readBoolean(); + } + + @Override + public void write(PacketBuffer buffer) { + buffer.writeCompoundTag(NBTUtil.writeBlockState(state)); + buffer.writeItemStack(stack); + buffer.writeBlockPos(pos); + buffer.writeBoolean(self); + } + + @Override + public void handle(Supplier context) { + context.get().enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> this.spawnParticles(self))); + context.get().setPacketHandled(true); + } + + @OnlyIn(Dist.CLIENT) + void spawnParticles(boolean self) { + if (!(stack.getItem() instanceof AbstractToolItem)) + return; + ClientWorld world = Minecraft.getInstance().world; + if (!self) + world.playEvent(2001, pos, Block.getStateId(state)); + ((AbstractToolItem) stack.getItem()).spawnParticles(world, pos, stack, state); + } + } + } diff --git a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java index 14882f5ba..0aba2552b 100644 --- a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java +++ b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java @@ -14,6 +14,7 @@ import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.modules.IModule; import com.simibubi.create.modules.contraptions.base.IRotate; import com.simibubi.create.modules.contraptions.components.flywheel.engine.EngineBlock; +import com.simibubi.create.modules.curiosities.tools.AllToolTiers; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.I18n; @@ -85,13 +86,14 @@ public class TooltipHelper { public static boolean hasTooltip(ItemStack stack) { checkLocale(); - - boolean hasGlasses = AllItems.GOGGLES.typeOf(Minecraft.getInstance().player.getItemStackFromSlot(EquipmentSlotType.HEAD)); + + boolean hasGlasses = + AllItems.GOGGLES.typeOf(Minecraft.getInstance().player.getItemStackFromSlot(EquipmentSlotType.HEAD)); if (hasGlasses != gogglesMode) { gogglesMode = hasGlasses; cachedTooltips.clear(); } - + String key = getTooltipTranslationKey(stack); if (cachedTooltips.containsKey(key)) return cachedTooltips.get(key) != ItemDescription.MISSING; @@ -161,6 +163,15 @@ public class TooltipHelper { } public static String getTooltipTranslationKey(ItemStack stack) { + + if (stack.getItem() instanceof AbstractToolItem) { + AbstractToolItem abstractToolItem = (AbstractToolItem) stack.getItem(); + if (abstractToolItem.getTier() instanceof AllToolTiers) { + AllToolTiers allToolTiers = (AllToolTiers) abstractToolItem.getTier(); + return "tool.create." + Lang.asId(allToolTiers.name()) + ".tooltip"; + } + } + return stack.getItem().getTranslationKey(stack) + ".tooltip"; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerTileEntity.java index beaea8308..b873da005 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerTileEntity.java @@ -49,13 +49,13 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity { super.addBehaviours(behaviours); CenteredSideValueBoxTransform slot = new CenteredSideValueBoxTransform((state, direction) -> direction.getAxis().isHorizontal()) { - - @Override - protected Vec3d getSouthLocation() { - return super.getSouthLocation().add(0, 4/16f, 0); - } - - }; + + @Override + protected Vec3d getSouthLocation() { + return super.getSouthLocation().add(0, 4 / 16f, 0); + } + + }; minIngredients = new ScrollValueBehaviour(Lang.translate("mechanical_mixer.min_ingredients"), this, slot); minIngredients.between(1, 9); minIngredients.withCallback(i -> checkBasin = true); @@ -191,7 +191,8 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity { return false; NonNullList ingredients = recipe.getIngredients(); - if (!ingredients.stream().allMatch(Ingredient::isSimple)) + if (!ingredients.stream() + .allMatch(ingredient -> (ingredient.isSimple() || ingredient.getMatchingStacks().length == 1))) return false; List remaining = new ArrayList<>(); diff --git a/src/main/java/com/simibubi/create/modules/curiosities/tools/AllToolTiers.java b/src/main/java/com/simibubi/create/modules/curiosities/tools/AllToolTiers.java index e0189ab3b..e3b58ed86 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/tools/AllToolTiers.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/tools/AllToolTiers.java @@ -11,7 +11,7 @@ import net.minecraft.util.LazyLoadBase; public enum AllToolTiers implements IItemTier { - BLAZING(3, 750, 10.0F, 2.5F, 16, () -> { + BLAZING(3, 450, 10.0F, 2.5F, 16, () -> { return Ingredient.fromItems(Items.BLAZE_ROD); }), @@ -19,7 +19,7 @@ public enum AllToolTiers implements IItemTier { return Ingredient.fromItems(AllItems.POLISHED_ROSE_QUARTZ.get()); }), - SHADOW_STEEL(4, 2303, 16.0F, 3.5F, 10, () -> { + SHADOW_STEEL(4, 2303, 28.0F, 3.5F, 10, () -> { return Ingredient.fromItems(AllItems.SHADOW_STEEL.get()); }), @@ -29,22 +29,6 @@ public enum AllToolTiers implements IItemTier { ; - /* used to belong to AllItems. Banished here until harvest events exist */ - -// BLAZING_PICKAXE(new BlazingToolItem(1, -2.8F, standardProperties(), PICKAXE)), -// BLAZING_SHOVEL(new BlazingToolItem(1.5F, -3.0F, standardProperties(), SHOVEL)), -// BLAZING_AXE(new BlazingToolItem(5.0F, -3.0F, standardProperties(), AXE)), -// BLAZING_SWORD(new BlazingToolItem(3, -2.4F, standardProperties(), SWORD)), -// -// ROSE_QUARTZ_PICKAXE(new RoseQuartzToolItem(1, -2.8F, standardProperties(), PICKAXE)), -// ROSE_QUARTZ_SHOVEL(new RoseQuartzToolItem(1.5F, -3.0F, standardProperties(), SHOVEL)), -// ROSE_QUARTZ_AXE(new RoseQuartzToolItem(5.0F, -3.0F, standardProperties(), AXE)), -// ROSE_QUARTZ_SWORD(new RoseQuartzToolItem(3, -2.4F, standardProperties(), SWORD)), -// -// SHADOW_STEEL_PICKAXE(new ShadowSteelToolItem(2.5F, -2.0F, standardProperties(), PICKAXE)), -// SHADOW_STEEL_MATTOCK(new ShadowSteelToolItem(2.5F, -1.5F, standardProperties(), SHOVEL, AXE, HOE)), -// SHADOW_STEEL_SWORD(new ShadowSteelToolItem(3, -2.0F, standardProperties(), SWORD)), - private final int harvestLevel; private final int maxUses; private final float efficiency; diff --git a/src/main/java/com/simibubi/create/modules/curiosities/tools/BlazingToolItem.java b/src/main/java/com/simibubi/create/modules/curiosities/tools/BlazingToolItem.java index 9a43c328f..0895ab89c 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/tools/BlazingToolItem.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/tools/BlazingToolItem.java @@ -11,15 +11,16 @@ import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.enchantment.Enchantments; import net.minecraft.entity.LivingEntity; +import net.minecraft.item.BlockItem; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipe; import net.minecraft.item.crafting.IRecipeType; import net.minecraft.item.crafting.RecipeManager; import net.minecraft.particles.ParticleTypes; import net.minecraft.tileentity.FurnaceTileEntity; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.SoundEvents; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.world.IWorld; @@ -56,39 +57,52 @@ public class BlazingToolItem extends AbstractToolItem { return world.getDimension().getType() != DimensionType.THE_NETHER; } + @Override + public boolean modifiesDrops() { + return true; + } + @Override public void modifyDrops(List drops, IWorld world, BlockPos pos, ItemStack tool, BlockState state) { super.modifyDrops(drops, world, pos, tool, state); World worldIn = world.getWorld(); helperFurnace.setWorld(worldIn); + RecipeManager recipeManager = worldIn.getRecipeManager(); - + int enchantmentLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, tool); List smeltedStacks = new ArrayList<>(); Iterator dropper = drops.iterator(); while (dropper.hasNext()) { ItemStack stack = dropper.next(); helperFurnace.setInventorySlotContents(0, stack); - Optional smeltingRecipe = recipeManager.getRecipe(IRecipeType.SMELTING, helperFurnace, - worldIn); + Optional smeltingRecipe = + recipeManager.getRecipe(IRecipeType.SMELTING, helperFurnace, worldIn); if (!smeltingRecipe.isPresent()) continue; - dropper.remove(); ItemStack out = smeltingRecipe.get().getRecipeOutput().copy(); - smeltedStacks.addAll(ItemHelper.multipliedOutput(stack, out)); - } - if (world.isRemote() && !smeltedStacks.isEmpty()) { - for (int i = 0; i < 10; i++) { - Vec3d flamePos = VecHelper.offsetRandomly(VecHelper.getCenterOf(pos), world.getRandom(), .45f); - Vec3d smokePos = VecHelper.offsetRandomly(VecHelper.getCenterOf(pos), world.getRandom(), .45f); - world.addParticle(ParticleTypes.FLAME, flamePos.getX(), flamePos.getY(), flamePos.getZ(), 0, .1f, 0); - world.addParticle(ParticleTypes.SMOKE, smokePos.getX(), smokePos.getY(), smokePos.getZ(), 0, .1f, 0); - } - world.playSound(null, pos, SoundEvents.ENTITY_GENERIC_EXTINGUISH_FIRE, SoundCategory.BLOCKS, .5f, .1f); + float modifier = 1; + if (stack.getItem() instanceof BlockItem && !(out.getItem() instanceof BlockItem)) + modifier += world.getRandom().nextFloat() * enchantmentLevel; + + out.setCount((int) (out.getCount() * modifier + .4f)); + smeltedStacks.addAll(ItemHelper.multipliedOutput(stack, out)); } drops.addAll(smeltedStacks); } + @Override + public void spawnParticles(IWorld world, BlockPos pos, ItemStack tool, BlockState state) { + if (!canHarvestBlock(tool, state)) + return; + for (int i = 0; i < 10; i++) { + Vec3d flamePos = VecHelper.offsetRandomly(VecHelper.getCenterOf(pos), world.getRandom(), .45f); + Vec3d smokePos = VecHelper.offsetRandomly(VecHelper.getCenterOf(pos), world.getRandom(), .45f); + world.addParticle(ParticleTypes.FLAME, flamePos.getX(), flamePos.getY(), flamePos.getZ(), 0, .01f, 0); + world.addParticle(ParticleTypes.SMOKE, smokePos.getX(), smokePos.getY(), smokePos.getZ(), 0, .1f, 0); + } + } + } diff --git a/src/main/java/com/simibubi/create/modules/curiosities/tools/RoseQuartzToolItem.java b/src/main/java/com/simibubi/create/modules/curiosities/tools/RoseQuartzToolItem.java index ca88e0026..6f88cef83 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/tools/RoseQuartzToolItem.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/tools/RoseQuartzToolItem.java @@ -1,12 +1,27 @@ package com.simibubi.create.modules.curiosities.tools; +import java.util.UUID; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; import com.simibubi.create.foundation.item.AbstractToolItem; import com.simibubi.create.foundation.item.AllToolTypes; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.player.PlayerEntity; + public class RoseQuartzToolItem extends AbstractToolItem { + static Multimap rangeModifier; + static final UUID attributeId = UUID.fromString("7f7dbdb2-0d0d-458a-aa40-ac7633691f66"); + public RoseQuartzToolItem(float attackDamageIn, float attackSpeedIn, Properties builder, AllToolTypes... types) { super(attackDamageIn, attackSpeedIn, AllToolTiers.ROSE_QUARTZ, builder, types); + if (rangeModifier == null) { + rangeModifier = HashMultimap.create(); + rangeModifier.put(PlayerEntity.REACH_DISTANCE.getName(), + new AttributeModifier(attributeId, "Range modifier", 3, AttributeModifier.Operation.ADDITION)); + } } } diff --git a/src/main/java/com/simibubi/create/modules/curiosities/tools/ShadowSteelToolItem.java b/src/main/java/com/simibubi/create/modules/curiosities/tools/ShadowSteelToolItem.java index 78aecf55e..66926d92b 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/tools/ShadowSteelToolItem.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/tools/ShadowSteelToolItem.java @@ -4,22 +4,37 @@ import java.util.List; import com.simibubi.create.foundation.item.AbstractToolItem; import com.simibubi.create.foundation.item.AllToolTypes; +import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; import net.minecraft.item.ItemStack; +import net.minecraft.particles.ParticleTypes; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3d; import net.minecraft.world.IWorld; public class ShadowSteelToolItem extends AbstractToolItem { - public ShadowSteelToolItem(float attackDamageIn, float attackSpeedIn, Properties builder, - AllToolTypes... types) { + public ShadowSteelToolItem(float attackDamageIn, float attackSpeedIn, Properties builder, AllToolTypes... types) { super(attackDamageIn, attackSpeedIn, AllToolTiers.SHADOW_STEEL, builder, types); } + @Override + public boolean modifiesDrops() { + return true; + } + @Override public void modifyDrops(List drops, IWorld world, BlockPos pos, ItemStack tool, BlockState state) { drops.clear(); } + @Override + public void spawnParticles(IWorld world, BlockPos pos, ItemStack tool, BlockState state) { + if (!canHarvestBlock(tool, state)) + return; + Vec3d smokePos = VecHelper.offsetRandomly(VecHelper.getCenterOf(pos), world.getRandom(), .15f); + world.addParticle(ParticleTypes.SMOKE, smokePos.getX(), smokePos.getY(), smokePos.getZ(), 0, .01f, 0); + } + } diff --git a/src/main/java/com/simibubi/create/modules/curiosities/tools/ToolEvents.java b/src/main/java/com/simibubi/create/modules/curiosities/tools/ToolEvents.java new file mode 100644 index 000000000..c492d9065 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/curiosities/tools/ToolEvents.java @@ -0,0 +1,136 @@ +package com.simibubi.create.modules.curiosities.tools; + +import java.util.List; + +import com.simibubi.create.AllPackets; +import com.simibubi.create.foundation.item.AbstractToolItem; +import com.simibubi.create.foundation.item.AbstractToolItem.HarvestPacket; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.enchantment.Enchantments; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.EntityDamageSource; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IWorld; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import net.minecraft.world.storage.loot.LootContext.Builder; +import net.minecraft.world.storage.loot.LootParameters; +import net.minecraftforge.event.entity.living.LivingDropsEvent; +import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; +import net.minecraftforge.event.entity.living.LivingExperienceDropEvent; +import net.minecraftforge.event.world.BlockEvent; +import net.minecraftforge.eventbus.api.Event.Result; +import net.minecraftforge.eventbus.api.EventPriority; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod.EventBusSubscriber; +import net.minecraftforge.fml.network.PacketDistributor; + +@EventBusSubscriber +public class ToolEvents { + + @SubscribeEvent(priority = EventPriority.LOWEST) + public static void toolsCanModifyBlockDrops(BlockEvent.BreakEvent event) { + if (event.isCanceled()) + return; + PlayerEntity player = event.getPlayer(); + ItemStack held = player.getHeldItemMainhand(); + if (player.isCreative()) + return; + if (!(held.getItem() instanceof AbstractToolItem)) + return; + AbstractToolItem tool = (AbstractToolItem) held.getItem(); + if (!tool.modifiesDrops()) + return; + BlockState state = event.getState(); + if (!tool.canHarvestBlock(held, state)) + return; + + IWorld world = event.getWorld(); + BlockPos pos = event.getPos(); + boolean onServer = !world.isRemote(); + + if (!onServer) { + tool.spawnParticles(world, pos, held, state); + return; + } + + World actualWorld = world.getWorld(); + if (!(actualWorld instanceof ServerWorld)) + return; + + List drops = state.getDrops(new Builder((ServerWorld) actualWorld) + .withRandom(actualWorld.getRandom()).withParameter(LootParameters.POSITION, pos) + .withParameter(LootParameters.TOOL, held).withParameter(LootParameters.THIS_ENTITY, player) + .withNullableParameter(LootParameters.BLOCK_ENTITY, world.getTileEntity(pos))); + + tool.modifyDrops(drops, world, pos, held, state); + tool.onBlockDestroyed(held, actualWorld, state, pos, player); + world.setBlockState(pos, Blocks.AIR.getDefaultState(), 3); + for (ItemStack dropped : drops) + Block.spawnAsEntity(actualWorld, pos, dropped); + + AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> player), + new HarvestPacket(state, held, pos, false)); + AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) player), + new HarvestPacket(state, held, pos, true)); + event.setResult(Result.DENY); + } + + @SubscribeEvent + public static void holdingRoseQuartzToolIncreasesRange(LivingUpdateEvent event) { + if (!(event.getEntity() instanceof PlayerEntity)) + return; + if (event.isCanceled()) + return; + + PlayerEntity player = (PlayerEntity) event.getEntityLiving(); + ItemStack heldItemMainhand = player.getHeldItemMainhand(); + String marker = "create_roseQuartzRange"; + CompoundNBT persistentData = player.getPersistentData(); + + if (!(heldItemMainhand.getItem() instanceof RoseQuartzToolItem)) { + if (persistentData.contains(marker)) { + player.getAttributes().removeAttributeModifiers(RoseQuartzToolItem.rangeModifier); + persistentData.remove(marker); + } + return; + } + + if (!persistentData.contains(marker)) { + player.getAttributes().applyAttributeModifiers(RoseQuartzToolItem.rangeModifier); + persistentData.putBoolean(marker, true); + } + } + + @SubscribeEvent + public static void shadowSteelToolsDoNotDropEntityLoot(LivingDropsEvent event) { + if (!(event.getSource() instanceof EntityDamageSource)) + return; + EntityDamageSource source = (EntityDamageSource) event.getSource(); + Entity trueSource = source.getTrueSource(); + if (trueSource != null && trueSource instanceof PlayerEntity) { + PlayerEntity player = (PlayerEntity) trueSource; + if (player.getHeldItemMainhand().getItem() instanceof ShadowSteelToolItem) + event.setCanceled(true); + } + } + + @SubscribeEvent + public static void shadowSteelToolsDropMoreXPonKill(LivingExperienceDropEvent event) { + ItemStack heldItemMainhand = event.getAttackingPlayer().getHeldItemMainhand(); + if (heldItemMainhand.getItem() instanceof ShadowSteelToolItem) { + int level = EnchantmentHelper.getEnchantmentLevel(Enchantments.LOOTING, heldItemMainhand); + float modifier = 1 + event.getEntity().world.getRandom().nextFloat() * level; + event.setDroppedExperience((int) (event.getDroppedExperience() * modifier + .4f)); + } + } + +} diff --git a/src/main/resources/assets/create/lang/en_us.json b/src/main/resources/assets/create/lang/en_us.json index f1e69f91e..c536dc8e9 100644 --- a/src/main/resources/assets/create/lang/en_us.json +++ b/src/main/resources/assets/create/lang/en_us.json @@ -28,6 +28,7 @@ "item.create.whisk": "Whisk", "item.create.brass_hand": "Hand", "item.create.slot_cover": "Crafter Slot Cover", + "item.create.zinc_handle": "Quality Tool Handle", "item.create.flour": "Wheat Flour", "item.create.dough": "Dough", "item.create.wrench": "Wrench", @@ -62,7 +63,7 @@ "item.create.blazing_pickaxe": "Blazing Pickaxe", "item.create.blazing_shovel": "Blazing Shovel", "item.create.blazing_axe": "Blazing Axe", - "item.create.blazing_sword": "Blazing Longsword", + "item.create.blazing_sword": "Blazing Cleaver", "item.create.shadow_steel_pickaxe": "Shadow Steel Pickaxe", "item.create.shadow_steel_mattock": "Shadow Steel Garden Mattock", @@ -1113,6 +1114,15 @@ "item.create.slot_cover.tooltip": "SLOT COVER", "item.create.slot_cover.tooltip.summary": "Used to mark a _Mechanical_ _Crafter_ as an empty slot in a recipe. Crafters do not necessarily have to form a full square grid, this cover find its use when there are recipes where _ingredients_ _are_ _diagonal_ to each other.", + "tool.create.shadow_steel.tooltip": "SHADOW STEEL TOOLS", + "tool.create.shadow_steel.tooltip.summary": "This tool breaks blocks _extremely_ _quick,_ but _shatters_ all of their _drops_ with them. Killed mobs can drop _more_ _experience_ based on the _Looting_ modifier of this tool.", + + "tool.create.blazing.tooltip": "BLAZING TOOLS", + "tool.create.blazing.tooltip.summary": "This tool will _melt_ _broken_ _blocks_ and _ignite_ _attacked_ _mobs._ It will not lose Durability while being used in the _Nether._", + + "tool.create.rose_quartz.tooltip": "ROSE QUARTZ TOOLS", + "tool.create.rose_quartz.tooltip.summary": "This tool grants you a _greater_ _reach_ for _breaking_ _blocks_ or _placing_ _blocks_ from the off-hand.", + "item.create.logistical_controller_calculation.tooltip": "WIP", "item.create.logistical_controller_request.tooltip": "WIP", "item.create.logistical_controller_storage.tooltip": "WIP", diff --git a/src/main/resources/assets/create/models/item/rose_quartz_axe.json b/src/main/resources/assets/create/models/item/rose_quartz_axe.json index 82a26fba6..c3b3aa30f 100644 --- a/src/main/resources/assets/create/models/item/rose_quartz_axe.json +++ b/src/main/resources/assets/create/models/item/rose_quartz_axe.json @@ -1,5 +1,5 @@ { - "parent": "item/handheld", + "parent": "create:item/rose_quartz_tool", "textures": { "layer0": "create:item/rose_quartz_axe" } diff --git a/src/main/resources/assets/create/models/item/rose_quartz_pickaxe.json b/src/main/resources/assets/create/models/item/rose_quartz_pickaxe.json index d93c0dc1f..8d7613cdb 100644 --- a/src/main/resources/assets/create/models/item/rose_quartz_pickaxe.json +++ b/src/main/resources/assets/create/models/item/rose_quartz_pickaxe.json @@ -1,5 +1,5 @@ { - "parent": "item/handheld", + "parent": "create:item/rose_quartz_tool", "textures": { "layer0": "create:item/rose_quartz_pickaxe" } diff --git a/src/main/resources/assets/create/models/item/rose_quartz_shovel.json b/src/main/resources/assets/create/models/item/rose_quartz_shovel.json index cc04346f0..f0104a9c7 100644 --- a/src/main/resources/assets/create/models/item/rose_quartz_shovel.json +++ b/src/main/resources/assets/create/models/item/rose_quartz_shovel.json @@ -1,5 +1,5 @@ { - "parent": "item/handheld", + "parent": "create:item/rose_quartz_tool", "textures": { "layer0": "create:item/rose_quartz_shovel" } diff --git a/src/main/resources/assets/create/models/item/rose_quartz_sword.json b/src/main/resources/assets/create/models/item/rose_quartz_sword.json index ef5739dd6..662c0b608 100644 --- a/src/main/resources/assets/create/models/item/rose_quartz_sword.json +++ b/src/main/resources/assets/create/models/item/rose_quartz_sword.json @@ -1,5 +1,5 @@ { - "parent": "item/handheld", + "parent": "create:item/rose_quartz_tool", "textures": { "layer0": "create:item/rose_quartz_sword" } diff --git a/src/main/resources/assets/create/models/item/rose_quartz_tool.json b/src/main/resources/assets/create/models/item/rose_quartz_tool.json new file mode 100644 index 000000000..0125bcbb4 --- /dev/null +++ b/src/main/resources/assets/create/models/item/rose_quartz_tool.json @@ -0,0 +1,15 @@ +{ + "parent": "item/handheld", + "display": { + "firstperson_righthand": { + "rotation": [ 0, -90, 25 ], + "translation": [ 1.13, 4.2, 1.13 ], + "scale": [ 0.68, 0.68, 0.68 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 90, -25 ], + "translation": [ 1.13, 4.2, 1.13 ], + "scale": [ 0.68, 0.68, 0.68 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/zinc_handle.json b/src/main/resources/assets/create/models/item/zinc_handle.json new file mode 100644 index 000000000..dd8fe372f --- /dev/null +++ b/src/main/resources/assets/create/models/item/zinc_handle.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/tool_handle" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/item/rose_quartz_axe.png b/src/main/resources/assets/create/textures/item/rose_quartz_axe.png index 5231ac672eeb46b5f08160d28f69fe20d0c8bb41..68916ea3a6ef89b2ebf0b0be0771f913727f1be6 100644 GIT binary patch delta 435 zcmV;k0Zjhi1M&lqNq@os01mtkfZ zqy7K?|6mLQAkF`;oVW_ax4~?vJWeBEnnAXJGz6C=USYU>oSotIL-w^tzRPW876;2S zfk`|7s`)ZdGY7-Hi){Z>T;x{o+|Hn>X~A&y>P4t3ECA#JxPPY(4|o101rvrxyy{w8SOS#YR=<-?N~#CSZDn}9Igw#vy~i7nA@DFT zFbIRPAmHCWK?WwK_Y9(<9AMKdEo~W0OVGEtgA0B(Sxp~n9kYD*c)wfvwW#4G{0EoNr^VCVn(#g5nJ3l~;F dSs=i`004V+xbe9!4AB4p002ovPDHLkV1h_t!f5~i delta 416 zcmV;R0bl;|1K$IXNq@rt01m?e$8V@)0004WNkltkfZ zqy7K?|6mLQAkF`8Uc3s#x4~?vJWeBEnnAXJG^7@%USYU@iJjrybN1N>9?2d5Ed-Wl z0+VVa}w8D4KrWLVK0_XcDLJPZsB!k{cv zp#J>C|7hROVD?|{H4N?TlNe5>=)Pg#;rkg;I7OOZ7~GV!09)cSYca#IN>_%;$~*@1 zIhRF1npeJj#D7T806#z1|BU|U7|ON$z2t!IrKEvzRKfr1) zTv!E`g8`f_0BJTgbwSaL4PZ3@X7i*;^>{Ud01K1`gC>*R;P_)S?IdV33}Cnb6xxSM zm5I^}0&oKi4K@DXP+JNQZDIl37Be${u=9WYV#jMUY8fmrFaQ7(%)BY~# z;6OphqM3||iFIJ{t5+{Fuz*FO09|wN_YLnDEIhw4@Cv+R5S4$ayvXEXYrV<^}1gNi^v zef=D;ix^I9=LPYx8UXY2q)GJ*yE#G_K^Q8{3>JfBh+n_h2|63(0#v}j007ds-7?_X{U87U002ovPDHLkV1oHL%=Z8Q delta 464 zcmV;>0Wbc71djxeNq@os01m%YpI#WnIgF@_%445H>UON7#sLJBSTa z1mbT>5d`T2gMa_F{C~Mo6l@?!j?us%3`7$Ietxe1Z_aFHm^AAglx%3|~G8gZMZN06Ck{{~SZPmLF6E0_yAM zfL-+H%t2ldAFBZ{KTn!e&#;>#gb{?HQVhqB9|qH98z1tleEEnGB_V+TNHemZp~7&m zd-o!c*#F%?%^*IC3y^KbrWppHhJXRs1)z`y(Tt{@I7w~B1>i0~4{dDV{P~sOR0_i& zz+`Bs@&AU}QjE~X20*zL8H2@O8RFM3c7o0Zxd0U~FaQ7#ZP+bA6-+y1Lo_K^Vkd6PNz~|CxOkfcVz`9rN$z@k#uVjuwA7FZ>F_rETmC`xk;-@eQPg zpcj&o>cI-;WjoviYGz@0`}!Zlo0s1i9K(O)hgF*4bpZ@$YFaQPO+BCv)XWIf{0pf0 z8%XoSkIxwy4GhAd${^tU`IS%>0+^cz{0|99XIQglCd0|5fD84<{uneirZ9r!u)4s| zFdU3GrwR@I2jSY<31H12L(JP(3(wv+e!jO`Z&+wWf1gsDlz%+vZ zh6_NNL4E{le*FWk5Z!AqfMNj5W{?w+HNyb57y^5t$z(S;L>WyxF>EFT;4XlLHYu7x zfXUEMy1Lo_K^VlIm6r4W|D}@`fcVz`1MBaGi_86yjuwA4C-w@%^&{*I$2Wsq@eQPg zpcj&o>cI-;6?)$UYGz^h@c!Ss*Dt>d*?9ek2+ude>jD_i)U;qo>ffpk)XWIf{0pf0 z8%Xnt7Y`X33=G0hFwF1B*v!oTe^=MG{~#LZ_w%qY0b#5zFfnv;`57*bO58D4XQfE6MGm}U^bZ~;g&$d6#n zuYbT5qI(SnPz-?C400l}W*9hsekGKJ0AMdPnd}CKD5Gg7hRuWk+y$`ECPgy{Fc}(Z y{J){L6eYAt0gRy31!91r2rPmJV1@w$0|4g9*Yb6mz6<~W002n`MNUMnLSTaYlb)FX diff --git a/src/main/resources/assets/create/textures/item/rose_quartz_sword.png b/src/main/resources/assets/create/textures/item/rose_quartz_sword.png index 6973445619f33dedd4181b5cd230708940b59a9f..91e06448e3d125de90a6e3ae0e71f2e2930d8314 100644 GIT binary patch delta 440 zcmV;p0Z0D)1NQ@vNq@os01m|gkw;pUZJU_orQV8c+GFZ}P0zxlu1 z<08m*kT_Pw=opt~5N0qi2m@mfr><`He-MUAf-pYKAPhGEq<`_*v&a9>oO$ry)in;R zh>&IwW&~*lf%E5AGPt?LgQG`AMuEZm?@I)=7KR?(1 z$;lxMlP1+O9OUz55KYPUrw^K$FSt{~&B?>cWtck`ML{SQZM-p8W%5 zVFI`dKz=?{stnis>lZuYnl&@QG{{BhhQa`op`phA8!>82;eJL2Ak82emu3)PG&A!D i$309jK7bhp3=9C5Em=MXnew*)0000=H}a$ z)Qce7LE=~yqhnl}L72h7APkH_oVvQ%|3Mfg3Bvd^gD~6xkblN!&mR9jbLPQ+SJybO zB0`!$m=UBI1kRsd$>8P|4~`xg83hJQ)^`lR0J{hbFwS?cU;fCNyi@O{qy-~L9WsC$ zAS%iMv^fII*0>c7rhQGbZv!=d2WejM;vpkg5Dl04H)N=|3YrY;OADfwXUfMucJ z?Abq17AAnZ0OaRGrOI&4zkabZu30k^OoLp6ZYT^e88#Yf{J){L6z*qa0MZPiacKqt nMl&;iaLB_H;{%vsz`y_i$$MPNI3WNB00000NkvXXu0mjf3*E`l diff --git a/src/main/resources/assets/create/textures/item/tool_handle.png b/src/main/resources/assets/create/textures/item/tool_handle.png new file mode 100644 index 0000000000000000000000000000000000000000..5935582436066030c87477e980982cd2e348be35 GIT binary patch literal 321 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufG}g$wN6f;;5APd#}Etu?xw9UU~6Et>tZ}|gNJE>1j9~- zmWON-Qdt72#vBUiRuxtT=KKuCb$^qNua;y<&|_fS!T5xcjg7(5qwaRDvdMLz4;egN L{an^LB{Ts5saR?x literal 0 HcmV?d00001 diff --git a/src/main/resources/data/create/recipes/crafting_shaped/curiosities/shadow_steel_mattock.json b/src/main/resources/data/create/recipes/crafting_shaped/curiosities/shadow_steel_mattock.json new file mode 100644 index 000000000..2568e2c0d --- /dev/null +++ b/src/main/resources/data/create/recipes/crafting_shaped/curiosities/shadow_steel_mattock.json @@ -0,0 +1,26 @@ +{ + "type": "crafting_shaped", + "pattern": [ + "PPP", + "PS ", + " S " + ], + "key": { + "S": { + "item": "create:zinc_handle" + }, + "P": { + "item": "create:shadow_steel" + } + }, + "result": { + "item": "create:shadow_steel_mattock", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "curiosities" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting_shaped/curiosities/shadow_steel_pickaxe.json b/src/main/resources/data/create/recipes/crafting_shaped/curiosities/shadow_steel_pickaxe.json new file mode 100644 index 000000000..5259d3aaa --- /dev/null +++ b/src/main/resources/data/create/recipes/crafting_shaped/curiosities/shadow_steel_pickaxe.json @@ -0,0 +1,26 @@ +{ + "type": "crafting_shaped", + "pattern": [ + "PPP", + " S ", + " S " + ], + "key": { + "S": { + "item": "create:zinc_handle" + }, + "P": { + "item": "create:shadow_steel" + } + }, + "result": { + "item": "create:shadow_steel_pickaxe", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "curiosities" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting_shaped/curiosities/shadow_steel_sword.json b/src/main/resources/data/create/recipes/crafting_shaped/curiosities/shadow_steel_sword.json new file mode 100644 index 000000000..6892edb88 --- /dev/null +++ b/src/main/resources/data/create/recipes/crafting_shaped/curiosities/shadow_steel_sword.json @@ -0,0 +1,26 @@ +{ + "type": "crafting_shaped", + "pattern": [ + "P", + "P", + "S" + ], + "key": { + "S": { + "item": "create:zinc_handle" + }, + "P": { + "item": "create:shadow_steel" + } + }, + "result": { + "item": "create:shadow_steel_sword", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "curiosities" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting_shaped/zinc_handle.json b/src/main/resources/data/create/recipes/crafting_shaped/zinc_handle.json new file mode 100644 index 000000000..0e91a4679 --- /dev/null +++ b/src/main/resources/data/create/recipes/crafting_shaped/zinc_handle.json @@ -0,0 +1,16 @@ +{ + "type": "crafting_shaped", + "pattern": [ + "Z", + "Z" + ], + "key": { + "Z": { + "tag": "forge:ingots/zinc" + } + }, + "result": { + "item": "create:zinc_handle", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_axe.json b/src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_axe.json new file mode 100644 index 000000000..bca503bbd --- /dev/null +++ b/src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_axe.json @@ -0,0 +1,33 @@ +{ + "type": "create:mechanical_crafting", + "pattern": [ + " C ", + "RGR", + "RZ ", + " Z " + ], + "key": { + "Z": { + "item": "create:zinc_handle" + }, + "R": { + "item": "create:polished_rose_quartz" + }, + "C": { + "tag": "forge:plates/iron" + }, + "G": { + "tag": "forge:ingots/gold" + } + }, + "result": { + "item": "create:rose_quartz_axe", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_pickaxe.json b/src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_pickaxe.json new file mode 100644 index 000000000..f1822388b --- /dev/null +++ b/src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_pickaxe.json @@ -0,0 +1,33 @@ +{ + "type": "create:mechanical_crafting", + "pattern": [ + " C ", + "RGR", + "RZR", + " Z " + ], + "key": { + "Z": { + "item": "create:zinc_handle" + }, + "R": { + "item": "create:polished_rose_quartz" + }, + "C": { + "tag": "forge:plates/iron" + }, + "G": { + "tag": "forge:ingots/gold" + } + }, + "result": { + "item": "create:rose_quartz_pickaxe", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_shovel.json b/src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_shovel.json new file mode 100644 index 000000000..7b7a00a8f --- /dev/null +++ b/src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_shovel.json @@ -0,0 +1,33 @@ +{ + "type": "create:mechanical_crafting", + "pattern": [ + " R ", + "CGC", + " Z ", + " Z " + ], + "key": { + "Z": { + "item": "create:zinc_handle" + }, + "R": { + "item": "create:polished_rose_quartz" + }, + "C": { + "tag": "forge:plates/iron" + }, + "G": { + "tag": "forge:ingots/gold" + } + }, + "result": { + "item": "create:rose_quartz_shovel", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_sword.json b/src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_sword.json new file mode 100644 index 000000000..dbbc82bf8 --- /dev/null +++ b/src/main/resources/data/create/recipes/mechanical_crafting/rose_quartz_sword.json @@ -0,0 +1,33 @@ +{ + "type": "create:mechanical_crafting", + "pattern": [ + " R ", + " R ", + "CGC", + " Z " + ], + "key": { + "Z": { + "item": "create:zinc_handle" + }, + "R": { + "item": "create:polished_rose_quartz" + }, + "C": { + "tag": "forge:plates/iron" + }, + "G": { + "tag": "forge:ingots/gold" + } + }, + "result": { + "item": "create:rose_quartz_sword", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/mixing/blazing_axe.json b/src/main/resources/data/create/recipes/mixing/blazing_axe.json new file mode 100644 index 000000000..772532f0a --- /dev/null +++ b/src/main/resources/data/create/recipes/mixing/blazing_axe.json @@ -0,0 +1,29 @@ +{ + "type": "create:mixing", + "ingredients": [ + { + "item": "minecraft:golden_axe" + }, + { + "item": "create:obsidian_dust" + }, + { + "item": "minecraft:blaze_powder" + }, + { + "item": "minecraft:blaze_powder" + }, + { + "item": "minecraft:blaze_powder" + }, + { + "item": "minecraft:blaze_powder" + } + ], + "results": [ + { + "item": "create:blazing_axe", + "count": 1 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/mixing/blazing_pickaxe.json b/src/main/resources/data/create/recipes/mixing/blazing_pickaxe.json new file mode 100644 index 000000000..d80db6c1a --- /dev/null +++ b/src/main/resources/data/create/recipes/mixing/blazing_pickaxe.json @@ -0,0 +1,29 @@ +{ + "type": "create:mixing", + "ingredients": [ + { + "item": "minecraft:golden_pickaxe" + }, + { + "item": "create:obsidian_dust" + }, + { + "item": "minecraft:blaze_powder" + }, + { + "item": "minecraft:blaze_powder" + }, + { + "item": "minecraft:blaze_powder" + }, + { + "item": "minecraft:blaze_powder" + } + ], + "results": [ + { + "item": "create:blazing_pickaxe", + "count": 1 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/mixing/blazing_shovel.json b/src/main/resources/data/create/recipes/mixing/blazing_shovel.json new file mode 100644 index 000000000..dbce999c7 --- /dev/null +++ b/src/main/resources/data/create/recipes/mixing/blazing_shovel.json @@ -0,0 +1,29 @@ +{ + "type": "create:mixing", + "ingredients": [ + { + "item": "minecraft:golden_shovel" + }, + { + "item": "create:obsidian_dust" + }, + { + "item": "minecraft:blaze_powder" + }, + { + "item": "minecraft:blaze_powder" + }, + { + "item": "minecraft:blaze_powder" + }, + { + "item": "minecraft:blaze_powder" + } + ], + "results": [ + { + "item": "create:blazing_shovel", + "count": 1 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/mixing/blazing_sword.json b/src/main/resources/data/create/recipes/mixing/blazing_sword.json new file mode 100644 index 000000000..8b8785f59 --- /dev/null +++ b/src/main/resources/data/create/recipes/mixing/blazing_sword.json @@ -0,0 +1,29 @@ +{ + "type": "create:mixing", + "ingredients": [ + { + "item": "minecraft:golden_sword" + }, + { + "item": "create:obsidian_dust" + }, + { + "item": "minecraft:blaze_powder" + }, + { + "item": "minecraft:blaze_powder" + }, + { + "item": "minecraft:blaze_powder" + }, + { + "item": "minecraft:blaze_powder" + } + ], + "results": [ + { + "item": "create:blazing_sword", + "count": 1 + } + ] +} \ No newline at end of file