- Removed the Transformer classes as transformation-based class detection is too slow

- Finished the RegisterZenClassesTask and applied it to the API & Mod support projects
- Started work on the events API
- Added a mod.info file
- Added mods detection API
This commit is contained in:
Stan Hebben committed 2014-06-25 11:54:08 +02:00
1 parent 8b00ce34b6
commit 0c535134c5
106 files changed
+2111 -444

No files matched your search

@@ -0,0 +1,96 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package minetweaker.api.event;
import minetweaker.api.block.IBlock;
import minetweaker.api.player.IPlayer;
import minetweaker.api.world.IBlockGroup;
import minetweaker.api.world.IDimension;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenGetter;
import stanhebben.zenscript.annotations.ZenMethod;
/**
*
* @author Stan
*/
@ZenClass("minetweaker.event.PlayerBonemealEvent")
public class PlayerBonemealEvent {
private final IPlayer player;
private final IBlockGroup blocks;
private final int x;
private final int y;
private final int z;
private boolean canceled;
private boolean processed;
public PlayerBonemealEvent(IPlayer player, IBlockGroup blocks, int x, int y, int z) {
this.player = player;
this.blocks = blocks;
this.x = x;
this.y = y;
this.z = z;
canceled = false;
processed = false;
}
@ZenMethod
public void cancel() {
canceled = true;
}
@ZenMethod
public void process() {
processed = true;
}
@ZenGetter("canceled")
public boolean isCanceled() {
return canceled;
}
@ZenGetter("processed")
public boolean isProcessed() {
return processed;
}
@ZenGetter("player")
public IPlayer getPlayer() {
return player;
}
@ZenGetter("blocks")
public IBlockGroup getBlocks() {
return blocks;
}
@ZenGetter("x")
public int getX() {
return x;
}
@ZenGetter("y")
public int getY() {
return y;
}
@ZenGetter("z")
public int getZ() {
return z;
}
@ZenGetter("block")
public IBlock getBlock() {
return blocks.getBlock(x, y, z);
}
@ZenGetter("dimension")
public IDimension getDimension() {
return blocks.getDimension();
}
}