Git Product home page Git Product logo

yadp's People

Contributors

peter200lx avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yadp's Issues

Torch scroll attempt causing severe error

The issue arises when attempting to scroll a torch (redstone or normal) that is facing up.

When in debug is enabled, the clicked.getState().getData() is causing the null pointer:
Caused by: java.lang.NullPointerException
at org.bukkit.material.SimpleAttachableMaterialData.getFacing(SimpleAttachableMaterialData.java:38)
at org.bukkit.material.SimpleAttachableMaterialData.toString(SimpleAttachableMaterialData.java:43)
at org.bukkit.material.RedstoneTorch.toString(RedstoneTorch.java:41)
at java.lang.String.valueOf(String.java:2838)
at java.lang.StringBuilder.append(StringBuilder.java:132)
at com.github.peter200lx.yadp.ToolListener.scrollTool(ToolListener.java:108)

If debug is disabled, then data2str will cause the issue:
Caused by: java.lang.NullPointerException
at org.bukkit.material.SimpleAttachableMaterialData.getFacing(SimpleAttachableMaterialData.java:38)
at org.bukkit.material.SimpleAttachableMaterialData.toString(SimpleAttachableMaterialData.java:43)
at org.bukkit.material.RedstoneTorch.toString(RedstoneTorch.java:41)
at com.github.peter200lx.yadp.ToolListener.data2Str(ToolListener.java:175)
at com.github.peter200lx.yadp.ToolListener.scrollTool(ToolListener.java:149)

According to http://www.minecraftwiki.net/wiki/Data_values#Torches_and_Redstone_Torches ,torches of all types do not have a 0x0 data value. This needs to be investigated further, and likely a special case needs to be made for the scroll tool. However, this does not seem like it will solve the issue from when debugging is enabled.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.