Cleaned Up Code

Changed calls to canPlayerEdit() to pass hit.sideHit data with the
request. Also renamed several variables to make the code clearer.
Removed a custom implementation of the ray tracing call in BaseItemDoor
- we can use the built-in call from Minecraft there.
This commit is contained in:
SenseiKiwi
2013-09-05 11:36:59 -04:00
parent 22b7ed147a
commit 1138f6733e
5 changed files with 19 additions and 48 deletions

View File

@@ -56,7 +56,7 @@ public class itemRiftRemover extends Item
NewDimData dimension = PocketManager.getDimensionData(world);
DimLink link = dimension.getLink(hx, hy, hz);
if (world.getBlockId(hx, hy, hz) == mod_pocketDim.blockRift.blockID && link != null &&
player.canPlayerEdit(hx, hy, hz, 0, stack))
player.canPlayerEdit(hx, hy, hz, hit.sideHit, stack))
{
// Invoke onPlayerRightClick()
FMLClientHandler.instance().getClient().playerController.onPlayerRightClick(