mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 02:39:05 +00:00
Start API Branch
This commit is contained in:
1 parent
74cb7f979d
commit
be9ae94163
465 files changed
+4204
-4238
No files matched your search
@@ -1,19 +0,0 @@
|
||||
package net.minecraft.block.properties;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/** This code is owned by Minecraft */
|
||||
|
||||
public interface IProperty<T extends Comparable<T>>
|
||||
{
|
||||
String getName();
|
||||
|
||||
Collection<T> getAllowedValues();
|
||||
|
||||
Class<T> getValueClass();
|
||||
|
||||
/**
|
||||
* Get the name for the given value.
|
||||
*/
|
||||
String getName(T value);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package net.minecraft.block.state;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import java.util.Collection;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
|
||||
/** This code is owned by Minecraft */
|
||||
|
||||
public interface IBlockState
|
||||
{
|
||||
Collection<IProperty> getPropertyNames();
|
||||
|
||||
<T extends Comparable<T>> T getValue(IProperty<T> property);
|
||||
|
||||
<T extends Comparable<T>, V extends T> IBlockState withProperty(IProperty<T> property, V value);
|
||||
|
||||
<T extends Comparable<T>> IBlockState cycleProperty(IProperty<T> property);
|
||||
|
||||
ImmutableMap<IProperty, Comparable> getProperties();
|
||||
|
||||
Block getBlock();
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
package net.minecraft.util;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/** This code is owned by Minecraft */
|
||||
|
||||
public class Vec3i implements Comparable<Vec3i>
|
||||
{
|
||||
/** The Null vector constant (0, 0, 0) */
|
||||
public static final Vec3i NULL_VECTOR = new Vec3i(0, 0, 0);
|
||||
/** X coordinate */
|
||||
private final int x;
|
||||
/** Y coordinate */
|
||||
private final int y;
|
||||
/** Z coordinate */
|
||||
private final int z;
|
||||
|
||||
public Vec3i(int xIn, int yIn, int zIn)
|
||||
{
|
||||
this.x = xIn;
|
||||
this.y = yIn;
|
||||
this.z = zIn;
|
||||
}
|
||||
|
||||
public Vec3i(double xIn, double yIn, double zIn)
|
||||
{
|
||||
this(MathHelper.floor_double(xIn), MathHelper.floor_double(yIn), MathHelper.floor_double(zIn));
|
||||
}
|
||||
|
||||
public boolean equals(Object p_equals_1_)
|
||||
{
|
||||
if (this == p_equals_1_)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (!(p_equals_1_ instanceof Vec3i))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Vec3i vec3i = (Vec3i)p_equals_1_;
|
||||
return this.getX() != vec3i.getX() ? false : (this.getY() != vec3i.getY() ? false : this.getZ() == vec3i.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
public int hashCode()
|
||||
{
|
||||
return (this.getY() + this.getZ() * 31) * 31 + this.getX();
|
||||
}
|
||||
|
||||
public int compareTo(Vec3i p_compareTo_1_)
|
||||
{
|
||||
return this.getY() == p_compareTo_1_.getY() ? (this.getZ() == p_compareTo_1_.getZ() ? this.getX() - p_compareTo_1_.getX() : this.getZ() - p_compareTo_1_.getZ()) : this.getY() - p_compareTo_1_.getY();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the X coordinate
|
||||
*/
|
||||
public int getX()
|
||||
{
|
||||
return this.x;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Y coordinate
|
||||
*/
|
||||
public int getY()
|
||||
{
|
||||
return this.y;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Z coordinate
|
||||
*/
|
||||
public int getZ()
|
||||
{
|
||||
return this.z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the cross product of this and the given Vector
|
||||
*/
|
||||
public Vec3i crossProduct(Vec3i vec)
|
||||
{
|
||||
return new Vec3i(this.getY() * vec.getZ() - this.getZ() * vec.getY(), this.getZ() * vec.getX() - this.getX() * vec.getZ(), this.getX() * vec.getY() - this.getY() * vec.getX());
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate squared distance to the given coordinates
|
||||
*/
|
||||
public double distanceSq(double toX, double toY, double toZ)
|
||||
{
|
||||
double d0 = (double)this.getX() - toX;
|
||||
double d1 = (double)this.getY() - toY;
|
||||
double d2 = (double)this.getZ() - toZ;
|
||||
return d0 * d0 + d1 * d1 + d2 * d2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute square of distance from point x, y, z to center of this Block
|
||||
*/
|
||||
public double distanceSqToCenter(double xIn, double yIn, double zIn)
|
||||
{
|
||||
double d0 = (double)this.getX() + 0.5D - xIn;
|
||||
double d1 = (double)this.getY() + 0.5D - yIn;
|
||||
double d2 = (double)this.getZ() + 0.5D - zIn;
|
||||
return d0 * d0 + d1 * d1 + d2 * d2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate squared distance to the given Vector
|
||||
*/
|
||||
public double distanceSq(Vec3i to)
|
||||
{
|
||||
return this.distanceSq((double)to.getX(), (double)to.getY(), (double)to.getZ());
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return Objects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString();
|
||||
}
|
||||
}
|
||||
@@ -1,557 +0,0 @@
|
||||
package net.minecraft.util.math;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
import net.minecraft.util.Vec3i;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.google.common.collect.AbstractIterator;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**
|
||||
* Pasted in from 1.9, with the Vec3d constructor removed
|
||||
*/
|
||||
@Immutable
|
||||
public class BlockPos extends Vec3i
|
||||
{
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
/** The BlockPos with all coordinates 0 */
|
||||
public static final BlockPos ORIGIN = new BlockPos(0, 0, 0);
|
||||
private static final int NUM_X_BITS = 26; //1 + MathHelper.calculateLogBaseTwo(MathHelper.roundUpToPowerOfTwo(30000000)); //Manually calculated because of crash
|
||||
private static final int NUM_Z_BITS = NUM_X_BITS;
|
||||
private static final int NUM_Y_BITS = 64 - NUM_X_BITS - NUM_Z_BITS;
|
||||
private static final int Y_SHIFT = 0 + NUM_Z_BITS;
|
||||
private static final int X_SHIFT = Y_SHIFT + NUM_Y_BITS;
|
||||
private static final long X_MASK = (1L << NUM_X_BITS) - 1L;
|
||||
private static final long Y_MASK = (1L << NUM_Y_BITS) - 1L;
|
||||
private static final long Z_MASK = (1L << NUM_Z_BITS) - 1L;
|
||||
|
||||
public BlockPos(int x, int y, int z)
|
||||
{
|
||||
super(x, y, z);
|
||||
}
|
||||
|
||||
public BlockPos(double x, double y, double z)
|
||||
{
|
||||
super(x, y, z);
|
||||
}
|
||||
|
||||
public BlockPos(Entity source)
|
||||
{
|
||||
this(source.posX, source.posY, source.posZ);
|
||||
}
|
||||
|
||||
public BlockPos(Vec3i source)
|
||||
{
|
||||
this(source.getX(), source.getY(), source.getZ());
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the given coordinates to the coordinates of this BlockPos
|
||||
*/
|
||||
public BlockPos add(double x, double y, double z)
|
||||
{
|
||||
return x == 0.0D && y == 0.0D && z == 0.0D ? this : new BlockPos((double)this.getX() + x, (double)this.getY() + y, (double)this.getZ() + z);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the given coordinates to the coordinates of this BlockPos
|
||||
*/
|
||||
public BlockPos add(int x, int y, int z)
|
||||
{
|
||||
return x == 0 && y == 0 && z == 0 ? this : new BlockPos(this.getX() + x, this.getY() + y, this.getZ() + z);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the given Vector to this BlockPos
|
||||
*/
|
||||
public BlockPos add(Vec3i vec)
|
||||
{
|
||||
return vec.getX() == 0 && vec.getY() == 0 && vec.getZ() == 0 ? this : new BlockPos(this.getX() + vec.getX(), this.getY() + vec.getY(), this.getZ() + vec.getZ());
|
||||
}
|
||||
|
||||
/**
|
||||
* Subtract the given Vector from this BlockPos
|
||||
*/
|
||||
public BlockPos subtract(Vec3i vec)
|
||||
{
|
||||
return vec.getX() == 0 && vec.getY() == 0 && vec.getZ() == 0 ? this : new BlockPos(this.getX() - vec.getX(), this.getY() - vec.getY(), this.getZ() - vec.getZ());
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos 1 block up
|
||||
*/
|
||||
public BlockPos up()
|
||||
{
|
||||
return this.up(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos n blocks up
|
||||
*/
|
||||
public BlockPos up(int n)
|
||||
{
|
||||
return this.offset(EnumFacing.UP, n);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos 1 block down
|
||||
*/
|
||||
public BlockPos down()
|
||||
{
|
||||
return this.down(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos n blocks down
|
||||
*/
|
||||
public BlockPos down(int n)
|
||||
{
|
||||
return this.offset(EnumFacing.DOWN, n);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos 1 block in northern direction
|
||||
*/
|
||||
public BlockPos north()
|
||||
{
|
||||
return this.north(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos n blocks in northern direction
|
||||
*/
|
||||
public BlockPos north(int n)
|
||||
{
|
||||
return this.offset(EnumFacing.NORTH, n);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos 1 block in southern direction
|
||||
*/
|
||||
public BlockPos south()
|
||||
{
|
||||
return this.south(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos n blocks in southern direction
|
||||
*/
|
||||
public BlockPos south(int n)
|
||||
{
|
||||
return this.offset(EnumFacing.SOUTH, n);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos 1 block in western direction
|
||||
*/
|
||||
public BlockPos west()
|
||||
{
|
||||
return this.west(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos n blocks in western direction
|
||||
*/
|
||||
public BlockPos west(int n)
|
||||
{
|
||||
return this.offset(EnumFacing.WEST, n);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos 1 block in eastern direction
|
||||
*/
|
||||
public BlockPos east()
|
||||
{
|
||||
return this.east(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos n blocks in eastern direction
|
||||
*/
|
||||
public BlockPos east(int n)
|
||||
{
|
||||
return this.offset(EnumFacing.EAST, n);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos 1 block in the given direction
|
||||
*/
|
||||
public BlockPos offset(EnumFacing facing)
|
||||
{
|
||||
return this.offset(facing, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offsets this BlockPos n blocks in the given direction
|
||||
*/
|
||||
public BlockPos offset(EnumFacing facing, int n)
|
||||
{
|
||||
return n == 0 ? this : new BlockPos(this.getX() + facing.getFrontOffsetX() * n, this.getY() + facing.getFrontOffsetY() * n, this.getZ() + facing.getFrontOffsetZ() * n);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the cross product of this and the given Vector
|
||||
*/
|
||||
public BlockPos crossProduct(Vec3i vec)
|
||||
{
|
||||
return new BlockPos(this.getY() * vec.getZ() - this.getZ() * vec.getY(), this.getZ() * vec.getX() - this.getX() * vec.getZ(), this.getX() * vec.getY() - this.getY() * vec.getX());
|
||||
}
|
||||
|
||||
/**
|
||||
* Serialize this BlockPos into a long value
|
||||
*/
|
||||
public long toLong()
|
||||
{
|
||||
return ((long)this.getX() & X_MASK) << X_SHIFT | ((long)this.getY() & Y_MASK) << Y_SHIFT | ((long)this.getZ() & Z_MASK) << 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a BlockPos from a serialized long value (created by toLong)
|
||||
*/
|
||||
public static BlockPos fromLong(long serialized)
|
||||
{
|
||||
int i = (int)(serialized << 64 - X_SHIFT - NUM_X_BITS >> 64 - NUM_X_BITS);
|
||||
int j = (int)(serialized << 64 - Y_SHIFT - NUM_Y_BITS >> 64 - NUM_Y_BITS);
|
||||
int k = (int)(serialized << 64 - NUM_Z_BITS >> 64 - NUM_Z_BITS);
|
||||
return new BlockPos(i, j, k);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an Iterable that returns all positions in the box specified by the given corners
|
||||
*/
|
||||
public static Iterable<BlockPos> getAllInBox(BlockPos from, BlockPos to)
|
||||
{
|
||||
final BlockPos blockpos = new BlockPos(Math.min(from.getX(), to.getX()), Math.min(from.getY(), to.getY()), Math.min(from.getZ(), to.getZ()));
|
||||
final BlockPos blockpos1 = new BlockPos(Math.max(from.getX(), to.getX()), Math.max(from.getY(), to.getY()), Math.max(from.getZ(), to.getZ()));
|
||||
return new Iterable<BlockPos>()
|
||||
{
|
||||
public Iterator<BlockPos> iterator()
|
||||
{
|
||||
return new AbstractIterator<BlockPos>()
|
||||
{
|
||||
private BlockPos lastReturned = null;
|
||||
protected BlockPos computeNext()
|
||||
{
|
||||
if (this.lastReturned == null)
|
||||
{
|
||||
this.lastReturned = blockpos;
|
||||
return this.lastReturned;
|
||||
}
|
||||
else if (this.lastReturned.equals(blockpos1))
|
||||
{
|
||||
return (BlockPos)this.endOfData();
|
||||
}
|
||||
else
|
||||
{
|
||||
int i = this.lastReturned.getX();
|
||||
int j = this.lastReturned.getY();
|
||||
int k = this.lastReturned.getZ();
|
||||
|
||||
if (i < blockpos1.getX())
|
||||
{
|
||||
++i;
|
||||
}
|
||||
else if (j < blockpos1.getY())
|
||||
{
|
||||
i = blockpos.getX();
|
||||
++j;
|
||||
}
|
||||
else if (k < blockpos1.getZ())
|
||||
{
|
||||
i = blockpos.getX();
|
||||
j = blockpos.getY();
|
||||
++k;
|
||||
}
|
||||
|
||||
this.lastReturned = new BlockPos(i, j, k);
|
||||
return this.lastReturned;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a version of this BlockPos that is guaranteed to be immutable.
|
||||
*
|
||||
* <p>When storing a BlockPos given to you for an extended period of time, make sure you
|
||||
* use this in case the value is changed internally.</p>
|
||||
*/
|
||||
public BlockPos toImmutable()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Like getAllInBox but reuses a single MutableBlockPos instead. If this method is used, the resulting BlockPos
|
||||
* instances can only be used inside the iteration loop.
|
||||
*/
|
||||
public static Iterable<BlockPos.MutableBlockPos> getAllInBoxMutable(BlockPos from, BlockPos to)
|
||||
{
|
||||
final BlockPos blockpos = new BlockPos(Math.min(from.getX(), to.getX()), Math.min(from.getY(), to.getY()), Math.min(from.getZ(), to.getZ()));
|
||||
final BlockPos blockpos1 = new BlockPos(Math.max(from.getX(), to.getX()), Math.max(from.getY(), to.getY()), Math.max(from.getZ(), to.getZ()));
|
||||
return new Iterable<BlockPos.MutableBlockPos>()
|
||||
{
|
||||
public Iterator<BlockPos.MutableBlockPos> iterator()
|
||||
{
|
||||
return new AbstractIterator<BlockPos.MutableBlockPos>()
|
||||
{
|
||||
private BlockPos.MutableBlockPos theBlockPos = null;
|
||||
protected BlockPos.MutableBlockPos computeNext()
|
||||
{
|
||||
if (this.theBlockPos == null)
|
||||
{
|
||||
this.theBlockPos = new BlockPos.MutableBlockPos(blockpos.getX(), blockpos.getY(), blockpos.getZ());
|
||||
return this.theBlockPos;
|
||||
}
|
||||
else if (this.theBlockPos.equals(blockpos1))
|
||||
{
|
||||
return (BlockPos.MutableBlockPos)this.endOfData();
|
||||
}
|
||||
else
|
||||
{
|
||||
int i = this.theBlockPos.getX();
|
||||
int j = this.theBlockPos.getY();
|
||||
int k = this.theBlockPos.getZ();
|
||||
|
||||
if (i < blockpos1.getX())
|
||||
{
|
||||
++i;
|
||||
}
|
||||
else if (j < blockpos1.getY())
|
||||
{
|
||||
i = blockpos.getX();
|
||||
++j;
|
||||
}
|
||||
else if (k < blockpos1.getZ())
|
||||
{
|
||||
i = blockpos.getX();
|
||||
j = blockpos.getY();
|
||||
++k;
|
||||
}
|
||||
|
||||
this.theBlockPos.x = i;
|
||||
this.theBlockPos.y = j;
|
||||
this.theBlockPos.z = k;
|
||||
return this.theBlockPos;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static class MutableBlockPos extends BlockPos
|
||||
{
|
||||
/** Mutable X Coordinate */
|
||||
protected int x;
|
||||
/** Mutable Y Coordinate */
|
||||
protected int y;
|
||||
/** Mutable Z Coordinate */
|
||||
protected int z;
|
||||
|
||||
public MutableBlockPos()
|
||||
{
|
||||
this(0, 0, 0);
|
||||
}
|
||||
|
||||
public MutableBlockPos(BlockPos pos)
|
||||
{
|
||||
this(pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
|
||||
public MutableBlockPos(int x_, int y_, int z_)
|
||||
{
|
||||
super(0, 0, 0);
|
||||
this.x = x_;
|
||||
this.y = y_;
|
||||
this.z = z_;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the X coordinate.
|
||||
*/
|
||||
public int getX()
|
||||
{
|
||||
return this.x;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Y coordinate.
|
||||
*/
|
||||
public int getY()
|
||||
{
|
||||
return this.y;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Z coordinate.
|
||||
*/
|
||||
public int getZ()
|
||||
{
|
||||
return this.z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the position, MUST not be name 'set' as that causes obfusication conflicts with func_185343_d
|
||||
*/
|
||||
public BlockPos.MutableBlockPos setPos(int xIn, int yIn, int zIn)
|
||||
{
|
||||
this.x = xIn;
|
||||
this.y = yIn;
|
||||
this.z = zIn;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BlockPos.MutableBlockPos setPos(double p_189532_1_, double p_189532_3_, double p_189532_5_)
|
||||
{
|
||||
return this.setPos(MathHelper.floor_double(p_189532_1_), MathHelper.floor_double(p_189532_3_), MathHelper.floor_double(p_189532_5_));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BlockPos.MutableBlockPos setPos(Entity p_189535_1_)
|
||||
{
|
||||
return this.setPos(p_189535_1_.posX, p_189535_1_.posY, p_189535_1_.posZ);
|
||||
}
|
||||
|
||||
public BlockPos.MutableBlockPos setPos(Vec3i p_189533_1_)
|
||||
{
|
||||
return this.setPos(p_189533_1_.getX(), p_189533_1_.getY(), p_189533_1_.getZ());
|
||||
}
|
||||
|
||||
public BlockPos.MutableBlockPos move(EnumFacing p_189536_1_)
|
||||
{
|
||||
return this.move(p_189536_1_, 1);
|
||||
}
|
||||
|
||||
public BlockPos.MutableBlockPos move(EnumFacing p_189534_1_, int p_189534_2_)
|
||||
{
|
||||
return this.setPos(this.x + p_189534_1_.getFrontOffsetX() * p_189534_2_, this.y + p_189534_1_.getFrontOffsetY() * p_189534_2_, this.z + p_189534_1_.getFrontOffsetZ() * p_189534_2_);
|
||||
}
|
||||
|
||||
public void setY(int yIn)
|
||||
{
|
||||
this.y = yIn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a version of this BlockPos that is guaranteed to be immutable.
|
||||
*
|
||||
* <p>When storing a BlockPos given to you for an extended period of time, make sure you
|
||||
* use this in case the value is changed internally.</p>
|
||||
*/
|
||||
public BlockPos toImmutable()
|
||||
{
|
||||
return new BlockPos(this);
|
||||
}
|
||||
}
|
||||
|
||||
public static final class PooledMutableBlockPos extends BlockPos.MutableBlockPos
|
||||
{
|
||||
private boolean released;
|
||||
private static final List<BlockPos.PooledMutableBlockPos> POOL = Lists.<BlockPos.PooledMutableBlockPos>newArrayList();
|
||||
|
||||
private PooledMutableBlockPos(int xIn, int yIn, int zIn)
|
||||
{
|
||||
super(xIn, yIn, zIn);
|
||||
}
|
||||
|
||||
public static BlockPos.PooledMutableBlockPos retain()
|
||||
{
|
||||
return retain(0, 0, 0);
|
||||
}
|
||||
|
||||
public static BlockPos.PooledMutableBlockPos retain(double xIn, double yIn, double zIn)
|
||||
{
|
||||
return retain(MathHelper.floor_double(xIn), MathHelper.floor_double(yIn), MathHelper.floor_double(zIn));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static BlockPos.PooledMutableBlockPos retain(Vec3i vec)
|
||||
{
|
||||
return retain(vec.getX(), vec.getY(), vec.getZ());
|
||||
}
|
||||
|
||||
public static BlockPos.PooledMutableBlockPos retain(int xIn, int yIn, int zIn)
|
||||
{
|
||||
synchronized (POOL)
|
||||
{
|
||||
if (!POOL.isEmpty())
|
||||
{
|
||||
BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = (BlockPos.PooledMutableBlockPos)POOL.remove(POOL.size() - 1);
|
||||
|
||||
if (blockpos$pooledmutableblockpos != null && blockpos$pooledmutableblockpos.released)
|
||||
{
|
||||
blockpos$pooledmutableblockpos.released = false;
|
||||
blockpos$pooledmutableblockpos.set(xIn, yIn, zIn);
|
||||
return blockpos$pooledmutableblockpos;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new BlockPos.PooledMutableBlockPos(xIn, yIn, zIn);
|
||||
}
|
||||
|
||||
public void release()
|
||||
{
|
||||
synchronized (POOL)
|
||||
{
|
||||
if (POOL.size() < 100)
|
||||
{
|
||||
POOL.add(this);
|
||||
}
|
||||
|
||||
this.released = true;
|
||||
}
|
||||
}
|
||||
|
||||
public BlockPos.PooledMutableBlockPos set(int xIn, int yIn, int zIn)
|
||||
{
|
||||
if (this.released)
|
||||
{
|
||||
BlockPos.LOGGER.error("PooledMutableBlockPosition modified after it was released.", new Throwable());
|
||||
this.released = false;
|
||||
}
|
||||
|
||||
return (BlockPos.PooledMutableBlockPos)super.setPos(xIn, yIn, zIn);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BlockPos.PooledMutableBlockPos set(Entity p_189537_1_)
|
||||
{
|
||||
return (BlockPos.PooledMutableBlockPos)super.setPos(p_189537_1_);
|
||||
}
|
||||
|
||||
public BlockPos.PooledMutableBlockPos set(double xIn, double yIn, double zIn)
|
||||
{
|
||||
return (BlockPos.PooledMutableBlockPos)super.setPos(xIn, yIn, zIn);
|
||||
}
|
||||
|
||||
public BlockPos.PooledMutableBlockPos set(Vec3i vec)
|
||||
{
|
||||
return (BlockPos.PooledMutableBlockPos)super.setPos(vec);
|
||||
}
|
||||
|
||||
public BlockPos.PooledMutableBlockPos offsetMutable(EnumFacing facing)
|
||||
{
|
||||
return (BlockPos.PooledMutableBlockPos)super.move(facing);
|
||||
}
|
||||
|
||||
public BlockPos.PooledMutableBlockPos movePos(EnumFacing p_189538_1_, int p_189538_2_)
|
||||
{
|
||||
return (BlockPos.PooledMutableBlockPos)super.move(p_189538_1_, p_189538_2_);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,255 +0,0 @@
|
||||
package net.minecraft.util.math;
|
||||
|
||||
public class IntHashMap<V> {
|
||||
private transient IntHashMap.Entry<V>[] slots = new IntHashMap.Entry[16];
|
||||
/**
|
||||
* The number of items stored in this map
|
||||
*/
|
||||
private transient int count;
|
||||
/**
|
||||
* The grow threshold
|
||||
*/
|
||||
private int threshold = 12;
|
||||
/**
|
||||
* The scale factor used to determine when to grow the table
|
||||
*/
|
||||
private final float growFactor = 0.75F;
|
||||
|
||||
/**
|
||||
* Makes the passed in integer suitable for hashing by a number of shifts
|
||||
*/
|
||||
private static int computeHash(int integer) {
|
||||
integer = integer ^ integer >>> 20 ^ integer >>> 12;
|
||||
return integer ^ integer >>> 7 ^ integer >>> 4;
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes the index of the slot for the hash and slot count passed in.
|
||||
*/
|
||||
private static int getSlotIndex(int hash, int slotCount) {
|
||||
return hash & slotCount - 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the object associated to a key
|
||||
*/
|
||||
public V lookup(int p_76041_1_) {
|
||||
int i = computeHash(p_76041_1_);
|
||||
|
||||
for (IntHashMap.Entry<V> entry = this.slots[getSlotIndex(i, this.slots.length)]; entry != null; entry = entry.nextEntry) {
|
||||
if (entry.hashEntry == p_76041_1_) {
|
||||
return entry.valueEntry;
|
||||
}
|
||||
}
|
||||
|
||||
return (V) null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this hash table contains the specified item.
|
||||
*/
|
||||
public boolean containsItem(int p_76037_1_) {
|
||||
return this.lookupEntry(p_76037_1_) != null;
|
||||
}
|
||||
|
||||
final IntHashMap.Entry<V> lookupEntry(int p_76045_1_) {
|
||||
int i = computeHash(p_76045_1_);
|
||||
|
||||
for (IntHashMap.Entry<V> entry = this.slots[getSlotIndex(i, this.slots.length)]; entry != null; entry = entry.nextEntry) {
|
||||
if (entry.hashEntry == p_76045_1_) {
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a key and associated value to this map
|
||||
*/
|
||||
public void addKey(int p_76038_1_, V p_76038_2_) {
|
||||
int i = computeHash(p_76038_1_);
|
||||
int j = getSlotIndex(i, this.slots.length);
|
||||
|
||||
for (IntHashMap.Entry<V> entry = this.slots[j]; entry != null; entry = entry.nextEntry) {
|
||||
if (entry.hashEntry == p_76038_1_) {
|
||||
entry.valueEntry = p_76038_2_;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.insert(i, p_76038_1_, p_76038_2_, j);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increases the number of hash slots
|
||||
*/
|
||||
private void grow(int p_76047_1_) {
|
||||
IntHashMap.Entry<V>[] entry = this.slots;
|
||||
int i = entry.length;
|
||||
|
||||
if (i == 1073741824) {
|
||||
this.threshold = Integer.MAX_VALUE;
|
||||
} else {
|
||||
IntHashMap.Entry<V>[] entry1 = new IntHashMap.Entry[p_76047_1_];
|
||||
this.copyTo(entry1);
|
||||
this.slots = entry1;
|
||||
this.threshold = (int) ((float) p_76047_1_ * this.growFactor);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the hash slots to a new array
|
||||
*/
|
||||
private void copyTo(IntHashMap.Entry<V>[] p_76048_1_) {
|
||||
IntHashMap.Entry<V>[] entry = this.slots;
|
||||
int i = p_76048_1_.length;
|
||||
|
||||
for (int j = 0; j < entry.length; ++j) {
|
||||
IntHashMap.Entry<V> entry1 = entry[j];
|
||||
|
||||
if (entry1 != null) {
|
||||
entry[j] = null;
|
||||
|
||||
while (true) {
|
||||
IntHashMap.Entry<V> entry2 = entry1.nextEntry;
|
||||
int k = getSlotIndex(entry1.slotHash, i);
|
||||
entry1.nextEntry = p_76048_1_[k];
|
||||
p_76048_1_[k] = entry1;
|
||||
entry1 = entry2;
|
||||
|
||||
if (entry2 == null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the specified object from the map and returns it
|
||||
*/
|
||||
public V removeObject(int p_76049_1_) {
|
||||
IntHashMap.Entry<V> entry = this.removeEntry(p_76049_1_);
|
||||
return (V) (entry == null ? null : entry.valueEntry);
|
||||
}
|
||||
|
||||
final IntHashMap.Entry<V> removeEntry(int p_76036_1_) {
|
||||
int i = computeHash(p_76036_1_);
|
||||
int j = getSlotIndex(i, this.slots.length);
|
||||
IntHashMap.Entry<V> entry = this.slots[j];
|
||||
IntHashMap.Entry<V> entry1;
|
||||
IntHashMap.Entry<V> entry2;
|
||||
|
||||
for (entry1 = entry; entry1 != null; entry1 = entry2) {
|
||||
entry2 = entry1.nextEntry;
|
||||
|
||||
if (entry1.hashEntry == p_76036_1_) {
|
||||
--this.count;
|
||||
|
||||
if (entry == entry1) {
|
||||
this.slots[j] = entry2;
|
||||
} else {
|
||||
entry.nextEntry = entry2;
|
||||
}
|
||||
|
||||
return entry1;
|
||||
}
|
||||
|
||||
entry = entry1;
|
||||
}
|
||||
|
||||
return entry1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all entries from the map
|
||||
*/
|
||||
public void clearMap() {
|
||||
IntHashMap.Entry<V>[] entry = this.slots;
|
||||
|
||||
for (int i = 0; i < entry.length; ++i) {
|
||||
entry[i] = null;
|
||||
}
|
||||
|
||||
this.count = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an object to a slot
|
||||
*/
|
||||
private void insert(int p_76040_1_, int p_76040_2_, V p_76040_3_, int p_76040_4_) {
|
||||
IntHashMap.Entry<V> entry = this.slots[p_76040_4_];
|
||||
this.slots[p_76040_4_] = new IntHashMap.Entry(p_76040_1_, p_76040_2_, p_76040_3_, entry);
|
||||
|
||||
if (this.count++ >= this.threshold) {
|
||||
this.grow(2 * this.slots.length);
|
||||
}
|
||||
}
|
||||
|
||||
static class Entry<V> {
|
||||
/**
|
||||
* The hash code of this entry
|
||||
*/
|
||||
final int hashEntry;
|
||||
/**
|
||||
* The object stored in this entry
|
||||
*/
|
||||
V valueEntry;
|
||||
IntHashMap.Entry<V> nextEntry;
|
||||
/**
|
||||
* The id of the hash slot computed from the hash
|
||||
*/
|
||||
final int slotHash;
|
||||
|
||||
Entry(int p_i1552_1_, int p_i1552_2_, V p_i1552_3_, IntHashMap.Entry<V> p_i1552_4_) {
|
||||
this.valueEntry = p_i1552_3_;
|
||||
this.nextEntry = p_i1552_4_;
|
||||
this.hashEntry = p_i1552_2_;
|
||||
this.slotHash = p_i1552_1_;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the hash code for this entry
|
||||
*/
|
||||
public final int getHash() {
|
||||
return this.hashEntry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the object stored in this entry
|
||||
*/
|
||||
public final V getValue() {
|
||||
return this.valueEntry;
|
||||
}
|
||||
|
||||
public final boolean equals(Object p_equals_1_) {
|
||||
if (!(p_equals_1_ instanceof IntHashMap.Entry)) {
|
||||
return false;
|
||||
} else {
|
||||
IntHashMap.Entry<V> entry = (IntHashMap.Entry) p_equals_1_;
|
||||
Object object = Integer.valueOf(this.getHash());
|
||||
Object object1 = Integer.valueOf(entry.getHash());
|
||||
|
||||
if (object == object1 || object != null && object.equals(object1)) {
|
||||
Object object2 = this.getValue();
|
||||
Object object3 = entry.getValue();
|
||||
|
||||
if (object2 == object3 || object2 != null && object2.equals(object3)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return IntHashMap.computeHash(this.hashEntry);
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
return this.getHash() + "=" + this.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import noppes.npcs.containers.*;
|
||||
import noppes.npcs.controllers.data.PlayerData;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import noppes.npcs.scripted.interfaces.IWorld;
|
||||
import noppes.npcs.api.IWorld;
|
||||
|
||||
public class CommonProxy implements IGuiHandler {
|
||||
|
||||
|
||||
@@ -20,10 +20,11 @@ import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.event.entity.EntityEvent;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.IWorld;
|
||||
import noppes.npcs.controllers.*;
|
||||
import noppes.npcs.controllers.data.*;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.ScriptBlockPos;
|
||||
import noppes.npcs.scripted.event.*;
|
||||
import noppes.npcs.scripted.event.PlayerEvent.ChatEvent;
|
||||
import noppes.npcs.scripted.event.PlayerEvent.ContainerOpen;
|
||||
@@ -33,13 +34,12 @@ import noppes.npcs.scripted.event.PlayerEvent.LoginEvent;
|
||||
import noppes.npcs.scripted.event.PlayerEvent.LogoutEvent;
|
||||
import noppes.npcs.scripted.event.PlayerEvent.PickUpEvent;
|
||||
import noppes.npcs.scripted.event.PlayerEvent.DropEvent;
|
||||
import noppes.npcs.scripted.interfaces.*;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.scripted.interfaces.gui.ICustomGui;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.INaturalSpawn;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemCustom;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.gui.ICustomGui;
|
||||
import noppes.npcs.api.handler.data.INaturalSpawn;
|
||||
import noppes.npcs.api.item.IItemCustom;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagDouble;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.controllers.IScriptHandler;
|
||||
import noppes.npcs.api.IScriptHandler;
|
||||
|
||||
public class NBTTags {
|
||||
|
||||
|
||||
@@ -36,10 +36,9 @@ import cpw.mods.fml.common.network.internal.FMLProxyPacket;
|
||||
import noppes.npcs.scripted.ScriptSound;
|
||||
import noppes.npcs.scripted.event.DialogEvent;
|
||||
import noppes.npcs.scripted.event.QuestEvent;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestObjective;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.ISound;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.handler.data.IQuestObjective;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
|
||||
public class NoppesUtilPlayer {
|
||||
|
||||
@@ -73,7 +73,7 @@ import noppes.npcs.roles.RoleTransporter;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.ScriptSound;
|
||||
import noppes.npcs.scripted.event.DialogEvent;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
|
||||
public class NoppesUtilServer {
|
||||
private static HashMap<String,Quest> editingQuests = new HashMap<String,Quest>();
|
||||
|
||||
@@ -53,7 +53,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.network.FMLNetworkEvent.ServerCustomPacketEvent;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.gui.ScriptGui;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.scripted.item.ScriptCustomItem;
|
||||
|
||||
public class PacketHandlerServer{
|
||||
|
||||
@@ -5,7 +5,6 @@ import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
|
||||
import net.minecraftforge.event.entity.item.ItemTossEvent;
|
||||
@@ -15,9 +14,9 @@ import net.minecraftforge.event.entity.player.PlayerUseItemEvent;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.items.ItemScripted;
|
||||
import noppes.npcs.scripted.event.ItemEvent;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemCustom;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.api.item.IItemCustom;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -14,9 +14,7 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.ContainerPlayer;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.event.entity.EntityStruckByLightningEvent;
|
||||
@@ -26,15 +24,13 @@ import net.minecraftforge.event.entity.living.*;
|
||||
import net.minecraftforge.event.entity.player.*;
|
||||
import net.minecraftforge.event.world.*;
|
||||
import noppes.npcs.constants.EnumPacketClient;
|
||||
import noppes.npcs.constants.EnumQuestType;
|
||||
import noppes.npcs.controllers.*;
|
||||
import noppes.npcs.controllers.data.PlayerData;
|
||||
import noppes.npcs.controllers.data.PlayerDataScript;
|
||||
import noppes.npcs.controllers.data.PlayerQuestData;
|
||||
import noppes.npcs.controllers.data.Quest;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
|
||||
public class ScriptPlayerEventHandler {
|
||||
public ScriptPlayerEventHandler() {
|
||||
|
||||
@@ -136,7 +136,7 @@ import noppes.npcs.controllers.data.PlayerData;
|
||||
import noppes.npcs.entity.*;
|
||||
|
||||
import noppes.npcs.items.ItemScripted;
|
||||
import noppes.npcs.scripted.interfaces.IWorld;
|
||||
import noppes.npcs.api.IWorld;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import tconstruct.client.tabs.InventoryTabFactions;
|
||||
|
||||
@@ -30,7 +30,7 @@ import noppes.npcs.client.gui.util.IGuiData;
|
||||
import noppes.npcs.constants.EnumPacketServer;
|
||||
import noppes.npcs.containers.ContainerCustomGui;
|
||||
import noppes.npcs.scripted.gui.*;
|
||||
import noppes.npcs.scripted.interfaces.gui.ICustomGuiComponent;
|
||||
import noppes.npcs.api.gui.ICustomGuiComponent;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -16,7 +16,7 @@ import noppes.npcs.client.gui.custom.GuiCustom;
|
||||
import noppes.npcs.client.gui.custom.interfaces.IClickListener;
|
||||
import noppes.npcs.client.renderer.ImageBufferDownloadAlt;
|
||||
import noppes.npcs.scripted.gui.ScriptGuiButton;
|
||||
import noppes.npcs.scripted.interfaces.gui.ICustomGuiComponent;
|
||||
import noppes.npcs.api.gui.ICustomGuiComponent;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class CustomGuiButton extends GuiButton implements IClickListener {
|
||||
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.client.gui.custom.GuiCustom;
|
||||
import noppes.npcs.client.gui.custom.interfaces.IGuiComponent;
|
||||
import noppes.npcs.scripted.gui.ScriptGuiLabel;
|
||||
import noppes.npcs.scripted.interfaces.gui.ICustomGuiComponent;
|
||||
import noppes.npcs.api.gui.ICustomGuiComponent;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.client.gui.custom.GuiCustom;
|
||||
import noppes.npcs.client.gui.custom.interfaces.IGuiComponent;
|
||||
import noppes.npcs.scripted.gui.ScriptGuiLine;
|
||||
import noppes.npcs.scripted.interfaces.gui.ICustomGuiComponent;
|
||||
import noppes.npcs.api.gui.ICustomGuiComponent;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class CustomGuiLine extends Gui implements IGuiComponent {
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import noppes.npcs.client.gui.custom.interfaces.IClickListener;
|
||||
import noppes.npcs.client.gui.custom.interfaces.IDataHolder;
|
||||
import noppes.npcs.client.gui.util.GuiCustomScroll;
|
||||
import noppes.npcs.scripted.gui.ScriptGuiScroll;
|
||||
import noppes.npcs.scripted.interfaces.gui.ICustomGuiComponent;
|
||||
import noppes.npcs.api.gui.ICustomGuiComponent;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class CustomGuiScrollComponent extends GuiCustomScroll implements IDataHolder, IClickListener {
|
||||
|
||||
@@ -13,7 +13,7 @@ import noppes.npcs.client.gui.custom.interfaces.IClickListener;
|
||||
import noppes.npcs.client.gui.custom.interfaces.IDataHolder;
|
||||
import noppes.npcs.client.gui.custom.interfaces.IKeyListener;
|
||||
import noppes.npcs.scripted.gui.ScriptGuiTextField;
|
||||
import noppes.npcs.scripted.interfaces.gui.ICustomGuiComponent;
|
||||
import noppes.npcs.api.gui.ICustomGuiComponent;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class CustomGuiTextField extends GuiTextField implements IKeyListener, IDataHolder, IClickListener {
|
||||
|
||||
@@ -8,7 +8,6 @@ package noppes.npcs.client.gui.custom.components;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.ITextureObject;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.resources.IResource;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -17,7 +16,7 @@ import noppes.npcs.client.gui.custom.GuiCustom;
|
||||
import noppes.npcs.client.gui.custom.interfaces.IGuiComponent;
|
||||
import noppes.npcs.client.renderer.ImageBufferDownloadAlt;
|
||||
import noppes.npcs.scripted.gui.ScriptGuiTexturedRect;
|
||||
import noppes.npcs.scripted.interfaces.gui.ICustomGuiComponent;
|
||||
import noppes.npcs.api.gui.ICustomGuiComponent;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
package noppes.npcs.client.gui.custom.interfaces;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import noppes.npcs.scripted.interfaces.gui.ICustomGuiComponent;
|
||||
import noppes.npcs.api.gui.ICustomGuiComponent;
|
||||
|
||||
public interface IGuiComponent {
|
||||
int getID();
|
||||
|
||||
@@ -9,7 +9,7 @@ import noppes.npcs.client.gui.customoverlay.components.CustomOverlayLabel;
|
||||
import noppes.npcs.client.gui.customoverlay.components.CustomOverlayLine;
|
||||
import noppes.npcs.client.gui.customoverlay.components.CustomOverlayTexturedRect;
|
||||
import noppes.npcs.client.gui.customoverlay.interfaces.IOverlayComponent;
|
||||
import noppes.npcs.scripted.interfaces.overlay.ICustomOverlayComponent;
|
||||
import noppes.npcs.api.overlay.ICustomOverlayComponent;
|
||||
import noppes.npcs.scripted.overlay.*;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.client.gui.customoverlay.OverlayCustom;
|
||||
import noppes.npcs.client.gui.customoverlay.interfaces.IOverlayComponent;
|
||||
import noppes.npcs.scripted.interfaces.overlay.ICustomOverlayComponent;
|
||||
import noppes.npcs.api.overlay.ICustomOverlayComponent;
|
||||
import noppes.npcs.scripted.overlay.ScriptOverlayLabel;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.client.gui.customoverlay.OverlayCustom;
|
||||
import noppes.npcs.client.gui.customoverlay.interfaces.IOverlayComponent;
|
||||
import noppes.npcs.scripted.interfaces.overlay.ICustomOverlayComponent;
|
||||
import noppes.npcs.api.overlay.ICustomOverlayComponent;
|
||||
import noppes.npcs.scripted.overlay.ScriptOverlayLine;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
||||
+1
-2
@@ -3,7 +3,6 @@ package noppes.npcs.client.gui.customoverlay.components;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.ITextureObject;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.resources.IResource;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -11,7 +10,7 @@ import noppes.npcs.client.ImageDownloadAlt;
|
||||
import noppes.npcs.client.gui.customoverlay.OverlayCustom;
|
||||
import noppes.npcs.client.gui.customoverlay.interfaces.IOverlayComponent;
|
||||
import noppes.npcs.client.renderer.ImageBufferDownloadAlt;
|
||||
import noppes.npcs.scripted.interfaces.overlay.ICustomOverlayComponent;
|
||||
import noppes.npcs.api.overlay.ICustomOverlayComponent;
|
||||
import noppes.npcs.scripted.overlay.ScriptOverlayTexturedRect;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import noppes.npcs.controllers.data.DialogImage;
|
||||
import noppes.npcs.controllers.data.DialogOption;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IDialogImage;
|
||||
import noppes.npcs.api.handler.data.IDialogImage;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -31,7 +31,7 @@ import noppes.npcs.NoppesStringUtils;
|
||||
import noppes.npcs.client.NoppesUtil;
|
||||
import noppes.npcs.client.gui.swing.GuiJTextArea;
|
||||
import noppes.npcs.client.gui.util.*;
|
||||
import noppes.npcs.controllers.IScriptHandler;
|
||||
import noppes.npcs.api.IScriptHandler;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.controllers.data.ForgeDataScript;
|
||||
import noppes.npcs.controllers.data.NPCDataScript;
|
||||
|
||||
@@ -26,7 +26,7 @@ import noppes.npcs.controllers.data.SkinOverlay;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.roles.JobPuppet;
|
||||
|
||||
import noppes.npcs.scripted.interfaces.ISkinOverlay;
|
||||
import noppes.npcs.api.ISkinOverlay;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import static noppes.npcs.client.ClientProxy.bindTexture;
|
||||
|
||||
@@ -23,7 +23,6 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.boss.BossStatus;
|
||||
import net.minecraft.util.ReportedException;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.client.ImageDownloadAlt;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
@@ -33,7 +32,7 @@ import noppes.npcs.controllers.data.SkinOverlay;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import noppes.npcs.scripted.interfaces.ISkinOverlay;
|
||||
import noppes.npcs.api.ISkinOverlay;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
|
||||
|
||||
@@ -14,8 +14,8 @@ import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.scripted.interfaces.gui.IItemSlot;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.gui.IItemSlot;
|
||||
import noppes.npcs.scripted.gui.ScriptGui;
|
||||
import noppes.npcs.client.gui.custom.components.CustomGuiSlot;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package noppes.npcs.containers;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import noppes.npcs.scripted.interfaces.IContainer;
|
||||
import noppes.npcs.api.IContainer;
|
||||
import noppes.npcs.scripted.ScriptContainer;
|
||||
|
||||
public class ContainerNpcInterface extends Container{
|
||||
|
||||
@@ -12,8 +12,8 @@ import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.containers.ContainerCustomGui;
|
||||
import noppes.npcs.scripted.event.CustomGuiEvent;
|
||||
import noppes.npcs.scripted.gui.ScriptGui;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.scripted.overlay.ScriptOverlay;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ import noppes.npcs.constants.EnumOptionType;
|
||||
import noppes.npcs.controllers.data.Dialog;
|
||||
import noppes.npcs.controllers.data.DialogCategory;
|
||||
import noppes.npcs.controllers.data.DialogOption;
|
||||
import noppes.npcs.scripted.interfaces.handler.IDialogHandler;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IDialog;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IDialogCategory;
|
||||
import noppes.npcs.api.handler.IDialogHandler;
|
||||
import noppes.npcs.api.handler.data.IDialog;
|
||||
import noppes.npcs.api.handler.data.IDialogCategory;
|
||||
import noppes.npcs.util.NBTJsonUtil;
|
||||
|
||||
public class DialogController implements IDialogHandler {
|
||||
|
||||
@@ -18,8 +18,8 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.LogWriter;
|
||||
import noppes.npcs.controllers.data.Faction;
|
||||
import noppes.npcs.scripted.interfaces.handler.IFactionHandler;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IFaction;
|
||||
import noppes.npcs.api.handler.IFactionHandler;
|
||||
import noppes.npcs.api.handler.data.IFaction;
|
||||
|
||||
public class FactionController implements IFactionHandler {
|
||||
public HashMap<Integer,Faction> factions;
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.controllers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
|
||||
public interface IScriptHandler {
|
||||
void callScript(EnumScriptType var1, Event var2);
|
||||
|
||||
boolean isClient();
|
||||
|
||||
boolean getEnabled();
|
||||
|
||||
void setEnabled(boolean var1);
|
||||
|
||||
String getLanguage();
|
||||
|
||||
void setLanguage(String var1);
|
||||
|
||||
List<ScriptContainer> getScripts();
|
||||
|
||||
String noticeString();
|
||||
|
||||
Map<Long, String> getConsoleText();
|
||||
|
||||
void clearConsole();
|
||||
}
|
||||
@@ -12,9 +12,9 @@ import noppes.npcs.LogWriter;
|
||||
import noppes.npcs.NoppesStringUtils;
|
||||
import noppes.npcs.controllers.data.Quest;
|
||||
import noppes.npcs.controllers.data.QuestCategory;
|
||||
import noppes.npcs.scripted.interfaces.handler.IQuestHandler;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuest;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestCategory;
|
||||
import noppes.npcs.api.handler.IQuestHandler;
|
||||
import noppes.npcs.api.handler.data.IQuest;
|
||||
import noppes.npcs.api.handler.data.IQuestCategory;
|
||||
import noppes.npcs.util.NBTJsonUtil;
|
||||
|
||||
public class QuestController implements IQuestHandler {
|
||||
|
||||
@@ -15,8 +15,8 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.controllers.data.RecipeCarpentry;
|
||||
import noppes.npcs.controllers.data.RecipesDefault;
|
||||
import noppes.npcs.scripted.interfaces.handler.IRecipeHandler;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IRecipe;
|
||||
import noppes.npcs.api.handler.IRecipeHandler;
|
||||
import noppes.npcs.api.handler.data.IRecipe;
|
||||
|
||||
public class RecipeController implements IRecipeHandler {
|
||||
private static Collection<RecipeCarpentry> prevRecipes;
|
||||
|
||||
@@ -18,6 +18,7 @@ import cpw.mods.fml.common.eventhandler.Event;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.api.IScriptHandler;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IExtendedEntityProperties;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
|
||||
public class ScriptEntityData implements IExtendedEntityProperties{
|
||||
public IEntity base;
|
||||
|
||||
@@ -19,10 +19,10 @@ import noppes.npcs.LogWriter;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.interfaces.IPos;
|
||||
import noppes.npcs.scripted.interfaces.handler.ICloneHandler;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.scripted.interfaces.IWorld;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.handler.ICloneHandler;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
import noppes.npcs.api.IWorld;
|
||||
import noppes.npcs.util.NBTJsonUtil;
|
||||
|
||||
public class ServerCloneController implements ICloneHandler {
|
||||
|
||||
@@ -20,8 +20,8 @@ import net.minecraft.util.WeightedRandom;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.LogWriter;
|
||||
import noppes.npcs.controllers.data.SpawnData;
|
||||
import noppes.npcs.scripted.interfaces.handler.INaturalSpawnsHandler;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.INaturalSpawn;
|
||||
import noppes.npcs.api.handler.INaturalSpawnsHandler;
|
||||
import noppes.npcs.api.handler.data.INaturalSpawn;
|
||||
|
||||
public class SpawnController implements INaturalSpawnsHandler {
|
||||
public HashMap<String,List<SpawnData>> biomes = new HashMap<String, List<SpawnData>>() ;
|
||||
|
||||
@@ -6,10 +6,8 @@ import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
@@ -20,9 +18,8 @@ import noppes.npcs.controllers.data.TransportCategory;
|
||||
import noppes.npcs.controllers.data.TransportLocation;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.roles.RoleTransporter;
|
||||
import noppes.npcs.scripted.interfaces.handler.ITransportHandler;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.ITransportCategory;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.ITransportLocation;
|
||||
import noppes.npcs.api.handler.ITransportHandler;
|
||||
import noppes.npcs.api.handler.data.ITransportCategory;
|
||||
|
||||
public class TransportController implements ITransportHandler {
|
||||
private HashMap<Integer,TransportLocation> locations = new HashMap<Integer, TransportLocation>();
|
||||
|
||||
@@ -14,8 +14,8 @@ import noppes.npcs.controllers.FactionController;
|
||||
import noppes.npcs.controllers.PlayerDataController;
|
||||
import noppes.npcs.controllers.PlayerQuestController;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IAvailability;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.api.handler.data.IAvailability;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
|
||||
public class Availability implements ICompatibilty, IAvailability {
|
||||
public int version = VersionCompatibility.ModRev;
|
||||
|
||||
@@ -7,7 +7,6 @@ import javax.script.ScriptEngine;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
@@ -18,7 +17,7 @@ import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.LogWriter;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.controllers.IScriptHandler;
|
||||
import noppes.npcs.api.IScriptHandler;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.entity.ScriptNpc;
|
||||
@@ -26,8 +25,8 @@ import noppes.npcs.scripted.ScriptWorld;
|
||||
import noppes.npcs.scripted.constants.EntityType;
|
||||
import noppes.npcs.scripted.constants.JobType;
|
||||
import noppes.npcs.scripted.constants.RoleType;
|
||||
import noppes.npcs.scripted.interfaces.entity.ICustomNpc;
|
||||
import noppes.npcs.scripted.interfaces.IWorld;
|
||||
import noppes.npcs.api.entity.ICustomNpc;
|
||||
import noppes.npcs.api.IWorld;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
|
||||
public class DataScript implements IScriptHandler {
|
||||
|
||||
@@ -14,7 +14,7 @@ import noppes.npcs.constants.EnumOptionType;
|
||||
import noppes.npcs.controllers.DialogController;
|
||||
import noppes.npcs.controllers.QuestController;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.*;
|
||||
import noppes.npcs.api.handler.data.*;
|
||||
|
||||
public class Dialog implements ICompatibilty, IDialog {
|
||||
public int version = VersionCompatibility.ModRev;
|
||||
|
||||
@@ -6,8 +6,8 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IDialog;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IDialogCategory;
|
||||
import noppes.npcs.api.handler.data.IDialog;
|
||||
import noppes.npcs.api.handler.data.IDialogCategory;
|
||||
|
||||
public class DialogCategory implements IDialogCategory {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package noppes.npcs.controllers.data;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IDialogImage;
|
||||
import noppes.npcs.api.handler.data.IDialogImage;
|
||||
|
||||
public class DialogImage implements IDialogImage {
|
||||
public int id;
|
||||
|
||||
@@ -2,7 +2,6 @@ package noppes.npcs.controllers.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -10,11 +9,9 @@ import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.controllers.FactionController;
|
||||
import noppes.npcs.controllers.PlayerDataController;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IFaction;
|
||||
import noppes.npcs.scripted.interfaces.entity.ICustomNpc;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.api.handler.data.IFaction;
|
||||
import noppes.npcs.api.entity.ICustomNpc;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
|
||||
public class Faction implements IFaction {
|
||||
public String name = "";
|
||||
|
||||
@@ -19,7 +19,7 @@ import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.controllers.IScriptHandler;
|
||||
import noppes.npcs.api.IScriptHandler;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
|
||||
public class ForgeDataScript implements IScriptHandler {
|
||||
|
||||
@@ -7,12 +7,12 @@ import net.minecraft.util.math.BlockPos;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.controllers.IScriptHandler;
|
||||
import noppes.npcs.api.IScriptHandler;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.interfaces.entity.ICustomNpc;
|
||||
import noppes.npcs.api.entity.ICustomNpc;
|
||||
|
||||
import javax.annotation.CheckForNull;
|
||||
import java.lang.reflect.Array;
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.HashMap;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.controllers.BankController;
|
||||
import noppes.npcs.scripted.interfaces.handler.IPlayerBankData;
|
||||
import noppes.npcs.api.handler.IPlayerBankData;
|
||||
|
||||
public class PlayerBankData implements IPlayerBankData {
|
||||
private final PlayerData parent;
|
||||
|
||||
@@ -16,8 +16,8 @@ import noppes.npcs.entity.data.DataSkinOverlays;
|
||||
import noppes.npcs.entity.data.DataTimers;
|
||||
import noppes.npcs.roles.RoleCompanion;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.interfaces.entity.ICustomNpc;
|
||||
import noppes.npcs.scripted.interfaces.handler.*;
|
||||
import noppes.npcs.api.entity.ICustomNpc;
|
||||
import noppes.npcs.api.handler.*;
|
||||
import noppes.npcs.util.NBTJsonUtil;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -16,10 +16,10 @@ import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.controllers.IScriptHandler;
|
||||
import noppes.npcs.api.IScriptHandler;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
|
||||
import javax.annotation.CheckForNull;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.util.HashSet;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.scripted.interfaces.handler.IPlayerDialogData;
|
||||
import noppes.npcs.api.handler.IPlayerDialogData;
|
||||
|
||||
public class PlayerDialogData implements IPlayerDialogData {
|
||||
private final PlayerData parent;
|
||||
|
||||
@@ -10,8 +10,8 @@ import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.controllers.FactionController;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.event.FactionEvent;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.scripted.interfaces.handler.IPlayerFactionData;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.handler.IPlayerFactionData;
|
||||
|
||||
public class PlayerFactionData implements IPlayerFactionData {
|
||||
private final PlayerData parent;
|
||||
|
||||
@@ -7,8 +7,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.controllers.GlobalDataController;
|
||||
import noppes.npcs.roles.JobItemGiver;
|
||||
import noppes.npcs.scripted.interfaces.handler.IPlayerItemGiverData;
|
||||
import noppes.npcs.scripted.interfaces.jobs.IJobItemGiver;
|
||||
import noppes.npcs.api.handler.IPlayerItemGiverData;
|
||||
import noppes.npcs.api.jobs.IJobItemGiver;
|
||||
import noppes.npcs.scripted.roles.ScriptJobItemGiver;
|
||||
|
||||
public class PlayerItemGiverData implements IPlayerItemGiverData {
|
||||
|
||||
@@ -9,9 +9,8 @@ import net.minecraft.nbt.NBTTagString;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.controllers.QuestController;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IPlayerMail;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuest;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.api.handler.data.IPlayerMail;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.scripted.interfaces.handler.IPlayerMailData;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IPlayerMail;
|
||||
import noppes.npcs.api.handler.IPlayerMailData;
|
||||
import noppes.npcs.api.handler.data.IPlayerMail;
|
||||
|
||||
public class PlayerMailData implements IPlayerMailData {
|
||||
private final PlayerData parent;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package noppes.npcs.controllers.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -20,8 +19,8 @@ import noppes.npcs.controllers.QuestController;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.quests.QuestInterface;
|
||||
import noppes.npcs.quests.QuestItem;
|
||||
import noppes.npcs.scripted.interfaces.handler.IPlayerQuestData;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuest;
|
||||
import noppes.npcs.api.handler.IPlayerQuestData;
|
||||
import noppes.npcs.api.handler.data.IQuest;
|
||||
|
||||
public class PlayerQuestData implements IPlayerQuestData {
|
||||
private final PlayerData parent;
|
||||
|
||||
@@ -6,8 +6,8 @@ import java.util.HashSet;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.controllers.TransportController;
|
||||
import noppes.npcs.scripted.interfaces.handler.IPlayerTransportData;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.ITransportLocation;
|
||||
import noppes.npcs.api.handler.IPlayerTransportData;
|
||||
import noppes.npcs.api.handler.data.ITransportLocation;
|
||||
|
||||
public class PlayerTransportData implements IPlayerTransportData {
|
||||
private final PlayerData parent;
|
||||
|
||||
@@ -15,12 +15,12 @@ import noppes.npcs.quests.QuestItem;
|
||||
import noppes.npcs.quests.QuestKill;
|
||||
import noppes.npcs.quests.QuestLocation;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuest;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestCategory;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestInterface;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestObjective;
|
||||
import noppes.npcs.scripted.interfaces.IContainer;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.api.handler.data.IQuest;
|
||||
import noppes.npcs.api.handler.data.IQuestCategory;
|
||||
import noppes.npcs.api.handler.data.IQuestInterface;
|
||||
import noppes.npcs.api.handler.data.IQuestObjective;
|
||||
import noppes.npcs.api.IContainer;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
|
||||
public class Quest implements ICompatibilty, IQuest {
|
||||
|
||||
@@ -6,8 +6,8 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuest;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestCategory;
|
||||
import noppes.npcs.api.handler.data.IQuest;
|
||||
import noppes.npcs.api.handler.data.IQuestCategory;
|
||||
|
||||
public class QuestCategory implements IQuestCategory {
|
||||
public HashMap<Integer,Quest> quests;
|
||||
|
||||
@@ -14,7 +14,7 @@ import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.NoppesUtilPlayer;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.controllers.RecipeController;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IRecipe;
|
||||
import noppes.npcs.api.handler.data.IRecipe;
|
||||
|
||||
public class RecipeCarpentry extends ShapedRecipes implements IRecipe {
|
||||
public int id = -1;
|
||||
|
||||
@@ -3,7 +3,7 @@ package noppes.npcs.controllers.data;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.entity.data.DataSkinOverlays;
|
||||
import noppes.npcs.scripted.interfaces.ISkinOverlay;
|
||||
import noppes.npcs.api.ISkinOverlay;
|
||||
|
||||
public class SkinOverlay implements ISkinOverlay {
|
||||
public DataSkinOverlays parent;
|
||||
|
||||
@@ -12,9 +12,9 @@ import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.controllers.ServerCloneController;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.interfaces.IWorld;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.INaturalSpawn;
|
||||
import noppes.npcs.api.IWorld;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
import noppes.npcs.api.handler.data.INaturalSpawn;
|
||||
|
||||
public class SpawnData extends WeightedRandom.Item implements INaturalSpawn {
|
||||
public List<String> biomes = new ArrayList<String>();
|
||||
|
||||
@@ -7,8 +7,8 @@ import java.util.Vector;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.controllers.TransportController;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.ITransportCategory;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.ITransportLocation;
|
||||
import noppes.npcs.api.handler.data.ITransportCategory;
|
||||
import noppes.npcs.api.handler.data.ITransportLocation;
|
||||
|
||||
public class TransportCategory implements ITransportCategory {
|
||||
public int id = -1;
|
||||
|
||||
@@ -3,8 +3,8 @@ package noppes.npcs.controllers.data;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.controllers.TransportController;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.interfaces.IPos;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.ITransportLocation;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.handler.data.ITransportLocation;
|
||||
|
||||
public class TransportLocation implements ITransportLocation {
|
||||
public int id = -1;
|
||||
|
||||
@@ -73,8 +73,8 @@ import noppes.npcs.entity.data.DataTimers;
|
||||
import noppes.npcs.roles.*;
|
||||
import noppes.npcs.scripted.entity.ScriptNpc;
|
||||
import noppes.npcs.scripted.event.*;
|
||||
import noppes.npcs.scripted.interfaces.entity.ICustomNpc;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.api.entity.ICustomNpc;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.util.GameProfileAlt;
|
||||
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import noppes.npcs.constants.EnumPacketClient;
|
||||
import noppes.npcs.controllers.data.PlayerData;
|
||||
import noppes.npcs.controllers.data.SkinOverlay;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.interfaces.ISkinOverlay;
|
||||
import noppes.npcs.scripted.interfaces.handler.IOverlayHandler;
|
||||
import noppes.npcs.api.ISkinOverlay;
|
||||
import noppes.npcs.api.handler.IOverlayHandler;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.interfaces.ITimers;
|
||||
import noppes.npcs.api.ITimers;
|
||||
import noppes.npcs.controllers.data.PlayerData;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -13,7 +12,6 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.CustomItems;
|
||||
@@ -22,7 +20,7 @@ import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.constants.EnumGuiType;
|
||||
import noppes.npcs.entity.EntityItemScripted;
|
||||
import noppes.npcs.scripted.event.ItemEvent;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.scripted.item.ScriptCustomItem;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -14,8 +14,8 @@ import noppes.npcs.controllers.DialogController;
|
||||
import noppes.npcs.controllers.data.PlayerData;
|
||||
import noppes.npcs.controllers.PlayerDataController;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestDialog;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestObjective;
|
||||
import noppes.npcs.api.handler.data.IQuestDialog;
|
||||
import noppes.npcs.api.handler.data.IQuestObjective;
|
||||
|
||||
public class QuestDialog extends QuestInterface implements IQuestDialog {
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ import noppes.npcs.constants.EnumPacketClient;
|
||||
import noppes.npcs.controllers.PlayerDataController;
|
||||
import noppes.npcs.controllers.QuestController;
|
||||
import noppes.npcs.controllers.data.PlayerData;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestInterface;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestObjective;
|
||||
import noppes.npcs.api.handler.data.IQuestInterface;
|
||||
import noppes.npcs.api.handler.data.IQuestObjective;
|
||||
|
||||
public abstract class QuestInterface implements IQuestInterface {
|
||||
public int questId;
|
||||
|
||||
@@ -10,8 +10,8 @@ import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.NpcMiscInventory;
|
||||
import noppes.npcs.controllers.data.PlayerData;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestItem;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestObjective;
|
||||
import noppes.npcs.api.handler.data.IQuestItem;
|
||||
import noppes.npcs.api.handler.data.IQuestObjective;
|
||||
import noppes.npcs.util.ValueUtil;
|
||||
|
||||
public class QuestItem extends QuestInterface implements IQuestItem {
|
||||
|
||||
@@ -11,8 +11,8 @@ import noppes.npcs.controllers.PlayerDataController;
|
||||
import noppes.npcs.controllers.data.PlayerQuestData;
|
||||
import noppes.npcs.controllers.data.QuestData;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestKill;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestObjective;
|
||||
import noppes.npcs.api.handler.data.IQuestKill;
|
||||
import noppes.npcs.api.handler.data.IQuestObjective;
|
||||
|
||||
public class QuestKill extends QuestInterface implements IQuestKill {
|
||||
public HashMap<String,Integer> targets = new HashMap<String,Integer>();
|
||||
|
||||
@@ -13,8 +13,8 @@ import noppes.npcs.controllers.PlayerDataController;
|
||||
import noppes.npcs.controllers.data.PlayerQuestData;
|
||||
import noppes.npcs.controllers.data.QuestData;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestLocation;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuestObjective;
|
||||
import noppes.npcs.api.handler.data.IQuestLocation;
|
||||
import noppes.npcs.api.handler.data.IQuestObjective;
|
||||
|
||||
public class QuestLocation extends QuestInterface implements IQuestLocation {
|
||||
public String location = "";
|
||||
|
||||
@@ -12,7 +12,7 @@ import noppes.npcs.controllers.data.PlayerTransportData;
|
||||
import noppes.npcs.controllers.TransportController;
|
||||
import noppes.npcs.controllers.data.TransportLocation;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.ITransportLocation;
|
||||
import noppes.npcs.api.handler.data.ITransportLocation;
|
||||
|
||||
public class RoleTransporter extends RoleInterface{
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.api.*;
|
||||
import noppes.npcs.containers.ContainerNpcInterface;
|
||||
import noppes.npcs.controllers.*;
|
||||
import noppes.npcs.controllers.data.SkinOverlay;
|
||||
@@ -38,15 +39,14 @@ import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.items.ItemScripted;
|
||||
import noppes.npcs.scripted.entity.*;
|
||||
import noppes.npcs.scripted.gui.ScriptGui;
|
||||
import noppes.npcs.scripted.interfaces.*;
|
||||
import noppes.npcs.scripted.interfaces.entity.ICustomNpc;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.scripted.interfaces.gui.ICustomGui;
|
||||
import noppes.npcs.scripted.interfaces.handler.*;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.ISound;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.scripted.interfaces.overlay.ICustomOverlay;
|
||||
import noppes.npcs.api.entity.ICustomNpc;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.gui.ICustomGui;
|
||||
import noppes.npcs.api.handler.*;
|
||||
import noppes.npcs.api.handler.data.ISound;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.api.overlay.ICustomOverlay;
|
||||
import noppes.npcs.scripted.item.*;
|
||||
import noppes.npcs.scripted.overlay.ScriptOverlay;
|
||||
import noppes.npcs.util.JsonException;
|
||||
|
||||
@@ -14,8 +14,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import noppes.npcs.scripted.interfaces.*;
|
||||
import noppes.npcs.api.*;
|
||||
import noppes.npcs.util.LRUHashMap;
|
||||
|
||||
public class ScriptBlock implements IBlock {
|
||||
|
||||
@@ -8,7 +8,7 @@ package noppes.npcs.scripted;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3i;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import noppes.npcs.scripted.interfaces.IPos;
|
||||
import noppes.npcs.api.IPos;
|
||||
|
||||
public class ScriptBlockPos implements IPos {
|
||||
public BlockPos blockPos;
|
||||
|
||||
@@ -12,9 +12,9 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import noppes.npcs.NoppesUtilPlayer;
|
||||
import noppes.npcs.containers.ContainerCustomGui;
|
||||
import noppes.npcs.scripted.interfaces.IContainer;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.api.IContainer;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
|
||||
public class ScriptContainer implements IContainer {
|
||||
private IInventory inventory;
|
||||
|
||||
@@ -6,9 +6,8 @@
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
import net.minecraft.util.DamageSource;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.scripted.interfaces.IDamageSource;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.api.IDamageSource;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
|
||||
public class ScriptDamageSource implements IDamageSource {
|
||||
private DamageSource source;
|
||||
|
||||
@@ -14,7 +14,7 @@ import net.minecraft.nbt.NBTTagInt;
|
||||
import net.minecraft.nbt.NBTTagIntArray;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
import noppes.npcs.scripted.interfaces.INbt;
|
||||
import noppes.npcs.api.INbt;
|
||||
import noppes.npcs.util.NBTJsonUtil;
|
||||
|
||||
public class ScriptNbt implements INbt {
|
||||
|
||||
@@ -2,10 +2,10 @@ package noppes.npcs.scripted;
|
||||
|
||||
import net.minecraft.nbt.*;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.scripted.interfaces.IParticle;
|
||||
import noppes.npcs.scripted.interfaces.IPos;
|
||||
import noppes.npcs.scripted.interfaces.IWorld;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.api.IParticle;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.IWorld;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
import net.minecraft.nbt.*;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import noppes.npcs.scripted.interfaces.IPos;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.ISound;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
import noppes.npcs.api.handler.data.ISound;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@ package noppes.npcs.scripted;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import noppes.npcs.scripted.interfaces.*;
|
||||
import noppes.npcs.api.*;
|
||||
|
||||
public class ScriptTileEntity<T extends TileEntity> implements ITileEntity {
|
||||
protected T tileEntity;
|
||||
|
||||
@@ -24,15 +24,15 @@ import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.blocks.tiles.TileBigSign;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.controllers.ServerCloneController;
|
||||
import noppes.npcs.scripted.interfaces.IBlock;
|
||||
import noppes.npcs.scripted.interfaces.IPos;
|
||||
import noppes.npcs.scripted.interfaces.IParticle;
|
||||
import noppes.npcs.scripted.interfaces.ITileEntity;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.ISound;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.scripted.interfaces.IWorld;
|
||||
import noppes.npcs.api.IBlock;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.IParticle;
|
||||
import noppes.npcs.api.ITileEntity;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.handler.data.ISound;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.api.IWorld;
|
||||
import noppes.npcs.scripted.scoreboard.ScriptScoreboard;
|
||||
|
||||
public class ScriptWorld implements IWorld {
|
||||
|
||||
@@ -2,11 +2,10 @@ package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import noppes.npcs.scripted.constants.EntityType;
|
||||
import noppes.npcs.scripted.interfaces.entity.IAnimal;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.api.entity.IAnimal;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
|
||||
public class ScriptAnimal<T extends EntityAnimal> extends ScriptLiving<T> implements IAnimal {
|
||||
protected T entity;
|
||||
|
||||
@@ -5,8 +5,8 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
import noppes.npcs.scripted.interfaces.entity.IDBCPlayer;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.api.entity.IDBCPlayer;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
|
||||
public class ScriptDBCPlayer<T extends EntityPlayerMP> extends ScriptPlayer<T> implements IDBCPlayer {
|
||||
|
||||
@@ -18,19 +18,17 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagIntArray;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.controllers.ServerCloneController;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.*;
|
||||
import noppes.npcs.scripted.constants.EntityType;
|
||||
import noppes.npcs.scripted.interfaces.IParticle;
|
||||
import noppes.npcs.scripted.interfaces.IWorld;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.scripted.interfaces.INbt;
|
||||
import noppes.npcs.scripted.interfaces.IPos;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.api.IParticle;
|
||||
import noppes.npcs.api.IWorld;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
import noppes.npcs.api.INbt;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
|
||||
public class ScriptEntity<T extends Entity> implements IEntity {
|
||||
protected T entity;
|
||||
|
||||
@@ -2,9 +2,9 @@ package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntityLiving;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntityLivingBase;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
import noppes.npcs.api.entity.IEntityLiving;
|
||||
import noppes.npcs.api.entity.IEntityLivingBase;
|
||||
|
||||
public class ScriptLiving<T extends EntityLiving> extends ScriptLivingBase<T> implements IEntityLiving {
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ import net.minecraft.util.Vec3;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.ScriptDamageSource;
|
||||
import noppes.npcs.scripted.constants.EntityType;
|
||||
import noppes.npcs.scripted.interfaces.IBlock;
|
||||
import noppes.npcs.scripted.interfaces.IPos;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntityLivingBase;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.api.IBlock;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
import noppes.npcs.api.entity.IEntityLivingBase;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
|
||||
public class ScriptLivingBase<T extends EntityLivingBase> extends ScriptEntity<T> implements IEntityLivingBase {
|
||||
protected T entity;
|
||||
|
||||
@@ -2,7 +2,7 @@ package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import noppes.npcs.scripted.constants.EntityType;
|
||||
import noppes.npcs.scripted.interfaces.entity.IMonster;
|
||||
import noppes.npcs.api.entity.IMonster;
|
||||
|
||||
public class ScriptMonster<T extends EntityMob> extends ScriptLiving<T> implements IMonster {
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@ import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.constants.AnimationType;
|
||||
import noppes.npcs.scripted.constants.EntityType;
|
||||
import noppes.npcs.scripted.interfaces.IPos;
|
||||
import noppes.npcs.scripted.interfaces.ITimers;
|
||||
import noppes.npcs.scripted.interfaces.entity.ICustomNpc;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntityLivingBase;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.scripted.interfaces.handler.IOverlayHandler;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IFaction;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.ITimers;
|
||||
import noppes.npcs.api.entity.ICustomNpc;
|
||||
import noppes.npcs.api.entity.IEntityLivingBase;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.handler.IOverlayHandler;
|
||||
import noppes.npcs.api.handler.data.IFaction;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.scripted.roles.ScriptJobBard;
|
||||
import noppes.npcs.scripted.roles.ScriptJobConversation;
|
||||
import noppes.npcs.scripted.roles.ScriptJobFollower;
|
||||
|
||||
@@ -3,7 +3,7 @@ package noppes.npcs.scripted.entity;
|
||||
import net.minecraft.entity.passive.EntityTameable;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.controllers.PixelmonHelper;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPixelmon;
|
||||
import noppes.npcs.api.entity.IPixelmon;
|
||||
import noppes.npcs.util.ValueUtil;
|
||||
|
||||
public class ScriptPixelmon<T extends EntityTameable> extends ScriptAnimal<T> implements IPixelmon {
|
||||
|
||||
@@ -16,6 +16,7 @@ import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.WorldSettings;
|
||||
import noppes.npcs.*;
|
||||
import noppes.npcs.api.*;
|
||||
import noppes.npcs.constants.EnumPacketClient;
|
||||
import noppes.npcs.constants.EnumQuestType;
|
||||
import noppes.npcs.containers.ContainerCustomGui;
|
||||
@@ -36,16 +37,15 @@ import noppes.npcs.scripted.ScriptPixelmonPlayerData;
|
||||
import noppes.npcs.scripted.ScriptSound;
|
||||
import noppes.npcs.scripted.constants.EntityType;
|
||||
import noppes.npcs.scripted.gui.ScriptGui;
|
||||
import noppes.npcs.scripted.interfaces.*;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IDialog;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IQuest;
|
||||
import noppes.npcs.scripted.interfaces.gui.ICustomGui;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.ISound;
|
||||
import noppes.npcs.scripted.interfaces.overlay.ICustomOverlay;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.scripted.interfaces.handler.IOverlayHandler;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.api.handler.data.IDialog;
|
||||
import noppes.npcs.api.handler.data.IQuest;
|
||||
import noppes.npcs.api.gui.ICustomGui;
|
||||
import noppes.npcs.api.handler.data.ISound;
|
||||
import noppes.npcs.api.overlay.ICustomOverlay;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
import noppes.npcs.api.handler.IOverlayHandler;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.scripted.overlay.ScriptOverlay;
|
||||
import noppes.npcs.util.ValueUtil;
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ package noppes.npcs.scripted.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import noppes.npcs.scripted.interfaces.gui.ICustomGui;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.api.gui.ICustomGui;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
|
||||
public class CustomGuiEvent extends Event {
|
||||
public final IPlayer player;
|
||||
|
||||
@@ -7,10 +7,9 @@ package noppes.npcs.scripted.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import noppes.npcs.scripted.interfaces.AbstractNpcAPI;
|
||||
import noppes.npcs.scripted.interfaces.IPos;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.INaturalSpawn;
|
||||
import noppes.npcs.api.AbstractNpcAPI;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.handler.data.INaturalSpawn;
|
||||
|
||||
public class CustomNPCsEvent extends Event{
|
||||
public final AbstractNpcAPI API = AbstractNpcAPI.Instance();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package noppes.npcs.scripted.event;
|
||||
|
||||
import noppes.npcs.scripted.interfaces.handler.data.IDialog;
|
||||
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
||||
import noppes.npcs.api.handler.data.IDialog;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
|
||||
public class DialogEvent extends CustomNPCsEvent {
|
||||
public final IDialog dialog;
|
||||
|
||||
Loaded 100 of 465 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user