Crafting recipe for end gateway not working?

Discussion in 'Spigot Plugin Development' started by avighnash, Jun 6, 2016.

  1. Hello! For my plugin, I am making recipes for non attainable items.
    Here is the end gateway method:

    Code (Text):
    private void voidRecipe() {

            ShapedRecipe vrecipe = new ShapedRecipe(new ItemStack(Material.END_GATEWAY));
            vrecipe.shape("ege", "gog", "ege");
            vrecipe.setIngredient('e', Material.ENDER_PEARL);
            vrecipe.setIngredient('o', Material.OBSIDIAN);
            vrecipe.setIngredient('g', Material.THIN_GLASS);

            Bukkit.getServer().addRecipe(vrecipe);

        }
    and in my oneanble I call the method. All my other recipes work, and they are formatted exactly the same.
    Why does it not work?
     
  2. Try giving yourself an END_GATEWAY item, it probably won't work. If it didn't use something like a blue wool named "End Gateway" and detect it on replace to replace it with an end_gateway.
     
  3. WAIT
    There is an error!

    Code (Text):
    [17:26:23 FATAL]: Error executing task
    java.util.concurrent.ExecutionException: java.lang.NullPointerException
            at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_91]
            at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_91]
            at net.minecraft.server.v1_9_R1.SystemUtils.a(SourceFile:46) [spigot.jar:git-Spigot-129f87a-6bf25cd]
            at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:721) [spigot.jar:git-Spigot-129f87a-6bf25cd]
            at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot.jar:git-Spigot-129f87a-6bf25cd]
            at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot.jar:git-Spigot-129f87a-6bf25cd]
            at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot.jar:git-Spigot-129f87a-6bf25cd]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_91]
    Caused by: java.lang.NullPointerException
            at net.minecraft.server.v1_9_R1.ShapedRecipes.craftItem(ShapedRecipes.java:150) ~[spigot.jar:git-Spigot-129f87a-6bf25cd]
            at net.minecraft.server.v1_9_R1.CraftingManager.craft(CraftingManager.java:306) ~[spigot.jar:git-Spigot-129f87a-6bf25cd]
            at net.minecraft.server.v1_9_R1.ContainerWorkbench.a(ContainerWorkbench.java:56) ~[spigot.jar:git-Spigot-129f87a-6bf25cd]
            at net.minecraft.server.v1_9_R1.InventoryCrafting.setItem(InventoryCrafting.java:115) ~[spigot.jar:git-Spigot-129f87a-6bf25cd]
            at net.minecraft.server.v1_9_R1.Slot.set(Slot.java:55) ~[spigot.jar:git-Spigot-129f87a-6bf25cd]
            at org.bukkit.craftbukkit.v1_9_R1.inventory.CraftInventoryView.setItem(CraftInventoryView.java:54) ~[spigot.jar:git-Spigot-129f87a-6bf25cd]
            at net.minecraft.server.v1_9_R1.Container.a(Container.java:196) ~[spigot.jar:git-Spigot-129f87a-6bf25cd]
            at net.minecraft.server.v1_9_R1.PlayerConnection.a(PlayerConnection.java:1814) ~[spigot.jar:git-Spigot-129f87a-6bf25cd]
            at net.minecraft.server.v1_9_R1.PacketPlayInWindowClick.a(SourceFile:33) ~[spigot.jar:git-Spigot-129f87a-6bf25cd]
            at net.minecraft.server.v1_9_R1.PacketPlayInWindowClick.a(SourceFile:10) ~[spigot.jar:git-Spigot-129f87a-6bf25cd]
            at net.minecraft.server.v1_9_R1.PlayerConnectionUtils$1.run(SourceFile:13) ~[spigot.jar:git-Spigot-129f87a-6bf25cd]
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_91]
            at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_91]
            at net.minecraft.server.v1_9_R1.SystemUtils.a(SourceFile:45) ~[spigot.jar:git-Spigot-129f87a-6bf25cd]
            ... 5 more
    could this be a bug relating to the end gateway? :eek:
     
  4. Choco

    Moderator

    Update to the latest version of Spigot first. Looks like a Spigot issue, however you're only on Spigot R1 (Not Spigot 1.9.4 R2)
     
  5. MiniDigger

    Supporter

    look like the internal server limits what you can craft and what you can't craft.
    without looking at the nms code I would guess that there is no item for that material, only a block and the material const.
     
    • Informative Informative x 1