mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 10:49:07 +00:00
Proper Reformating
This commit is contained in:
1 parent
ce75880aba
commit
180d257024
1179 files changed
+59847
-61583
No files matched your search
@@ -6,27 +6,28 @@ import net.minecraft.util.MathHelper;
|
||||
import noppes.npcs.api.IContainer;
|
||||
import noppes.npcs.scripted.ScriptContainer;
|
||||
|
||||
public class ContainerNpcInterface extends Container{
|
||||
private int posX, posZ;
|
||||
public EntityPlayer player;
|
||||
public IContainer scriptContainer;
|
||||
public class ContainerNpcInterface extends Container {
|
||||
private int posX, posZ;
|
||||
public EntityPlayer player;
|
||||
public IContainer scriptContainer;
|
||||
|
||||
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) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
public static IContainer getOrCreateIContainer(ContainerNpcInterface container) {
|
||||
if (container.scriptContainer != null) {
|
||||
return container.scriptContainer;
|
||||
} else {
|
||||
return container.scriptContainer = new ScriptContainer(container);
|
||||
}
|
||||
}
|
||||
public static IContainer getOrCreateIContainer(ContainerNpcInterface container) {
|
||||
if (container.scriptContainer != null) {
|
||||
return container.scriptContainer;
|
||||
} else {
|
||||
return container.scriptContainer = new ScriptContainer(container);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user