Skip to content

Commit

Permalink
Fix crafting tables not being able to be opened in 1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbegt committed May 28, 2017
1 parent 797e5fb commit 6dae45f
Showing 1 changed file with 3 additions and 2 deletions.
@@ -1,8 +1,9 @@
package com.progwml6.natura.common.gui.common;

import com.progwml6.natura.decorative.NaturaDecorative;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.InventoryCraftResult;
Expand Down Expand Up @@ -93,7 +94,7 @@ public void onContainerClosed(EntityPlayer playerIn)
@Override
public boolean canInteractWith(EntityPlayer playerIn)
{
return this.world.getBlockState(this.pos).getBlock() != Blocks.CRAFTING_TABLE ? false : playerIn.getDistanceSq(this.pos.getX() + 0.5D, this.pos.getY() + 0.5D, this.pos.getZ() + 0.5D) <= 64.0D;
return (this.world.getBlockState(this.pos).getBlock() != NaturaDecorative.overworldWorkbenches && this.world.getBlockState(this.pos).getBlock() != NaturaDecorative.netherWorkbenches) ? false : playerIn.getDistanceSq(this.pos.getX() + 0.5D, this.pos.getY() + 0.5D, this.pos.getZ() + 0.5D) <= 64.0D;
}

/**
Expand Down

0 comments on commit 6dae45f

Please sign in to comment.