mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 06:55:03 +00:00
1.7.10 Files
Files added
This commit is contained in:
1 parent
393ea9b463
commit
a31efb2dc3
1768 files changed
+84831
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package noppes.npcs.containers;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ContainerNpcInterface extends Container{
|
||||
private int posX, posZ;
|
||||
|
||||
public ContainerNpcInterface(EntityPlayer player){
|
||||
posX = MathHelper.floor_double(player.posX);
|
||||
posZ = MathHelper.floor_double(player.posZ);
|
||||
player.motionX = 0;
|
||||
player.motionZ = 0;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return !player.isDead && posX == MathHelper.floor_double(player.posX) && posZ == MathHelper.floor_double(player.posZ);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user