diff --git a/src/main/java/io/github/pylonmc/pylon/Pylon.java b/src/main/java/io/github/pylonmc/pylon/Pylon.java index 9b5c156c9..e74504208 100644 --- a/src/main/java/io/github/pylonmc/pylon/Pylon.java +++ b/src/main/java/io/github/pylonmc/pylon/Pylon.java @@ -62,8 +62,6 @@ public void onEnable() { pm.registerEvents(new SoulboundRune.SoulboundRuneListener(), this); pm.registerEvents(new Bloomery.CreationListener(), this); pm.registerEvents(new Grindstone.PlaceListener(), this); - - pm.registerEvents(new HungerTalisman.JoinListener(), this); pm.registerEvents(new FarmingTalisman.FarmingTalismanListener(), this); pm.registerEvents(new BarteringTalisman.BarteringTalismanListener(), this); pm.registerEvents(new BreedingTalisman.BreedingTalismanListener(), this); diff --git a/src/main/java/io/github/pylonmc/pylon/PylonBlocks.java b/src/main/java/io/github/pylonmc/pylon/PylonBlocks.java index 628cf83ec..155b5cb00 100644 --- a/src/main/java/io/github/pylonmc/pylon/PylonBlocks.java +++ b/src/main/java/io/github/pylonmc/pylon/PylonBlocks.java @@ -77,7 +77,6 @@ public static void initialize() { RebarBlock.register(PylonKeys.LAVA_DRAINER, Material.DISPENSER, FluidDrainer.class); RebarBlock.register(PylonKeys.FLUID_VOIDER_1, Material.STRUCTURE_VOID, FluidVoider.class); RebarBlock.register(PylonKeys.FLUID_VOIDER_2, Material.STRUCTURE_VOID, FluidVoider.class); - RebarBlock.register(PylonKeys.FLUID_VOIDER_3, Material.STRUCTURE_VOID, FluidVoider.class); RebarBlock.register(PylonKeys.CREATIVE_FLUID_VOIDER, Material.STRUCTURE_VOID, FluidVoider.class); RebarBlock.register(PylonKeys.CREATIVE_FLUID_SOURCE, Material.PINK_CONCRETE, CreativeFluidSource.class); RebarBlock.register(PylonKeys.REFRACTORY_MIX, Material.SMOOTH_RED_SANDSTONE, RefractoryMix.class); @@ -109,7 +108,7 @@ public static void initialize() { RebarBlock.register(PylonKeys.HYDRAULIC_HAMMER_HEAD, Material.STONE_BRICKS, HydraulicHammerHead.class); RebarBlock.register(PylonKeys.HYDRAULIC_PIPE_BENDER, Material.WAXED_CHISELED_COPPER, HydraulicPipeBender.class); RebarBlock.register(PylonKeys.HYDRAULIC_TABLE_SAW, Material.WAXED_CUT_COPPER, HydraulicTableSaw.class); - RebarBlock.register(PylonKeys.SOLAR_LENS, Material.GLASS_PANE, RebarBlock.class); + RebarBlock.register(PylonKeys.SOLAR_LENS, Material.GLASS_PANE, SolarLens.class); RebarBlock.register(PylonKeys.MANUAL_HYDRAULIC_PURIFIER, Material.DECORATED_POT, ManualHydraulicPurifier.class); RebarBlock.register(PylonKeys.COPPER_FRAMED_GLASS, Material.ORANGE_STAINED_GLASS, RebarBlock.class); RebarBlock.register(PylonKeys.QUARTZ_CAP, Material.QUARTZ_SLAB, RebarBlock.class); diff --git a/src/main/java/io/github/pylonmc/pylon/PylonItems.java b/src/main/java/io/github/pylonmc/pylon/PylonItems.java index 287690238..d72ce8144 100644 --- a/src/main/java/io/github/pylonmc/pylon/PylonItems.java +++ b/src/main/java/io/github/pylonmc/pylon/PylonItems.java @@ -1414,42 +1414,6 @@ private PylonItems() { PylonPages.TALISMANS.addItem(HEALTH_TALISMAN_PALLADIUM); } - public static final ItemStack HUNGER_TALISMAN_SIMPLE = ItemStackBuilder.rebar(Material.CLAY_BALL, PylonKeys.HUNGER_TALISMAN_SIMPLE) - .set(DataComponentTypes.MAX_STACK_SIZE, 1) - .set(DataComponentTypes.ITEM_MODEL, Objects.requireNonNull(Material.GOLDEN_APPLE.getDefaultData(DataComponentTypes.ITEM_MODEL))) - .build(); - static { - RebarItem.register(HungerTalisman.class, HUNGER_TALISMAN_SIMPLE); - PylonPages.TALISMANS.addItem(HUNGER_TALISMAN_SIMPLE); - } - - public static final ItemStack HUNGER_TALISMAN_ADVANCED = ItemStackBuilder.rebar(Material.CLAY_BALL, PylonKeys.HUNGER_TALISMAN_ADVANCED) - .set(DataComponentTypes.MAX_STACK_SIZE, 1) - .set(DataComponentTypes.ITEM_MODEL, Objects.requireNonNull(Material.GOLDEN_APPLE.getDefaultData(DataComponentTypes.ITEM_MODEL))) - .build(); - static { - RebarItem.register(HungerTalisman.class, HUNGER_TALISMAN_ADVANCED); - PylonPages.TALISMANS.addItem(HUNGER_TALISMAN_ADVANCED); - } - - public static final ItemStack HUNGER_TALISMAN_ULTIMATE = ItemStackBuilder.rebar(Material.CLAY_BALL, PylonKeys.HUNGER_TALISMAN_ULTIMATE) - .set(DataComponentTypes.MAX_STACK_SIZE, 1) - .set(DataComponentTypes.ITEM_MODEL, Objects.requireNonNull(Material.GOLDEN_APPLE.getDefaultData(DataComponentTypes.ITEM_MODEL))) - .build(); - static { - RebarItem.register(HungerTalisman.class, HUNGER_TALISMAN_ULTIMATE); - PylonPages.TALISMANS.addItem(HUNGER_TALISMAN_ULTIMATE); - } - - public static final ItemStack HUNGER_TALISMAN_PALLADIUM = ItemStackBuilder.rebar(Material.CLAY_BALL, PylonKeys.HUNGER_TALISMAN_PALLADIUM) - .set(DataComponentTypes.MAX_STACK_SIZE, 1) - .set(DataComponentTypes.ITEM_MODEL, Objects.requireNonNull(Material.GOLDEN_APPLE.getDefaultData(DataComponentTypes.ITEM_MODEL))) - .build(); - static { - RebarItem.register(HungerTalisman.class, HUNGER_TALISMAN_PALLADIUM); - PylonPages.TALISMANS.addItem(HUNGER_TALISMAN_PALLADIUM); - } - public static final ItemStack FARMING_TALISMAN_SIMPLE = ItemStackBuilder.rebar(Material.BOWL, PylonKeys.FARMING_TALISMAN_SIMPLE) .set(DataComponentTypes.MAX_STACK_SIZE, 1) .build(); @@ -1836,9 +1800,6 @@ private PylonItems() { public static final ItemStack PALLADIUM_HELMET = ItemStackBuilder.rebarHelmet(Material.DIAMOND_HELMET, PylonKeys.PALLADIUM_HELMET, true) .set(DataComponentTypes.MAX_DAMAGE, Settings.get(PylonKeys.PALLADIUM_HELMET).getOrThrow("durability", ConfigAdapter.INTEGER)) - .set(DataComponentTypes.ENCHANTMENTS, ItemEnchantments.itemEnchantments() - .add(Enchantment.PROTECTION, Settings.get(PylonKeys.PALLADIUM_HELMET).getOrThrow("prot-level", ConfigAdapter.INTEGER)) - .build()) .addAttributeModifier(Attribute.MOVEMENT_SPEED, new AttributeModifier( pylonKey("palladium_helmet_speed"), Settings.get(PylonKeys.PALLADIUM_BOOTS).getOrThrow("speed-percentage-increase", ConfigAdapter.DOUBLE), @@ -1852,9 +1813,6 @@ private PylonItems() { } public static final ItemStack PALLADIUM_CHESTPLATE = ItemStackBuilder.rebarChestplate(Material.DIAMOND_CHESTPLATE, PylonKeys.PALLADIUM_CHESTPLATE, true) - .set(DataComponentTypes.ENCHANTMENTS, ItemEnchantments.itemEnchantments() - .add(Enchantment.PROTECTION, Settings.get(PylonKeys.PALLADIUM_CHESTPLATE).getOrThrow("prot-level", ConfigAdapter.INTEGER)) - .build()) .addAttributeModifier(Attribute.MOVEMENT_SPEED, new AttributeModifier( pylonKey("palladium_chestplate_speed"), Settings.get(PylonKeys.PALLADIUM_BOOTS).getOrThrow("speed-percentage-increase", ConfigAdapter.DOUBLE), @@ -1868,9 +1826,6 @@ private PylonItems() { } public static final ItemStack PALLADIUM_LEGGINGS = ItemStackBuilder.rebarLeggings(Material.DIAMOND_LEGGINGS, PylonKeys.PALLADIUM_LEGGINGS, true) - .set(DataComponentTypes.ENCHANTMENTS, ItemEnchantments.itemEnchantments() - .add(Enchantment.PROTECTION, Settings.get(PylonKeys.PALLADIUM_LEGGINGS).getOrThrow("prot-level", ConfigAdapter.INTEGER)) - .build()) .addAttributeModifier(Attribute.MOVEMENT_SPEED, new AttributeModifier( pylonKey("palladium_leggings_speed"), Settings.get(PylonKeys.PALLADIUM_BOOTS).getOrThrow("speed-percentage-increase", ConfigAdapter.DOUBLE), @@ -1884,10 +1839,6 @@ private PylonItems() { } public static final ItemStack PALLADIUM_BOOTS = ItemStackBuilder.rebarBoots(Material.DIAMOND_BOOTS, PylonKeys.PALLADIUM_BOOTS, true) - .set(DataComponentTypes.ENCHANTMENTS, ItemEnchantments.itemEnchantments() - .add(Enchantment.PROTECTION, Settings.get(PylonKeys.PALLADIUM_BOOTS).getOrThrow("prot-level", ConfigAdapter.INTEGER)) - .add(Enchantment.FROST_WALKER, Settings.get(PylonKeys.PALLADIUM_BOOTS).getOrThrow("frost-walker-level", ConfigAdapter.INTEGER)) - .build()) .addAttributeModifier(Attribute.MOVEMENT_SPEED, new AttributeModifier( pylonKey("palladium_boots_speed"), Settings.get(PylonKeys.PALLADIUM_BOOTS).getOrThrow("speed-percentage-increase", ConfigAdapter.DOUBLE), @@ -2692,14 +2643,6 @@ private PylonItems() { PylonPages.FLUID_MACHINES.addItem(FLUID_VOIDER_2); } - public static final ItemStack FLUID_VOIDER_3 = ItemStackBuilder.rebar(Material.STRUCTURE_VOID, PylonKeys.FLUID_VOIDER_3) - .set(DataComponentTypes.ITEM_MODEL, Material.BLACK_TERRACOTTA.getKey()) - .build(); - static { - RebarItem.register(FluidVoider.Item.class, FLUID_VOIDER_3, PylonKeys.FLUID_VOIDER_3); - PylonPages.FLUID_MACHINES.addItem(FLUID_VOIDER_3); - } - // // diff --git a/src/main/java/io/github/pylonmc/pylon/PylonKeys.java b/src/main/java/io/github/pylonmc/pylon/PylonKeys.java index 138b05bce..9985097b5 100644 --- a/src/main/java/io/github/pylonmc/pylon/PylonKeys.java +++ b/src/main/java/io/github/pylonmc/pylon/PylonKeys.java @@ -218,7 +218,6 @@ public class PylonKeys { public static final NamespacedKey FLUID_VOIDER_1 = pylonKey("fluid_voider_1"); public static final NamespacedKey FLUID_VOIDER_2 = pylonKey("fluid_voider_2"); - public static final NamespacedKey FLUID_VOIDER_3 = pylonKey("fluid_voider_3"); public static final NamespacedKey CREATIVE_FLUID_VOIDER = pylonKey("creative_fluid_voider"); public static final NamespacedKey CREATIVE_FLUID_SOURCE = pylonKey("creative_fluid_source"); @@ -370,11 +369,6 @@ public class PylonKeys { public static final NamespacedKey HEALTH_TALISMAN_ULTIMATE = pylonKey("health_talisman_ultimate"); public static final NamespacedKey HEALTH_TALISMAN_PALLADIUM = pylonKey("health_talisman_palladium"); - public static final NamespacedKey HUNGER_TALISMAN_SIMPLE = pylonKey("hunger_talisman_simple"); - public static final NamespacedKey HUNGER_TALISMAN_ADVANCED = pylonKey("hunger_talisman_advanced"); - public static final NamespacedKey HUNGER_TALISMAN_ULTIMATE = pylonKey("hunger_talisman_ultimate"); - public static final NamespacedKey HUNGER_TALISMAN_PALLADIUM = pylonKey("hunger_talisman_palladium"); - public static final NamespacedKey FARMING_TALISMAN_SIMPLE = pylonKey("farming_talisman_simple"); public static final NamespacedKey FARMING_TALISMAN_ADVANCED = pylonKey("farming_talisman_advanced"); public static final NamespacedKey FARMING_TALISMAN_ULTIMATE = pylonKey("farming_talisman_ultimate"); diff --git a/src/main/java/io/github/pylonmc/pylon/content/components/ItemInputHatch.java b/src/main/java/io/github/pylonmc/pylon/content/components/ItemInputHatch.java index 6fac718d1..05cb8df85 100644 --- a/src/main/java/io/github/pylonmc/pylon/content/components/ItemInputHatch.java +++ b/src/main/java/io/github/pylonmc/pylon/content/components/ItemInputHatch.java @@ -1,6 +1,7 @@ package io.github.pylonmc.pylon.content.components; import io.github.pylonmc.rebar.block.RebarBlock; +import io.github.pylonmc.rebar.block.base.RebarDirectionalBlock; import io.github.pylonmc.rebar.block.base.RebarGuiBlock; import io.github.pylonmc.rebar.block.base.RebarLogisticBlock; import io.github.pylonmc.rebar.block.base.RebarVirtualInventoryBlock; @@ -16,12 +17,17 @@ import java.util.Map; -public class ItemInputHatch extends RebarBlock implements RebarGuiBlock, RebarLogisticBlock, RebarVirtualInventoryBlock { +public class ItemInputHatch extends RebarBlock implements + RebarGuiBlock, + RebarDirectionalBlock, + RebarLogisticBlock, + RebarVirtualInventoryBlock { public final VirtualInventory inventory = new VirtualInventory(1); public ItemInputHatch(@NotNull Block block, @NotNull BlockCreateContext context) { super(block, context); + setFacing(context.getFacing()); } public ItemInputHatch(@NotNull Block block, @NotNull PersistentDataContainer pdc) { diff --git a/src/main/java/io/github/pylonmc/pylon/content/components/ItemOutputHatch.java b/src/main/java/io/github/pylonmc/pylon/content/components/ItemOutputHatch.java index 591cb02ba..dc153b301 100644 --- a/src/main/java/io/github/pylonmc/pylon/content/components/ItemOutputHatch.java +++ b/src/main/java/io/github/pylonmc/pylon/content/components/ItemOutputHatch.java @@ -1,6 +1,7 @@ package io.github.pylonmc.pylon.content.components; import io.github.pylonmc.rebar.block.RebarBlock; +import io.github.pylonmc.rebar.block.base.RebarDirectionalBlock; import io.github.pylonmc.rebar.block.base.RebarGuiBlock; import io.github.pylonmc.rebar.block.base.RebarLogisticBlock; import io.github.pylonmc.rebar.block.base.RebarVirtualInventoryBlock; @@ -16,12 +17,17 @@ import java.util.Map; -public class ItemOutputHatch extends RebarBlock implements RebarGuiBlock, RebarLogisticBlock, RebarVirtualInventoryBlock { +public class ItemOutputHatch extends RebarBlock implements + RebarGuiBlock, + RebarDirectionalBlock, + RebarLogisticBlock, + RebarVirtualInventoryBlock { public final VirtualInventory inventory = new VirtualInventory(1); public ItemOutputHatch(@NotNull Block block, @NotNull BlockCreateContext context) { super(block, context); + setFacing(context.getFacing()); } public ItemOutputHatch(@NotNull Block block, @NotNull PersistentDataContainer pdc) { diff --git a/src/main/java/io/github/pylonmc/pylon/content/components/SolarLens.java b/src/main/java/io/github/pylonmc/pylon/content/components/SolarLens.java new file mode 100644 index 000000000..652c738f7 --- /dev/null +++ b/src/main/java/io/github/pylonmc/pylon/content/components/SolarLens.java @@ -0,0 +1,58 @@ +package io.github.pylonmc.pylon.content.components; + +import io.github.pylonmc.rebar.block.RebarBlock; +import io.github.pylonmc.rebar.block.base.RebarMultiblock; +import io.github.pylonmc.rebar.block.context.BlockCreateContext; +import io.github.pylonmc.rebar.util.RebarUtils; +import io.github.pylonmc.rebar.util.position.BlockPosition; +import io.github.pylonmc.rebar.util.position.ChunkPosition; +import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; +import org.bukkit.persistence.PersistentDataContainer; +import org.jetbrains.annotations.NotNull; + +import java.util.HashSet; +import java.util.Set; +import java.util.stream.Collectors; + + +public class SolarLens extends RebarBlock implements RebarMultiblock { + + private final Set adjacentBlocks = new HashSet<>(); + + public SolarLens(@NotNull Block block, @NotNull PersistentDataContainer pdc) { + super(block, pdc); + } + + public SolarLens(@NotNull Block block, @NotNull BlockCreateContext context) { + super(block, context); + } + + { + for (BlockFace face : RebarUtils.IMMEDIATE_FACES) { + adjacentBlocks.add(new BlockPosition(getBlock()).getRelative(face)); + } + } + + @Override + public @NotNull Set<@NotNull ChunkPosition> getChunksOccupied() { + return adjacentBlocks.stream() + .map(BlockPosition::getChunk) + .collect(Collectors.toSet()); + } + + @Override + public boolean checkFormed() { + return true; + } + + @Override + public boolean isPartOfMultiblock(@NotNull Block otherBlock) { + return adjacentBlocks.contains(new BlockPosition(otherBlock)); + } + + @Override + public void onMultiblockRefreshed() { + refreshBlockTextureItem(); + } +} diff --git a/src/main/java/io/github/pylonmc/pylon/content/machines/diesel/machines/DieselTableSaw.java b/src/main/java/io/github/pylonmc/pylon/content/machines/diesel/machines/DieselTableSaw.java index ca203efa4..36914dfc2 100644 --- a/src/main/java/io/github/pylonmc/pylon/content/machines/diesel/machines/DieselTableSaw.java +++ b/src/main/java/io/github/pylonmc/pylon/content/machines/diesel/machines/DieselTableSaw.java @@ -63,6 +63,8 @@ public class DieselTableSaw extends RebarBlock implements .addCustomModelDataString(getKey() + ":side2"); public ItemStackBuilder chimneyStack = ItemStackBuilder.of(Material.CYAN_TERRACOTTA) .addCustomModelDataString(getKey() + ":chimney"); + public final ItemStackBuilder sawItem = ItemStackBuilder.of(Material.IRON_BARS) + .addCustomModelDataString(getKey() + ":saw"); private final VirtualInventory inputInventory = new VirtualInventory(1); private final VirtualInventory outputInventory = new VirtualInventory(1); @@ -120,10 +122,9 @@ public DieselTableSaw(@NotNull Block block, @NotNull BlockCreateContext context) .scale(0.3)) .build(block.getLocation().toCenterLocation().add(0, 0.65, 0)) ); - addEntity("saw", new BlockDisplayBuilder() - .blockData(Material.IRON_BARS.createBlockData("[east=true,west=true]")) + addEntity("saw", new ItemDisplayBuilder() + .itemStack(sawItem) .transformation(new TransformBuilder() - .rotate(0, RebarUtils.faceToYaw(getFacing()), 0) .scale(0.6, 0.4, 0.4)) .build(block.getLocation().toCenterLocation().add(0, 0.7, 0)) ); diff --git a/src/main/java/io/github/pylonmc/pylon/content/machines/fluid/FluidStrainer.java b/src/main/java/io/github/pylonmc/pylon/content/machines/fluid/FluidStrainer.java index 1b893231f..5ac4aa14b 100644 --- a/src/main/java/io/github/pylonmc/pylon/content/machines/fluid/FluidStrainer.java +++ b/src/main/java/io/github/pylonmc/pylon/content/machines/fluid/FluidStrainer.java @@ -52,7 +52,7 @@ public class FluidStrainer extends RebarBlock implements public final double buffer = getSettings().getOrThrow("buffer", ConfigAdapter.DOUBLE); public @Nullable RebarFluid fluidType; public double fluidAmount; - private final VirtualInventory inventory = new VirtualInventory(9 * 3); + private final VirtualInventory inventory = new VirtualInventory(5); public static class Item extends RebarItem { diff --git a/src/main/java/io/github/pylonmc/pylon/content/machines/simple/Grindstone.java b/src/main/java/io/github/pylonmc/pylon/content/machines/simple/Grindstone.java index cd8747857..184fc1558 100644 --- a/src/main/java/io/github/pylonmc/pylon/content/machines/simple/Grindstone.java +++ b/src/main/java/io/github/pylonmc/pylon/content/machines/simple/Grindstone.java @@ -186,6 +186,8 @@ public boolean tryStartRecipe(@NotNull GrindstoneRecipe nextRecipe) { return false; } + ItemStack particleItem = input.clone(); + itemDisplay.setItemStack(input.subtract(nextRecipe.input().getAmount())); startRecipe(nextRecipe, nextRecipe.timeTicks()); @@ -204,11 +206,12 @@ public boolean tryStartRecipe(@NotNull GrindstoneRecipe nextRecipe) { } PylonUtils.animate(getStoneDisplay(), CYCLE_DURATION_TICKS / 4, getStoneDisplayMatrix(translation, rotation)); - new ParticleBuilder(Particle.BLOCK) - .data(nextRecipe.particleBlockData()) - .count(10) - .location(getBlock().getLocation().toCenterLocation()) - .spawn(); + new ParticleBuilder(Particle.ITEM) + .data(particleItem) + .count(20) + .extra(0.1) + .location(getBlock().getLocation().toCenterLocation()) + .spawn(); progressRecipe(CYCLE_DURATION_TICKS / 4); }, (long) ((i + j/4.0) * CYCLE_DURATION_TICKS)); diff --git a/src/main/java/io/github/pylonmc/pylon/content/machines/simple/MixingPot.java b/src/main/java/io/github/pylonmc/pylon/content/machines/simple/MixingPot.java index 372c3f89a..128108995 100644 --- a/src/main/java/io/github/pylonmc/pylon/content/machines/simple/MixingPot.java +++ b/src/main/java/io/github/pylonmc/pylon/content/machines/simple/MixingPot.java @@ -126,7 +126,9 @@ public void onInteract(@NotNull PlayerInteractEvent event, @NotNull EventPriorit return; } - tryDoRecipe(); + if (priority == EventPriority.MONITOR) { + tryDoRecipe(); + } } public boolean tryDoRecipe() { @@ -160,6 +162,13 @@ public boolean tryDoRecipe() { return true; } + new ParticleBuilder(Particle.SMOKE) + .count(50) + .extra(0) + .offset(0.1, 0, 0.1) + .location(getBlock().getLocation().toCenterLocation().add(0, 0.4, 0)) + .spawn(); + return false; } diff --git a/src/main/java/io/github/pylonmc/pylon/content/machines/simple/ShimmerAltar.java b/src/main/java/io/github/pylonmc/pylon/content/machines/simple/ShimmerAltar.java index 66f16d146..7bbf22795 100644 --- a/src/main/java/io/github/pylonmc/pylon/content/machines/simple/ShimmerAltar.java +++ b/src/main/java/io/github/pylonmc/pylon/content/machines/simple/ShimmerAltar.java @@ -17,11 +17,16 @@ import io.github.pylonmc.rebar.entity.display.ItemDisplayBuilder; import io.github.pylonmc.rebar.entity.display.transform.TransformBuilder; import io.github.pylonmc.rebar.event.api.annotation.MultiHandler; +import io.github.pylonmc.rebar.i18n.RebarArgument; +import io.github.pylonmc.rebar.waila.WailaDisplay; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.TextColor; import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.Particle; import org.bukkit.block.Block; import org.bukkit.entity.ItemDisplay; +import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.EventPriority; import org.bukkit.event.block.Action; @@ -30,6 +35,7 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.persistence.PersistentDataContainer; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import org.joml.Vector3i; import java.util.*; @@ -229,4 +235,19 @@ public void cancelRecipe() { .location(getBlock().getLocation().toCenterLocation()) .spawn(); } + + @Override + public @Nullable WailaDisplay getWaila(@NotNull Player player) { + return new WailaDisplay(getDefaultWailaTranslationKey().arguments( + RebarArgument.of("progress", getCurrentRecipe() == null + ? Component.empty() + : Component.translatable("pylon.item.shimmer_altar.progress") + .arguments(RebarArgument.of("progress", PylonUtils.createProgressBar( + 1.0 - (getRecipeTicksRemaining() / 20.0) / getCurrentRecipe().timeSeconds(), + 20, + TextColor.color(255, 255, 255) + ))) + ) + )); + } } diff --git a/src/main/java/io/github/pylonmc/pylon/content/talismans/HungerTalisman.java b/src/main/java/io/github/pylonmc/pylon/content/talismans/HungerTalisman.java deleted file mode 100644 index 38468ec54..000000000 --- a/src/main/java/io/github/pylonmc/pylon/content/talismans/HungerTalisman.java +++ /dev/null @@ -1,95 +0,0 @@ -package io.github.pylonmc.pylon.content.talismans; - -import io.github.pylonmc.pylon.Pylon; -import io.github.pylonmc.pylon.util.PylonUtils; -import io.github.pylonmc.rebar.config.adapter.ConfigAdapter; -import io.github.pylonmc.rebar.i18n.RebarArgument; -import io.github.pylonmc.rebar.item.RebarItem; -import io.github.pylonmc.rebar.util.gui.unit.UnitFormat; -import net.kyori.adventure.text.Component; -import org.bukkit.Bukkit; -import org.bukkit.NamespacedKey; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerJoinEvent; -import org.bukkit.inventory.ItemStack; -import org.bukkit.persistence.PersistentDataType; -import org.bukkit.scheduler.BukkitTask; -import org.jetbrains.annotations.NotNull; - -import java.util.List; -import java.util.UUID; -import java.util.WeakHashMap; - -public class HungerTalisman extends Talisman { - private static final NamespacedKey HUNGER_TALISMAN_KEY = PylonUtils.pylonKey("hunger_talisman"); - public final int hungerIncrease = getSettings().getOrThrow("hunger-increase", ConfigAdapter.INTEGER); - public final float saturationIncrease = getSettings().getOrThrow("saturation-increase", ConfigAdapter.FLOAT); - public final int increasePeriod = getSettings().getOrThrow("period-ticks", ConfigAdapter.INTEGER); - public final int level = getSettings().getOrThrow("level", ConfigAdapter.INTEGER); - private static final WeakHashMap hungerTasks = new WeakHashMap<>(); - - public HungerTalisman(@NotNull ItemStack stack) { - super(stack); - } - - @Override - public @NotNull List<@NotNull RebarArgument> getPlaceholders() { - return List.of(RebarArgument.of("period", UnitFormat.SECONDS.format(increasePeriod / 20f)), - RebarArgument.of("saturation_increase", Component.text(saturationIncrease)), - RebarArgument.of("hunger_increase", Component.text(hungerIncrease))); - } - - @Override - public void removeEffect(@NotNull Player player) { - super.removeEffect(player); - if (!hungerTasks.containsKey(player.getUniqueId())) { - return; - } - hungerTasks.get(player.getUniqueId()).cancel(); - } - - @Override - public void applyEffect(@NotNull Player player) { - super.applyEffect(player); - if (hungerTasks.containsKey(player.getUniqueId())) { - hungerTasks.get(player.getUniqueId()).cancel(); - } - hungerTasks.put(player.getUniqueId(), Bukkit.getScheduler().runTaskTimer(Pylon.getInstance(), () -> { - player.setFoodLevel(Math.min(player.getFoodLevel() + hungerIncrease, 20)); - player.setSaturation(Math.min(player.getSaturation() + saturationIncrease, player.getFoodLevel())); - }, increasePeriod, increasePeriod)); - } - - @Override - public int getLevel() { - return level; - } - - @Override - public NamespacedKey getTalismanKey() { - return HUNGER_TALISMAN_KEY; - } - - public static final class JoinListener implements Listener { - @EventHandler - public void onPlayerJoin(PlayerJoinEvent event) { - if (!event.getPlayer().getPersistentDataContainer().has(HUNGER_TALISMAN_KEY)) { - return; - } - int talismanLevel = event.getPlayer().getPersistentDataContainer().get(HUNGER_TALISMAN_KEY, PersistentDataType.INTEGER); - for (ItemStack stack : event.getPlayer().getInventory()) { - RebarItem item = RebarItem.fromStack(stack); - if (!(item instanceof HungerTalisman talisman)) { - continue; - } - if (talisman.getLevel() != talismanLevel) { - continue; - } - talisman.applyEffect(event.getPlayer()); - } - } - } - -} diff --git a/src/main/java/io/github/pylonmc/pylon/content/talismans/Talisman.java b/src/main/java/io/github/pylonmc/pylon/content/talismans/Talisman.java index ea110474c..ac21ab063 100644 --- a/src/main/java/io/github/pylonmc/pylon/content/talismans/Talisman.java +++ b/src/main/java/io/github/pylonmc/pylon/content/talismans/Talisman.java @@ -14,7 +14,7 @@ public abstract class Talisman extends RebarItem implements RebarInventoryEffectItem { public final int level = getSettings().getOrThrow("level", ConfigAdapter.INTEGER); - public Talisman(@NotNull ItemStack stack) { + protected Talisman(@NotNull ItemStack stack) { super(stack); } @@ -34,11 +34,25 @@ public void onAddedToInventory(@NotNull Player player) { public void onRemovedFromInventory(@NotNull Player player) { RebarInventoryEffectItem.super.onRemovedFromInventory(player); Integer currentTalismanLevel = player.getPersistentDataContainer().get(getTalismanKey(), PersistentDataType.INTEGER); - if (currentTalismanLevel == null) + if (currentTalismanLevel == null) { return; // really shouldn't happen, but in this case less likely to crash by not calling removeEffect + } if (currentTalismanLevel == getLevel()) { removeEffect(player); } + + // Check if there are any other talismans which will override this one + // e.g. if the player just removed a health talisman 3, is there another health talisman to fall back to? + for (ItemStack stack : player.getInventory()) { + if (fromStack(stack) instanceof Talisman talisman) { + if (talisman.getTalismanKey().equals(getTalismanKey())) { + Integer newCurrentTalismanLevel = player.getPersistentDataContainer().get(getTalismanKey(), PersistentDataType.INTEGER); + if (newCurrentTalismanLevel == null || newCurrentTalismanLevel < currentTalismanLevel) { + talisman.applyEffect(player); + } + } + } + } } /** diff --git a/src/main/java/io/github/pylonmc/pylon/content/tools/BrickMold.java b/src/main/java/io/github/pylonmc/pylon/content/tools/BrickMold.java index 68c1240e8..cab223c10 100644 --- a/src/main/java/io/github/pylonmc/pylon/content/tools/BrickMold.java +++ b/src/main/java/io/github/pylonmc/pylon/content/tools/BrickMold.java @@ -2,6 +2,7 @@ import com.destroystokyo.paper.ParticleBuilder; import io.github.pylonmc.rebar.block.BlockStorage; +import io.github.pylonmc.rebar.block.RebarBlock; import io.github.pylonmc.rebar.block.context.BlockBreakContext; import io.github.pylonmc.rebar.config.adapter.ConfigAdapter; import io.github.pylonmc.rebar.event.api.annotation.MultiHandler; @@ -44,11 +45,20 @@ public void onUsedToClickBlock(@NotNull PlayerInteractEvent event, @NotNull Even moldable.doMoldingClick(); event.getPlayer().setCooldown(getStack(), cooldownTicks); - new ParticleBuilder(Particle.BLOCK) - .count(20) + + ItemStack particleType; + RebarBlock rebarBlock = BlockStorage.get(event.getClickedBlock()); + if (rebarBlock != null) { + particleType = rebarBlock.getDefaultItem().getItemStack(); + } else { + particleType = new ItemStack(event.getClickedBlock().getType()); + } + new ParticleBuilder(Particle.ITEM) + .count(50) + .extra(0.1) .offset(0.2, 0.2, 0.2) .location(event.getClickedBlock().getLocation().toCenterLocation()) - .data(event.getClickedBlock().getBlockData()) + .data(particleType) .spawn(); if (moldable.isMoldingFinished()) { diff --git a/src/main/java/io/github/pylonmc/pylon/content/tools/Hammer.java b/src/main/java/io/github/pylonmc/pylon/content/tools/Hammer.java index 87d4c24c2..10e8f140e 100644 --- a/src/main/java/io/github/pylonmc/pylon/content/tools/Hammer.java +++ b/src/main/java/io/github/pylonmc/pylon/content/tools/Hammer.java @@ -54,6 +54,11 @@ public class Hammer extends RebarItem implements RebarBlockInteractor { private static final Map> lastHammeredItems = new HashMap<>(); public static final Random random = new Random(); + // We do not use the item's PDC because this leads to the item not stacking + // Some entries will persist in this map and never be removed until the server restarts, this + // is fine because the memory usage is so tiny and it would be very annoying to fix + public static final Map remainingUseMap = new HashMap<>(); + public final Material baseBlock = getBaseBlock(getKey()); public final MiningLevel miningLevel = getMiningLevel(getKey()); public final int cooldownTicks = getSettings().getOrThrow("cooldown-ticks", ConfigAdapter.INTEGER); @@ -131,12 +136,23 @@ private boolean tryDoRecipe(Block block, Player player, EquipmentSlot slot, Hamm RebarUtils.damageItem(getStack(), 1, block.getWorld()); } - if (ThreadLocalRandom.current().nextFloat() > recipe.getChanceFor(miningLevel)) { + new ParticleBuilder(Particle.ITEM) + .count(20) + .extra(0.1) + .data(item.getItemStack()) + .location(item.getLocation().add(0, 0.2, 0)) + .spawn(); + + int remainingUses = remainingUseMap.computeIfAbsent(item.getUniqueId(), unused -> recipe.uses()) - 1; + if (remainingUses > 0) { block.getWorld().playSound(failSound.create(), block.getX() + 0.5, block.getY() + 0.5, block.getZ() + 0.5); - lastHammeredItems.put(new BlockPosition(block), new Pair<>(recipe, item.getUniqueId())); - return true; // recipe attempted but unsuccessful + remainingUseMap.put(item.getUniqueId(), remainingUses); + return true; // recipe not finished } + lastHammeredItems.put(new BlockPosition(block), new Pair<>(recipe, item.getUniqueId())); + remainingUseMap.remove(item.getUniqueId()); + int newAmount = item.getItemStack().getAmount() - recipe.input().getAmount(); item.setItemStack(item.getItemStack().asQuantity(newAmount)); block.getWorld().dropItem(block.getLocation().add(0.5, 1.1, 0.5), recipe.result()) diff --git a/src/main/java/io/github/pylonmc/pylon/recipes/AssemblingRecipe.java b/src/main/java/io/github/pylonmc/pylon/recipes/AssemblingRecipe.java index e46aeff69..692638d62 100644 --- a/src/main/java/io/github/pylonmc/pylon/recipes/AssemblingRecipe.java +++ b/src/main/java/io/github/pylonmc/pylon/recipes/AssemblingRecipe.java @@ -178,7 +178,7 @@ public record Step( .addIngredient('#', GuiItems.background()) .addIngredient('I', GuiItems.input()) .addIngredient('O', GuiItems.output()) - .addIngredient('t', PylonItems.ASSEMBLY_TABLE) + .addIngredient('t', new ItemButton(PylonItems.ASSEMBLY_TABLE)) .addIngredient('x', PagedGui.itemsBuilder() .setStructure("< x x x x x x x >") .addIngredient('x', Markers.CONTENT_LIST_SLOT_HORIZONTAL) diff --git a/src/main/java/io/github/pylonmc/pylon/recipes/GrindstoneRecipe.java b/src/main/java/io/github/pylonmc/pylon/recipes/GrindstoneRecipe.java index f003d4e3f..ea6a5d80c 100644 --- a/src/main/java/io/github/pylonmc/pylon/recipes/GrindstoneRecipe.java +++ b/src/main/java/io/github/pylonmc/pylon/recipes/GrindstoneRecipe.java @@ -14,7 +14,6 @@ import net.kyori.adventure.text.Component; import org.bukkit.Material; import org.bukkit.NamespacedKey; -import org.bukkit.block.data.BlockData; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; import org.jspecify.annotations.NonNull; @@ -36,8 +35,7 @@ public record GrindstoneRecipe( @NotNull NamespacedKey key, @NotNull RecipeInput.Item input, @NotNull WeightedSet results, - int cycles, - @NotNull BlockData particleBlockData + int cycles ) implements RebarRecipe { @Override @@ -52,8 +50,7 @@ public record GrindstoneRecipe( key, section.getOrThrow("input", ConfigAdapter.RECIPE_INPUT_ITEM), section.getOrThrow("results", ConfigAdapter.WEIGHTED_SET.from(ConfigAdapter.ITEM_STACK)), - section.getOrThrow("cycles", ConfigAdapter.INTEGER), - section.getOrThrow("particle-data", ConfigAdapter.BLOCK_DATA) + section.getOrThrow("cycles", ConfigAdapter.INTEGER) ); } diff --git a/src/main/java/io/github/pylonmc/pylon/recipes/HammerRecipe.java b/src/main/java/io/github/pylonmc/pylon/recipes/HammerRecipe.java index fbcca00d6..334be707e 100644 --- a/src/main/java/io/github/pylonmc/pylon/recipes/HammerRecipe.java +++ b/src/main/java/io/github/pylonmc/pylon/recipes/HammerRecipe.java @@ -12,11 +12,11 @@ import io.github.pylonmc.rebar.registry.RebarRegistry; import io.github.pylonmc.rebar.util.MiningLevel; import io.github.pylonmc.rebar.util.gui.GuiItems; -import io.github.pylonmc.rebar.util.gui.unit.UnitFormat; import net.kyori.adventure.text.Component; import org.bukkit.NamespacedKey; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; +import org.jspecify.annotations.NonNull; import xyz.xenondevs.invui.gui.Gui; import java.util.ArrayList; @@ -35,7 +35,7 @@ public record HammerRecipe( @NotNull RecipeInput.Item input, @NotNull ItemStack result, @NotNull MiningLevel level, - float chance + int uses ) implements RebarRecipe { @Override @@ -54,7 +54,7 @@ public record HammerRecipe( section.getOrThrow("input", ConfigAdapter.RECIPE_INPUT_ITEM), section.getOrThrow("result", ConfigAdapter.ITEM_STACK), section.getOrThrow("mining-level", MINING_LEVEL_ADAPTER), - section.getOrThrow("chance", ConfigAdapter.FLOAT) + section.getOrThrow("uses", ConfigAdapter.INTEGER) ); } }; @@ -86,28 +86,21 @@ public record HammerRecipe( .build(); } - public float getChanceFor(@NotNull MiningLevel hammerLevel) { - if (!hammerLevel.isAtLeast(level)) { - return 0f; - } - // Each tier is twice as likely to succeed as the previous one - return chance * (1 << hammerLevel.getNumericalLevel() - level.getNumericalLevel()); - } - - private List getHammers() { + private @NonNull List getHammers() { List hammers = new ArrayList<>(); for (RebarItemSchema itemSchema : RebarRegistry.ITEMS.getValues()) { Hammer hammer = RebarItem.fromStack(itemSchema.getOriginalTemplate(), Hammer.class); if (hammer == null) continue; ItemStack stack = itemSchema.getItemStack(); - float chance = Math.min(1, getChanceFor(hammer.miningLevel)); - if (chance <= 0f) continue; + if (!hammer.miningLevel.isAtLeast(level)) { + continue; + } List lore = stack.lore(); Preconditions.checkNotNull(lore); lore.add(Component.empty()); lore.add(Component.translatable("pylon.guide.recipe.hammer", - RebarArgument.of("chance", UnitFormat.PERCENT.format(chance * 100f).significantFigures(3)) + RebarArgument.of("uses", uses) )); stack.lore(lore); hammers.add(stack); diff --git a/src/main/resources/lang/en.yml b/src/main/resources/lang/en.yml index 450c8a44c..daa837b66 100644 --- a/src/main/resources/lang/en.yml +++ b/src/main/resources/lang/en.yml @@ -435,12 +435,6 @@ item: Destroys all fluids piped into it Void rate: %void_rate% - fluid_voider_3: - name: "Fluid Voider III" - lore: |- - Destroys all fluids piped into it - Void rate: %void_rate% - creative_fluid_voider: name: "<#ff00ff>Creative Fluid Voider" lore: |- @@ -593,6 +587,8 @@ item: Components 1x 8x + waila: "Shimmer Altar%progress%" + progress: "| %progress%" shimmer_pedestal: name: "Shimmer Pedestal" @@ -1886,42 +1882,6 @@ item: lore: |- Destroys any items piped into it - hunger_talisman_simple: - name: "Simple Hunger Talisman" - lore: |- - Increases your saturation and hunger every %period% - Does not stack - Only works while in your inventory - Saturation increase: %saturation_increase% - Hunger increase: %hunger_increase% - - hunger_talisman_advanced: - name: "Advanced Hunger Talisman" - lore: |- - Increases your saturation and hunger every %period% - Does not stack - Only works while in your inventory - Saturation increase: %saturation_increase% - Hunger increase: %hunger_increase% - - hunger_talisman_ultimate: - name: "Ultimate Hunger Talisman" - lore: |- - Increases your saturation and hunger every %period% - Does not stack - Only works while in your inventory - Saturation increase: %saturation_increase% - Hunger increase: %hunger_increase% - - hunger_talisman_palladium: - name: "Palladium Hunger Talisman" - lore: |- - Increases your saturation and hunger every %period% - Does not stack - Only works while in your inventory - Saturation increase: %saturation_increase% - Hunger increase: %hunger_increase% - farming_talisman_simple: name: "Simple Farming Talisman" lore: |- @@ -2682,7 +2642,7 @@ guide: casting: "Temperature: %temperature%" drilling: "Cycle time: %time%" molding: "Molding cycles: %molding-cycles%" - hammer: "Chance: %chance%" + hammer: "Uses: %uses%" button: info: loupe: diff --git a/src/main/resources/recipes/minecraft/crafting_shaped.yml b/src/main/resources/recipes/minecraft/crafting_shaped.yml index 0722fecde..4f33eb232 100644 --- a/src/main/resources/recipes/minecraft/crafting_shaped.yml +++ b/src/main/resources/recipes/minecraft/crafting_shaped.yml @@ -1022,15 +1022,27 @@ pylon:lava_drainer: pylon:fluid_voider_1: pattern: - " P " - - "IAI" + - "SPS" - " I " key: I: pylon:igneous_composite P: pylon:fluid_pipe_tin - A: pylon:abyssal_catalyst + S: pylon:shimmer_dust_1 result: pylon:fluid_voider_1 category: building +pylon:fluid_voider_2: + pattern: + - " P " + - "SPS" + - " A " + key: + A: pylon:abyssal_catalyst + P: pylon:fluid_pipe_tin + S: pylon:shimmer_dust_2 + result: pylon:fluid_voider_2 + category: building + pylon:loupe: pattern: - " C " @@ -1695,17 +1707,6 @@ pylon:breeding_talisman_simple: result: pylon:breeding_talisman_simple category: equipment -pylon:hunger_talisman_simple: - pattern: - - "AAA" - - "AGA" - - "AAA" - key: - A: minecraft:apple - G: minecraft:golden_apple - result: pylon:hunger_talisman_simple - category: equipment - pylon:luck_talisman_simple: pattern: - "GGG" diff --git a/src/main/resources/recipes/pylon/assembling.yml b/src/main/resources/recipes/pylon/assembling.yml index c1140c35f..b3a6599a0 100644 --- a/src/main/resources/recipes/pylon/assembling.yml +++ b/src/main/resources/recipes/pylon/assembling.yml @@ -228,7 +228,7 @@ pylon:cargo_controller: - name: "base" item: minecraft:light_gray_concrete position: [0.5, 0.5] - scale: [0.8, 0.03, 0.8] + scale: [0.8, 0.05, 0.8] - tool: "screwdriver" icon: pylon:copper_screwdriver @@ -531,243 +531,6 @@ pylon:health_talisman_palladium: position: [ 0.5, 0.3 ] scale: [ 0.3, 0.3, 0.3 ] -pylon:hunger_talisman_palladium: - inputs: - - pylon:hunger_talisman_ultimate: 1 - - pylon:palladium_ingot: 8 - - pylon:shimmer_dust_3: 8 - results: - - pylon:hunger_talisman_palladium - steps: - - tool: "hammer" - icon: pylon:diamond_hammer - clicks: 1 - add-displays: - - name: "pldust1" - item: minecraft:light_blue_concrete_powder - position: [ 0.0, 1.0 ] - scale: [ 0.25, 0.25, 0.25 ] - - name: "talisman" - item: pylon:hunger_talisman_ultimate - position: [ 0.5, 0.5 ] - scale: [ 0.25, 0.25, 0.25 ] - - tool: "hammer" - icon: pylon:diamond_hammer - clicks: 1 - add-displays: - - name: "pldust2" - item: minecraft:light_blue_concrete_powder - position: [ 0.5, 1.0 ] - scale: [ 0.25, 0.25, 0.25 ] - - tool: "hammer" - icon: pylon:diamond_hammer - clicks: 1 - add-displays: - - name: "pldust3" - item: minecraft:light_blue_concrete_powder - position: [ 1.0, 1.0 ] - scale: [ 0.25, 0.25, 0.25 ] - - tool: "hammer" - icon: pylon:diamond_hammer - clicks: 1 - add-displays: - - name: "pldust4" - item: minecraft:light_blue_concrete_powder - position: [ 1.0, 0.5] - scale: [ 0.25, 0.25, 0.25 ] - - tool: "hammer" - icon: pylon:diamond_hammer - clicks: 1 - add-displays: - - name: "pldust5" - item: minecraft:light_blue_concrete_powder - position: [ 1.0, 0.0 ] - scale: [ 0.25, 0.25, 0.25 ] - - tool: "hammer" - icon: pylon:diamond_hammer - clicks: 1 - add-displays: - - name: "pldust6" - item: minecraft:light_blue_concrete_powder - position: [ 0.5, 0.0 ] - scale: [ 0.25, 0.25, 0.25 ] - - tool: "hammer" - icon: pylon:diamond_hammer - clicks: 1 - add-displays: - - name: "pldust7" - item: minecraft:light_blue_concrete_powder - position: [ 0.0, 0.0] - scale: [ 0.25, 0.25, 0.25 ] - - tool: "hammer" - icon: pylon:diamond_hammer - clicks: 1 - add-displays: - - name: "pldust8" - item: minecraft:light_blue_concrete_powder - position: [ 0.0, 0.5 ] - scale: [ 0.25, 0.25, 0.25 ] - - tool: "redstone_soldering_iron" - icon: pylon:redstone_soldering_iron - clicks: 1 - add-displays: - - name: "pldust1sol" - item: minecraft:light_blue_concrete - position: [ 0.0, 1.0 ] - scale: [ 0.3, 0.3, 0.3 ] - remove_displays: - - "pldust1" - - tool: "redstone_soldering_iron" - icon: pylon:redstone_soldering_iron - clicks: 1 - add-displays: - - name: "pldust2sol" - item: minecraft:light_blue_concrete - position: [ 0.5, 1.0 ] - scale: [ 0.3, 0.3, 0.3 ] - remove_displays: - - "pldust2" - - tool: "redstone_soldering_iron" - icon: pylon:redstone_soldering_iron - clicks: 1 - add-displays: - - name: "pldust3sol" - item: minecraft:light_blue_concrete - position: [ 1.0, 1.0 ] - scale: [ 0.3, 0.3, 0.3 ] - remove_displays: - - "pldust3" - - tool: "redstone_soldering_iron" - icon: pylon:redstone_soldering_iron - clicks: 1 - add-displays: - - name: "pldust4sol" - item: minecraft:light_blue_concrete - position: [ 1.0, 0.5 ] - scale: [ 0.3, 0.3, 0.3 ] - remove_displays: - - "pldust4" - - tool: "redstone_soldering_iron" - icon: pylon:redstone_soldering_iron - clicks: 1 - add-displays: - - name: "pldust5sol" - item: minecraft:light_blue_concrete - position: [ 1.0, 0.0 ] - scale: [ 0.3, 0.3, 0.3 ] - remove_displays: - - "pldust5" - - tool: "redstone_soldering_iron" - icon: pylon:redstone_soldering_iron - clicks: 1 - add-displays: - - name: "pldust6sol" - item: minecraft:light_blue_concrete - position: [ 0.5, 0.0 ] - scale: [ 0.3, 0.3, 0.3 ] - remove_displays: - - "pldust6" - - tool: "redstone_soldering_iron" - icon: pylon:redstone_soldering_iron - clicks: 1 - add-displays: - - name: "pldust7sol" - item: minecraft:light_blue_concrete - position: [ 0.0, 0.0 ] - scale: [ 0.3, 0.3, 0.3 ] - remove_displays: - - "pldust7" - - tool: "redstone_soldering_iron" - icon: pylon:redstone_soldering_iron - clicks: 1 - add-displays: - - name: "pldust8sol" - item: minecraft:light_blue_concrete - position: [ 0.0, 0.5 ] - scale: [ 0.3, 0.3, 0.3 ] - remove_displays: - - "pldust8" - - tool: "screwdriver" - icon: pylon:steel_screwdriver - clicks: 1 - remove_displays: - - "pldust1sol" - add-displays: - - name: "pldust1fin" - item: minecraft:light_blue_concrete - position: [0.3, 0.7] - scale: [ 0.3, 0.3, 0.3 ] - - tool: "screwdriver" - icon: pylon:steel_screwdriver - clicks: 1 - remove_displays: - - "pldust2sol" - add-displays: - - name: "pldust2fin" - item: minecraft:light_blue_concrete - position: [ 0.5, 0.7 ] - scale: [ 0.3, 0.3, 0.3 ] - - tool: "screwdriver" - icon: pylon:steel_screwdriver - clicks: 1 - remove_displays: - - "pldust3sol" - add-displays: - - name: "pldust3fin" - item: minecraft:light_blue_concrete - position: [ 0.7, 0.7 ] - scale: [ 0.3, 0.3, 0.3 ] - - tool: "screwdriver" - icon: pylon:steel_screwdriver - clicks: 1 - remove_displays: - - "pldust4sol" - add-displays: - - name: "pldust4fin" - item: minecraft:light_blue_concrete - position: [ 0.7, 0.5 ] - scale: [ 0.3, 0.3, 0.3 ] - - tool: "screwdriver" - icon: pylon:steel_screwdriver - clicks: 1 - remove_displays: - - "pldust5sol" - add-displays: - - name: "pldust5fin" - item: minecraft:light_blue_concrete - position: [ 0.7, 0.3 ] - scale: [ 0.3, 0.3, 0.3 ] - - tool: "screwdriver" - icon: pylon:steel_screwdriver - clicks: 1 - remove_displays: - - "pldust6sol" - add-displays: - - name: "pldust6fin" - item: minecraft:light_blue_concrete - position: [ 0.5, 0.3 ] - scale: [ 0.3, 0.3, 0.3 ] - - tool: "screwdriver" - icon: pylon:steel_screwdriver - clicks: 1 - remove_displays: - - "pldust7sol" - add-displays: - - name: "pldust7fin" - item: minecraft:light_blue_concrete - position: [ 0.3, 0.3 ] - scale: [ 0.3, 0.3, 0.3 ] - - tool: "screwdriver" - icon: pylon:steel_screwdriver - clicks: 1 - remove_displays: - - "pldust8sol" - add-displays: - - name: "pldust8fin" - item: minecraft:light_blue_concrete - position: [ 0.5, 0.3 ] - scale: [ 0.3, 0.3, 0.3 ] - pylon:farming_talisman_palladium: inputs: - pylon:farming_talisman_ultimate: 1 diff --git a/src/main/resources/recipes/pylon/grindstone.yml b/src/main/resources/recipes/pylon/grindstone.yml index 86b8aba31..277c20581 100644 --- a/src/main/resources/recipes/pylon/grindstone.yml +++ b/src/main/resources/recipes/pylon/grindstone.yml @@ -8,7 +8,6 @@ pylon:shallow_core_chunk: - value: pylon:raw_tin weight: 0.3 cycles: 6 - particle-data: minecraft:stone priority: 4 pylon:subsurface_core_chunk: @@ -27,7 +26,6 @@ pylon:subsurface_core_chunk: minecraft:raw_iron: 2 weight: 0.4 cycles: 8 - particle-data: minecraft:stone priority: 3 pylon:intermediate_core_chunk: @@ -50,7 +48,6 @@ pylon:intermediate_core_chunk: - value: pylon:gypsum weight: 0.1 cycles: 10 - particle-data: minecraft:stone priority: 2 pylon:deep_core_chunk: @@ -81,141 +78,124 @@ pylon:deep_core_chunk: minecraft:lapis_lazuli: 5 weight: 0.15 cycles: 20 - particle-data: minecraft:stone priority: 1 pylon:rock_dust: input: "#rebar:rocks" results: pylon:rock_dust cycles: 2 - particle-data: minecraft:cobblestone pylon:sand: input: minecraft:gravel results: minecraft:sand cycles: 2 - particle-data: minecraft:sand pylon:coal_dust: input: "#minecraft:coals" results: pylon:coal_dust cycles: 2 - particle-data: minecraft:coal_block pylon:gypsum_dust_from_gypsum: input: pylon:gypsum results: pylon:gypsum_dust cycles: 8 - particle-data: minecraft:quartz_block pylon:quartz_dust_from_quartz: input: minecraft:quartz results: pylon:quartz_dust cycles: 4 - particle-data: minecraft:quartz_block pylon:diamond_dust_from_diamond: input: minecraft:diamond results: pylon:diamond_dust cycles: 6 - particle-data: minecraft:diamond_block pylon:emerald_dust_from_emerald: input: minecraft:emerald results: pylon:emerald_dust cycles: 6 - particle-data: minecraft:emerald_block pylon:copper_dust_from_copper_ingot: input: minecraft:copper_ingot results: pylon:copper_dust cycles: 2 - particle-data: minecraft:copper_block pylon:copper_dust_from_raw_copper: input: minecraft:raw_copper results: pylon:copper_dust cycles: 4 - particle-data: minecraft:copper_block pylon:iron_dust_from_iron_ingot: input: minecraft:iron_ingot results: pylon:iron_dust cycles: 2 - particle-data: minecraft:iron_block pylon:iron_dust_from_raw_iron: input: minecraft:raw_iron results: pylon:iron_dust cycles: 4 - particle-data: minecraft:iron_block pylon:gold_dust_from_gold_ingot: input: minecraft:gold_ingot results: pylon:gold_dust cycles: 2 - particle-data: minecraft:gold_block pylon:gold_dust_from_raw_gold: input: minecraft:raw_gold results: pylon:gold_dust cycles: 4 - particle-data: minecraft:gold_block pylon:tin_dust_from_tin_ingot: input: pylon:tin_ingot results: pylon:tin_dust cycles: 2 - particle-data: minecraft:iron_block pylon:tin_dust_from_raw_tin: input: pylon:raw_tin results: pylon:tin_dust cycles: 4 - particle-data: minecraft:iron_block pylon:bronze_dust_from_bronze_ingot: input: pylon:bronze_ingot results: pylon:bronze_dust cycles: 2 - particle-data: minecraft:gold_block pylon:steel_dust_from_steel_ingot: input: pylon:steel_ingot results: pylon:steel_dust cycles: 2 - particle-data: minecraft:netherite_block pylon:fiber: input: minecraft:string results: pylon:fiber: 2 cycles: 2 - particle-data: minecraft:white_wool pylon:flour: input: minecraft:wheat results: pylon:flour cycles: 1 - particle-data: minecraft:wheat[age=7] pylon:string_from_bamboo: input: minecraft:bamboo: 4 results: minecraft:string cycles: 3 - particle-data: minecraft:bamboo[age=1] pylon:blaze_powder: input: minecraft:blaze_rod results: minecraft:blaze_powder: 3 cycles: 5 - particle-data: minecraft:yellow_concrete pylon:fine_sediment: input: minecraft:sand results: pylon:fine_sediment: 3 cycles: 1 - particle-data: minecraft:sand \ No newline at end of file + +pylon:clay_ball: + input: minecraft:clay + results: + minecraft:clay_ball: 3 + cycles: 1 \ No newline at end of file diff --git a/src/main/resources/recipes/pylon/hammer.yml b/src/main/resources/recipes/pylon/hammer.yml index dce78fca6..10343150b 100644 --- a/src/main/resources/recipes/pylon/hammer.yml +++ b/src/main/resources/recipes/pylon/hammer.yml @@ -3,93 +3,93 @@ pylon:obsidian_chip: result: pylon:obsidian_chip: 3 mining-level: diamond - chance: 0.2 + uses: 4 pylon:crushed_raw_copper: input: minecraft:raw_copper result: pylon:crushed_raw_copper: 2 mining-level: stone - chance: 0.75 + uses: 1 pylon:crushed_raw_iron: input: minecraft:raw_iron result: pylon:crushed_raw_iron: 2 mining-level: stone - chance: 0.75 + uses: 1 pylon:crushed_raw_gold: input: minecraft:raw_gold result: pylon:crushed_raw_gold: 2 mining-level: iron - chance: 0.75 + uses: 1 pylon:crushed_raw_tin: input: pylon:raw_tin result: pylon:crushed_raw_tin: 2 mining-level: stone - chance: 0.75 + uses: 1 pylon:copper_sheet: input: minecraft:copper_ingot result: pylon:copper_sheet mining-level: stone - chance: 0.25 + uses: 2 pylon:gold_sheet: input: minecraft:gold_ingot result: pylon:gold_sheet mining-level: stone - chance: 0.25 + uses: 2 pylon:iron_sheet: input: minecraft:iron_ingot result: pylon:iron_sheet mining-level: iron - chance: 0.25 + uses: 2 pylon:tin_sheet: input: pylon:tin_ingot result: pylon:tin_sheet mining-level: iron - chance: 0.25 + uses: 2 pylon:bronze_sheet: input: pylon:bronze_ingot result: pylon:bronze_sheet mining-level: iron - chance: 0.25 + uses: 2 pylon:steel_sheet: input: pylon:steel_ingot result: pylon:steel_sheet mining-level: diamond - chance: 0.25 + uses: 2 pylon:palladium_sheet: input: pylon:palladium_ingot result: pylon:palladium_sheet mining-level: diamond - chance: 0.25 + uses: 2 pylon:gravel_from_rocks: input: "#rebar:rocks" result: minecraft:gravel mining-level: stone - chance: 0.5 + uses: 1 pylon:flint_from_gravel: input: minecraft:gravel result: minecraft:flint mining-level: stone - chance: 0.5 + uses: 1 pylon:liselette_conductor: input: pylon:cohesive_unit result: pylon:liselette_conductor: 2 mining-level: iron - chance: 0.5 + uses: 3 diff --git a/src/main/resources/recipes/pylon/mixing_pot.yml b/src/main/resources/recipes/pylon/mixing_pot.yml index 1b6abf352..3b7a53258 100644 --- a/src/main/resources/recipes/pylon/mixing_pot.yml +++ b/src/main/resources/recipes/pylon/mixing_pot.yml @@ -106,24 +106,6 @@ pylon:abyssal_catalyst: pylon:abyssal_catalyst: 1 requires-enriched-fire: true -pylon:fluid_voider_2: - input-items: - - pylon:fluid_voider_1 - input-fluid: - pylon:obscyra: 500 - output: - pylon:fluid_voider_2: 1 - requires-enriched-fire: true - -pylon:fluid_voider_3: - input-items: - - pylon:fluid_voider_2 - input-fluid: - pylon:obscyra: 500 - output: - pylon:fluid_voider_3: 1 - requires-enriched-fire: true - pylon:research_pack_2: input-items: - pylon:hydraulic_motor @@ -195,16 +177,6 @@ pylon:breeding_talisman_advanced: output: pylon:breeding_talisman_advanced: 1 -pylon:hunger_talisman_advanced: - input-items: - - pylon:hunger_talisman_simple: 1 - - pylon:shimmer_dust_2: 2 - - pylon:diamond_dust: 1 - input-fluid: - pylon:plant_oil: 1000 - output: - pylon:hunger_talisman_advanced: 1 - pylon:luck_talisman_advanced: input-items: - pylon:luck_talisman_simple: 1 @@ -297,17 +269,6 @@ pylon:breeding_talisman_ultimate: pylon:breeding_talisman_ultimate: 1 requires-enriched-fire: true -pylon:hunger_talisman_ultimate: - input-items: - - pylon:hunger_talisman_advanced: 1 - - pylon:shimmer_skull: 1 - - pylon:shimmer_dust_3: 4 - input-fluid: - pylon:gold: 500 - output: - pylon:hunger_talisman_ultimate: 1 - requires-enriched-fire: true - pylon:luck_talisman_ultimate: input-items: - pylon:luck_talisman_advanced: 1 diff --git a/src/main/resources/researches.yml b/src/main/resources/researches.yml index d30ed0e00..2117e8560 100644 --- a/src/main/resources/researches.yml +++ b/src/main/resources/researches.yml @@ -18,7 +18,6 @@ talismans_1: cost: 10 unlocks: - pylon:health_talisman_simple - - pylon:hunger_talisman_simple - pylon:farming_talisman_simple - pylon:bartering_talisman_simple - pylon:water_breathing_talisman_simple @@ -33,7 +32,6 @@ talismans_2: cost: 25 unlocks: - pylon:health_talisman_advanced - - pylon:hunger_talisman_advanced - pylon:farming_talisman_advanced - pylon:bartering_talisman_advanced - pylon:water_breathing_talisman_advanced @@ -48,7 +46,6 @@ talismans_3: cost: 60 unlocks: - pylon:health_talisman_ultimate - - pylon:hunger_talisman_ultimate - pylon:farming_talisman_ultimate - pylon:bartering_talisman_ultimate - pylon:water_breathing_talisman_ultimate @@ -64,7 +61,6 @@ talismans_4: cost: 175 unlocks: - pylon:health_talisman_palladium - - pylon:hunger_talisman_palladium - pylon:farming_talisman_palladium - pylon:bartering_talisman_palladium - pylon:water_breathing_talisman_palladium @@ -268,7 +264,6 @@ fluid_machines_3: unlocks: - pylon:fluid_meter - pylon:fluid_accumulator - - pylon:fluid_voider_3 bronze_equipment: item: pylon:bronze_pickaxe diff --git a/src/main/resources/settings/beheading_sword.yml b/src/main/resources/settings/beheading_sword.yml index dd63916ef..89738e43c 100644 --- a/src/main/resources/settings/beheading_sword.yml +++ b/src/main/resources/settings/beheading_sword.yml @@ -1,4 +1,4 @@ durability: 300 head-chance: normal-entity: 0.15 - wither-skeleton: 0.025 + wither-skeleton: 0.075 diff --git a/src/main/resources/settings/fluid_voider_1.yml b/src/main/resources/settings/fluid_voider_1.yml index 0f9bff3a0..8803b2856 100644 --- a/src/main/resources/settings/fluid_voider_1.yml +++ b/src/main/resources/settings/fluid_voider_1.yml @@ -1,3 +1,3 @@ main-material: black_terracotta -fluid-voided-per-second: 50.0 +fluid-voided-per-second: 500.0 main-display-size: 0.3 \ No newline at end of file diff --git a/src/main/resources/settings/fluid_voider_2.yml b/src/main/resources/settings/fluid_voider_2.yml index 08526221e..1cd75d436 100644 --- a/src/main/resources/settings/fluid_voider_2.yml +++ b/src/main/resources/settings/fluid_voider_2.yml @@ -1,3 +1,3 @@ main-material: black_terracotta -fluid-voided-per-second: 100.0 +fluid-voided-per-second: 2000.0 main-display-size: 0.4 diff --git a/src/main/resources/settings/fluid_voider_3.yml b/src/main/resources/settings/fluid_voider_3.yml deleted file mode 100644 index 69d13dc5a..000000000 --- a/src/main/resources/settings/fluid_voider_3.yml +++ /dev/null @@ -1,3 +0,0 @@ -main-material: black_terracotta -fluid-voided-per-second: 200.0 -main-display-size: 0.5 diff --git a/src/main/resources/settings/hydraulic_cannon.yml b/src/main/resources/settings/hydraulic_cannon.yml index 1636b33cb..8c0dbefe5 100644 --- a/src/main/resources/settings/hydraulic_cannon.yml +++ b/src/main/resources/settings/hydraulic_cannon.yml @@ -6,7 +6,7 @@ projectile: material: gray_concrete thickness: 0.08 length: 0.12 - speed-blocks-per-second: 16 - damage: 6 + speed-blocks-per-second: 24 + damage: 8 tick-interval: 1 - lifetime-ticks: 50 \ No newline at end of file + lifetime-ticks: 100 \ No newline at end of file diff --git a/src/main/resources/settings/palladium_boots.yml b/src/main/resources/settings/palladium_boots.yml index 2db5f73f2..30db4b977 100644 --- a/src/main/resources/settings/palladium_boots.yml +++ b/src/main/resources/settings/palladium_boots.yml @@ -1,6 +1,4 @@ durability: 1100 -prot-level: 3 -frost-walker-level: 2 armor-toughness: 3 armor: 3 speed-percentage-increase: 0.1 \ No newline at end of file diff --git a/src/main/resources/settings/palladium_chestplate.yml b/src/main/resources/settings/palladium_chestplate.yml index 169530201..48ca7a846 100644 --- a/src/main/resources/settings/palladium_chestplate.yml +++ b/src/main/resources/settings/palladium_chestplate.yml @@ -1,5 +1,4 @@ durability: 1400 -prot-level: 3 armor-toughness: 8 armor: 8 speed-percentage-increase: 0.1 \ No newline at end of file diff --git a/src/main/resources/settings/palladium_helmet.yml b/src/main/resources/settings/palladium_helmet.yml index 9a36e87bf..30db4b977 100644 --- a/src/main/resources/settings/palladium_helmet.yml +++ b/src/main/resources/settings/palladium_helmet.yml @@ -1,5 +1,4 @@ durability: 1100 -prot-level: 3 armor-toughness: 3 armor: 3 speed-percentage-increase: 0.1 \ No newline at end of file diff --git a/src/main/resources/settings/palladium_leggings.yml b/src/main/resources/settings/palladium_leggings.yml index 0a2a86079..8e6ae71f2 100644 --- a/src/main/resources/settings/palladium_leggings.yml +++ b/src/main/resources/settings/palladium_leggings.yml @@ -1,5 +1,4 @@ durability: 1300 -prot-level: 3 armor-toughness: 6 armor: 6 speed-percentage-increase: 0.1 \ No newline at end of file