Files
fabric-carpet/src/main/java/carpet/helpers/PortalHelper.javax
T
2019-05-12 01:48:19 -03:00

20 lines
566 B
Plaintext

package carpet.helpers;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.block.Blocks;
import net.minecraft.item.ItemBlock;
public class PortalHelper
{
public static boolean player_holds_obsidian(EntityPlayer playerIn)
{
if ( (!playerIn.getHeldItemMainhand().isEmpty()
&& playerIn.getHeldItemMainhand().getItem() instanceof ItemBlock &&
((ItemBlock)(playerIn.getHeldItemMainhand().getItem())).getBlock() == Blocks.OBSIDIAN ))
{
return true;
}
return false;
}
}