-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: BlockFace #11
Comments
@KingColton1 can you be more precise on what you want. For example the specific API you would want to be added. |
@Fox2Code Essentially it is similar to Bukkit and pretty much all of other mod libraries that have BlockFace and getRelative(BlockFace or coordinate) APIs. It would be used to get a side of a block based on a chosen block using For a simple enum variable something like this; final BlockFace face;
face.UP;
face.DOWN;
face.NORTH;
face.SOUTH;
face.EAST;
face.WEST; or BlockFace.UP
// and so go on.. To get a block from a side of a specific block can be done via `Block block = world.getBlockId(x, y, z).getRelative(BlockFace). I don't want to use too much for loops to find, for example, a sign attached onto a block. So that way I can use something like this; // Find a sign using BlockFaces, assuming a assigned block with a given coordinate is already found
Block block = world.getBlockId(x, y, z).getRelative(BlockFace.NORTH);
Block sign = Block.SIGN_WALL;
if (block == sign) {
return true; // A block with a sign is found
} else {
return false; // A block is found but doesn't have a sign on a block's north face
} Note that the |
@KingColton1 this is not Bukkit, are you oki? What you proposed doesn't make any sense. |
Your code: Block block = world.getBlockId(x, y, z).getRelative(BlockFace.NORTH); What your code means: int blockId = world.getBlockId(x, y, z);
Block block = blockId.getRelative(BlockFace.NORTH); |
I'll try to do something for FoxLoader for ReIndev 2.9, probably something on |
Currently I’m trying to figure out a way to get a face of a block but ended up being a little complex. Would that be possible to add a new method to find and get a face of a block?
The text was updated successfully, but these errors were encountered: