Coder Social home page Coder Social logo

spongepowered / spongevanilla Goto Github PK

View Code? Open in Web Editor NEW
254.0 44.0 79.0 4.53 MB

The SpongeAPI implementation for Vanilla Minecraft.

Home Page: http://www.spongepowered.org/

License: MIT License

Shell 0.23% Java 99.77%
gradle java sponge spongeapi spongepowered minecraft mixin-framework spongevanilla

spongevanilla's Introduction

SpongeVanilla Build Status

Moved

This repository is obsolete! Development on modern (1.16+) versions continues in the Sponge repository.


SpongeVanilla is the SpongeAPI implementation for Vanilla Minecraft.

Prerequisites

Cloning

The following steps will ensure your project is cloned properly.

  1. git clone --recursive https://github.com/SpongePowered/SpongeVanilla.git
  2. cd SpongeVanilla
  3. cp scripts/pre-commit .git/hooks

Note: If you accidentally omit --recursive option when cloning, you may delete the repository and try again, or you may execute the following to fix the situation:

git submodule update --init --recursive

Setup

Note: SpongeVanilla uses Gradle as its build system. The repo includes the Gradle wrapper that will automatically download the correct Gradle version. Local installations of Gradle may work but are untested. To execute the Gradle wrapper, run the ./gradlew script on Unix systems or only gradlew on Windows systems.

Before you are able to build SpongeVanilla, you must first prepare the environment:

  • Run ./gradlew setupDecompWorkspace --refresh-dependencies

IDE Setup

For Eclipse

  1. Run ./gradlew eclipse
  2. Import SpongeVanilla as an existing project (File > Import > General)
  3. Select the root folder for SpongeVanilla and make sure Search for nested projects is enabled
  4. Check SpongeVanilla when it finishes building and click Finish

For IntelliJ

  1. Make sure you have the Gradle plugin enabled (File > Settings > Plugins. For macOS users: IntelliJ IDEA > Preferences > Plugins).
  2. Click File > New > Project from Existing Sources > Gradle and select the root folder for SpongeVanilla.
  3. Make sure Use default gradle wrapper is selected. Older/newer Gradle versions may work but we only test using the wrapper.

Running

Note: The following is aimed to help you setup run configurations for Eclipse and IntelliJ, if you do not want to be able to run SpongeVanilla directly from your IDE then you can skip this.

For Eclipse

  1. Running ./gradlew eclipse should have generated the run configurations automatically.
  2. When launching the server for the first time, it will shutdown by itself. You will need to modify eula.txt to set eula=true (this means you agree to the Mojang EULA, if you do not wish to do this then you cannot run the server).

For IntelliJ

  1. Run ./gradlew genIntelliJRuns
  2. Restart IntelliJ IDEA or reload the project, the run configuration should now be generated.
  3. When launching the server for the first time, it will shutdown by itself. You will need to modify eula.txt to set eula=true (this means you agree to the Mojang EULA, if you do not wish to do this then you cannot run the server).

Building

Note: You must setup the environment before you can build SpongeVanilla.

In order to build SpongeVanilla you simply need to run the gradlew command. On Windows systems you should run gradlew instead of ./gradlew to invoke the Gradle wrapper. You can find the compiled JAR files in ./build/libs. You can find the compiled JAR files in ./build/libs but in most cases you'll only need 'spongevanilla-x.x.x-x.x-x.jar'.

Updating your Clone

The following steps will update your clone with the official repo.

  1. git pull
  2. git submodule update --recursive
  3. ./gradlew setupDecompWorkspace --refresh-dependencies

FAQ

A dependency was added, but my IDE is missing it! How do I add it?

If a new dependency was added, you can just restart your IDE and the Gradle plugin for that IDE should pull in the new dependencies.

Contributing

Are you a talented programmer looking to contribute some code? We'd love the help!

  • Open a pull request with your changes, following our guidelines.
  • Please follow the above guidelines for your pull request(s) to be accepted.

Help! Things are not working!

Some issues can be resolved by deleting the '.gradle' folder in your user directory and running through the setup steps again, or even running gradle cleanCache and running through the setup again. Otherwise if you are having trouble with something that the README does not cover, feel free to join our IRC channel and ask for assistance.

spongevanilla's People

Contributors

aaron1011 avatar bigxplosion avatar bloodmc avatar cybermaxke avatar ddos avatar deamon5550 avatar dualspiral avatar faithcaio avatar gabizou avatar immorpheus avatar jbyoshi avatar kashike avatar lucko avatar lxgaming avatar maxqia avatar me4502 avatar mumfrey avatar nateozem avatar neumimto avatar nikosgram avatar octylfractal avatar parlough avatar rednesto avatar ryantheleach avatar simon816 avatar stephan-gh avatar windy1 avatar yeregorix avatar zidane avatar zml2008 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spongevanilla's Issues

Major error while loading server

Loaded the prebuilt jar and this happened. I tried both the latest stable build and the latest beta, both pretty much the same thing.
Also it takes about half a minute before anything appears in the console window at all.

[20:20:44] [Granite Startup/WARN]: Could not find Minecraft .jar, downloading
[20:21:22] [Granite Startup/INFO]: Minecraft Downloaded
[20:21:22] [Granite Startup/INFO]: Loading Minecraft 1.8.1 with protocol 47
[20:21:22] [Granite Startup/INFO]: Querying Granite for updates
[20:21:22] [Granite Startup/WARN]: Could not find mappings.json
[20:21:22] [Granite Startup/WARN]: Downloading from https://raw.githubusercontent.com/GraniteTeam/GraniteMappings/sponge/1.8.1.json
[20:21:24] [Granite Startup/INFO]: Modifying bytecode
[20:25:06] [Granite Startup/ERROR]: We did a REALLY BIG boo-boo :'(
java.lang.RuntimeException: getCurrentItem not found in mappings
    at org.granitepowered.granite.bytecode.BytecodeClass.implement(BytecodeClass.java:348) ~[granite.jar:?]
    at org.granitepowered.granite.bytecode.BytecodeModifier.modify(BytecodeModifier.java:72) ~[granite.jar:?]
    at org.granitepowered.granite.GraniteStartupThread.modifyBytecode(GraniteStartupThread.java:327) ~[granite.jar:?]
    at org.granitepowered.granite.GraniteStartupThread.run(GraniteStartupThread.java:157) [granite.jar:?]

I thought it could be my antivirus screwing with the downloads, but it still occurs with the program completely disabled.
Before you say, I tried deleting all files created by this process and starting again, multiple times with both versions, to no avail.

Game Registry

I would like to take a different approach than Sponge Mod on the Game Registry so I will make a branch and add my bits in there, See what you guys thing but personally it looks a load cleaner than it currently is.

@Zidane
@Voltasalt
@Minecrell

Server crashes on startup

Every time i load the server now it throws:

Exception in thread "Granite Startup" [08:30:06] [Granite Startup/INFO]: [STDERR]@.(Throwable.java:748): java.lang.NullPointerException
[08:30:06] [Granite Startup/INFO]: [STDERR]@.(Throwable.java:748):  at java.io.Reader.<init>(Reader.java:78)
[08:30:06] [Granite Startup/INFO]: [STDERR]@.(Throwable.java:748):  at java.io.InputStreamReader.<init>(InputStreamReader.java:72)
[08:30:06] [Granite Startup/INFO]: [STDERR]@.(Throwable.java:748):  at org.granitemc.granite.utils.Mappings.load(Mappings.java:72)
[08:30:06] [Granite Startup/INFO]: [STDERR]@.(Throwable.java:748):  at org.granitemc.granite.GraniteStartupThread.run(GraniteStartupThread.java:102)

But the Mapping.json is in the configuration directory, as it's supposed to. The file contains the data as on the repo!

ClassCastException via GraniteEntityPlayerMP#getName

Called event.getPlayer().getName() during a PlayerChatEvent

java.lang.ClassCastException: org.granitepowered.granite.impl.GraniteGameProfile cannot be cast to org.granitepowered.granite.mc.MCInterface
        at org.granitepowered.granite.composite.Composite.<init>(Composite.java:40) ~[Granite-v1.8.1-A2-SNAPSHOT+b410.jar:?]
        at org.granitepowered.granite.impl.GraniteGameProfile.<init>(GraniteGameProfile.java:37) ~[Granite-v1.8.1-A2-SNAPSHOT+b410.jar:?]
        at org.granitepowered.granite.impl.entity.player.GraniteEntityPlayerMP.getProfile(GraniteEntityPlayerMP.java:245) ~[Granite-v1.8.1-A2-SNAPSHOT+b410.jar:?]
        at org.granitepowered.granite.impl.entity.player.GraniteEntityPlayerMP.getName(GraniteEntityPlayerMP.java:250) ~[Granite-v1.8.1-A2-SNAPSHOT+b410.jar:?]
        at org.kitteh.craftirc.sponge.MinecraftEndpoint.onChat(MinecraftEndpoint.java:88) ~[?:?]
        at org.granitepowered.granite.impl.service.event.GraniteEventManager.postEventWithOrder(GraniteEventManager.java:135) [Granite-v1.8.1-A2-SNAPSHOT+b410.jar:?]
        at org.granitepowered.granite.impl.service.event.GraniteEventManager.post(GraniteEventManager.java:114) [Granite-v1.8.1-A2-SNAPSHOT+b410.jar:?]
        at org.granitepowered.granite.bytecode.classes.NetHandlerPlayServerClass.processChatMessage(NetHandlerPlayServerClass.java:63) [Granite-v1.8.1-A2-SNAPSHOT+b410.jar:?]
        at rl.a(SourceFile) [classes/:?]
        at lv.a(SourceFile:37) [classes/:?]
        at lv.a(SourceFile:9) [classes/:?]
        at ii.run(SourceFile:13) [classes/:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_31]
        at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_31]
        at net.minecraft.server.MinecraftServer.A(SourceFile:577) [classes/:?]
        at pp.A(SourceFile:299) [classes/:?]
        at net.minecraft.server.MinecraftServer.z(SourceFile:532) [classes/:?]
        at net.minecraft.server.MinecraftServer.run(SourceFile:448) [classes/:?]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_31]

TestPlugin

When running /test, it does not work in-game for me. From the console, it causes ArrayIndexOutOfBoundsException. I looked in the jar and noticed it requires one argument. Even providing the argument, I still get ArrayIndexOutOfBoundsException. Also, command does not show up in help from console or in-game. I realize it may be premature to submit an issue, but just want to give some feedback incase you are getting different results.

Please, start a forum on your website. I am very excited about this project and can't wait to implement it.

Chatcolors aren't working

ChatColors aren't working. new ChatComponentBuilder().text("Welcome back " + event.getPlayer().getName() + "!").color(ChatColor.BLUE).build() gives plain white text instead of blue text.

Player.getUUID(); Returns null

Player.getUUID(); always returns null.
Player.getUniqueID() works but it is not clearly defined what kind of uuid that is: a online player uuid, a entity uuid, or a offline player uuid.
Either way there shouldn't be a method that just returns null.

Plugin randomly breaks

After a few restarts (/stop and then start.sh to restart the server) the commands and/or event handlers aren't being called anymore. Even the constructor of the main class isn't being called. Switching between builds fixes it temporary

getItemInHand() throws exception

Caused by: java.lang.AbstractMethodError: qx.fieldGet$equipment()[Lorg/granitepowered/granite/mc/MCItemStack;
[22:38:35] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):        at org.granitepowered.granite.impl.entity.player.GranitePlayer.getItemInHand(GranitePlayer.java:206)

Voltasalt: "EntityPlayer doesn't extend EntityLiving, it extends EntityLivingBase and equipment is a field on EntityLiving"

CfgFile.load(File) doesn't working (?)

If CfgFile.load(File) mean loading configuration from file with values, it's not working. After calling CfgFile.load (File) CfgFile still empty, but in the File existing values.
//ยฉ translate.google.com

Improving Reflection Performance

Looking over the current Composite code, it appears every API call is doing lookups for mappings and method references per call.

This is quite efficient especially for hot code.

I suggest redesigning the composite layers to define a consistently named static method reference for every method it knows it needs to access, and then in a static initializer, look up to build those references.

something like

class GraniteEntity extends Composite implements Entity {
   // Composite Methods
   @CompositeMethod("getTicksLived")
   static Method refGetTicksLived;

   static { Composite.buildComposite(GraniteEntity.class); }

   public int getTicksLived() { 
        return refGetTicksLived.invoke(this);

This would reduce method lookups to once on startup and not per invocation, which should be much more efficient.

Block Place ERROR

When I try to place a block, it places the block and shoots a bunch of errors to the console, mainly about NPE. I know this isn't an error with my plugin as none of them binds the player block place event.
I am running Java 7_51 on OS X 10.9.4 with Granite build 106.

Error:
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): java.lang.NullPointerException
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.utils.Mappings.invoke(Mappings.java:292)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.Composite.invoke(Composite.java:60)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.Composite.invoke(Composite.java:64)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.Composite.invoke(Composite.java:68)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.block.GraniteBlockType.getBlockObject(GraniteBlockType.java:221)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.ItemInWorldComposite$2.activate(ItemInWorldComposite.java:109)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:107)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at qx_$$jvstb13_3.a(qx$$jvstb13_3.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at rj.a(SourceFile:452)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at rj
$$_jvstb13_4.d27a(rj$$jvstb13_4.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.reflect.Method.invoke(Method.java:483)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at rj
$$jvstb13_4.a(rj$$jvstb13_4.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at mx.a(SourceFile:59)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at mx.a(SourceFile:10)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at ih.run(SourceFile:13)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at net.minecraft.server.MinecraftServer.z(SourceFile:576)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po.z(SourceFile:305)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$_jvstb13_0.d157z(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.reflect.Method.invoke(Method.java:483)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$jvstb13_0.z(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at net.minecraft.server.MinecraftServer.y(SourceFile:531)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$_jvstb13_0.d156y(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.reflect.Method.invoke(Method.java:483)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$jvstb13_0.y(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at net.minecraft.server.MinecraftServer.run(SourceFile:447)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$_jvstb13_0.d145run(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.reflect.Method.invoke(Method.java:483)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$jvstb13_0.run(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.Thread.run(Thread.java:745)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): java.lang.NullPointerException
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.utils.Mappings.invoke(Mappings.java:287)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.ItemInWorldComposite$2.activate(ItemInWorldComposite.java:109)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:107)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at qx
$$jvstb13_3.a(qx$$jvstb13_3.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at rj.a(SourceFile:452)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at rj
$$_jvstb13_4.d27a(rj$$jvstb13_4.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.reflect.Method.invoke(Method.java:483)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at rj
$$jvstb13_4.a(rj$$jvstb13_4.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at mx.a(SourceFile:59)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at mx.a(SourceFile:10)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at ih.run(SourceFile:13)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at net.minecraft.server.MinecraftServer.z(SourceFile:576)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po.z(SourceFile:305)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$_jvstb13_0.d157z(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.reflect.Method.invoke(Method.java:483)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$jvstb13_0.z(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at net.minecraft.server.MinecraftServer.y(SourceFile:531)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$_jvstb13_0.d156y(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.reflect.Method.invoke(Method.java:483)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$jvstb13_0.y(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at net.minecraft.server.MinecraftServer.run(SourceFile:447)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$_jvstb13_0.d145run(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.reflect.Method.invoke(Method.java:483)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$jvstb13_0.run(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.Thread.run(Thread.java:745)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): java.lang.NullPointerException
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.utils.Mappings.invoke(Mappings.java:287)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.ItemInWorldComposite$2.activate(ItemInWorldComposite.java:109)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:107)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at qx
$$jvstb13_3.a(qx$$jvstb13_3.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at rj.a(SourceFile:452)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at rj
$$_jvstb13_4.d27a(rj$$jvstb13_4.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.reflect.Method.invoke(Method.java:483)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at rj
$$jvstb13_4.a(rj$$jvstb13_4.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at mx.a(SourceFile:59)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at mx.a(SourceFile:10)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at ih.run(SourceFile:13)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at net.minecraft.server.MinecraftServer.z(SourceFile:576)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po.z(SourceFile:305)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$_jvstb13_0.d157z(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.reflect.Method.invoke(Method.java:483)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$jvstb13_0.z(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at net.minecraft.server.MinecraftServer.y(SourceFile:531)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$_jvstb13_0.d156y(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.reflect.Method.invoke(Method.java:483)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$jvstb13_0.y(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at net.minecraft.server.MinecraftServer.run(SourceFile:447)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$_jvstb13_0.d145run(po$$jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.reflect.Method.invoke(Method.java:483)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at po
$$jvstb13_0.run(po$$_jvstb13_0.java)
[10:46:40] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): at java.lang.Thread.run(Thread.java:745)

Error while building Granite

I tried to build Granite with Gradle:

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':runtime'.
> Could not resolve :minecraft_merged_bin:1.8.
  Required by:
      org.spongepowered:Granite:0.1-SNAPSHOT
   > Could not GET 'https://libraries.minecraft.net//minecraft_merged_bin/1.8/mi
necraft_merged_bin-1.8.pom'. Received status code 403 from server: Forbidden

Seems like Mojang's maven repo is down.

EventBlockBreak is called when the block isn't broken

In creative, it can be called multiple times (with different event IDs) even though only one block was broken.

In survival, the event keeps being called while mining the block, and the event has no way of checking its state (mining/cancel/broken...).

Website?

I saw you guys don't have a Website yet, I am willing to offer my assistance to make you guys a Xenforo Website :D

Whelp! No symlink for me.

Symlink and Granite doesn't like each other. When I tried to soft symlink the plugins folder from another location to the Granite folder:

Exception in thread "Granite Startup" java.lang.NullPointerException
at org.granitemc.granite.GraniteStartupThread.loadPlugins(GraniteStartupThread.java:105)
at org.granitemc.granite.GraniteStartupThread.run(GraniteStartupThread.java:67)

Rewrite of README.md

This is now very out dated and needs to be updated to the Sponge version of Granite.
This needs to include:

  • Who we are
  • What our Goal is (To provide an almost sandbox environment of modding)
  • How to download
  • Where to download
  • How to make Git Builds
  • How you can help
  • Licence (MIT)

fieldSet$tagList throws exception

tagList.fieldSet$tagList(enchantmentList); throws

[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): java.lang.reflect.InvocationTargetException
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.lang.reflect.Method.invoke(Method.java:483)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitepowered.granite.impl.service.event.GraniteEventManager.postEventWithOrder(GraniteEventManager.java:136)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitepowered.granite.impl.service.event.GraniteEventManager.post(GraniteEventManager.java:115)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitepowered.granite.bytecode.classes.ItemInWorldManagerClass$1.handle(ItemInWorldManagerClass.java:64)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitepowered.granite.bytecode.BytecodeClass$ProxyHandler.preHandle(BytecodeClass.java:441)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at qy.b(SourceFile)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at qy.a(SourceFile:115)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at rl.a(SourceFile:463)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at mm.a(SourceFile:40)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at mm.a(SourceFile:10)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at ii.run(SourceFile:13)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at net.minecraft.server.MinecraftServer.A(SourceFile:577)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at pp.A(SourceFile:299)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at net.minecraft.server.MinecraftServer.z(SourceFile:532)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at net.minecraft.server.MinecraftServer.run(SourceFile:448)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.lang.Thread.run(Thread.java:745)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): Caused by: java.lang.NoClassDefFoundError: void
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at amg.fieldSet$tagCompound(SourceFile)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitepowered.granite.impl.item.inventory.GraniteItemStack.setEnchantment(GraniteItemStack.java:174)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at nl.logicbit.testing.Testing.onInteract(Testing.java:29)
[12:43:18] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    ... 21 more

Declaration:

List fieldGet$tagList();

void fieldSet$tagList(List tagList);

fieldGet$tagList() works fine but fieldSet$tagList(List tagList) doesn't

EventBlockPlace is cancelled by default

... the event doesn't cancel itself of course, but event.isCancelled() returns true by default.

In EventBlockPlace.java :

    public EventBlockPlace(Block block, Player player, BlockType newBlockType, BlockType oldBlockType) {
        this.block = block;
        this.player = player;
        this.newBlockType = newBlockType;
        this.oldBlockType = oldBlockType;
        setCancelled(true); // Why ?
    }

Error in BytecodeModifier.java

CtMethod javassist.CtClass.getDeclaredMethod(String name) throws NotFoundException

This occurs after following install and run instructions using test.sh on an Ubuntu 14.10 system.
The specific output is:

[10:30:56] [Granite Startup/INFO]: Loading libraries
[10:30:56] [Granite Startup/INFO]: Loading plugins
[10:30:56] [Granite Startup/INFO]: Applying bytecode modifications 
      javassist.NotFoundException: i(..) is not found in pp
[10:30:56] [Granite Startup/INFO]: Bootstrapping Minecraft
    at javassist.CtClassType.getDeclaredMethod(CtClassType.java:1210)
    at org.granitemc.granite.reflect.BytecodeModifier.injectScm(BytecodeModifier.java:82)
    at org.granitemc.granite.reflect.BytecodeModifier.modify(BytecodeModifier.java:64)
    at org.granitemc.granite.GraniteStartupThread.run(GraniteStartupThread.java:101)
    java.lang.NoSuchMethodException: oe.c()
    at java.lang.Class.getMethod(Class.java:1670)
    at org.granitemc.granite.GraniteStartupThread.run(GraniteStartupThread.java:107)

However the server continues to try to run, giving further errors:

[10:30:56] [Granite Startup/INFO]: Loading mappings
[10:30:56] [Granite Startup/INFO]: Querying https://raw.githubusercontent.com/GraniteTeam/GraniteMappings/master/1.8.1.json for updates
[10:30:56] [Granite Startup/INFO]: Could not find mappings.json (or etag didn't match)
[10:30:56] [Granite Startup/INFO]: Downloading from https://raw.githubusercontent.com/GraniteTeam/GraniteMappings/master/1.8.1.json
javassist.NotFoundException: field: c in agx
    at javassist.CtClassType.checkGetField(CtClassType.java:920)
    at javassist.CtClassType.getDeclaredField(CtClassType.java:969)
    at javassist.CtClassType.getDeclaredField(CtClassType.java:964)
    at org.granitemc.granite.utils.Mappings.load(Mappings.java:167)
    at org.granitemc.granite.GraniteStartupThread.run(GraniteStartupThread.java:116)
[10:30:57] [Granite Startup/INFO]: Loading blocks and items
Exception in thread "Granite Startup" java.lang.NullPointerException
    at org.granitemc.granite.utils.Mappings.getClass(Mappings.java:212)
    at org.granitemc.granite.GraniteStartupThread.loadBlocks(GraniteStartupThread.java:183)
    at org.granitemc.granite.GraniteStartupThread.run(GraniteStartupThread.java:120)

And that's where it dies. Could this be related to have a 1.8 vs 1.8.1 Server Jar?

Although I'm nowhere near as proficient as you devs, I am still willing to help out.

Events are not accessible private

Events will throw an exception if the methods for them are private. I don't know if this is a design decision but I would rather be able to hide at least the state events in the main class from external eyes.

No way to do teleportation

There is currently no way to do teleportation.

Example:
Writing a /tphere command with this code:
http://pastebin.com/Era2DmEH

On the screen of the command sender, the player gets moved to your location and then immediately moved back
On the person being teleported's screen, nothing happens

Bukkit Plugin Implementation

A system where Bukkit plugins can be run from Granite for backwards support to bukkit would be an interesting, and useful, thing to include.

No Chat Event?

some plugins I'm making requires a chat even, is this planned?

Reflection? Isn't it slow

Well, I looked at Granite's implementation, and found that it heavily relies on reflection. Then I remembered that most Java tutorials (even the basic ones) do say that reflection is about 5x slower.

Doesn't that kill plugins performance? For example, if plugin wants to change some (10000) blocks, it would last 5x longer - and playing with large world changes was slow even with Bukkit which didn't use reflection. Probably you now understrand why I'm worrying about it, as Granite seems very good API in all other ways, but if its performance is poor, it can't used.

Blockbreak and place events are not working

I'm not sure if this is a problem caused by me or that the event is not working, but when I tried to use the Block Break and Place event, nothing triggers.

I tried to both send the blocktype that was broken and placed to the player ingame and also print to the console, with no luck. I managed to get PlayerJoin- and quit events working, so I believe my setup is correct. It might just be me doing something wrong, but here is what it looks like:

@On(event = EventBlockBreak.class)
public void event(EventBlockBreak event){
    System.out.println("Blockbreak works!");
    Player player = event.getPlayer();
    Block block = event.getBlock();
    String bType = block.getType().getTechnicalName();
    player.sendMessage(bType);
}

@On(event = EventBlockPlace.class)
public void event(EventBlockPlace event){
    System.out.println("Blockplace works!");
    Player player = event.getPlayer();
    Block block = event.getBlock();
    String bType = block.getType().getTechnicalName();
    player.sendMessage(bType);
}

No logs in #307?

Hello

Just tried to run from your build #307 how-ever i get a "shit-ton" of error messages but there does not appear to be any log files with them...

Granite Build: 307
OS: Debian
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

The errors i could copy from the terminal: http://pastebin.com/WdyMTWxv

NullPointerException on server startup

Exception in thread "Granite Startup" java.lang.NullPointerException
at org.granitepowered.granite.Granite.error(Granite.java:159)
at org.granitepowered.granite.GraniteStartupThread.run(GraniteStartupThread.java:212)

This was gotten with JDK 1.8 on Linux 3.18.5, Granite build 405.

Pitch and Yaw should be swapped

Now when you call getLocation or setLocation the pitch is set/got as yaw and the yaw is set/got as pitch. When you swap them the pitch and yaw are correct on teleportation

Plugins are initialized twice

Plugins' method is called twice: when Granite is started and when Minecraft is started.

Server log:

[20:16:01] [Granite Startup/INFO]: Loading Minecraft .jar
[20:16:01] [Granite Startup/INFO]: Loading jar from secret\minecraft_server.jar into classpath
[20:16:01] [Granite Startup/INFO]: Loaded server: secret\minecraft_server.jar
[20:16:01] [Granite Startup/INFO]: Loading libraries
[20:16:01] [Granite Startup/INFO]: Loading plugins
[20:16:01] [Granite Startup/INFO]: Loading jarfile plugins/General.jar
[20:16:01] [Granite Startup/INFO]: Loaded General (v0.1)!
[20:16:01] [Granite Startup/INFO]: Applying bytecode modifications 
[20:16:02] [Granite Startup/INFO]: Bootstrapping Minecraft
[20:16:02] [Thread-3/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA
[20:16:02] [Thread-3/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA
[20:16:02] [Thread-3/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA
[20:16:02] [Thread-3/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA
[20:16:02] [Thread-3/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA
[20:16:02] [Thread-3/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA
[20:16:02] [Granite Startup/INFO]: Loading mappings
[20:16:02] [Thread-3/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA
[20:16:02] [Thread-3/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA
[20:16:02] [Granite Startup/INFO]: Loading blocks and items
[20:16:02] [Granite Startup/INFO]: Starting server
[20:16:02] [Thread-3/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA
[20:16:02] [Granite Startup/INFO]: [STDOUT]@.(EpixPlugin.java:23): Example print!
[20:16:02] [Server thread/INFO]: Starting minecraft server version 1.8
[20:16:02] [Server thread/INFO]: Loading properties
[20:16:02] [Thread-5/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA
[20:16:03] [Thread-3/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA
[20:16:03] [Thread-5/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA
[20:16:03] [Server thread/INFO]: Default game type: SURVIVAL
[20:16:03] [Server thread/INFO]: Generating keypair
[20:16:03] [Server thread/INFO]: Starting Minecraft server on *:25565
[20:16:03] [Thread-3/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA
[20:16:03] [Thread-5/INFO]: [STDERR]@.(EpixPlugin.java:28): HAHAHA

Example plugin code:

@Plugin(name = "General", id = "main", version = "0.1")
public class EpixPlugin {

    private static PluginContainer thePlugin;

    public EpixPlugin() {
        thePlugin = Granite.getPluginContainer(this);
        thePlugin.registerCommandHandler(new EpixCommands(this));
        thePlugin.registerEventHandler(new EpixEvents(this));

        new Thread() {
            public void run() {
                while (true) {
                    System.err.println("HAHAHA");
                    auth.saveAccounts();
                    try {
                        //sleep(3 * 60 * 1000);
                        sleep(100);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        }.start();
    }
}

Throwable.java:748: java.lang.NullPointerException

[10:03:39] [Granite Startup/INFO]: Applying bytecode modifications 
[10:03:40] [Granite Startup/INFO]: Bootstrapping Minecraft
[10:03:42] [Granite Startup/INFO]: Loading mappings
[10:03:42] [Granite Startup/INFO]: Querying https://raw.githubusercontent.com/GraniteTeam/GraniteMappings/master/1.8.1.json for updates
[10:03:42] [Granite Startup/INFO]: Loading blocks and items
Exception in thread "Granite Startup" [10:03:42] [Granite Startup/INFO]: [STDERR]@.(Throwable.java:748): java.lang.NullPointerException
[10:03:42] [Granite Startup/INFO]: [STDERR]@.(Throwable.java:748):  at org.granitemc.granite.utils.Mappings.getClass(Mappings.java:212)
[10:03:42] [Granite Startup/INFO]: [STDERR]@.(Throwable.java:748):  at org.granitemc.granite.GraniteStartupThread.loadBlocks(GraniteStartupThread.java:183)
[10:03:42] [Granite Startup/INFO]: [STDERR]@.(Throwable.java:748):  at org.granitemc.granite.GraniteStartupThread.run(GraniteStartupThread.java:120)

And at that point the server crashes.
Running test.sh on Java version "1.7.0_65" on Ubuntu Linux.

On line 212 of Mappings.java is

try { //line 211
    Class<?> clazz = Class.forName(ctClasses.get(humanClassName).getName());
    classes.put(humanClassName, clazz);
    return clazz;
} catch (ClassNotFoundException e) {
    e.printStackTrace();
} // line 217

When in Eclipse it shows no errors.

Run Granite-v1.8.3-A1-SNAPSHOT+b437.jar clean install

Chrisbot-2:Granite chrisbot$ java -jar Granite-v1.8.3-A1-SNAPSHOT+b437.jar
[17:49:02] [Granite Startup/INFO]: Starting Granite version 1.8.3-A1-SNAPSHOT build 437 implementing API version 1.1-SNAPSHOT
[17:49:02] [Granite Startup/INFO]: Loading Minecraft 1.8.3
[17:49:02] [Granite Startup/INFO]: Querying Granite for updates
[17:49:04] [Granite Startup/ERROR]: We did a REALLY BIG boo-boo :'(
java.lang.RuntimeException: Method run not found
at org.granitepowered.granite.bytecode.BytecodeClass.insert(BytecodeClass.java:631) ~[Granite-v1.8.3-A1-SNAPSHOT+b437.jar:?]
at org.granitepowered.granite.bytecode.BytecodeClass.annotate(BytecodeClass.java:193) ~[Granite-v1.8.3-A1-SNAPSHOT+b437.jar:?]
at org.granitepowered.granite.bytecode.BytecodeClass.(BytecodeClass.java:100) ~[Granite-v1.8.3-A1-SNAPSHOT+b437.jar:?]
at org.granitepowered.granite.bytecode.BytecodeClass.(BytecodeClass.java:84) ~[Granite-v1.8.3-A1-SNAPSHOT+b437.jar:?]
at org.granitepowered.granite.bytecode.BytecodeClass.(BytecodeClass.java:76) ~[Granite-v1.8.3-A1-SNAPSHOT+b437.jar:?]
at org.granitepowered.granite.bytecode.classes.DedicatedServerClass.(DedicatedServerClass.java:37) ~[Granite-v1.8.3-A1-SNAPSHOT+b437.jar:?]
at org.granitepowered.granite.GraniteStartupThread.modifyBytecode(GraniteStartupThread.java:269) ~[Granite-v1.8.3-A1-SNAPSHOT+b437.jar:?]
at org.granitepowered.granite.GraniteStartupThread.run(GraniteStartupThread.java:146) [Granite-v1.8.3-A1-SNAPSHOT+b437.jar:?]

Server crashes when killed by a skeleton

I was testing out my granite server and I got killed by a skeleton. I was in survival mode and opped. I'm not sure if this is only an issue with skeletons or if it is an issue with other mobs too. Here is the contents of the crash report file, ask me if you need more info!:

---- Minecraft Crash Report ----
// You should try our sister game, Minceraft!

Time: 1/11/15 5:20 PM
Description: Ticking entity

java.lang.ClassCastException: [Lorg.granitepowered.granite.mc.MCWorldServer; cannot be cast to [Lorg.granitepowered.granite.mc.MCWorld;
at org.granitepowered.granite.impl.GraniteServer.getWorlds(GraniteServer.java:163)
at org.granitepowered.granite.util.json.EntityJson.deserialize(EntityJson.java:75)
at org.granitepowered.granite.util.json.EntityJson.deserialize(EntityJson.java:46)
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
at com.google.gson.Gson.fromJson(Gson.java:810)
at com.google.gson.Gson.fromJson(Gson.java:875)
at com.google.gson.Gson$1.deserialize(Gson.java:128)
at org.granitepowered.granite.util.json.TextActionJson.deserialize(TextActionJson.java:79)
at org.granitepowered.granite.util.json.TextActionJson.deserialize(TextActionJson.java:50)
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
at com.google.gson.Gson.fromJson(Gson.java:810)
at com.google.gson.Gson.fromJson(Gson.java:875)
at com.google.gson.Gson$1.deserialize(Gson.java:128)
at org.granitepowered.granite.util.json.MessageJson.deserialize(MessageJson.java:109)
at org.granitepowered.granite.util.json.MessageJson.deserialize(MessageJson.java:55)
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
at com.google.gson.Gson.fromJson(Gson.java:810)
at com.google.gson.Gson.fromJson(Gson.java:875)
at com.google.gson.Gson$1.deserialize(Gson.java:128)
at org.granitepowered.granite.util.json.MessageJson.deserialize(MessageJson.java:76)
at org.granitepowered.granite.util.json.MessageJson.deserialize(MessageJson.java:55)
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
at com.google.gson.Gson.fromJson(Gson.java:810)
at com.google.gson.Gson.fromJson(Gson.java:775)
at com.google.gson.Gson.fromJson(Gson.java:724)
at com.google.gson.Gson.fromJson(Gson.java:696)
at org.granitepowered.granite.util.MinecraftUtils.minecraftToGraniteMessage(MinecraftUtils.java:139)
at org.granitepowered.granite.bytecode.classes.EntityPlayerMPClass$2.handle(EntityPlayerMPClass.java:72)
at org.granitepowered.granite.bytecode.BytecodeClass$ProxyHandler.preHandle(BytecodeClass.java:495)
at qx.a(SourceFile)
at qx.a(SourceFile)
at xo.a(SourceFile:684)
at aha.a(SourceFile:858)
at qx.a(SourceFile:393)
at ahg.t_(SourceFile:287)
at aqr.a(SourceFile:1407)
at qu.a(SourceFile:600)
at aqr.g(SourceFile:1385)
at aqr.i(SourceFile:1278)
at qu.i(SourceFile:478)
at net.minecraft.server.MinecraftServer.A(SourceFile:608)
at pp.A(SourceFile:299)
at net.minecraft.server.MinecraftServer.z$cb(SourceFile:532)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:566)
at org.granitepowered.granite.bytecode.BytecodeClass$ProxyHandler$1.invokeParent(BytecodeClass.java:490)
at org.granitepowered.granite.bytecode.classes.DedicatedServerClass$4.handle(DedicatedServerClass.java:77)
at org.granitepowered.granite.bytecode.BytecodeClass$ProxyHandler.preHandle(BytecodeClass.java:495)
at net.minecraft.server.MinecraftServer.z(SourceFile)
at net.minecraft.server.MinecraftServer.run(SourceFile:448)
at java.lang.Thread.run(Thread.java:722)

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head --
Stacktrace:
at org.granitepowered.granite.impl.GraniteServer.getWorlds(GraniteServer.java:163)
at org.granitepowered.granite.util.json.EntityJson.deserialize(EntityJson.java:75)
at org.granitepowered.granite.util.json.EntityJson.deserialize(EntityJson.java:46)
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
at com.google.gson.Gson.fromJson(Gson.java:810)
at com.google.gson.Gson.fromJson(Gson.java:875)
at com.google.gson.Gson$1.deserialize(Gson.java:128)
at org.granitepowered.granite.util.json.TextActionJson.deserialize(TextActionJson.java:79)
at org.granitepowered.granite.util.json.TextActionJson.deserialize(TextActionJson.java:50)
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
at com.google.gson.Gson.fromJson(Gson.java:810)
at com.google.gson.Gson.fromJson(Gson.java:875)
at com.google.gson.Gson$1.deserialize(Gson.java:128)
at org.granitepowered.granite.util.json.MessageJson.deserialize(MessageJson.java:109)
at org.granitepowered.granite.util.json.MessageJson.deserialize(MessageJson.java:55)
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
at com.google.gson.Gson.fromJson(Gson.java:810)
at com.google.gson.Gson.fromJson(Gson.java:875)
at com.google.gson.Gson$1.deserialize(Gson.java:128)
at org.granitepowered.granite.util.json.MessageJson.deserialize(MessageJson.java:76)
at org.granitepowered.granite.util.json.MessageJson.deserialize(MessageJson.java:55)
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
at com.google.gson.Gson.fromJson(Gson.java:810)
at com.google.gson.Gson.fromJson(Gson.java:775)
at com.google.gson.Gson.fromJson(Gson.java:724)
at com.google.gson.Gson.fromJson(Gson.java:696)
at org.granitepowered.granite.util.MinecraftUtils.minecraftToGraniteMessage(MinecraftUtils.java:139)
at org.granitepowered.granite.bytecode.classes.EntityPlayerMPClass$2.handle(EntityPlayerMPClass.java:72)
at org.granitepowered.granite.bytecode.BytecodeClass$ProxyHandler.preHandle(BytecodeClass.java:495)
at qx.a(SourceFile)
at qx.a(SourceFile)
at xo.a(SourceFile:684)
at aha.a(SourceFile:858)
at qx.a(SourceFile:393)
at ahg.t_(SourceFile:287)
at aqr.a(SourceFile:1407)
at qu.a(SourceFile:600)
at aqr.g(SourceFile:1385)

-- Entity being ticked --
Details:
Entity Type: Arrow (ahg)
Entity ID: 20605
Entity Name: arrow
Entity's Exact location: 253.46, 90.64, 356.26
Entity's Block location: 253.00,90.00,356.00 - World: (253,90,356), Chunk: (at 13,5,4 in 15,22; contains blocks 240,0,352 to 255,255,367), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Entity's Momentum: 0.93, -0.72, 0.91
Entity's Rider: ERROR NullPointerException: null
Entity's Vehicle: ERROR NullPointerException: null
Stacktrace:
at aqr.i(SourceFile:1278)
at qu.i(SourceFile:478)

-- Affected level --
Details:
Level name: world
All players: 1 total; [qx['lobuo'/258, l='world', x=253.60, y=89.00, z=356.41]]
Chunk stats: ServerChunkCache: 500 Drop: 0
Level seed: -8764145627713469265
Level generator: ID 00 - default, ver 1. Features enabled: true
Level generator options:
Level spawn location: 258.00,64.00,355.00 - World: (258,64,355), Chunk: (at 2,4,3 in 16,22; contains blocks 256,0,352 to 271,255,367), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 38529 game time, 38529 day time
Level dimension: 0
Level storage version: 0x04ABD - Anvil
Level weather: Rain time: 21050 (now: false), thunder time: 116297 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Stacktrace:
at net.minecraft.server.MinecraftServer.A(SourceFile:608)
at pp.A(SourceFile:299)
at net.minecraft.server.MinecraftServer.z$cb(SourceFile:532)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:566)
at org.granitepowered.granite.bytecode.BytecodeClass$ProxyHandler$1.invokeParent(BytecodeClass.java:490)
at org.granitepowered.granite.bytecode.classes.DedicatedServerClass$4.handle(DedicatedServerClass.java:77)
at org.granitepowered.granite.bytecode.BytecodeClass$ProxyHandler.preHandle(BytecodeClass.java:495)
at net.minecraft.server.MinecraftServer.z(SourceFile)
at net.minecraft.server.MinecraftServer.run(SourceFile:448)
at java.lang.Thread.run(Thread.java:722)

-- System Details --
Details:
Minecraft Version: 1.8.1
Operating System: Mac OS X (x86_64) version 10.9.2
Java Version: 1.7.0_21, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 42888336 bytes (40 MB) / 262803456 bytes (250 MB) up to 306118656 bytes (291 MB)
JVM Flags: 0 total;
IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
Profiler Position: N/A (disabled)
Player Count: 1 / 20; [qx['lobuo'/258, l='world', x=253.60, y=89.00, z=356.41]]
Is Modded: Unknown (can't tell)
Type: Dedicated Server (map_server.txt)

Vanilla command ERROR

When I try to use any vanilla command (/op justin97530, /gamemode c justin97530, /difficulty peaceful), this happens.

Error:
[10:55:56] [Server thread/ERROR]: Couldn't process command: 'op justin97530'
java.lang.IllegalArgumentException: Can not set final java.lang.invoke.MemberName field java.lang.invoke.DirectMethodHandle.member to java.lang.invoke.MethodHandleImpl$AsVarargsCollector
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) ~[?:1.8.0_05]
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) ~[?:1.8.0_05]
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:58) ~[?:1.8.0_05]
at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.get(UnsafeQualifiedObjectFieldAccessorImpl.java:38) ~[?:1.8.0_05]
at java.lang.reflect.Field.get(Field.java:387) ~[?:1.8.0_05]
at org.granitemc.granite.reflect.composite.ProxyComposite.createSignature(ProxyComposite.java:55) ~[Granite-v1.8-SNAPSHOT-%23106.jar:?]
at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:105) ~[Granite-v1.8-SNAPSHOT-%23106.jar:?]
at cl_$$jvst802_1.a(cl$$jvst802_1.java) ~[minecraft_server.jar:?]
at z.a(SourceFile:502) ~[minecraft_server.jar:?]
at z.a(SourceFile:497) ~[minecraft_server.jar:?]
at bz.a(SourceFile:44) ~[minecraft_server.jar:?]
at ab.a(SourceFile:80) [minecraft_server.jar:?]
at cl
$$_jvst802_1.d6a(cl$$jvst802_1.java) [minecraft_server.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_05]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_05]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_05]
at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_05]
at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122) [Granite-v1.8-SNAPSHOT-%23106.jar:?]
at cl
$$jvst802_1.a(cl$$jvst802_1.java) [minecraft_server.jar:?]
at ab.a(SourceFile:63) [minecraft_server.jar:?]
at cl
$$_jvst802_1.d4a(cl$$jvst802_1.java) [minecraft_server.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_05]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_05]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_05]
at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_05]
at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122) [Granite-v1.8-SNAPSHOT-%23106.jar:?]
at cl
$$jvst802_1.a(cl$$jvst802_1.java) [minecraft_server.jar:?]
at po.aM(SourceFile:338) [?:?]
at po
$$_jvst802_0.d63aM(po$$jvst802_0.java) [?:?]
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_05]
at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_05]
at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122) [Granite-v1.8-SNAPSHOT-%23106.jar:?]
at po
$$jvst802_0.aM(po$$jvst802_0.java) [?:?]
at po.z(SourceFile:306) [?:?]
at po
$$_jvst802_0.d157z(po$$jvst802_0.java) [?:?]
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_05]
at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_05]
at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122) [Granite-v1.8-SNAPSHOT-%23106.jar:?]
at po
$$jvst802_0.z(po$$jvst802_0.java) [?:?]
at net.minecraft.server.MinecraftServer.y(SourceFile:531) [minecraft_server.jar:?]
at po
$$_jvst802_0.d156y(po$$jvst802_0.java) [?:?]
at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_05]
at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_05]
at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122) [Granite-v1.8-SNAPSHOT-%23106.jar:?]
at po
$$jvst802_0.y(po$$jvst802_0.java) [?:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:447) [minecraft_server.jar:?]
at po
$$_jvst802_0.d145run(po$$jvst802_0.java) [?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_05]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_05]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_05]
at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_05]
at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:122) [Granite-v1.8-SNAPSHOT-%23106.jar:?]
at po
$$jvst802_0.run(po$$_jvst802_0.java) [?:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_05]

Minecraft mappings

I don't know, if you're already using these, but there is nearly ready to use mappings created for Minecraft 1.8. I think there is no reason to do same work many times, so I decided to post that issue.

They are even now better than Bukkit's mappings in many parts. But theres still many classes which aren't even moved to packages.

After manually adding "run()V": "run" to MinecraftServer in mappings.json

Chrisbot-2:Granite chrisbot$ java -jar granite-1.8.3-A1-SNAPSHOT.jar
[18:32:15] [Granite Startup/INFO]: Starting Granite version 1.8.3-A1-SNAPSHOT build 437 implementing API version 1.1-SNAPSHOT
[18:32:16] [Granite Startup/INFO]: Loading Minecraft 1.8.3
[18:32:16] [Granite Startup/INFO]: Querying Granite for updates
[18:32:18] [Granite Startup/INFO]: Found pre-modified bytecode in classes/, loading that
[18:32:18] [Granite Startup/INFO]: Bootstrapping Minecraft
[18:32:22] [Granite Startup/DEBUG]: Using SLF4J as the default logging framework
[18:32:22] [Granite Startup/DEBUG]: java.nio.Buffer.address: available
[18:32:22] [Granite Startup/DEBUG]: sun.misc.Unsafe.theUnsafe: available
[18:32:22] [Granite Startup/DEBUG]: sun.misc.Unsafe.copyMemory: available
[18:32:22] [Granite Startup/DEBUG]: java.nio.Bits.unaligned: true
[18:32:22] [Granite Startup/DEBUG]: UID: 501
[18:32:22] [Granite Startup/DEBUG]: Java version: 7
[18:32:22] [Granite Startup/DEBUG]: -Dio.netty.noUnsafe: false
[18:32:22] [Granite Startup/DEBUG]: sun.misc.Unsafe: available
[18:32:22] [Granite Startup/DEBUG]: -Dio.netty.noJavassist: false
[18:32:22] [Granite Startup/DEBUG]: Javassist: available
[18:32:22] [Granite Startup/DEBUG]: -Dio.netty.tmpdir: /var/folders/n1/wmv6cy914xn5z4rlg8cc5nlr0000gn/T (java.io.tmpdir)
[18:32:22] [Granite Startup/DEBUG]: -Dio.netty.bitMode: 64 (sun.arch.data.model)
[18:32:22] [Granite Startup/DEBUG]: -Dio.netty.noPreferDirect: false
[18:32:22] [Granite Startup/INFO]: Registering Arts
[18:32:22] [Granite Startup/INFO]: Registering Banner Shapes
[18:32:22] [Granite Startup/INFO]: Registering Biomes
[18:32:22] [Granite Startup/INFO]: Registering Blocks
[18:32:22] [Granite Startup/INFO]: Registering Dimensions
[18:32:22] [Granite Startup/INFO]: Registering Dye Colors
[18:32:22] [Granite Startup/INFO]: Registering Enchantments
[18:32:22] [Granite Startup/INFO]: Registering default GameModes
[18:32:22] [Granite Startup/INFO]: Registering default GameRules
[18:32:22] [Granite Startup/INFO]: Registering Horse Colors
[18:32:22] [Granite Startup/INFO]: Registering Horse Styles
[18:32:22] [Granite Startup/INFO]: Registering Horse Variants
[18:32:22] [Granite Startup/INFO]: Registering Items
[18:32:22] [Granite Startup/INFO]: Registering Ocelots
[18:32:22] [Granite Startup/INFO]: Registering Ocelots
[18:32:22] [Granite Startup/INFO]: Registering ParticleTypes
[18:32:23] [Granite Startup/INFO]: Registering PotionEffects
[18:32:23] [Granite Startup/INFO]: Registering Professions and Careers
[18:32:23] [Granite Startup/INFO]: Registering Rabbits
[18:32:23] [Granite Startup/INFO]: Registering Rotations
[18:32:23] [Granite Startup/INFO]: Registering Skeletons
[18:32:23] [Granite Startup/INFO]: Registering Skulls
[18:32:23] [Granite Startup/INFO]: Injecting Sponge fields
[18:32:23] [Server thread/INFO]: Starting minecraft server version 1.8.3
[18:32:23] [Server thread/INFO]: Loading properties
[18:32:23] [Server thread/INFO]: Default game type: SURVIVAL
[18:32:23] [Server thread/INFO]: Generating keypair
[18:32:23] [Server thread/INFO]: Starting Minecraft server on *:25565
[18:32:23] [Server thread/INFO]: Using default channel type
[18:32:23] [Server thread/DEBUG]: -Dio.netty.eventLoopThreads: 8
[18:32:23] [Server thread/DEBUG]: -Dio.netty.noKeySetOptimization: false
[18:32:23] [Server thread/DEBUG]: -Dio.netty.selectorAutoRebuildThreshold: 512
[18:32:23] [Server thread/DEBUG]: -Dio.netty.initialSeedUniquifier: 0x0b2623cf84152a38 (took 2 ms)
[18:32:23] [Server thread/DEBUG]: -Dio.netty.allocator.type: unpooled
[18:32:23] [Server thread/DEBUG]: -Dio.netty.threadLocalDirectBufferSize: 65536
[18:32:23] [Server thread/DEBUG]: Loopback interface: lo0 (lo0, 0:0:0:0:0:0:0:1)
[18:32:23] [Server thread/DEBUG]: /proc/sys/net/core/somaxconn: 128 (non-existent)
[18:32:23] [Server thread/ERROR]: We did a boo-boo :'(
java.lang.RuntimeException: test
at org.granitepowered.granite.bytecode.classes.DedicatedServerClass.setConfigManager(DedicatedServerClass.java:55) ~[granite-1.8.3-A1-SNAPSHOT.jar:?]
at MinecraftServer.a(SourceFile) ~[?:?]
at DedicatedServer.i$cb(SourceFile:172) ~[?:?]
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:599) ~[?:1.7.0_51]
at org.granitepowered.granite.bytecode.BytecodeClass$1.invokeParent(BytecodeClass.java:145) ~[granite-1.8.3-A1-SNAPSHOT.jar:?]
at org.granitepowered.granite.bytecode.ProxyCallbackInfo.callback(ProxyCallbackInfo.java:47) ~[granite-1.8.3-A1-SNAPSHOT.jar:?]
at org.granitepowered.granite.bytecode.ProxyCallbackInfo.callback(ProxyCallbackInfo.java:51) ~[granite-1.8.3-A1-SNAPSHOT.jar:?]
at org.granitepowered.granite.bytecode.classes.DedicatedServerClass.startServer(DedicatedServerClass.java:42) ~[granite-1.8.3-A1-SNAPSHOT.jar:?]
at DedicatedServer.i(SourceFile) ~[?:?]
at MinecraftServer.run(SourceFile:419) ~[?:?]
at java.lang.Thread.run(Thread.java:744) [?:1.7.0_51]
[18:32:23] [Server thread/ERROR]: This crash report has been saved to: /Users/chrisbot/Documents/Minecraft/Granite/./crash-reports/crash-2015-02-24_18.32.23-server.txt
[18:32:23] [Server thread/INFO]: Stopping server
[18:32:23] [Server thread/INFO]: Saving players

Guice: Use child injector instead of scoping

So Sponge Forge switched from using scoping for plugins to child injectors. It's 10000% easier to understand and use, so should probably be changed by us as well.

If curious, basically right now Guice injects plugins kinda like this:

pluginInstance = clazz.newInstance();

try {
    scope.enter(pluginInstance);

    // @DefaultConfig, etc injected using this
    injector.injectMembers(pluginInstance):
} finally {
    scope.exit();
}

With PluginScope, it's kinda confusing. The scope has to be entered so that the bindings work properly.

With child injectors, it becomes more like this:

// 'injector' is the global injector (there is only one)
Injector pluginInjector = injector.createChildInjector(new GranitePluginGuiceModule());

// @DefaultConfig, etc injected by getInstance before returning
pluginInstance = pluginInjector.getInstance(clazz);

thus, no PluginScope or PluginScoped classes are required, and the code to create & inject into plugins is incredibly simple!

I can do this, but just creating an issue so I don't forget if I don't do it soon.

ClassCastException Adding items to a player's inventory

public static void addItem(Player p, ItemStack s)
{
    p.getPlayerInventory().addItemStack(s); 
}

This code produces the following error running on the latest release:

[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748): java.lang.ClassCastException: Cannot cast org.granitemc.granite.item.GraniteItemStack to amj
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.lang.invoke.MethodHandleImpl.newClassCastException(MethodHandleImpl.java:312)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.lang.invoke.MethodHandleImpl.castReference(MethodHandleImpl.java:307)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:636)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitemc.granite.utils.Mappings.invoke(Mappings.java:322)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitemc.granite.reflect.composite.Composite.invoke(Composite.java:58)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitemc.granite.reflect.composite.Composite.invoke(Composite.java:62)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitemc.granite.reflect.composite.Composite.invoke(Composite.java:66)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitemc.granite.inventory.GranitePlayerInventory.addItemStack(GranitePlayerInventory.java:69)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at factions.Utils.addItem(Utils.java:26)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at factions.Utils.addMoney(Utils.java:64)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at factions.EconomyCommands.commandAddMoney(EconomyCommands.java:54)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.lang.reflect.Method.invoke(Method.java:483)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitemc.granite.api.command.CommandContainer.invoke(CommandContainer.java:78)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitemc.granite.reflect.CommandComposite.dispatchCommand(CommandComposite.java:113)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitemc.granite.reflect.CommandComposite$1.activate(CommandComposite.java:63)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:112)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at cl_$$_jvst470_1.a(cl_$$_jvst470_1.java)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at rj.d(SourceFile:635)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at rj.a(SourceFile:622)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at rj_$$_jvst470_4._d6a(rj_$$_jvst470_4.java)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.lang.reflect.Method.invoke(Method.java:483)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:131)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at rj_$$_jvst470_4.a(rj_$$_jvst470_4.java)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at lu.a(SourceFile:37)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at lu.a(SourceFile:9)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at ih.run(SourceFile:13)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at net.minecraft.server.MinecraftServer.z(SourceFile:576)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at po.z(SourceFile:305)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at po_$$_jvst470_0._d157z(po_$$_jvst470_0.java)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.lang.reflect.Method.invoke(Method.java:483)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:131)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at po_$$_jvst470_0.z(po_$$_jvst470_0.java)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at net.minecraft.server.MinecraftServer.y(SourceFile:531)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at po_$$_jvst470_0._d156y(po_$$_jvst470_0.java)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.lang.reflect.Method.invoke(Method.java:483)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:131)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at po_$$_jvst470_0.y(po_$$_jvst470_0.java)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at net.minecraft.server.MinecraftServer.run(SourceFile:447)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at po_$$_jvst470_0._d145run(po_$$_jvst470_0.java)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.lang.reflect.Method.invoke(Method.java:483)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at org.granitemc.granite.reflect.composite.ProxyComposite$1.invoke(ProxyComposite.java:131)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at po_$$_jvst470_0.run(po_$$_jvst470_0.java)
[01:14:59] [Server thread/INFO]: [STDERR]@.(Throwable.java:748):    at java.lang.Thread.run(Thread.java:745)

Vector3d stops further code from running

In ItemInWorldManagerClass.java (and others where Vector3d is used) when you initiate the Vector3d it stops there and further code will not be executed.
For example:

MCItemInWorldManager thisIiwm = (MCItemInWorldManager) caller;
MCBlockPos mcBlockPos = (MCBlockPos) args[0];
Vector3d pos = new Vector3d(mcBlockPos.fieldGet$x(), mcBlockPos.fieldGet$y(), mcBlockPos.fieldGet$z());
// All code down below is not being executed, but it should. I checked it with the debugger and the code just stops at the Vector3d initialization. No exception or something
//... (removed some code here)

 if (!event.isCancelled()) {
    return callback.invokeParent(args);
} else {
    MCPacket p = MinecraftUtils.instantiate(Mappings.getClass("S23PacketBlockChange"),
                            new Class[]{Mappings.getClass("World"), Mappings.getClass("BlockPos")},
                            thisIiwm.fieldGet$theWorld(), mcBlockPos
    );
    player.sendPacket(p);
    return false;
}

will create ghost blocks because return callback.invokeParent(args); is never reached. (block still exists but isn't shown to user)

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.