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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user