From 5876d9a0f8b722186548db806538c3778d915396 Mon Sep 17 00:00:00 2001 From: TerslenK Date: Sun, 21 Aug 2022 22:55:25 +0300 Subject: [PATCH 01/13] yay new dev branch --- .../elementmanipulation/misc/MiscItems.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java index 966754c..4bb0c5c 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java @@ -1,10 +1,13 @@ package me.lucasgithuber.elementmanipulation.misc; +import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.UnplaceableBlock; import me.lucasgithuber.elementmanipulation.ElementManipulation; +import me.lucasgithuber.elementmanipulation.elements.Elements; import me.lucasgithuber.elementmanipulation.utils.Categories; +import net.kyori.adventure.platform.bukkit.BukkitComponentSerializer; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; @@ -31,6 +34,14 @@ public class MiscItems { "&fThis glass is so clear that it seems", "&fThere's nothing in your way" ); + public static final SlimefunItemStack BISMUTH_BLOCK = new SlimefunItemStack( + "EM_BISMUTH_BLOCK", + Material.SEA_LANTERN, + BukkitComponentSerializer.legacy().serialize(ElementManipulation.MM.deserialize( + "Bismuth block")), + BukkitComponentSerializer.legacy().serialize(ElementManipulation.MM.deserialize( + "Glows")) + ); public static void setup(ElementManipulation em){ new UnplaceableBlock(Categories.MISCELLANEOUS, CLEAR_GLASS_1, RecipeType.SMELTERY, new ItemStack[]{ new ItemStack(Material.GLASS_PANE), null, null, @@ -47,5 +58,10 @@ public static void setup(ElementManipulation em){ null, null, null, null, null, null }).register(em); + new SlimefunItem(Categories.MISCELLANEOUS, BISMUTH_BLOCK, RecipeType.COMPRESSOR, new ItemStack[]{ + Elements.BISMUTH,Elements.BISMUTH,Elements.BISMUTH, + Elements.BISMUTH,Elements.BISMUTH,Elements.BISMUTH, + Elements.BISMUTH,Elements.BISMUTH,Elements.BISMUTH + }).register(em); } } From f7cbf2cad847521d1704608df8f316c427369646 Mon Sep 17 00:00:00 2001 From: lucasGithuber <91435998+lucasGithuber@users.noreply.github.com> Date: Wed, 31 Aug 2022 17:42:10 -0300 Subject: [PATCH 02/13] druggies --- pom.xml | 2 +- .../ElementManipulation.java | 2 +- .../elementmanipulation/drugs/Alcohol.java | 51 +++++++++++++++++++ .../elementmanipulation/drugs/Anesthesic.java | 51 +++++++++++++++++++ .../elementmanipulation/drugs/Drugs.java | 32 ++++++++++++ .../machines/Machines.java | 4 +- .../elementmanipulation/utils/Categories.java | 4 +- 7 files changed, 140 insertions(+), 6 deletions(-) create mode 100644 src/main/java/me/lucasgithuber/elementmanipulation/drugs/Alcohol.java create mode 100644 src/main/java/me/lucasgithuber/elementmanipulation/drugs/Anesthesic.java diff --git a/pom.xml b/pom.xml index 4db698f..26563da 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 me.lucasgithuber ElementManipulation - 1.0.2 + MODIFIED 16 diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/ElementManipulation.java b/src/main/java/me/lucasgithuber/elementmanipulation/ElementManipulation.java index 02bacbf..c48bbb5 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/ElementManipulation.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/ElementManipulation.java @@ -37,7 +37,7 @@ public void enable() { Materials.setup(this); Machines.setup(this); MiscItems.setup(this); - //Drugs.setup(this); + Drugs.setup(this); /*PortalCorners.setup(this);*/ new Metrics(this, 13718); } diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Alcohol.java b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Alcohol.java new file mode 100644 index 0000000..6813445 --- /dev/null +++ b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Alcohol.java @@ -0,0 +1,51 @@ +package me.lucasgithuber.elementmanipulation.drugs; + +import io.github.thebusybiscuit.slimefun4.api.events.PlayerRightClickEvent; +import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup; +import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; +import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; +import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable; +import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler; +import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem; +import me.lucasgithuber.elementmanipulation.ElementManipulation; +import org.bukkit.GameMode; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +import javax.annotation.Nonnull; + +public class Alcohol extends SimpleSlimefunItem implements NotPlaceable { + private final String durationsPath = "drugs.alcohol.effects-duration."; + private final String powersPath = "drugs.alcohol.effects-power."; + public Alcohol(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + super(itemGroup, item, recipeType, recipe); + + } + + @Override + public void preRegister() { + addItemHandler(onUse()); + } + + @Nonnull + @Override + public ItemUseHandler getItemHandler() { + return PlayerRightClickEvent::cancel; + } + + @Nonnull + protected ItemUseHandler onUse() { + return e -> { + Player p = e.getPlayer(); + ItemStack itemStack = p.getInventory().getItemInMainHand(); + if (p.getGameMode() != GameMode.CREATIVE && itemStack.getAmount()>=1) { + itemStack.setAmount(itemStack.getAmount() - 1); + } + p.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION, ElementManipulation.config().getInt(durationsPath + "nausea") * 20, 2, false, false, false)); + p.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, ElementManipulation.config().getInt(durationsPath + "regeneration") * 20, 0, false, false, false)); + + }; + } +} \ No newline at end of file diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Anesthesic.java b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Anesthesic.java new file mode 100644 index 0000000..4539b1a --- /dev/null +++ b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Anesthesic.java @@ -0,0 +1,51 @@ +package me.lucasgithuber.elementmanipulation.drugs; + +import io.github.thebusybiscuit.slimefun4.api.events.PlayerRightClickEvent; +import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup; +import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; +import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; +import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable; +import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler; +import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem; +import me.lucasgithuber.elementmanipulation.ElementManipulation; +import org.bukkit.GameMode; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +import javax.annotation.Nonnull; + +public class Anesthetic extends SimpleSlimefunItem implements NotPlaceable { + private final String durationsPath = "drugs.anesthetic.effects-duration."; + private final String powersPath = "drugs.anesthetic.effects-power."; + public Anesthetic(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + super(itemGroup, item, recipeType, recipe); + + } + + @Override + public void preRegister() { + addItemHandler(onUse()); + } + + @Nonnull + @Override + public ItemUseHandler getItemHandler() { + return PlayerRightClickEvent::cancel; + } + + @Nonnull + protected ItemUseHandler onUse() { + return e -> { + Player p = e.getPlayer(); + ItemStack itemStack = p.getInventory().getItemInMainHand(); + if (p.getGameMode() != GameMode.CREATIVE && itemStack.getAmount()>=16) { + itemStack.setAmount(itemStack.getAmount() - 16); + } + p.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, ElementManipulation.config().getInt(durationsPath + "damage-resistance") * 20, 250, false, false, false)); + p.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, ElementManipulation.config().getInt(durationsPath + "fire-resistance") * 20, 250, false, false, false)); + p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, ElementManipulation.config().getInt(durationsPath + "blindness") * 20, 1, false, false, false)); + }; + } +} \ No newline at end of file diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java index 75aac56..c9de331 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java @@ -6,6 +6,7 @@ import me.lucasgithuber.elementmanipulation.utils.Categories; import net.md_5.bungee.api.ChatColor; import org.bukkit.Material; +import org.bukkit.Color; import org.bukkit.inventory.ItemStack; import static me.lucasgithuber.elementmanipulation.elements.Elements.*; @@ -23,6 +24,21 @@ public class Drugs { ChatColor.WHITE +"Cocaine", ChatColor.WHITE +"Makes you feel good" + ); + public static final SlimefunItemStack ALCOHOL = new SlimefunItemStack( + "EM_ALCOHOL", + Color.White, + new PotionEffect(PotionEffectType.NIGHT_VISION 2, 0), + ChatColor.of("#FFD78A") + "Alcohol", + ChatColor.of("#FFD78A") + "Makes you drunk", + ChatColor.of("#FFD78A") + "Makes emotional pain go away", + ); + public static final SlimefunItemStack ANESTHETIC = new SlimefunItemStack( + "EM_ANESTHETIC", + Material.END_ROD, + "&8anesthetic", + "&8Makes you feel good" + ); public static void setup(ElementManipulation em){ new Caffeine(Categories.DRUGS_CHEAT, CAFFEINE, DrugsTable.TYPE, new ItemStack[]{ @@ -41,5 +57,21 @@ public static void setup(ElementManipulation em){ null,null,null,CARBON,null,null, null,null,null,HYDROGEN,NITROGEN,HYDROGEN }).register(em); + new Alcohol(Categories.DRUGS_CHEAT, COCAINE, DrugsTable.TYPE, new ItemStack[]{ + new ItemStack(Material.GLASS_BOTTLE),HYDROGEN,HYDROGEN,null,null,null, + HYDROGEN,CARBON,CARBON,OXYGEN,HYDROGEN,null, + null,HYDROGEN,HYDROGEN,null,null,null, + null,HYDROGEN,HYDROGEN,null,null,null, + HYDROGEN,CARBON,CARBON,OXYGEN,HYDROGEN,null, + null,HYDROGEN,HYDROGEN,null,null,null, + }).register(em); + new Anesthetic(Categories.DRUGS_CHEAT, COCAINE, DrugsTable.TYPE, new ItemStack[]{ + ,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, + HYDROGEN,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, + HYDROGEN,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, + HYDROGEN,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, + HYDROGEN,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, + HYDROGEN,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, + }).register(em); } } diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/machines/Machines.java b/src/main/java/me/lucasgithuber/elementmanipulation/machines/Machines.java index 7f2d166..0b996b8 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/machines/Machines.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/machines/Machines.java @@ -84,11 +84,11 @@ SlimefunItems.REINFORCED_PLATE,new ItemStack(Material.GLASS),SlimefunItems.REINF SlimefunItems.REINFORCED_PLATE, new ItemStack(Material.GLASS), SlimefunItems.REINFORCED_PLATE, SlimefunItems.REINFORCED_PLATE, SlimefunItems.LARGE_CAPACITOR, SlimefunItems.REINFORCED_PLATE }).setProcessingSpeed(1).setCapacity(64).setEnergyConsumption(16); - /*new DrugsTable(Categories.MACHINES, DRUGS_TABLE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[]{ + new DrugsTable(Categories.MACHINES, DRUGS_TABLE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[]{ new ItemStack(Material.NETHER_STAR), MiscItems.CLEAR_GLASS_3,new ItemStack(Material.NETHER_STAR), SlimefunItems.REINFORCED_PLATE,SlimefunItems.CRAFTING_MOTOR,SlimefunItems.REINFORCED_PLATE, new ItemStack(Material.BLACK_CONCRETE),SlimefunItems.LARGE_CAPACITOR,new ItemStack(Material.BLACK_CONCRETE), - }, 4096).register(em);*/ + }, 4096).register(em); /*new PortalTable(Categories.MACHINES, PORTAL_TABLE, new ItemStack[] { * null , null , null, null, new ItemStack(Material.DARK_OAK_FENCE), null, diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/utils/Categories.java b/src/main/java/me/lucasgithuber/elementmanipulation/utils/Categories.java index e948159..839532a 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/utils/Categories.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/utils/Categories.java @@ -61,10 +61,10 @@ public class Categories { public static void setup(ElementManipulation em){ JUNCTION_CATEGORY.register(em); - /*DRUGS_CATEGORY.register(em);*/ + DRUGS_CATEGORY.register(em); MAIN.register(em); JUNCTION_CHEAT.register(em); - /*DRUGS_CHEAT.register(em);*/ + DRUGS_CHEAT.register(em); } } From 3811335c2fe3c1fe6da9455583249667a4aca0eb Mon Sep 17 00:00:00 2001 From: lucasGithuber <91435998+lucasGithuber@users.noreply.github.com> Date: Wed, 31 Aug 2022 18:00:33 -0300 Subject: [PATCH 03/13] i hate coding in github.dev --- .../me/lucasgithuber/elementmanipulation/drugs/Drugs.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java index c9de331..cdddca1 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java @@ -28,10 +28,10 @@ public class Drugs { public static final SlimefunItemStack ALCOHOL = new SlimefunItemStack( "EM_ALCOHOL", Color.White, - new PotionEffect(PotionEffectType.NIGHT_VISION 2, 0), + new PotionEffect(PotionEffectType.NIGHT_VISION, 2, 0), ChatColor.of("#FFD78A") + "Alcohol", ChatColor.of("#FFD78A") + "Makes you drunk", - ChatColor.of("#FFD78A") + "Makes emotional pain go away", + ChatColor.of("#FFD78A") + "Makes emotional pain go away" ); public static final SlimefunItemStack ANESTHETIC = new SlimefunItemStack( "EM_ANESTHETIC", From ddd8297f74c46924de7b4f706f52fb6f22c5b21e Mon Sep 17 00:00:00 2001 From: lucasGithuber <91435998+lucasGithuber@users.noreply.github.com> Date: Wed, 31 Aug 2022 18:27:13 -0300 Subject: [PATCH 04/13] i need good commit names --- .../elementmanipulation/drugs/Drugs.java | 14 ++++----- .../machines/Deconstructor.java | 1 + .../elementmanipulation/misc/MiscItems.java | 30 ++++++++++--------- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java index cdddca1..d331f09 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java @@ -28,15 +28,15 @@ public class Drugs { public static final SlimefunItemStack ALCOHOL = new SlimefunItemStack( "EM_ALCOHOL", Color.White, - new PotionEffect(PotionEffectType.NIGHT_VISION, 2, 0), + new PotionEffect(PotionEffectType.NIGHT_VISION 2, 0), ChatColor.of("#FFD78A") + "Alcohol", ChatColor.of("#FFD78A") + "Makes you drunk", - ChatColor.of("#FFD78A") + "Makes emotional pain go away" + ChatColor.of("#FFD78A") + "Makes emotional pain go away", ); - public static final SlimefunItemStack ANESTHETIC = new SlimefunItemStack( - "EM_ANESTHETIC", + public static final SlimefunItemStack ANESTHESIC = new SlimefunItemStack( + "EM_ANESTHESIC", Material.END_ROD, - "&8anesthetic", + "&8anesthesic", "&8Makes you feel good" ); @@ -57,7 +57,7 @@ public static void setup(ElementManipulation em){ null,null,null,CARBON,null,null, null,null,null,HYDROGEN,NITROGEN,HYDROGEN }).register(em); - new Alcohol(Categories.DRUGS_CHEAT, COCAINE, DrugsTable.TYPE, new ItemStack[]{ + new Alcohol(Categories.DRUGS_CHEAT, ALCOHOL, DrugsTable.TYPE, new ItemStack[]{ new ItemStack(Material.GLASS_BOTTLE),HYDROGEN,HYDROGEN,null,null,null, HYDROGEN,CARBON,CARBON,OXYGEN,HYDROGEN,null, null,HYDROGEN,HYDROGEN,null,null,null, @@ -65,7 +65,7 @@ public static void setup(ElementManipulation em){ HYDROGEN,CARBON,CARBON,OXYGEN,HYDROGEN,null, null,HYDROGEN,HYDROGEN,null,null,null, }).register(em); - new Anesthetic(Categories.DRUGS_CHEAT, COCAINE, DrugsTable.TYPE, new ItemStack[]{ + new Anesthetic(Categories.DRUGS_CHEAT, ANESTHESIC, DrugsTable.TYPE, new ItemStack[]{ ,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, HYDROGEN,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, HYDROGEN,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/machines/Deconstructor.java b/src/main/java/me/lucasgithuber/elementmanipulation/machines/Deconstructor.java index d4f05e6..20a9196 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/machines/Deconstructor.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/machines/Deconstructor.java @@ -98,6 +98,7 @@ public void registerDefaultRecipes() { new CustomItemStack(Elements.SODIUM, 8), new CustomItemStack(Elements.CALCIUM, 8), new CustomItemStack(Elements.SILICON, 4), + new CustomItemStack(Elements.SULFUR, 4), }); registerRecipe(4, new ItemStack[] {new ItemStack(Material.EMERALD, 64)}, new ItemStack[] { diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java index 4bb0c5c..e4ca7eb 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java @@ -1,16 +1,15 @@ package me.lucasgithuber.elementmanipulation.misc; -import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.UnplaceableBlock; import me.lucasgithuber.elementmanipulation.ElementManipulation; -import me.lucasgithuber.elementmanipulation.elements.Elements; import me.lucasgithuber.elementmanipulation.utils.Categories; -import net.kyori.adventure.platform.bukkit.BukkitComponentSerializer; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; +import static me.lucasgithuber.elementmanipulation.elements.Elements.*; + public class MiscItems { public static final SlimefunItemStack CLEAR_GLASS_1 = new SlimefunItemStack( "EM_CLEAR_GLASS_1", @@ -34,13 +33,11 @@ public class MiscItems { "&fThis glass is so clear that it seems", "&fThere's nothing in your way" ); - public static final SlimefunItemStack BISMUTH_BLOCK = new SlimefunItemStack( - "EM_BISMUTH_BLOCK", - Material.SEA_LANTERN, - BukkitComponentSerializer.legacy().serialize(ElementManipulation.MM.deserialize( - "Bismuth block")), - BukkitComponentSerializer.legacy().serialize(ElementManipulation.MM.deserialize( - "Glows")) + public static final SlimefunItemStack SYRINGE = new SlimefunItemStack( + "EM_SYRINGE", + Material.END_ROD, + "&fSyringe", + "&fUsed to put anesthetics" ); public static void setup(ElementManipulation em){ new UnplaceableBlock(Categories.MISCELLANEOUS, CLEAR_GLASS_1, RecipeType.SMELTERY, new ItemStack[]{ @@ -58,10 +55,15 @@ public static void setup(ElementManipulation em){ null, null, null, null, null, null }).register(em); - new SlimefunItem(Categories.MISCELLANEOUS, BISMUTH_BLOCK, RecipeType.COMPRESSOR, new ItemStack[]{ - Elements.BISMUTH,Elements.BISMUTH,Elements.BISMUTH, - Elements.BISMUTH,Elements.BISMUTH,Elements.BISMUTH, - Elements.BISMUTH,Elements.BISMUTH,Elements.BISMUTH + new UnplaceableBlock(Categories.MISCELLANEOUS, SYRINGE, RecipeType.SMELTERY, new ItemStack[]{ + SlimefunItems.PLASTIC_SHEET, null, SlimefunItems.PLASTIC_SHEET, + SlimefunItems.PLASTIC_SHEET, null, SlimefunItems.PLASTIC_SHEET, + SlimefunItems.PLASTIC_SHEET, Materials.RUBBER_PISTOL, SlimefunItems.PLASTIC_SHEET }).register(em); + new SlimefunItem(Categories.MISCELLANEOUS, RUBBER_PISTON, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[]{ + SULFUR,SULFUR,SULFUR, + SULFUR,CARBON,SULFUR, + SULFUR,SULFUR,SULFUR, + }) } } From afb68c51543578a4e6fca1c5893c5fda3ca954c4 Mon Sep 17 00:00:00 2001 From: lucasGithuber <91435998+lucasGithuber@users.noreply.github.com> Date: Wed, 31 Aug 2022 18:33:32 -0300 Subject: [PATCH 05/13] too bad i cant see errors in github.dev --- .../elementmanipulation/drugs/Drugs.java | 11 ++++++----- .../elementmanipulation/misc/MiscItems.java | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java index d331f09..8c0d0c5 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java @@ -4,6 +4,7 @@ import me.lucasgithuber.elementmanipulation.ElementManipulation; import me.lucasgithuber.elementmanipulation.machines.DrugsTable; import me.lucasgithuber.elementmanipulation.utils.Categories; +import me.lucasgithuber.elementmanipulation.misc.MiscItems; import net.md_5.bungee.api.ChatColor; import org.bukkit.Material; import org.bukkit.Color; @@ -33,11 +34,11 @@ public class Drugs { ChatColor.of("#FFD78A") + "Makes you drunk", ChatColor.of("#FFD78A") + "Makes emotional pain go away", ); - public static final SlimefunItemStack ANESTHESIC = new SlimefunItemStack( - "EM_ANESTHESIC", + public static final SlimefunItemStack ANESTHETIC = new SlimefunItemStack( + "EM_ANESTHETIC", Material.END_ROD, - "&8anesthesic", - "&8Makes you feel good" + "&8anesthetic", + "&8Makes you feel nothing" ); public static void setup(ElementManipulation em){ @@ -66,7 +67,7 @@ public static void setup(ElementManipulation em){ null,HYDROGEN,HYDROGEN,null,null,null, }).register(em); new Anesthetic(Categories.DRUGS_CHEAT, ANESTHESIC, DrugsTable.TYPE, new ItemStack[]{ - ,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, + MiscItems.SYRINGE,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, HYDROGEN,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, HYDROGEN,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, HYDROGEN,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java index e4ca7eb..beeb20f 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java @@ -64,6 +64,6 @@ public static void setup(ElementManipulation em){ SULFUR,SULFUR,SULFUR, SULFUR,CARBON,SULFUR, SULFUR,SULFUR,SULFUR, - }) + }).register(em); } } From 59bda8dc937f756735834a2df18143ad3e1d1793 Mon Sep 17 00:00:00 2001 From: lucasGithuber <91435998+lucasGithuber@users.noreply.github.com> Date: Wed, 31 Aug 2022 18:37:20 -0300 Subject: [PATCH 06/13] please work bruh --- .../java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java index 8c0d0c5..93d114c 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java @@ -29,7 +29,7 @@ public class Drugs { public static final SlimefunItemStack ALCOHOL = new SlimefunItemStack( "EM_ALCOHOL", Color.White, - new PotionEffect(PotionEffectType.NIGHT_VISION 2, 0), + new PotionEffect(PotionEffectType.NIGHT_VISION, 2, 0), ChatColor.of("#FFD78A") + "Alcohol", ChatColor.of("#FFD78A") + "Makes you drunk", ChatColor.of("#FFD78A") + "Makes emotional pain go away", From d9be133f9f849f572f3fffc51392bcaaec380e59 Mon Sep 17 00:00:00 2001 From: lucasGithuber <91435998+lucasGithuber@users.noreply.github.com> Date: Wed, 31 Aug 2022 18:41:24 -0300 Subject: [PATCH 07/13] just a comma --- .../java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java index 93d114c..7540456 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java @@ -32,14 +32,13 @@ public class Drugs { new PotionEffect(PotionEffectType.NIGHT_VISION, 2, 0), ChatColor.of("#FFD78A") + "Alcohol", ChatColor.of("#FFD78A") + "Makes you drunk", - ChatColor.of("#FFD78A") + "Makes emotional pain go away", + ChatColor.of("#FFD78A") + "Makes emotional pain go away" ); public static final SlimefunItemStack ANESTHETIC = new SlimefunItemStack( "EM_ANESTHETIC", Material.END_ROD, "&8anesthetic", "&8Makes you feel nothing" - ); public static void setup(ElementManipulation em){ new Caffeine(Categories.DRUGS_CHEAT, CAFFEINE, DrugsTable.TYPE, new ItemStack[]{ From 422298298d94a26cfc2abc5b22bab17654700c6a Mon Sep 17 00:00:00 2001 From: lucasGithuber <91435998+lucasGithuber@users.noreply.github.com> Date: Wed, 31 Aug 2022 18:56:28 -0300 Subject: [PATCH 08/13] one comma that make lots of error --- .../elementmanipulation/drugs/Anesthesic.java | 8 ++++---- .../me/lucasgithuber/elementmanipulation/drugs/Drugs.java | 8 ++++---- .../lucasgithuber/elementmanipulation/misc/MiscItems.java | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Anesthesic.java b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Anesthesic.java index 4539b1a..2a729cb 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Anesthesic.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Anesthesic.java @@ -16,10 +16,10 @@ import javax.annotation.Nonnull; -public class Anesthetic extends SimpleSlimefunItem implements NotPlaceable { - private final String durationsPath = "drugs.anesthetic.effects-duration."; - private final String powersPath = "drugs.anesthetic.effects-power."; - public Anesthetic(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { +public class Anesthesic extends SimpleSlimefunItem implements NotPlaceable { + private final String durationsPath = "drugs.anesthesic.effects-duration."; + private final String powersPath = "drugs.anesthesic.effects-power."; + public Anesthesic(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { super(itemGroup, item, recipeType, recipe); } diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java index 7540456..39a6131 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java @@ -34,10 +34,10 @@ public class Drugs { ChatColor.of("#FFD78A") + "Makes you drunk", ChatColor.of("#FFD78A") + "Makes emotional pain go away" ); - public static final SlimefunItemStack ANESTHETIC = new SlimefunItemStack( - "EM_ANESTHETIC", + public static final SlimefunItemStack ANESTHESIC = new SlimefunItemStack( + "EM_ANESTHESIC", Material.END_ROD, - "&8anesthetic", + "&8anesthesic", "&8Makes you feel nothing" ); public static void setup(ElementManipulation em){ @@ -65,7 +65,7 @@ public static void setup(ElementManipulation em){ HYDROGEN,CARBON,CARBON,OXYGEN,HYDROGEN,null, null,HYDROGEN,HYDROGEN,null,null,null, }).register(em); - new Anesthetic(Categories.DRUGS_CHEAT, ANESTHESIC, DrugsTable.TYPE, new ItemStack[]{ + new Anesthesic(Categories.DRUGS_CHEAT, ANESTHESIC, DrugsTable.TYPE, new ItemStack[]{ MiscItems.SYRINGE,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, HYDROGEN,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, HYDROGEN,CARBON,NITROGEN,NITROGEN,CARBON,HYDROGEN, diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java index beeb20f..c06a52c 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java @@ -37,7 +37,7 @@ public class MiscItems { "EM_SYRINGE", Material.END_ROD, "&fSyringe", - "&fUsed to put anesthetics" + "&fUsed to put anesthesics" ); public static void setup(ElementManipulation em){ new UnplaceableBlock(Categories.MISCELLANEOUS, CLEAR_GLASS_1, RecipeType.SMELTERY, new ItemStack[]{ From 12bf574867cb211a94eec41ec8764a3806ff4f38 Mon Sep 17 00:00:00 2001 From: lucasGithuber <91435998+lucasGithuber@users.noreply.github.com> Date: Wed, 31 Aug 2022 19:01:24 -0300 Subject: [PATCH 09/13] bruh --- .../lucasgithuber/elementmanipulation/ElementManipulation.java | 1 + .../me/lucasgithuber/elementmanipulation/misc/MiscItems.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/ElementManipulation.java b/src/main/java/me/lucasgithuber/elementmanipulation/ElementManipulation.java index c48bbb5..a3ebd56 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/ElementManipulation.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/ElementManipulation.java @@ -9,6 +9,7 @@ import me.lucasgithuber.elementmanipulation.misc.MiscItems; import me.lucasgithuber.elementmanipulation.utils.Categories; import net.kyori.adventure.text.minimessage.MiniMessage; +import me.lucasgithuber.elementmanipulation.drugs.Drugs; import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; import net.kyori.adventure.text.minimessage.tag.standard.StandardTags; import org.bstats.bukkit.Metrics; diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java index c06a52c..5f22386 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java @@ -1,6 +1,7 @@ package me.lucasgithuber.elementmanipulation.misc; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; +import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems; import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.UnplaceableBlock; import me.lucasgithuber.elementmanipulation.ElementManipulation; From b3452f8e28b0e357fca0bc6693252cc12363577a Mon Sep 17 00:00:00 2001 From: lucasGithuber <91435998+lucasGithuber@users.noreply.github.com> Date: Wed, 31 Aug 2022 19:03:46 -0300 Subject: [PATCH 10/13] . --- .../me/lucasgithuber/elementmanipulation/misc/MiscItems.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java index 5f22386..7877cb7 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java @@ -6,6 +6,7 @@ import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.UnplaceableBlock; import me.lucasgithuber.elementmanipulation.ElementManipulation; import me.lucasgithuber.elementmanipulation.utils.Categories; +import me.lucasgithuber.elementmanipulation.items.Materials; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; From a08b2343a3e3675b19de07e13716669f28897141 Mon Sep 17 00:00:00 2001 From: lucasGithuber <91435998+lucasGithuber@users.noreply.github.com> Date: Wed, 31 Aug 2022 19:09:49 -0300 Subject: [PATCH 11/13] finally? --- .../me/lucasgithuber/elementmanipulation/drugs/Drugs.java | 4 +++- .../lucasgithuber/elementmanipulation/misc/MiscItems.java | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java index 39a6131..67d92cc 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/drugs/Drugs.java @@ -9,6 +9,8 @@ import org.bukkit.Material; import org.bukkit.Color; import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; import static me.lucasgithuber.elementmanipulation.elements.Elements.*; @@ -28,7 +30,7 @@ public class Drugs { ); public static final SlimefunItemStack ALCOHOL = new SlimefunItemStack( "EM_ALCOHOL", - Color.White, + Color.WHITE, new PotionEffect(PotionEffectType.NIGHT_VISION, 2, 0), ChatColor.of("#FFD78A") + "Alcohol", ChatColor.of("#FFD78A") + "Makes you drunk", diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java index 7877cb7..8805199 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java @@ -41,6 +41,12 @@ public class MiscItems { "&fSyringe", "&fUsed to put anesthesics" ); + public static final SlimefunItemStack RUBBER_PISTON = new SlimefunItemStack( + "EM_RUBBER_PISTON", + Material.BLACK_DYE, + "&7Rubber piston", + "&7Component of syringes" + ); public static void setup(ElementManipulation em){ new UnplaceableBlock(Categories.MISCELLANEOUS, CLEAR_GLASS_1, RecipeType.SMELTERY, new ItemStack[]{ new ItemStack(Material.GLASS_PANE), null, null, @@ -60,7 +66,7 @@ public static void setup(ElementManipulation em){ new UnplaceableBlock(Categories.MISCELLANEOUS, SYRINGE, RecipeType.SMELTERY, new ItemStack[]{ SlimefunItems.PLASTIC_SHEET, null, SlimefunItems.PLASTIC_SHEET, SlimefunItems.PLASTIC_SHEET, null, SlimefunItems.PLASTIC_SHEET, - SlimefunItems.PLASTIC_SHEET, Materials.RUBBER_PISTOL, SlimefunItems.PLASTIC_SHEET + SlimefunItems.PLASTIC_SHEET, Materials.RUBBER_PISTON, SlimefunItems.PLASTIC_SHEET }).register(em); new SlimefunItem(Categories.MISCELLANEOUS, RUBBER_PISTON, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[]{ SULFUR,SULFUR,SULFUR, From fc5a868cc84553a6ad39fec334faf8634dad4188 Mon Sep 17 00:00:00 2001 From: lucasGithuber <91435998+lucasGithuber@users.noreply.github.com> Date: Wed, 31 Aug 2022 19:14:17 -0300 Subject: [PATCH 12/13] now? --- .../lucasgithuber/elementmanipulation/machines/Machines.java | 1 + .../me/lucasgithuber/elementmanipulation/misc/MiscItems.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/machines/Machines.java b/src/main/java/me/lucasgithuber/elementmanipulation/machines/Machines.java index 0b996b8..1d0830d 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/machines/Machines.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/machines/Machines.java @@ -9,6 +9,7 @@ import io.github.thebusybiscuit.slimefun4.utils.LoreBuilder; import me.lucasgithuber.elementmanipulation.ElementManipulation; import me.lucasgithuber.elementmanipulation.utils.Categories; +import me.lucasgithuber.elementmanipulation.misc.MiscItems; import net.kyori.adventure.platform.bukkit.BukkitComponentSerializer; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java index 8805199..2d8ab5e 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java @@ -9,6 +9,7 @@ import me.lucasgithuber.elementmanipulation.items.Materials; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; +import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem; import static me.lucasgithuber.elementmanipulation.elements.Elements.*; @@ -66,7 +67,7 @@ public static void setup(ElementManipulation em){ new UnplaceableBlock(Categories.MISCELLANEOUS, SYRINGE, RecipeType.SMELTERY, new ItemStack[]{ SlimefunItems.PLASTIC_SHEET, null, SlimefunItems.PLASTIC_SHEET, SlimefunItems.PLASTIC_SHEET, null, SlimefunItems.PLASTIC_SHEET, - SlimefunItems.PLASTIC_SHEET, Materials.RUBBER_PISTON, SlimefunItems.PLASTIC_SHEET + SlimefunItems.PLASTIC_SHEET, RUBBER_PISTON, SlimefunItems.PLASTIC_SHEET }).register(em); new SlimefunItem(Categories.MISCELLANEOUS, RUBBER_PISTON, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[]{ SULFUR,SULFUR,SULFUR, From 01266697fe9ede7a494f14710ef0bdbff1794286 Mon Sep 17 00:00:00 2001 From: lucasGithuber <91435998+lucasGithuber@users.noreply.github.com> Date: Wed, 31 Aug 2022 19:18:12 -0300 Subject: [PATCH 13/13] ... --- .../elementmanipulation/misc/MiscItems.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java index 2d8ab5e..af4cb79 100644 --- a/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java +++ b/src/main/java/me/lucasgithuber/elementmanipulation/misc/MiscItems.java @@ -64,15 +64,16 @@ public static void setup(ElementManipulation em){ null, null, null, null, null, null }).register(em); - new UnplaceableBlock(Categories.MISCELLANEOUS, SYRINGE, RecipeType.SMELTERY, new ItemStack[]{ - SlimefunItems.PLASTIC_SHEET, null, SlimefunItems.PLASTIC_SHEET, - SlimefunItems.PLASTIC_SHEET, null, SlimefunItems.PLASTIC_SHEET, - SlimefunItems.PLASTIC_SHEET, RUBBER_PISTON, SlimefunItems.PLASTIC_SHEET - }).register(em); new SlimefunItem(Categories.MISCELLANEOUS, RUBBER_PISTON, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[]{ SULFUR,SULFUR,SULFUR, SULFUR,CARBON,SULFUR, SULFUR,SULFUR,SULFUR, }).register(em); + new UnplaceableBlock(Categories.MISCELLANEOUS, SYRINGE, RecipeType.SMELTERY, new ItemStack[]{ + SlimefunItems.PLASTIC_SHEET, null, SlimefunItems.PLASTIC_SHEET, + SlimefunItems.PLASTIC_SHEET, null, SlimefunItems.PLASTIC_SHEET, + SlimefunItems.PLASTIC_SHEET, RUBBER_PISTON, SlimefunItems.PLASTIC_SHEET + }).register(em); + } }