Remove Submodule

This commit is contained in:
KAMKEEL committed 2022-11-25 15:55:25 -05:00
1 parent 8e6124b473
commit 96cde60428
113 files changed
-7349

No files matched your search

-3
View File
@@ -1,3 +0,0 @@
[submodule "src/api"]
path = src/api
url = https://github.com/KAMKEEL/CustomNPC-Plus-API.git
Submodule CustomNPC-Plus-API deleted from 95e2f9df01.
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2022 Kamron Vaswani
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-16
View File
@@ -1,16 +0,0 @@
# CustomNPC-Plus-API
External API for scripting and to allow mods/plugins to hook into CustomNPC+
## How to use in a Mod
Basically just download the api code and include it in your mod.
In your mod you can check if CustomNPC+ is installed with `NpcAPI.IsAvailable()`
To use the events, register your events with `NpcAPI.Instance().events().register(youreventclass)`
## Extra
JavaDocs: https://kamkeel.github.io/CustomNPC-Plus/
[![Discord Badge](https://img.shields.io/badge/KAMKEEL_Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/pQqRTvFeJ5)
[![Download CustomNPC+](https://img.shields.io/badge/CustomNPC+_Download-0081CB?style=for-the-badge&logo=material-ui&logoColor=white)](https://www.curseforge.com/minecraft/mc-mods/customnpc-plus)
@@ -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();
}
-123
View File
@@ -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();
}
}
}
@@ -1,273 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api;
import java.io.File;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.eventhandler.EventBus;
import net.minecraft.entity.Entity;
import net.minecraft.entity.INpc;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.DamageSource;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
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;
/**
* This object stores functions available to all scripting handlers through the "API" keyword.
*
*/
public abstract class AbstractNpcAPI {
private static AbstractNpcAPI instance = null;
public AbstractNpcAPI() {
}
public abstract long sizeOfObject(Object obj);
public abstract void stopServer();
public abstract int getCurrentPlayerCount();
public abstract int getMaxPlayers();
public abstract void kickAllPlayers();
public abstract boolean isHardcore();
public abstract File getFile(String path);
public abstract String getServerOwner();
public abstract IFactionHandler getFactions();
public abstract IRecipeHandler getRecipes();
public abstract IQuestHandler getQuests();
public abstract IDialogHandler getDialogs();
public abstract ICloneHandler getClones();
public abstract INaturalSpawnsHandler getNaturalSpawns();
public abstract ITransportHandler getLocations();
public abstract String[] getAllBiomeNames();
public abstract ICustomNpc<?> createNPC(IWorld var1);
/**
*
* Spawns a new NPC in the world at the given coordinates and returns an ICustomNpc object of it.
*/
public abstract ICustomNpc<?> spawnNPC(IWorld var1, int var2, int var3, int var4);
public abstract ICustomNpc<?> spawnNPC(IWorld world, IPos pos);
public abstract IEntity<?> getIEntity(Entity var1);
public abstract IPlayer<?> getPlayer(String username);
public abstract INpc[] getChunkLoadingNPCs();
public abstract IEntity<?>[] getLoadedEntities();
public abstract IBlock getIBlock(IWorld world, int x, int y, int z);
public abstract IBlock getIBlock(IWorld world, IPos pos);
public abstract ITileEntity getITileEntity(IWorld world, IPos pos);
public abstract ITileEntity getITileEntity(IWorld world, int x, int y, int z);
public abstract ITileEntity getITileEntity(TileEntity tileEntity);
public abstract IPos getIPos(BlockPos pos);
public abstract IPos getIPos(int x, int y, int z);
public abstract IPos getIPos(double x, double y, double z);
public abstract IPos getIPos(float x, float y, float z);
/**
* Forms a box with corners as the input IPos parameters, and returns all
* points inside the box as a list of IPos vectors.
*
* @param from The starting IPos vector, first corner of the box.
* @param to The ending IPos vector, opposite corner of the box.
* @param sortByDistance Sorts the list by distance from the "from" IPos parameter.
* @return The list of all IPos vectors inside the box.
*/
public abstract IPos[] getAllInBox(IPos from, IPos to, boolean sortByDistance);
public abstract IPos[] getAllInBox(IPos from, IPos to);
public abstract IContainer getIContainer(IInventory var1);
public abstract IContainer getIContainer(Container var1);
public abstract IItemStack getIItemStack(ItemStack var1);
public abstract IWorld getIWorld(World var1);
public abstract IWorld getIWorld(int var1);
public abstract IWorld[] getIWorlds();
public abstract IDamageSource getIDamageSource(DamageSource var1);
public abstract IDamageSource getIDamageSource(IEntity<?> entity);
public abstract EventBus events();
public abstract File getGlobalDir();
public abstract File getWorldDir();
public static boolean IsAvailable() {
return Loader.isModLoaded("customnpcs");
}
public static AbstractNpcAPI Instance() {
if (instance != null) {
return instance;
} else if (!IsAvailable()) {
return null;
} else {
try {
Class<?> c = Class.forName("noppes.npcs.scripted.NpcAPI");
instance = (AbstractNpcAPI) c.getMethod("Instance").invoke((Object) null);
} catch (Exception var1) {
var1.printStackTrace();
}
return instance;
}
}
public abstract void executeCommand(IWorld var1, String var2);
/**
* Generates a new name as a String using the Markov name generator.
*
* @param dictionary An integer representing which dictionary to use:
* 0: Roman
* 1: Japanese
* 2: Slavic
* 3: Welsh
* 4: Saami
* 5: Old Norse
* 6: Ancient Greek
* 7: Aztec
* 8: CustomNPCs Classic
* 9: Spanish
* @param gender The gender of the name:
* 0: Random
* 1: Male
* 2: Female
*/
public abstract String getRandomName(int dictionary, int gender);
public abstract INbt getINbt(NBTTagCompound nbtTagCompound);
public abstract INbt stringToNbt(String str);
public abstract IPlayer<?>[] getAllServerPlayers();
public abstract String[] getPlayerNames();
public abstract IItemStack createItem(String id, int damage, int size);
public abstract void playSoundAtEntity(IEntity<?> entity, String sound, float volume, float pitch);
public abstract void playSoundToNearExcept(IPlayer<?> player, String sound, float volume, float pitch);
/**
*
* @return Returns the server's Message of The Day.
*/
public abstract String getMOTD();
/**
* @param motd The server's new Message of The Day.
*/
public abstract void setMOTD(String motd);
/**
*
* @return A new IParticle object initialized with the given texture.
*/
public abstract IParticle createParticle(String directory);
@Deprecated
public abstract IParticle createEntityParticle(String directory);
public abstract ISound createSound(String directory);
public abstract void playSound(int id, ISound sound);
public abstract void stopSound(int id);
public abstract void pauseSounds();
public abstract void continueSounds();
public abstract void stopSounds();
/**
*
* @return The uptime of the server in MC ticks.
*/
public abstract int getServerTime();
public abstract boolean arePlayerScriptsEnabled();
public abstract boolean areForgeScriptsEnabled();
public abstract boolean areGlobalNPCScriptsEnabled();
public abstract void enablePlayerScripts(boolean enable);
public abstract void enableForgeScripts(boolean enable);
public abstract void enableGlobalNPCScripts(boolean enable);
/**
*
* @param id The id of the custom GUI.
* @param width The width of the GUI in pixels.
* @param height The height of the GUI in pixels.
* @param pauseGame Whether the GUI pauses the game or not.
* @return A new ICustomGui object with the given attributes.
*/
public abstract ICustomGui createCustomGui(int id, int width, int height, boolean pauseGame);
/**
*
* @return A new ICustomOverlay overlay object with the given ID.
*/
public abstract ICustomOverlay createCustomOverlay(int id);
/**
*
* @return A new ISkinOverlay object initialized with the given texture.
*/
public abstract ISkinOverlay createSkinOverlay(String texture);
}
-144
View File
@@ -1,144 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package noppes.npcs.api;
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
public interface IBlock {
int getX();
int getY();
int getZ();
/**
*
* @return An IPos object with the block's XYZ position.
*/
IPos getPosition();
/**
* Moves the block to a new position in the given world. The old position is replaced with air.
*
* @param pos The new position of the block
* @param world The destination world of the block
* @return Whether the block was successfully placed
*/
boolean setPosition(IPos pos, IWorld world);
boolean setPosition(IPos pos);
boolean setPosition(int x, int y, int z, IWorld world);
boolean setPosition(int x, int y, int z);
/**
*
* @return The block name as it appears in the block registry. Return example: "minecraft:stone"
*/
String getName();
/**
* Deletes the block, setting it to air.
*/
void remove();
boolean isAir();
/**
*
* @param blockName The name of the block to be set in place of this block.
* @return The new block set in place of this block as an IBlock object.
*/
IBlock setBlock(String blockName);
/**
*
* @param block Input IBlock object to replace this block.
* @return The new block set in place of the previous block.
*/
IBlock setBlock(IBlock block);
/**
*
* @return True if the block can contain items like a chest does.
*/
boolean isContainer();
/**
*
* @return The container object of this block. If this block is not a container, an exception will be thrown.
*/
IContainer getContainer();
/**
*
* @return An IWorld object of the world this block is in.
*/
IWorld getWorld();
/**
*
* @return True if this block has a tile entity. Blocks with custom data like signs, player skulls, chests, etc. will have tile entities.
*/
boolean hasTileEntity();
/**
*
* @return An ITileEntity object which can modify this block's tile entity.
*/
ITileEntity getTileEntity();
/**
*
* @param tileEntity Replaces this block's tile entity based on the data given by this parameter.
*/
void setTileEntity(ITileEntity tileEntity);
/**
*
* @return An obfuscated MC object for the block's tile entity.
*/
TileEntity getMCTileEntity();
/**
*
* @return An obfuscated MC block object.
*/
Block getMCBlock();
String getDisplayName();
/**
*
* @return An INbt object which can modify the block's tile entity's NBT data.
*/
INbt getTileEntityNBT();
/**
*
* @param maxVolume The volume threshold to determine whether this block's bounding box collides, if it has one.
* @return Whether this block can be collided with
*/
boolean canCollide(double maxVolume);
boolean canCollide();
void setBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ);
double getBlockBoundsMinX();
double getBlockBoundsMinY();
double getBlockBoundsMinZ();
double getBlockBoundsMaxX();
double getBlockBoundsMaxY();
double getBlockBoundsMaxZ();
}
@@ -1,64 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import noppes.npcs.api.entity.IPlayer;
import noppes.npcs.api.item.IItemStack;
public interface IContainer {
int getSize();
IItemStack getSlot(int slot);
/**
*
* @param slot The slot to be replaced
* @param item The item replacing the previous item in that slot, as an IItemStack object
*/
void setSlot(int slot, IItemStack item);
/**
*
* @return An obfuscated MC inventory object.
*/
IInventory getMCInventory();
/**
*
* @return An obfuscated MC container object.
*/
Container getMCContainer();
/**
*
* @param itemStack The item stack to be searched in the container
* @param ignoreDamage Whether damage should be ignored when searching
* @param ignoreNBT Whether NBT values should be ignored when searching
* @return The amount of the item stack found, based on the flags given above.
*/
int count(IItemStack itemStack, boolean ignoreDamage, boolean ignoreNBT);
/**
*
* @return A list of all item stacks in the container as a list of IItemStack objects.
*/
IItemStack[] getItems();
/**
*
* @return True if this container belongs to a Custom GUI.
*/
boolean isCustomGUI();
/**
* Sends changes to be reflected on the player's client.
*/
void detectAndSendChanges();
boolean isPlayerNotUsingContainer(IPlayer player);
}
@@ -1,39 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api;
import net.minecraft.util.DamageSource;
import noppes.npcs.api.entity.IEntity;
public interface IDamageSource {
/**
*
* @return The damage type of the damage source as a string. Ex: "lava", "explosion", "magic", "outOfWorld", etc.
*/
String getType();
boolean isUnblockable();
boolean isProjectile();
/**
*
* @return The entity source of where the damage source originated. If a player was shot by an arrow from a skeleton, this would return an IEntity object of the skeleton.
*/
IEntity getTrueSource();
/**
*
* @return The entity source of where the damage source originated. If a player was shot by an arrow from a skeleton, this would return an IEntity object of the arrow.
*/
IEntity getImmediateSource();
/**
*
* @return An obfuscated MC damage source object.
*/
DamageSource getMCDamageSource();
}
-142
View File
@@ -1,142 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package noppes.npcs.api;
import net.minecraft.nbt.NBTTagCompound;
/**
* A scripted data representation of an MC NBTTagCompound object. Using these functions modifies the compound tag
* associated with this object. Any changes made to the compound tag are made directly to its "tagMap" attribute,
* minimizing the impact of setting/getting NBT data with this object on performance.
*
* Compound tags, unlike list tags, can contain multiple types of NBT tag types. Compound tags can even
* contain compound tags inside them, and if that compound tag is accessed, an object like this one will also be returned!
*
* Every tag inside a compound tag has a -unique- "key". If you try to put another tag of the same key inside the
* compound tag, it will replace the previous tag.
*
* The types and their type as an integer are as follows:
* 1: Byte
* 2: Short
* 3: Int
* 4: Long
* 5: Float
* 6: Double
* 7: Byte array
* 8: String
* 9: Tag list
* 10: Compound
* 11: Integer array
*
*/
public interface INbt {
/**
* Returns the tag with the given key from the compound tag.
*/
void remove(String key);
/**
* @return True if the compound tag has a tag with the given key.
*/
boolean has(String key);
boolean getBoolean(String key);
void setBoolean(String key, boolean value);
short getShort(String key);
void setShort(String key, short value);
int getInteger(String key);
void setInteger(String key, int value);
byte getByte(String key);
void setByte(String key, byte value);
long getLong(String key);
void setLong(String key, long value);
double getDouble(String key);
void setDouble(String key, double value);
float getFloat(String key);
void setFloat(String key, float value);
String getString(String key);
void setString(String key, String value);
byte[] getByteArray(String key);
void setByteArray(String key, byte[] value);
int[] getIntegerArray(String key);
void setIntegerArray(String key, int[] value);
/**
* Returns a tag list of objects with this key in the compound tag. All the objects in the list
* will always be of the same type.
*
* @return The tag list of objects, depending on the tag type.
*/
Object[] getList(String key, int value);
/**
* Returns the type of the tag list with this key, as an integer.
*/
int getListType(String key);
/**
* Adds a new tag list to the compound tag with the given key.
*
* @param key The key for the list tag
* @param value The list of objects to be in the list. The type of the first element in this list becomes the tag
* list's type, and if later objects are not of this type, they will not be added.
*/
void setList(String key, Object[] value);
INbt getCompound(String key);
void setCompound(String key, INbt value);
/**
*
* @return A list of all the compound tag's keys.
*/
String[] getKeys();
/**
*
* @return The type of the tag with the input key as an integer.
*/
int getType(String key);
/**
*
* @return An obfuscated MC NBTTagCompound object.
*/
NBTTagCompound getMCNBT();
/**
*
* @return A curly-bracket formatted JSON string of all the compound tag.
*/
String toJsonString();
boolean isEqual(INbt nbt);
/**
* Completely clears the compound tag of all tags inside it.
*/
void clear();
}
-234
View File
@@ -1,234 +0,0 @@
package noppes.npcs.api;
import noppes.npcs.api.entity.IEntity;
/**
* A particle that can be spawned in the world, complete with translation, scale, rotate, and color transformations.
* (CNPC+ original!)
*
* To create a particle object:
* API.createParticle(directory);
* Then modify its attributes as you please, and call the particle's spawn functions to see it in the world.
*
* Spawning this particle in the world sends a hefty packet with all its data to the client. The particle is then
* rendered with a custom renderer based on all the given attributes.
*
* If a particle appears to not appear at first, try increasing its scale or changing its position. The entity it's
* being spawned on or a block in the world may be blocking it.
*
*/
public interface IParticle {
/**
*
* @param entity Spawns this particle object on the given entity. When spawned this way, the particle will always have its origin at the entity.
*/
void spawn(IEntity entity);
/**
*
* @param world Spawns the particle in the given world, at a position corresponding to this particle's position variables.
*/
void spawn(IWorld world);
/**
*
* @param world Spawns the particle in the given world, at a position determined by the input parameters.
* @param x The X position the particle will spawn in the world.
* @param y The Y position the particle will spawn in the world.
* @param z The Z position the particle will spawn in the world.
*/
void spawn(IWorld world, double x, double y, double z);
@Deprecated
void spawnOnEntity(IEntity entity);
@Deprecated
void spawnInWorld(IWorld world);
@Deprecated
void spawnInWorld(IWorld world, double x, double y, double z);
/**
*
* @param glows If true, this particle ignores all lighting and always renders with full brightness.
*/
void setGlows(boolean glows);
boolean getGlows();
void setNoClip(boolean noClip);
boolean getNoClip();
/**
*
* @param facePlayer Whether the particle is always facing the player's camera. If this is disabled, the particle will appear to be laying flat face down on the ground if its rotation is unchanged.
*/
void setFacePlayer(boolean facePlayer);
boolean getFacePlayer();
/**
*
* @param directory The directory of this particle's texture. This can be any texture in a resource pack or mod, and even a URL!
*/
void setDirectory(String directory);
String getDirectory();
/**
*
* @param amount The amount of multiples of this particle to spawn in the world. Not too good looking if used, but has some edge cases where it's alright.
*/
void setAmount(int amount);
int getAmount();
/**
*
* @param maxAge The maximum age this particle will be around for, in MC ticks.
*/
void setMaxAge(int maxAge);
int getMaxAge();
/**
* The width and height of the particle's texture you want to render in pixels. Anything more gets cut off.
* @param width The width of the particle's texture, in pixels.
* @param height The height of the particle's texture, in pixels.
*/
void setSize(int width, int height);
int getWidth();
int getHeight();
/**
* The horizontal and vertical offset of the particle's texture from the top-left, starts rendering the particle at this point.
* @param offsetX The horizontal offset, in pixels (u).
* @param offsetY The vertical offset, in pixels (v).
*/
void setOffset(int offsetX, int offsetY);
int getOffsetX();
int getOffsetY();
/**
* Enables animation on the particle. Must set a custom width and height first using the setSize(width,height) function.
* Every frame of animation the particle goes through should be saved on a single image file.
*
* The renderer will read the frames of animation based on the given width and height of the particle, starting from the given X & Y offsets.
* The renderer then goes rightwards (width) pixels for every frame. Once it can't go rightwards anymore,
* the animation goes down (height) pixels, and once again keeps going rightwards if it has to.
*
* If the animation loops, once there is nowhere downward to go, the animation will start over at the X & Y offset.
*
* @param animRate The frame rate of the particle's animation, in MC ticks. (20 ticks = 1 second)
* @param animLoop Whether the animation loops or not.
* @param animStart The amount of ticks before the particle starts animating.
* @param animEnd The amount of ticks the particle is around for before it stops animating.
*/
void setAnim(int animRate, boolean animLoop, int animStart, int animEnd);
int getAnimRate();
boolean getAnimLoop();
int getAnimStart();
int getAnimEnd();
/**
*
* @param x The X position from the particle's origin the particle will spawn at.
* @param y The Y position from the particle's origin the particle will spawn at.
* @param z The Z position from the particle's origin the particle will spawn at.
*/
void setPosition(double x, double y, double z);
double getX();
double getY();
double getZ();
void setPosition(IPos pos);
void getPos();
void setMotion(double motionX, double motionY, double motionZ, float gravity);
double getMotionX();
double getMotionY();
double getMotionZ();
float getGravity();
/**
*
* @param HEXColor The starting HEX color of the particle.
* @param HEXColor2 The ending HEX color of the particle.
* @param HEXColorRate The rate of interpolation between the two HEX colors.
* @param HEXColorStart The amount of ticks the particle is around for before its colors begin interpolating between HEXColor and HEXColor2.
*/
void setHEXColor(int HEXColor, int HEXColor2, float HEXColorRate, int HEXColorStart);
int getHEXColor1();
int getHEXColor2();
float getHEXColorRate();
int getHEXColorStart();
/**
*
* @param alpha1 The starting transparency of the particle.
* @param alpha2 The ending transparency of the particle.
* @param alphaRate The rate of interpolation between the two transparency values.
* @param alphaRateStart The amount of ticks the particle is around for before its colors begin interpolating between alpha1 and alpha2.
*/
void setAlpha(float alpha1, float alpha2, float alphaRate, int alphaRateStart);
float getAlpha1();
float getAlpha2();
float getAlphaRate();
int getAlphaRateStart();
/**
*
* @param scale1 The starting scale/size of the particle.
* @param scale2 The ending scale/size of the particle.
* @param scaleRate The rate of interpolation between the two scale values.
* @param scaleRateStart The amount of ticks the particle is around for before its colors begin interpolating between scale1 and scale2.
*/
void setScale(float scale1, float scale2, float scaleRate, int scaleRateStart);
float getScale1();
float getScale2();
float getScaleRate();
int getScaleRateStart();
/**
* Enables rotation about the X axis.
* If the particle is set to always face the player, this axis is a constant horizontal line on the player's camera.
*
* @param rotationX1 The starting X rotation of the particle.
* @param rotationX2 The ending X rotation of the particle.
* @param rotationXRate The rate of interpolation between the two X rotation values.
* @param rotationXRateStart The amount of ticks the particle is around for before its colors begin interpolating between rotationX1 and rotationX2.
*/
void setRotationX(float rotationX1, float rotationX2, float rotationXRate, int rotationXRateStart);
float getRotationX1();
float getRotationX2();
float getRotationXRate();
int getRotationXRateStart();
/**
* Enables rotation about the Y axis.
* If the particle is set to always face the player, this axis is a constant vertical line on the player's camera.
*
* @param rotationY1 The starting Y rotation of the particle.
* @param rotationY2 The ending Y rotation of the particle.
* @param rotationYRate The rate of interpolation between the two Y rotation values.
* @param rotationYRateStart The amount of ticks the particle is around for before its colors begin interpolating between rotationY1 and rotationY2.
*/
void setRotationY(float rotationY1, float rotationY2, float rotationYRate, int rotationYRateStart);
float getRotationY1();
float getRotationY2();
float getRotationYRate();
int getRotationYRateStart();
/**
* Enables rotation about the Y axis.
* If the particle is set to always face the player, this axis is a constant line going into the player's camera.
* You'll be using this one most often if the particle is set to face the player.
*
* @param rotationZ1 The starting Z rotation of the particle.
* @param rotationZ2 The ending Z rotation of the particle.
* @param rotationZRate The rate of interpolation between the two Z rotation values.
* @param rotationZRateStart The amount of ticks the particle is around for before its colors begin interpolating between rotationZ1 and rotationZ2.
*/
void setRotationZ(float rotationZ1, float rotationZ2, float rotationZRate, int rotationZRateStart);
float getRotationZ1();
float getRotationZ2();
float getRotationZRate();
int getRotationZRateStart();
}
@@ -1,10 +0,0 @@
package noppes.npcs.api;
import noppes.npcs.api.entity.IPixelmon;
public interface IPixelmonPlayerData {
IPixelmon getPartySlot(int slot);
int countPCPixelmon();
}
-173
View File
@@ -1,173 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package noppes.npcs.api;
import net.minecraft.util.math.BlockPos;
public interface IPos {
int getX();
int getY();
int getZ();
/**
* Shifts the IPos up by 1 block and returns the new object.
*
*/
IPos up();
/**
*
* @param n The number of blocks to move the position up by.
* @return The new IPos object.
*/
IPos up(int n);
/**
* Shifts the IPos down by 1 block and returns the new object.
*
*/
IPos down();
/**
*
* @param n The number of blocks to move the position down by.
* @return The new IPos object.
*/
IPos down(int n);
/**
* Shifts the IPos north by 1 block and returns the new object.
*
*/
IPos north();
/**
*
* @param n The number of blocks to move the position north by.
* @return The new IPos object.
*/
IPos north(int n);
/**
* Shifts the IPos east by 1 block and returns the new object.
*
*/
IPos east();
/**
*
* @param n The number of blocks to move the position east by.
* @return The new IPos object.
*/
IPos east(int n);
/**
* Shifts the IPos south by 1 block and returns the new object.
*
*/
IPos south();
/**
*
* @param n The number of blocks to move the position south by.
* @return The new IPos object.
*/
IPos south(int n);
/**
* Shifts the IPos west by 1 block and returns the new object.
*
*/
IPos west();
/**
*
* @param n The number of blocks to move the position west by.
* @return The new IPos object.
*/
IPos west(int n);
/**
* Adds the IPos' coordinates by each of the parameters given.
*
* @param x X coordinate amount to be added
* @param y Y coordinate amount to be added
* @param z Z coordinate amount to be added
* @return The resulting IPos from the addition.
*/
IPos add(int x, int y, int z);
/**
* Directly adds the coordinates of two IPos objects and returns the resulting IPos sum.
* For example, if one IPos was represented by the coordinates (0,60,5), and another by (-10,-30,25),
* the resulting object's coordinates are (0 - 10,60 - 30,5 + 25) = (-10,30,30).
*
* @param pos The position to be added to this IPos object.
* @return The sum of the two IPos objects as a new IPos object.
*/
IPos add(IPos pos);
/**
* Subtracts the IPos' coordinates by each of the parameters given.
*
* @param x X coordinate amount to be subtracted
* @param y Y coordinate amount to be subtracted
* @param z Z coordinate amount to be subtracted
* @return The resulting IPos from the subtraction.
*/
IPos subtract(int x, int y, int z);
/**
* Directly subtracts the coordinates of two IPos objects and returns the resulting IPos difference.
* For example, if one IPos was represented by the coordinates (0,60,5), and another by (-10,-30,25),
* the resulting object's coordinates are (0 + 10,60 + 30,5 - 25) = (10,90,-20).
*
* @param pos The position to be subtracted from this IPos object.
* @return The difference of the two IPos objects as a new IPos object.
*/
IPos subtract(IPos pos);
/**
* Returns a normalized vector of this block's position, calculated by:
*
*
* @return The normalized vector of this block position.
*/
double[] normalize();
/**
* Offsets the block by 1 block in the given direction and returns the resulting IPos object
*
*/
IPos offset(int direction);
/**
* Offsets the block by n blocks in the given direction and returns the resulting IPos object
*
*/
IPos offset(int direction, int n);
IPos crossProduct(int x, int y, int z);
IPos crossProduct(IPos pos);
IPos divide(float scalar);
long toLong();
IPos fromLong(long serialized);
/**
*
* @param pos The IPos object to calculate the distance to
* @return The distance between this IPos object and the other.
*/
double distanceTo(IPos pos);
BlockPos getMCPos();
}
@@ -1,63 +0,0 @@
package noppes.npcs.api;
/**
* A skin overlay object for both NPCs and players. Several skin overlays at a time can be layered on top of each other.
* In an NPC's case, the old overlay texture is now the skin overlay with ID 0.
*
* Modifying these attributes, an overlay can be made to look like a powered creeper effect, just a new skin, or both!
*/
public interface ISkinOverlay {
/**
* Sets the directory texture of the overlay. Does not support URLs.
*/
void setTexture(String texture);
String getTexture();
/**
* Sets whether this overlay glows in the dark or not.
*/
void setGlow(boolean glow);
boolean getGlow();
/**
* Sets whether this overlay blends on top of bottom textures at any alpha value.
*/
void setBlend(boolean blend);
boolean getBlend();
/**
* Sets the transparency of the overlay, from 0 to 1.
*/
void setAlpha(float alpha);
float getAlpha();
/**
* Sets the size of the entire overlay when rendered on the entity. By default, overlays render slightly on top of
* the entity's model.
*/
void setSize(float size);
float getSize();
/**
* Sets the texture scale of the overlay. Higher values will "zoom in" to the texture more.
*/
void setTextureScale(float scaleX, float scaleY);
float getTextureScaleX();
float getTextureScaleY();
/**
* Sets the "texture speed" by which the texture shifts on each render tick. Used to create a powered creeper effect!
* This does not move the entire overlay, it just moves the position at which the texture begins rendering.
*/
void setSpeed(float speedX, float speedY);
float getSpeedX();
float getSpeedY();
/**
* Sets the amount in each direction by which the overlay will be offset from the entity.
*/
void setOffset(float offsetX, float offsetY, float offsetZ);
float getOffsetX();
float getOffsetY();
float getOffsetZ();
}
@@ -1,71 +0,0 @@
package noppes.npcs.api;
import net.minecraft.tileentity.TileEntity;
public interface ITileEntity {
/**
*
* @return An integer representing the metadata of this block. Blocks with different states will
* return different values. For example, each stage of growth for a wheat crop will return a different value, each
* orientation of a stair block will return a different value, etc.
*/
int getBlockMetadata();
/**
*
* @return The world this tile entity is in.
*/
IWorld getWorld();
void setWorld(IWorld world);
/**
*
* @return An obfuscated MC tile entity object.
*/
TileEntity getMCTileEntity();
void markDirty();
/**
* Reads an INbt compound tag, creates a tile entity based on the data, and replaces this entity with the new one.
*/
void readFromNBT(INbt nbt);
/**
* @return The distance of this tile entity from the point given by the x, y, and z parameters.
*/
double getDistanceFrom(double x, double y, double z);
double getDistanceFrom(IPos pos);
/**
* @return A new IBlock object based on this tile entity's type.
*/
IBlock getBlockType();
/**
*
* @return True if the tile entity is invalid, false otherwise.
*/
boolean isInvalid();
/**
* Invalidates the tile entity.
*/
void invalidate();
/**
* Validates the tile entity for use.
*/
void validate();
/**
* Updates the block's tile entity to the values set in this object.
*/
void updateContainingBlockInfo();
/**
* Writes the tile entity to NBT and returns the compound tag.
*/
INbt getNBT();
}
-89
View File
@@ -1,89 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package noppes.npcs.api;
public interface ITimers {
/**
* Adds a timer to the NPC or player with the given attributes. If this function is used and there is already a
* timer with the given ID, an exception will be thrown.
*
* @param id The id of the timer.
* @param ticks The amount of ticks before the timer ends.
* @param repeat Whether this timer repeats when it reaches its maximum amount of ticks.
*/
void start(int id, int ticks, boolean repeat);
/**
* Adds a timer to the NPC or player with the given attributes. No exception will be thrown if there is already a
* timer with the given ID when using this function.
*
* @param id The id of the timer.
* @param ticks The amount of ticks before the timer ends.
* @param repeat Whether this timer repeats when it reaches its maximum amount of ticks.
*/
void forceStart(int id, int ticks, boolean repeat);
/**
*
* @return True if the set of timers contains a timer with the given id, false otherwise.
*/
boolean has(int id);
/**
* Stops the timer with the given id
*
* @return True if there was a timer with the given id.
*/
boolean stop(int id);
/**
* Resets the ticks elapsed in the timer with the given id to 0.
*/
void reset(int id);
/**
* Removes all timers.
*/
void clear();
/**
* @return The amount of ticks elapsed in the timer.
*/
int ticks(int id);
/**
* Sets the amount of ticks elapsed in the timer with the given id to a different value.
*
* @param ticks The new ticks elapsed by the timer.
*/
void setTicks(int id, int ticks);
/**
* @return The maximum amount of ticks the timer with the given id runs for before it stops.
*/
int maxTicks(int id);
/**
* Sets the maximum amount of ticks the timer with the given id can run for before it stops.
*/
void setMaxTicks(int id, int maxTicks);
/**
* @return True if the timer with the given id repeats, false otherwise.
*/
boolean repeats(int id);
/**
* Sets whether the timer with the given id repeats or not.
*/
void setRepeats(int id, boolean repeat);
/**
*
* @return The amount of timers in the set of timers.
*/
int size();
}
-425
View File
@@ -1,425 +0,0 @@
package noppes.npcs.api;
import net.minecraft.world.WorldServer;
import noppes.npcs.api.scoreboard.IScoreboard;
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;
public interface IWorld {
/**
* @return The worlds time
*/
long getTime();
/**
* @return The total world time
*/
long getTotalTime();
boolean areAllPlayersAsleep();
/**
* @param x World position x
* @param y World position y
* @param z World position z
* @return The block at the given position. Returns null if there isn't a block
*/
public IBlock getBlock(int x, int y, int z);
/**
* @param pos
* @return The block at the given position. Returns null if there isn't a block
*/
public IBlock getBlock(IPos pos);
/**
*
* @return The top-most block in the world as an IBlock object.
*/
IBlock getTopBlock(int x, int z);
IBlock getTopBlock(IPos pos);
boolean isBlockFreezable(IPos pos);
boolean isBlockFreezable(int x, int y, int z);
boolean isBlockFreezableNaturally(IPos pos);
boolean isBlockFreezableNaturally(int x, int y, int z);
boolean canBlockFreeze(IPos pos, boolean adjacentToWater);
boolean canBlockFreeze(int x, int y, int z, boolean adjacentToWater);
boolean canBlockFreezeBody(IPos pos, boolean adjacentToWater);
boolean canBlockFreezeBody(int x, int y, int z, boolean adjacentToWater);
boolean canSnowAt(IPos pos, boolean checkLight);
boolean canSnowAt(int x, int y, int z, boolean checkLight);
boolean canSnowAtBody(IPos pos, boolean checkLight);
boolean canSnowAtBody(int x, int y, int z, boolean checkLight);
/**
* @return The Y-value of the world at this x & z value based on the height map of the world.
*/
int getHeightValue(int x, int z);
int getHeightValue(IPos pos);
/**
* @return The minimum Y-value of the world at this x & z value based on the height map of the world.
*/
int getChunkHeightMapMinimum(int x, int z);
int getChunkHeightMapMinimum(IPos pos);
/**
* @return The metadata of the block at this position.
*/
int getBlockMetadata(int x, int y, int z);
int getBlockMetadata(IPos pos);
boolean setBlockMetadataWithNotify(int x, int y, int z, int metadata, int flag);
boolean setBlockMetadataWithNotify(IPos pos, int metadata, int flag);
/**
* @param x
* @param y
* @param z
* @return can the block at this position see the sky or are there no blocks above this one
*/
boolean canSeeSky(int x, int y, int z);
/**
* @param pos
* @return can the block at this position see the sky or are there no blocks above this one
*/
boolean canSeeSky(IPos pos);
int getFullBlockLightValue(int x, int y, int z);
int getFullBlockLightValue(IPos pos);
int getBlockLightValue(int x, int y, int z);
int getBlockLightValue(IPos pos);
void playSoundAtEntity(IEntity entity, String sound, float volume, float pitch);
void playSoundToNearExcept(IPlayer player, String sound, float volume, float pitch);
void playSound(int id, ISound sound);
void stopSound(int id);
void pauseSounds();
void continueSounds();
void stopSounds();
IEntity getEntityByID(int id);
boolean spawnEntityInWorld(IEntity entity);
IPlayer getClosestPlayerToEntity(IEntity entity, double range);
IPlayer getClosestPlayer(double x, double y, double z, double range);
IPlayer getClosestPlayer(IPos pos, double range);
IPlayer getClosestVulnerablePlayerToEntity(IEntity entity, double range);
IPlayer getClosestVulnerablePlayer(double x, double y, double z, double range);
IPlayer getClosestVulnerablePlayer(IPos pos, double range);
/**
*
* @param entity The entity whose type will be used as a parameter
* @return The amount of entities of the given type in the world.
*/
int countEntities(IEntity entity);
IEntity[] getLoadedEntities();
IEntity[] getEntitiesNear(IPos position, double range);
IEntity[] getEntitiesNear(double x, double y, double z, double range);
/**
* Sets the block's tile entity at the given position.
*/
void setTileEntity(int x, int y, int z, ITileEntity tileEntity);
void setTileEntity(IPos pos, ITileEntity tileEntity);
/**
* Removes the block's tile entity at the given position.
*/
void removeTileEntity(int x, int y, int z);
void removeTileEntity(IPos pos);
/**
*
* @return True if the block at this position is of cubic shape. (Not a stair, slab, etc.)
*/
boolean isBlockFullCube(int x, int y, int z);
boolean isBlockFullCube(IPos pos);
long getSeed();
void setSpawnLocation(int x, int y, int z);
void setSpawnLocation(IPos pos);
boolean canLightningStrikeAt(int x, int y, int z);
boolean canLightningStrikeAt(IPos pos);
boolean isBlockHighHumidity(int x, int y, int z);
boolean isBlockHighHumidity(IPos pos);
/**
* @param x World position x
* @param y World position y
* @param z World position z
* @return Text from signs
* @since 1.7.10d
*/
String getSignText(int x, int y, int z);
String getSignText(IPos pos);
/**
* @param x World position x
* @param y World position y
* @param z World position z
* @param item The block to be set
*/
boolean setBlock(int x, int y, int z, IItemStack item);
boolean setBlock(IPos pos, IItemStack item);
/**
* @param x World position x
* @param y World position y
* @param z World position z
* @param block The block to be set
*/
boolean setBlock(int x, int y, int z, IBlock block);
boolean setBlock(IPos pos, IBlock block);
/**
* @param x World position x
* @param y World position y
* @param z World position z
*/
void removeBlock(int x, int y, int z);
void removeBlock(IPos pos);
IPos rayCastPos(double[] startPos, double[] lookVector, int maxDistance, boolean stopOnBlock, boolean stopOnLiquid, boolean stopOnCollision);
IPos rayCastPos(double[] startPos, double[] lookVector, int maxDistance);
IPos rayCastPos(IPos startPos, IPos lookVector, int maxDistance, boolean stopOnBlock, boolean stopOnLiquid, boolean stopOnCollision);
IPos rayCastPos(IPos startPos, IPos lookVector, int maxDistance);
/**
* starting at the start position, draw a line in the lookVector direction until a block is detected
* @param startPos
* @param lookVector should be a normalized direction vector
* @param maxDistance
* @return the first detected block but null if maxDistance is reached
*/
IBlock rayCastBlock(double[] startPos, double[] lookVector, int maxDistance, boolean stopOnBlock, boolean stopOnLiquid, boolean stopOnCollision);
IBlock rayCastBlock(double[] startPos, double[] lookVector, int maxDistance);
IBlock rayCastBlock(IPos startPos, IPos lookVector, int maxDistance, boolean stopOnBlock, boolean stopOnLiquid, boolean stopOnCollision);
IBlock rayCastBlock(IPos startPos, IPos lookVector, int maxDistance);
/**
* @param startPos
* @param maxHeight
* @return the position of the closest block of air to startPos
*/
public IPos getNearestAir(IPos startPos, int maxHeight);
IEntity[] rayCastEntities(double[] startPos, double[] lookVector, int maxDistance, double offset, double range, boolean stopOnBlock, boolean stopOnLiquid, boolean stopOnCollision);
IEntity[] rayCastEntities(IPos startPos, IPos lookVector, int maxDistance, double offset, double range, boolean stopOnBlock, boolean stopOnLiquid, boolean stopOnCollision);
IEntity[] rayCastEntities(double[] startPos, double[] lookVector, int maxDistance, double offset, double range);
IEntity[] rayCastEntities(IPos startPos, IPos lookVector, int maxDistance, double offset, double range);
/**
* @param name The name of the player to be returned
* @return The Player with name. Null is returned when the player isnt found
*/
IPlayer getPlayer(String name);
IPlayer getPlayerByUUID(String uuid);
/**
* @param time The world time to be set
*/
void setTime(long time);
/**
* @return Whether or not its daytime
*/
boolean isDay();
/**
* @return Whether or not its currently raining
*/
boolean isRaining();
/**
* @param bo Set if it's raining
*/
void setRaining(boolean bo);
/**
* @param x The x position
* @param y The y position
* @param z The z position
*/
void thunderStrike(double x, double y, double z);
void thunderStrike(IPos pos);
/**
* Sends a packet from the server to the client everytime its called. Probably should not use this too much.
* @param particle Particle name. Particle name list: http://minecraft.gamepedia.com/Particles
* @param x The x position
* @param y The y position
* @param z The z position
* @param dx Usually used for the x motion
* @param dy Usually used for the y motion
* @param dz Usually used for the z motion
* @param speed Speed of the particles, usually between 0 and 1
* @param count Particle count
*/
void spawnParticle(String particle, double x, double y, double z, double dx, double dy, double dz, double speed, int count);
void spawnParticle(String particle, IPos pos, double dx, double dy, double dz, double speed, int count);
/**
* @param id The items name
* @param damage The damage value
* @param size The number of items in the item
* @return Returns the item
*/
IItemStack createItem(String id, int damage, int size);
/**
* @param directory The particle's texture directory. Use only forward slashes when writing a directory. Example: "customnpcs:textures/particle/tail.png"
* @return Returns IEntityParticle object
*/
@Deprecated
IParticle createEntityParticle(String directory);
/**
* @param key Get temp data for this key
* @return Returns the stored temp data
*/
Object getTempData(String key);
/**
* Tempdata gets cleared when the server restarts. All worlds share the same temp data.
* @param key The key for the data stored
* @param value The data stored
*/
void setTempData(String key, Object value);
/**
* @param key The key thats going to be tested against the temp data
* @return Whether or not temp data containes the key
*/
boolean hasTempData(String key);
/**
* @param key The key for the temp data to be removed
*/
void removeTempData(String key);
/**
* Removes all tempdata
*/
void clearTempData();
/**
* @param key The key of the data to be returned
* @return Returns the stored data
*/
Object getStoredData(String key);
/**
* Stored data persists through world restart. Unlike tempdata only Strings and Numbers can be saved
* @param key The key for the data stored
* @param value The data stored. This data can be either a Number or a String. Other data is not stored
*/
void setStoredData(String key, Object value);
/**
* @param key The key of the data to be checked
* @return Returns whether or not the stored data contains the key
*/
boolean hasStoredData(String key);
/**
* @param key The key of the data to be removed
*/
void removeStoredData(String key);
/**
* Remove all stored data
*/
void clearStoredData();
/**
* @param x Position x
* @param y Position y
* @param z Position z
* @param range Range of the explosion
* @param fire Whether or not the explosion does fire damage
* @param grief Whether or not the explosion does damage to blocks
*/
void explode(double x, double y, double z, float range, boolean fire, boolean grief);
void explode(IPos pos, float range, boolean fire, boolean grief);
IPlayer[] getAllServerPlayers();
public String[] getPlayerNames();
/**
* @since 1.7.10c
* @param x Position x
* @param z Position z
* @return Returns the name of the biome
*/
String getBiomeName(int x, int z);
String getBiomeName(IPos pos);
/**
* Lets you spawn a server side cloned entity
* @param x The x position the clone will be spawned at
* @param y The y position the clone will be spawned at
* @param z The z position the clone will be spawned at
* @param tab The tab in which the clone is
* @param name Name of the cloned entity
* @param ignoreProtection Whether the spawning of this clone skips protection checks.
* @return Returns the entity which was spawned
*/
IEntity spawnClone(int x, int y, int z, int tab, String name, boolean ignoreProtection);
IEntity spawnClone(IPos pos, int tab, String name, boolean ignoreProtection);
IEntity spawnClone(int x, int y, int z, int tab, String name);
IEntity spawnClone(IPos pos, int tab, String name);
IScoreboard getScoreboard();
/**
* @since 1.7.10c
* Expert use only
* @return Returns minecraft world object
*/
WorldServer getMCWorld();
/**
*
* @return The ID of this world's dimension. 0 for overworld, 1 for End, -1 for Nether, etc.
*/
int getDimensionID();
}
@@ -1,28 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package noppes.npcs.api.entity;
import net.minecraft.entity.passive.EntityAnimal;
import noppes.npcs.api.item.IItemStack;
public interface IAnimal<T extends EntityAnimal> extends IEntityLiving<T> {
/**
* Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on
* the animal type)
*/
boolean isBreedingItem(IItemStack itemStack);
/**
* Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
*/
boolean interact(IPlayer player);
boolean isInLove();
void resetInLove();
boolean canMateWith(IAnimal animal);
}
@@ -1,821 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.entity;
import net.minecraft.entity.EntityCreature;
import noppes.npcs.api.IPos;
import noppes.npcs.api.ITimers;
import noppes.npcs.api.handler.IOverlayHandler;
import noppes.npcs.api.handler.data.IFaction;
import noppes.npcs.api.item.IItemStack;
import noppes.npcs.api.jobs.IJob;
import noppes.npcs.api.roles.IRole;
public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
/**
* @return Returns the current npcs size 1-30
*/
int getSize();
/**
* @param size The size of the npc (1-30) default is 5
*/
void setSize(int size);
/**
* @return Returns the current npcs modelType of the NPC
*/
int getModelType();
/**
* @param modelType The modelType of the NPC. 0: Steve, 1: Steve64, 2: Alex
*/
void setModelType(int modelType);
/**
* @return The npcs name
*/
String getName();
void setRotation(float rotation);
void setRotationType(int rotationType);
int getRotationType();
/**
* @param name The name of the npc
*/
void setName(String name);
/**
* @since 1.7.10
* @return The npcs title
*/
String getTitle();
/**
* @since 1.7.10
* @param title The title of the npc
*/
void setTitle(String title);
/**
* @return The npcs texture
*/
String getTexture();
/**
* @param texture The texture of the npc
*/
void setTexture(String texture);
IPos getHome();
/**
* @return Home position x
*/
int getHomeX();
/**
* @param x The home x position
*/
void setHomeX(int x);
/**
* @return Home position x
*/
int getHomeY();
/**
* @param y The home y position
*/
void setHomeY(int y);
/**
* @return Home position x
*/
int getHomeZ();
/**
* @param z The home x position
*/
void setHomeZ(int z);
/**
* @param x The home x position
* @param y The home y position
* @param z The home z position
*/
void setHome(int x, int y, int z);
void setHome(IPos pos);
/**
* @param health New max health
*/
void setMaxHealth(double health);
/**
* @param bo Whether or not the npc will try to return to his home position
*/
void setReturnToHome(boolean bo);
/**
* @return Whether or not the npc returns home
*/
boolean getReturnToHome();
/**
* @return The faction of the npc
*/
IFaction getFaction();
/**
* @param id The id of the new faction
*/
void setFaction(int id);
/**
*
* @param attackOtherFactions True if you want the NPC to attack other factions, false otherwise.
*/
void setAttackFactions(boolean attackOtherFactions);
/**
*
* @return Returns true if the NPC attacks other factions, false otherwise.
*/
boolean getAttackFactions();
/**
*
* @param defendFaction True if the NPC should defend faction members, false otherwise.
*/
void setDefendFaction(boolean defendFaction);
/**
*
* @return Returns true if the NPC should defend faction members, false otherwise.
*/
boolean getDefendFaction();
int getType();
boolean typeOf(int type);
/**
* @param target The targeted npc
* @param item The item you want to shoot
* @param accuracy Accuracy of the shot (0-100)
*/
void shootItem(IEntityLivingBase target, IItemStack item, int accuracy);
void setProjectilesKeepTerrain(boolean b);
boolean getProjectilesKeepTerrain();
/**
* @param message The message the npc will say
*/
void say(String message);
/**
* @param message The message the npc will say
*/
void say(IPlayer player, String message);
/**
* Kill the npc, doesnt't despawn it
*/
void kill();
/**
* Basically completely resets the npc. This will also call the Init script
*/
void reset();
/**
* @return Returns the npcs current role
*/
IRole getRole();
void setRole(int role);
/**
* @return Returns the npcs current job
*/
IJob getJob();
void setJob(int job);
/**
* @return The item held in the right hand
*/
IItemStack getRightItem();
/**
* @param item Item to be held in the right hand
*/
void setRightItem(IItemStack item);
/**
* @return The item held in the left hand
*/
IItemStack getLefttItem();
/**
* @param item Item to be held in the left hand
*/
void setLeftItem(IItemStack item);
/**
* @return Returns the projectile the npc uses
*/
IItemStack getProjectileItem();
/**
* @param item Item to be used as projectile
*/
void setProjectileItem(IItemStack item);
/**
*
* @return Returns true if the NPC can aim while shooting.
*/
boolean canAimWhileShooting();
/**
*
* @param aimWhileShooting Set to true if you want the NPC to aim while shooting, false otherwise.
*/
void aimWhileShooting(boolean aimWhileShooting);
void setMinProjectileDelay(int minDelay);
int getMinProjectileDelay();
void setMaxProjectileDelay(int maxDelay);
int getMaxProjectileDelay();
void setRangedRange(int rangedRange);
int getRangedRange();
void setFireRate(int rate);
int getFireRate();
void setBurstCount(int burstCount);
int getBurstCount();
void setShotCount(int shotCount);
int getShotCount();
void setAccuracy(int accuracy);
int getAccuracy();
/**
*
* @return The directory of the sound that plays when a projectile is shot
*/
String getFireSound();
/**
*
* @param fireSound The new directory of the sound that plays when a projectile is shot
*/
void setFireSound(String fireSound);
/**
* @param slot The armor slot to return. 0:head, 1:body, 2:legs, 3:boots
* @return Returns the worn armor in slot
*/
IItemStack getArmor(int slot);
/**
* @param slot The armor slot to set. 0:head, 1:body, 2:legs, 3:boots
* @param item Item to be set as armor
*/
void setArmor(int slot, IItemStack item);
/**
*
* @param slot The slot from the NPC's drop list to return (0-8)
* @return The item in the NPC's drop list slot
*/
IItemStack getLootItem(int slot);
/**
*
* @param slot The slot from the NPC's drop list to change
* @param item The item the drop list slot will be changed to
*/
void setLootItem(int slot, IItemStack item);
/**
*
* @param slot The slot from the NPC's drop list to return (0-8)
* @return The chance of dropping the item in this slot. Returns 100 if the slot is not found.
*/
double getLootChance(int slot);
/**
*
* @param slot The slot from the NPC's drop list to change
* @param chance The new chance of dropping the item in this slot
*/
void setLootChance(int slot, double chance);
/**
*
* @return The NPC's loot mode. 0 = Normal, 1 = Auto Pickup
*/
int getLootMode();
/**
*
* @param lootMode The NPC's loot mode. 0 = Normal, 1 = Auto Pickup
*/
void setLootMode(int lootMode);
/**
*
* @param lootXP The new minimum XP gained from killing the NPC. If greater than the max XP, it will be set to it.
*/
void setMinLootXP(int lootXP);
/**
*
* @param lootXP The new maximum XP gained from killing the NPC. If less than the min XP, it will be set to it.
*/
void setMaxLootXP(int lootXP);
/**
*
* @return The minimum XP gained from killing the NPC.
*/
int getMinLootXP();
/**
*
* @return The maximum XP gained from killing the NPC.
*/
int getMaxLootXP();
boolean getCanDrown();
/**
*
* @param type 0 - Never drowns, 1 - Drowns in water, 2 - Drowns in air (without water)
*/
void setDrowningType(int type);
boolean canBreathe();
/**
* @param type The AnimationType
*/
void setAnimation(int type);
/**
*
* @param variant Changes the tactical variant of the NPC.
* 0 - Rush
* 1 - Dodge
* 2 - Surround
* 3 - Hit N Run
* 4 - Ambush
* 5 - Stalk
* 6 - None
*
*/
void setTacticalVariant(int variant);
/**
*
* @return Returns the tactical variant of the NPC.
* 0 - Rush
* 1 - Dodge
* 2 - Surround
* 3 - Hit N Run
* 4 - Ambush
* 5 - Stalk
* 6 - None
*
*/
int getTacticalVariant();
/**
*
* @param variant Sets the NPC's tactical variant by name.
*/
void setTacticalVariant(String variant);
/**
*
* @return Returns the name of the NPc's tactical variant.
*/
String getTacticalVariantName();
/**
*
* @param tacticalRadius Sets the radius in which the tactical variant is affected, if any. Effective for all tactical variants except Rush and None.
*/
void setTacticalRadius(int tacticalRadius);
/**
*
* @return Gets the radius in which the tactical variant is affected, if any. Effective for all tactical variants except Rush and None.
*/
int getTacticalRadius();
/**
*
* @param ignore True if the NPC goes through cobwebs
*/
void setIgnoreCobweb(boolean ignore);
/**
*
* @return True if the NPC goes through cobwebs
*/
boolean getIgnoreCobweb();
/**
*
* @return Changes what the NPC does when it finds an enemy based on the integer given.
* 0 - Retaliate
* 1 - Panic
* 2 - Retreat
* 3 - Nothing
*/
void setOnFoundEnemy(int onAttack);
/**
*
* @return Returns an integer representing what the NPC does when it finds an enemy.
* 0 - Retaliate
* 1 - Panic
* 2 - Retreat
* 3 - Nothing
*/
int onFoundEnemy();
/**
*
* @param shelterFrom An integer representing what conditions the NPC seeks shelter under.
* 0 - Darkenss
* 1 - Sunlight
* 2 - Disabled
*/
void setShelterFrom(int shelterFrom);
/**
*
* @return Returns an integer representing what conditions the NPC seeks shelter under.
* 0 - Darkenss
* 1 - Sunlight
* 2 - Disabled
*/
int getShelterFrom();
/**
*
* @return Whether the NPC has a living animation
*/
boolean hasLivingAnimation();
/**
*
* @param livingAnimation True if you want the NPC to have a living animation, false otherwise
*/
void setLivingAnimation(boolean livingAnimation);
/**
* @param type The visibility type of the npc, 0:visible, 1:invisible, 2:semi-visible
*/
void setVisibleType(int type);
/**
* @return The visibility type of the npc, 0:visible, 1:invisible, 2:semi-visible
*/
int getVisibleType();
/**
*
* @param player The player this NPC becomes visible/invisible to
* @param visible True if you want the NPC to be invisible to the player, false otherwise
*/
void setVisibleTo(IPlayer player, boolean visible);
/**
*
* @param player The player this NPC is visible/invisible to
* @return False if the NPC has been toggled to be invisible to this player, true otherwise.
* If setVisibleTo(player,visible) was not called to make this NPC invisible to the player at any point
* in the NPC's life, this function will return true regardless of the value of isVisible().
*/
boolean isVisibleTo(IPlayer player);
/**
* @param type The visibility type of the name, 0:visible, 1:invisible, 2:when-attacking
*/
void setShowName(int type);
/**
* @return Returns the visibility type of the name, 0:visible, 1:invisible, 2:when-attacking
*/
int getShowName();
/**
* @return Returns the visiblity of the boss bar, 0:invisible, 1:visible, 2:when-attacking
*/
int getShowBossBar();
/**
* @param type The visibility type of the boss bar, 0:invisible, 1:visible, 2:when-attacking
*/
void setShowBossBar(int type);
/**
* @return The melee strength
*/
float getMeleeStrength();
/**
* @param strength The melee strength
*/
void setMeleeStrength(float strength);
/**
* @return The melee speed
*/
int getMeleeSpeed();
/**
* @param speed The melee speed
*/
void setMeleeSpeed(int speed);
/**
* @return The ranged strength
*/
float getRangedStrength();
/**
* @param strength The ranged strength
*/
void setRangedStrength(float strength);
/**
* @return The ranged speed
*/
int getRangedSpeed();
/**
* @param speed The ranged speed
*/
void setRangedSpeed(int speed);
/**
* @return The ranged burst count
*/
int getRangedBurst();
/**
* @param count The ranged burst count
*/
void setRangedBurst(int count);
/**
*
* @return The amount of ticks before this entity respawns
*/
int getRespawnTime();
/**
*
* @param time The new amount of ticks before this entity respawns
*/
void setRespawnTime(int time);
/**
*
* @return Respawn: 0 - Yes (Always), 1 - Day, 2 - Night, 3 - No (Dies permanently)
*/
int getRespawnCycle();
/**
*
* @param cycle Sets when the NPC respawns. Respawn: 0 - Yes (Always), 1 - Day, 2 - Night, 3 - No (Dies permanently)
*/
void setRespawnCycle(int cycle);
/**
*
* @return Whether the NPC is hidden when it dies
*/
boolean getHideKilledBody();
/**
*
* @param hide True if the NPC is hidden when it dies. False otherwise.
*/
void hideKilledBody(boolean hide);
/**
*
* @return Returns true if the NPC naturally despawns.
*/
boolean naturallyDespawns();
/**
*
* @param canDespawn True if the NPC should naturally despawn. False otherwise.
*/
void setNaturallyDespawns(boolean canDespawn);
/**
* @return true if this npc was spawned by a player using soulstone
*/
boolean spawnedFromSoulStone();
/**
* @return the name of the player who spawned this npc using soulstone. null if not spawned by soulstone
*/
String getSoulStonePlayerName();
/**
* @return true if npc was spawned by soul stone. becomes false after the init function is called.
*/
boolean isSoulStoneInit();
/**
* @return does this npc refuse to be taken by soul stone
*/
boolean getRefuseSoulStone();
/**
* @param refuse set if this npc refuses to be taken by soul stone
*/
void setRefuseSoulStone(boolean refuse);
/**
* requires SoulStoneFriendlyNPCs in config to be true
* -1 by default
* if -1, the minimum points are the faction's friendly points
* @return the minimum faction points needed to soulstone this npc
*/
int getMinPointsToSoulStone();
/**
* requires SoulStoneFriendlyNPCs in config to be true
* -1 by default
* if -1, the minimum points are the faction's friendly points
* @param points the minimum faction points needed to soulstone this npc
*/
void setMinPointsToSoulStone(int points);
/**
* @param player The player to give the item to
* @param item The item given to the player
*/
void giveItem(IPlayer player, IItemStack item);
/**
* On servers the enable-command-block option in the server.properties needs to be set to true
* @param command The command to be executed
*/
void executeCommand(String command);
void setHeadScale(float x, float y, float z);
void setBodyScale(float x, float y, float z);
void setArmsScale(float x, float y, float z);
void setLegsScale(float x, float y, float z);
/**
* @since 1.7.10c
* @param resistance Explosion resistance (0-2) default is 1
*/
void setExplosionResistance(float resistance);
/**
* @since 1.7.10c
* @return Returns Explosion Resistance
*/
float getExplosionResistance();
/**
* @param resistance Melee resistance (0-2) default is 1
*/
void setMeleeResistance(float resistance);
/**
* @return Returns Melee Resistance
*/
float getMeleeResistance();
/**
* @param resistance Arrow resistance (0-2) default is 1
*/
void setArrowResistance(float resistance);
/**
* @return Returns Arrow Resistance
*/
float getArrowResistance();
/**
* @param resistance Knockback resistance (0-2) default is 1
*/
void setKnockbackResistance(float resistance);
/**
* @return Returns Knockback Resistance
*/
float getKnockbackResistance();
/**
* @param type Retaliation type. 0:normal, 1:panic, 2:retreat, 3:nothing
*/
void setRetaliateType(int type);
/**
* @return Returns the combat health regen per second
*/
float getCombatRegen();
/**
* @param regen The combat health regen per second
*/
void setCombatRegen(float regen);
/**
* @return Returns the health regen per second when not in combat
*/
float getHealthRegen();
/**
* @param regen The health regen per second when not in combat
*/
void setHealthRegen(float regen);
long getAge();
ITimers getTimers();
void setFly(int fly);
boolean canFly();
void setFlySpeed(double flySpeed);
double getFlySpeed(double flySpeed);
void setFlyGravity(double flyGravity);
double getFlyGravity(double flyGravity);
void setFlyHeightLimit(int flyHeightLimit);
int getFlyHeightLimit(int flyHeightLimit);
void limitFlyHeight(boolean limit);
boolean isFlyHeightLimited(boolean limit);
void setSpeed(int speed);
int getSpeed();
void setSkinType(byte type);
byte getSkinType();
void setSkinUrl(String url);
String getSkinUrl();
void setCloakTexture(String cloakTexture);
String getCloakTexture();
void setOverlayTexture(String overlayTexture);
String getOverlayTexture();
IOverlayHandler getOverlays();
void setCollisionType(int type);
int getCollisionType();
void updateClient();
void updateAI();
}
@@ -1,97 +0,0 @@
package noppes.npcs.api.entity;
import noppes.npcs.api.item.IItemStack;
public interface IDBCPlayer extends IPlayer {
void setStat(String stat, int value);
int getStat(String stat);
void addBonusAttribute(String stat, String bonusID, String operation, double attributeValue);
void addBonusAttribute(String stat, String bonusID, String operation, double attributeValue, boolean endOfTheList);
void addToBonusAttribute(String stat, String bonusID, String operation, double attributeValue);
void setBonusAttribute(String stat, String bonusID, String operation, double attributeValue);
void getBonusAttribute(String stat, String bonusID);
void removeBonusAttribute(String stat, String bonusID);
void clearBonusAttribute(String stat);
String bonusAttribute(String action, String stat, String bonusID);
String bonusAttribute(String action, String stat, String bonusID, String operation, double attributeValue, boolean endOfTheList);
void setRelease(byte release);
byte getRelease();
void setBody(int body);
int getBody();
void setStamina(int stamina);
int getStamina();
void setKi(int ki);
int getKi();
void setTP(int tp);
int getTP();
void setGravity(float gravity);
float getGravity();
boolean isBlocking();
void setHairCode(String hairCode);
String getHairCode();
void setExtraCode(String extraCode);
String getExtraCode();
/**
* @param slot The DBC extra inventory slot the item stack parameter will go into:
* 0 - Weight
* 1 - Body
* 2 - Head
* 3 - 4th Vanity Slot Down to the left
* 4 - 3rd Vanity Slot Down to the left
* 5 - 2nd Vanity Slot Down to the left
* 6 - 1st Vanity Slot Down to the left
* 7 - 4th Vanity Slot Down to the right
* 8 - 3rd Vanity Slot Down to the right
* 9 - 2nd Vanity Slot Down to the right
* 10 - 1st Vanity Slot Down to the right
* @param itemStack The item stack to be set into the slot. Set to null to remove the stack in that slot.
*/
void setItem(IItemStack itemStack, byte slot, boolean vanity);
IItemStack getItem(byte slot, boolean vanity);
IItemStack[] getInventory();
void setForm(byte form);
byte getForm();
void setForm2(byte form2);
byte getForm2();
void setPowerPoints(int points);
int getPowerPoints();
void setAuraColor(int color);
int getAuraColor();
void setFormLevel(int level);
int getFormLevel();
void setSkills(String skills);
String getSkills();
void setJRMCSE(String statusEffects);
String getJRMCSE();
void setRace(byte race);
int getRace();
void setDBCClass(byte dbcClass);
byte getDBCClass();
void setPowerType(byte powerType);
int getPowerType();
int getKillCount(String type);
}
@@ -1,353 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.entity;
import net.minecraft.entity.Entity;
import noppes.npcs.api.INbt;
import noppes.npcs.api.IParticle;
import noppes.npcs.api.IPos;
import noppes.npcs.api.IWorld;
import noppes.npcs.api.item.IItemStack;
public interface IEntity<T extends Entity> {
void spawnParticle(IParticle entityParticle);
int getEntityId();
String getUniqueID();
double getYOffset();
/**
* @return The entities width
*/
double getWidth();
/**
* @return The entities height
*/
double getHeight();
/**
* @return The entities x position
*/
double getX();
/**
* @param x The entities x position
*/
void setX(double x);
/**
* @return The entities y position
*/
double getY();
/**
* @param y The entities y position
*/
void setY(double y);
/**
* @return The entities x position
*/
double getZ();
/**
* @param z The entities x position
*/
void setZ(double z);
/**
* @return The entities z motion
*/
double getMotionX();
/**
* @param x The entities x motion
*/
void setMotionX(double x);
/**
* @return The entities x motion
*/
double getMotionY();
/**
* @param y The entities y motion
*/
void setMotionY(double y);
/**
* @return The entities y motion
*/
double getMotionZ();
/**
* @param z The entities z motion
*/
void setMotionZ(double z);
void setMotion(double x, double y, double z);
void setMotion(IPos pos);
IPos getMotion();
boolean isAirborne();
/**
* @return The block x position
*/
int getBlockX();
/**
* @return The block y position
*/
int getBlockY();
/**
* @return The block z position
*/
int getBlockZ();
/**
* @param x The x position
* @param y The y position
* @param z The z position
*/
void setPosition(double x, double y, double z);
void setPosition(IPos pos);
IPos getPosition();
int getDimension();
/**
* @param range The search range for entities around this entity
* @return Array of entities within range
*/
IEntity[] getSurroundingEntities(int range);
/**
* @param range The search range for entities around this entity
* @param type The EntityType you want to find
* @return Array of entities within range
*/
IEntity[] getSurroundingEntities(int range, int type);
/**
* @return Whether the entity is alive or not
*/
boolean isAlive();
/**
* @param key Get temp data for this key
* @return Returns the stored temp data
*/
Object getTempData(String key);
/**
* Tempdata gets cleared when the entity gets unloaded or the world restarts
* @param key The key for the data stored
* @param value The data stored
*/
void setTempData(String key, Object value);
/**
* @param key The key thats going to be tested against the temp data
* @return Whether or not temp data containes the key
*/
boolean hasTempData(String key);
/**
* @param key The key for the temp data to be removed
*/
void removeTempData(String key);
/**
* Remove all tempdata
*/
void clearTempData();
/**
* @param key The key of the data to be returned
* @return Returns the stored data
*/
Object getStoredData(String key);
/**
* Stored data persists through world restart. Unlike tempdata only Strings and Numbers can be saved
* @param key The key for the data stored
* @param value The data stored. This data can be either a Number or a String. Other data is not stored
*/
void setStoredData(String key, Object value);
/**
* @param key The key of the data to be checked
* @return Returns whether or not the stored data contains the key
*/
boolean hasStoredData(String key);
/**
* @param key The key of the data to be removed
*/
void removeStoredData(String key);
/**
* Remove all stored data
*/
void clearStoredData();
/**
* @return The age of this entity in ticks
*/
long getAge();
/**
* Despawns this entity. Removes it permanently
*/
void despawn();
/**
* @return Return whether or not this entity is standing in water
*/
boolean inWater();
/**
* @return Return whether or not this entity is standing in lava
*/
boolean inLava();
/**
* @return Return whether or not this entity is standing in fire
*/
boolean inFire();
/**
* @return Return whether or not this entity is on fire
*/
boolean isBurning();
/**
* @param ticks Amount of world ticks this entity will burn. 20 ticks equals 1 second
*/
void setBurning(int ticks);
/**
* Removes fire from this entity
*/
void extinguish();
/**
* @return Name as which it's registered in minecraft
*/
String getTypeName();
/**
* @param item Item to be dropped
*/
void dropItem(IItemStack item);
/**
* @return Return the rider
*/
IEntity getRider();
/**
* @param entity The entity to ride this entity
*/
void setRider(IEntity entity);
/**
* @return Return the entity, this entity is riding
*/
IEntity getMount();
/**
* @param entity The entity this entity will mount
*/
void setMount(IEntity entity);
/**
* @see noppes.npcs.scripted.constants.EntityType
* @return Returns the EntityType of this entity
*/
int getType();
/**
* @since 1.7.10c
* @param type @EntityType to check
* @return Returns whether the entity is type of the given @EntityType
*/
boolean typeOf(int type);
/**
* @param rotation The rotation to be set (0-360)
*/
void setRotation(float rotation);
/**
* @return Current rotation of the npc
*/
float getRotation();
public void setPitch(float pitch);
public float getPitch();
/**
* @param power How strong the knockback is
* @param direction The direction in which he flies back (0-360). Usually based on getRotation()
*/
void knockback(int power, float direction);
void knockback(int xpower, int ypower, int zpower, float direction);
void knockback(IPos pos, float direction);
void setImmune(int ticks);
public void setInvisible(boolean invisible);
public void setSneaking(boolean sneaking);
public void setSprinting(boolean sprinting);
boolean hasCollided();
/**
* @since 1.7.10c
* @return Returns whether or not this entity is sneaking
*/
boolean isSneaking();
/**
* @since 1.7.10c
* @return Returns whether or not this entity is sprinting
*/
boolean isSprinting();
/**
* @since 1.7.10c
* Expert users only
* @return Returns minecrafts entity
*/
T getMCEntity();
public INbt getNbt();
public INbt getAllNbt();
public void setNbt(INbt nbt);
INbt getNbtOptional();
void storeAsClone(int tab, String name);
IWorld getWorld();
}
@@ -1,54 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package noppes.npcs.api.entity;
import net.minecraft.entity.EntityLiving;
public interface IEntityLiving<T extends EntityLiving> extends IEntityLivingBase<T> {
boolean isNavigating();
void clearNavigation();
void navigateTo(double var1, double var3, double var5, double var7);
T getMCEntity();
void playLivingSound();
void spawnExplosionParticle();
void setMoveForward(float speed);
void faceEntity(IEntity entity, float pitch, float yaw);
boolean canPickUpLoot();
void setCanPickUpLoot(boolean pickUp);
boolean isPersistent();
void enablePersistence();
void setCustomNameTag(String text);
String getCustomNameTag();
boolean hasCustomNameTag();
void setAlwaysRenderNameTag(boolean alwaysRender);
boolean getAlwaysRenderNameTag();
void clearLeashed(boolean sendPacket, boolean dropLeash);
boolean allowLeashing();
boolean getLeashed();
IEntity getLeashedTo();
void setLeashedTo(IEntity entity, boolean sendPacket);
}
@@ -1,157 +0,0 @@
package noppes.npcs.api.entity;
import net.minecraft.entity.EntityLivingBase;
import noppes.npcs.api.IBlock;
import noppes.npcs.api.IDamageSource;
import noppes.npcs.api.IPos;
import noppes.npcs.api.item.IItemStack;
public interface IEntityLivingBase<T extends EntityLivingBase> extends IEntity<T> {
/**
* @return The entity's current health
*/
float getHealth();
/**
* @param health The new health of this entity
*/
void setHealth(float health);
void hurt(float damage);
void hurt(float damage, IEntity source);
void hurt(float damage, IDamageSource damageSource);
/**
* @return Entity's max health
*/
double getMaxHealth();
/**
* @return Whether or not this entity is attacking something
*/
boolean isAttacking();
/**
* @param living Entity which this entity will attack
*/
void setAttackTarget(IEntityLivingBase living);
/**
* @return The entity which this entity is attacking
*/
IEntityLivingBase getAttackTarget();
int getType();
boolean typeOf(int type);
/**
* @param entity Entity to check
* @return Whether or not this entity can see the given entity
*/
boolean canSeeEntity(IEntity entity);
/**
*
* @return Returns the look vector of this entity as an IPos object.
*/
IPos getLookVector();
/**
*
* @param maxDistance The max distance to perform checks before stopping
* @return The first block found by following along the entity's look vector.
*/
IBlock getLookingAtBlock(int maxDistance);
/**
* Returns an IPos object corresponding to the final obstructed point following along the
* entity's look vector. If no obstructions are found (entity is looking in a straight path of
* air with no blocks in the way), the final position is returned.
*
* @param maxDistance The max distance to perform checks before stopping
* @return The position the entity is looking at.
*/
IPos getLookingAtPos(int maxDistance);
/**
*
* @param maxDistance The max distance to perform checks before stopping
* @param range The radius to check for surrounding entities at every point on the vector
* @return A list of entities, sorted first by closest to the entity along the look vector, then by which
* entities are closest to the vector.
*/
IEntity[] getLookingAtEntities(int maxDistance, double offset, double range, boolean stopOnBlock, boolean stopOnLiquid, boolean stopOnCollision);
IEntity[] getLookingAtEntities(int maxDistance, double offset, double range);
/**
* Expert use only
* @return Returns the minecraft entity object
*/
T getMCEntity();
/**
* Makes the entity swing its hand
*/
void swingHand();
/**
* Works the same as the <a href="http://minecraft.gamepedia.com/Commands#effect">/effect command</a>
* @param effect
* @param duration The duration in seconds
* @param strength The amplifier of the potion effect
* @param hideParticles Whether or not you want to hide potion particles
*/
void addPotionEffect(int effect, int duration, int strength, boolean hideParticles);
/**
* Clears all potion effects
*/
void clearPotionEffects();
/**
* @since 1.7.10c
* @param effect Potion effect to check
* @return Returns -1 if its not active. Otherwise returns the strenght of the potion
*/
int getPotionEffect(int effect);
/**
* Note not all Living Entities support this
* @since 1.7.10c
* @return The item the entity is holding
*/
IItemStack getHeldItem();
/**
* Note not all Living Entities support this
* @since 1.7.10c
* @param item The item to be set
*/
void setHeldItem(IItemStack item);
/**
* Note not all Living Entities support this
* @param slot Slot of what armor piece to get, 0:boots, 1:pants, 2:body, 3:head
* @return The item in the given slot
*/
IItemStack getArmor(int slot);
/**
* Note not all Living Entities support this
* @since 1.7.10c
* @param slot Slot of what armor piece to set, 0:boots, 1:pants, 2:body, 3:head
* @param item Item to be set
*/
void setArmor(int slot, IItemStack item);
void setAIMoveSpeed(float speed);
float getAIMoveSpeed();
void setAbsorptionAmount(float amount);
float getAbsorptionAmount();
}
@@ -1,11 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package noppes.npcs.api.entity;
import net.minecraft.entity.monster.EntityMob;
public interface IMonster<T extends EntityMob> extends IEntityLiving<T> {
}
@@ -1,101 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package noppes.npcs.api.entity;
import net.minecraft.entity.passive.EntityTameable;
public interface IPixelmon<T extends EntityTameable> extends IAnimal<T> {
boolean getIsShiny();
void setIsShiny(boolean bo);
int getLevel();
void setLevel(int level);
/**
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
*/
int getIV(int type);
/**
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
*/
void setIV(int type, int value);
/**
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
*/
int getEV(int type);
/**
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
*/
void setEV(int type, int value);
/**
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
*/
int getStat(int type);
/**
* @param type 0:HP, 1:Attack, 2:Defense, 3:SpAttack, 4:SpDefense, 5:Speed
*/
void setStat(int type, int value);
/**
* @return type 0:Pygmy, 1:Runt, 2:Small, 3:Normal, 4:Huge, 5:Giant, 6:Enormous, 7:Ginormous, 8:Microscopic
*/
int getSize();
/**
* @param type 0:Pygmy, 1:Runt, 2:Small, 3:Normal, 4:Huge, 5:Giant, 6:Enormous, 7:Ginormous, 8:Microscopic
*/
void setSize(int type);
/**
* @return 0-255
*/
int getHapiness();
/**
* @param value 0-255
*/
void setHapiness(int value);
/**
* @return 0:Hardy, 1:Serious, 2:Docile, 3:Bashful, 4:Quirky, 5:Lonely, 6:Brave, 7:Adamant, 8:Naughty, 9:Bold, 10:Relaxed, 11:Impish, 12:Lax, 13:Timid, 14:Hasty, 15:Jolly, 16:Naive, 17:Modest, 18:Mild, 19:Quiet, 20:Rash, 21:Calm, 22:Gentle, 23:Sassy, 24:Careful
*/
int getNature();
/**
* @param type 0:Hardy, 1:Serious, 2:Docile, 3:Bashful, 4:Quirky, 5:Lonely, 6:Brave, 7:Adamant, 8:Naughty, 9:Bold, 10:Relaxed, 11:Impish, 12:Lax, 13:Timid, 14:Hasty, 15:Jolly, 16:Naive, 17:Modest, 18:Mild, 19:Quiet, 20:Rash, 21:Calm, 22:Gentle, 23:Sassy, 24:Careful
*/
void setNature(int type);
/**
* @return -1:Uncaught, 0:Pokeball, 1:GreatBall, 2:UltraBall, 3:MasterBall, 4:LevelBall, 5:MoonBall, 6:FriendBall, 7:LoveBall, 8:SafariBall, 9:HeavyBall, 10:FastBall, 11:RepeatBall, 12:TimerBall, 13:NestBall, 14:NetBall, 15:DiveBall, 16:LuxuryBall, 17:HealBall, 18:DuskBall, 19:PremierBall, 20:SportBall, 21:QuickBall, 22:ParkBall, 23:LureBall, 24:CherishBall, 25:GSBall
*/
int getPokeball();
/**
* @param type -1:Uncaught, 0:Pokeball, 1:GreatBall, 2:UltraBall, 3:MasterBall, 4:LevelBall, 5:MoonBall, 6:FriendBall, 7:LoveBall, 8:SafariBall, 9:HeavyBall, 10:FastBall, 11:RepeatBall, 12:TimerBall, 13:NestBall, 14:NetBall, 15:DiveBall, 16:LuxuryBall, 17:HealBall, 18:DuskBall, 19:PremierBall, 20:SportBall, 21:QuickBall, 22:ParkBall, 23:LureBall, 24:CherishBall, 25:GSBall
*/
void setPokeball(int type);
String getNickname();
boolean hasNickname();
void setNickname(String name);
String getMove(int slot);
void setMove(int slot, String move);
}
@@ -1,307 +0,0 @@
package noppes.npcs.api.entity;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayerMP;
import noppes.npcs.api.*;
import noppes.npcs.api.handler.IOverlayHandler;
import noppes.npcs.api.handler.IPlayerData;
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.item.IItemStack;
import noppes.npcs.api.overlay.ICustomOverlay;
public interface IPlayer<T extends EntityPlayerMP> extends IEntityLivingBase<T> {
/**
* @return Returns the displayed name of the player
*/
String getDisplayName();
/**
* @return Returns the players name
*/
String getName();
void kick(String reason);
void setPosition(double x, double y, double z);
void setPosition(IPos pos);
void setPosition(double x, double y, double z, int dimensionId);
void setPosition(IPos pos, int dimensionId);
void setPosition(double x, double y, double z, IWorld world);
void setPosition(IPos pos, IWorld world);
void setDimension(int dimension);
int getHunger();
void setHunger(int hunger);
float getSaturation();
void setSaturation(float saturation);
void showDialog(IDialog dialog);
boolean hasReadDialog(IDialog dialog);
void readDialog(IDialog dialog);
void unreadDialog(IDialog dialog);
void showDialog(int id);
boolean hasReadDialog(int id);
void readDialog(int id);
void unreadDialog(int id);
boolean hasFinishedQuest(IQuest quest);
boolean hasActiveQuest(IQuest quest);
/**
* Add the quest from active quest list
* @param quest The quest
*/
void startQuest(IQuest quest);
/**
* Add the quest from finished quest list
* @param quest The quest
*/
void finishQuest(IQuest quest);
/**
* Removes the quest from active quest list
* @param quest The quest
*/
void stopQuest(IQuest quest);
/**
* Removes the quest from active and finished quest list
* @param quest The quest
*/
void removeQuest(IQuest quest);
boolean hasFinishedQuest(int id);
boolean hasActiveQuest(int id);
/**
* @param id The quest ID
*/
void startQuest(int id);
/**
* @param id The quest ID
*/
void finishQuest(int id);
/**
* @param id The quest ID
*/
void stopQuest(int id);
/**
* @param id The quest ID
*/
void removeQuest(int id);
IQuest[] getFinishedQuests();
int getType();
boolean typeOf(int type);
/**
* @param faction The faction id
* @param points The points to increase. Use negative values to decrease
*/
void addFactionPoints(int faction, int points);
/**
* @param faction The faction id
* @param points The new point value for this faction
*/
void setFactionPoints(int faction, int points);
/**
* @param faction The faction id
* @return points
*/
int getFactionPoints(int faction);
/**
* @param message The message you want to send. Compatible with formatting codes, which can be found on the attached link.
* @see <a href="https://static.wikia.nocookie.net/minecraft_gamepedia/images/7/7e/Minecraft_Formatting.gif/revision/latest/scale-to-width-down/200?cb=20200828001454">Minecraft formatting codes</a>
*
*/
void sendMessage(String message);
/**
* @return Return gamemode. 0: Survival, 1: Creative, 2: Adventure
*/
int getMode();
/**
* @param type The gamemode type. 0:SURVIVAL, 1:CREATIVE, 2:ADVENTURE
*/
void setMode(int type);
/**
* @since 1.7.10d
* @return Returns a IItemStack array size 36
*/
IItemStack[] getInventory();
/**
* @param item The item to be checked
* @param ignoreNBT Whether the item's NBT tags will be checked to be equal
* @param ignoreDamage Whether the item's damage will be checked to be equal
* @return How many of this item the player has
*/
int inventoryItemCount(IItemStack item, boolean ignoreNBT, boolean ignoreDamage);
/**
* @since 1.7.10c
* @param id The items name
* @param damage The damage value
* @param amount How many will be removed
* @return True if the items were removed succesfully. Returns false incase a bigger amount than what the player has was given or item doesnt exist
*/
boolean removeItem(String id, int damage, int amount);
/**
* @param item The Item type to be removed
* @param amount How many will be removed
* @param ignoreNBT Whether the item's NBT tags will be checked to be equal
* @param ignoreDamage Whether the item's damage will be checked to be equal
* @return True if the items were removed succesfully. Returns false incase a bigger amount than what the player has was given
*/
boolean removeItem(IItemStack item, int amount, boolean ignoreNBT, boolean ignoreDamage);
/**
* @param item The item to be removed from the players inventory
* @param ignoreNBT Whether the item's NBT tags will be checked to be equal
* @param ignoreDamage Whether the item's damage will be checked to be equal
* @return The amount of item stacks that were removed
*/
int removeAllItems(IItemStack item, boolean ignoreNBT, boolean ignoreDamage);
/**
* @since 1.7.10c
* @param item Item to be added
* @param amount The amount of the item to be added
* @return Returns whether or not it gave the item succesfully
*/
boolean giveItem(IItemStack item, int amount);
/**
* @since 1.7.10c
* @param id The items name
* @param damage The damage value
* @param amount The amount of the item to be added
* @return Returns whether or not it gave the item succesfully
*/
boolean giveItem(String id, int damage, int amount);
/**
* Same as the /spawnpoint command
* @param x The x position
* @param y The y position
* @param z The z position
*/
void setSpawnpoint(int x, int y, int z);
void setSpawnpoint(IPos pos);
void resetSpawnpoint();
void setRotation(float rotationYaw, float rotationPitch);
void disableMouseInput(long time, int... buttonIds);
void stopUsingItem();
void clearItemInUse();
public void clearInventory();
void playSound(String name, float volume, float pitch);
void playSound(int id, ISound sound);
void stopSound(int id);
void pauseSounds();
void continueSounds();
void stopSounds();
void mountEntity(Entity ridingEntity);
IEntity dropOneItem(boolean dropStack);
boolean canHarvestBlock(IBlock block);
boolean interactWith(IEntity entity);
/**
* @param achievement The achievement id. For a complete list see http://minecraft.gamepedia.com/Achievements
* @return Returns whether or not the player has this achievement
*/
boolean hasAchievement(String achievement);
/**
* @param permission Bukkit/Cauldron permission
* @return Returns whether or not the player has the permission
*/
boolean hasBukkitPermission(String permission);
/**
* @since 1.7.10c
* @return Returns the exp level
*/
int getExpLevel();
/**
* @since 1.7.10c
* @param level The new exp level you want to set
*/
void setExpLevel(int level);
/**
* Requires pixelmon to be installed
* @since 1.7.10d
*/
IPixelmonPlayerData getPixelmonData();
ITimers getTimers();
void updatePlayerInventory();
IDBCPlayer getDBCPlayer();
boolean blocking();
public IPlayerData getData();
boolean isScriptingDev();
IQuest[] getActiveQuests();
IContainer getOpenContainer();
void showCustomGui(ICustomGui gui);
ICustomGui getCustomGui();
void closeGui();
void showCustomOverlay(ICustomOverlay overlay);
void closeOverlay(int id);
IOverlayHandler getOverlays();
}
@@ -1,43 +0,0 @@
package noppes.npcs.api.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import noppes.npcs.api.entity.IPlayer;
import noppes.npcs.api.gui.ICustomGui;
import noppes.npcs.api.item.IItemStack;
public interface ICustomGuiEvent extends ICustomNPCsEvent {
IPlayer getPlayer();
ICustomGui getGui();
int getId();
interface ButtonEvent extends ICustomGuiEvent {
}
interface UnfocusedEvent extends ICustomGuiEvent {
}
interface CloseEvent extends ICustomGuiEvent {
}
interface ScrollEvent extends ICustomGuiEvent {
String[] getSelection();
boolean doubleClick();
int getScrollIndex();
}
interface SlotEvent extends ICustomGuiEvent {
IItemStack getStack();
}
@Cancelable
interface SlotClickEvent extends ICustomGuiEvent {
IItemStack getStack();
int getDragType();
}
}
@@ -1,27 +0,0 @@
package noppes.npcs.api.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import noppes.npcs.api.IPos;
import noppes.npcs.api.handler.data.INaturalSpawn;
public interface ICustomNPCsEvent {
String getHookName();
@Cancelable
interface CNPCNaturalSpawnEvent extends ICustomNPCsEvent {
INaturalSpawn getNaturalSpawn();
void setAttemptPosition(IPos attemptPosition);
IPos getAttemptPosition();
boolean animalSpawnPassed();
boolean monsterSpawnPassed();
boolean liquidSpawnPassed();
boolean airSpawnPassed();
}
}
@@ -1,23 +0,0 @@
package noppes.npcs.api.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import noppes.npcs.api.entity.IPlayer;
import noppes.npcs.api.handler.data.IDialog;
public interface IDialogEvent extends ICustomNPCsEvent {
IPlayer getPlayer();
IDialog getDialog();
@Cancelable
interface DialogOpen extends IDialogEvent {
}
@Cancelable
interface DialogOption extends IDialogEvent {
}
interface DialogClosed extends IDialogEvent {
}
}
@@ -1,19 +0,0 @@
package noppes.npcs.api.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import noppes.npcs.api.entity.IPlayer;
import noppes.npcs.api.handler.data.IFaction;
public interface IFactionEvent extends ICustomNPCsEvent {
IPlayer getPlayer();
IFaction getFaction();
@Cancelable
interface FactionPoints extends IFactionEvent {
boolean decreased();
int getPoints();
}
}
@@ -1,21 +0,0 @@
package noppes.npcs.api.event;
import cpw.mods.fml.common.eventhandler.Event;
import noppes.npcs.api.IWorld;
import noppes.npcs.api.entity.IEntity;
public interface IForgeEvent extends ICustomNPCsEvent {
Event getEvent();
interface WorldEvent extends IForgeEvent {
IWorld getWorld();
}
interface EntityEvent extends IForgeEvent {
IEntity getEntity();
}
interface InitEvent extends IForgeEvent {
}
}
@@ -1,76 +0,0 @@
package noppes.npcs.api.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import noppes.npcs.api.entity.IEntity;
import noppes.npcs.api.entity.IPlayer;
import noppes.npcs.api.item.IItemCustom;
public interface IItemEvent extends ICustomNPCsEvent {
IItemCustom getItem();
interface InitEvent extends IItemEvent {
}
interface UpdateEvent extends IItemEvent {
IEntity getEntity();
}
@Cancelable
interface TossedEvent extends IItemEvent {
IEntity getEntity();
IPlayer getPlayer();
}
interface PickedUpEvent extends IItemEvent {
IPlayer getPlayer();
}
@Cancelable
interface SpawnEvent extends IItemEvent {
IEntity getEntity();
}
@Cancelable
interface InteractEvent extends IItemEvent {
int getType();
IEntity getTarget();
IPlayer getPlayer();
}
@Cancelable
interface AttackEvent extends IItemEvent {
int getType();
IEntity getTarget();
IEntity getSwingingEntity();
}
interface StartUsingItem extends IItemEvent {
IPlayer getPlayer();
int getDuration();
}
interface UsingItem extends IItemEvent {
IPlayer getPlayer();
int getDuration();
}
interface StopUsingItem extends IItemEvent {
IPlayer getPlayer();
int getDuration();
}
interface FinishUsingItem extends IItemEvent {
IPlayer getPlayer();
int getDuration();
}
}
@@ -1,124 +0,0 @@
package noppes.npcs.api.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import noppes.npcs.api.IDamageSource;
import noppes.npcs.api.entity.ICustomNpc;
import noppes.npcs.api.entity.IEntity;
import noppes.npcs.api.entity.IEntityLivingBase;
import noppes.npcs.api.entity.IPlayer;
import noppes.npcs.api.handler.data.IDialog;
import noppes.npcs.api.item.IItemStack;
public interface INpcEvent extends ICustomNPCsEvent {
ICustomNpc getNpc();
interface TimerEvent extends INpcEvent {
int getId();
}
interface CollideEvent extends INpcEvent{
IEntity getEntity();
}
@Cancelable
interface DamagedEvent extends INpcEvent {
IEntity getSource();
IDamageSource getDamageSource();
float getDamage();
void setDamage(float damage);
void setClearTarget(boolean bo);
boolean getClearTarget();
String getType();
}
@Cancelable
interface RangedLaunchedEvent extends INpcEvent {
IEntityLivingBase getTarget();
void setDamage(float damage);
float getDamage();
}
@Cancelable
interface MeleeAttackEvent extends INpcEvent {
IEntityLivingBase getTarget();
void setDamage(float damage);
float getDamage();
}
interface KilledEntityEvent {
IEntityLivingBase getEntity();
}
@Cancelable
interface DiedEvent extends INpcEvent {
IEntity getSource();
IDamageSource getDamageSource();
String getType();
void setDroppedItems(IItemStack[] droppedItems);
IItemStack[] getDroppedItems();
void setExpDropped(int expDropped);
int getExpDropped();
}
@Cancelable
interface InteractEvent extends INpcEvent {
IPlayer getPlayer();
}
@Cancelable
interface DialogEvent extends INpcEvent {
IPlayer getPlayer();
IDialog getDialog();
int getDialogId();
int getOptionId();
}
interface DialogClosedEvent extends INpcEvent {
IPlayer getPlayer();
IDialog getDialog();
int getDialogId();
int getOptionId();
}
@Cancelable
interface TargetLostEvent extends INpcEvent {
IEntityLivingBase getTarget();
}
@Cancelable
interface TargetEvent extends INpcEvent {
void setTarget(IEntityLivingBase entity);
IEntityLivingBase getTarget();
}
interface UpdateEvent extends INpcEvent {
}
interface InitEvent extends INpcEvent {
}
}
@@ -1,271 +0,0 @@
package noppes.npcs.api.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import noppes.npcs.api.IBlock;
import noppes.npcs.api.IContainer;
import noppes.npcs.api.IDamageSource;
import noppes.npcs.api.entity.IEntity;
import noppes.npcs.api.entity.IEntityLivingBase;
import noppes.npcs.api.entity.IPlayer;
import noppes.npcs.api.item.IItemStack;
public interface IPlayerEvent extends ICustomNPCsEvent {
IPlayer getPlayer();
@Cancelable
interface ChatEvent extends IPlayerEvent {
void setMessage(String message);
String getMessage();
}
interface KeyPressedEvent extends IPlayerEvent {
int getKey();
boolean isCtrlPressed();
boolean isAltPressed();
boolean isShiftPressed();
boolean isMetaPressed();
boolean keyDown();
int[] getKeysDown();
}
interface MouseClickedEvent extends IPlayerEvent {
int getButton();
int getMouseWheel();
boolean buttonDown();
boolean isCtrlPressed();
boolean isAltPressed();
boolean isShiftPressed();
boolean isMetaPressed();
int[] getKeysDown();
}
interface PickupXPEvent extends IPlayerEvent {
int getAmount();
}
interface LevelUpEvent extends IPlayerEvent {
int getChange();
}
interface LogoutEvent extends IPlayerEvent {
}
interface LoginEvent extends IPlayerEvent {
}
interface RespawnEvent extends IPlayerEvent {
}
interface ChangedDimension extends IPlayerEvent {
int getFromDim();
int getToDim();
}
interface TimerEvent extends IPlayerEvent {
int getId();
}
@Cancelable
interface AttackedEvent extends IPlayerEvent {
IDamageSource getDamageSource();
IEntity getSource();
float getDamage();
}
@Cancelable
interface DamagedEvent extends IPlayerEvent {
IDamageSource getDamageSource();
IEntity getSource();
float getDamage();
}
@Cancelable
interface LightningEvent extends IPlayerEvent {
}
@Cancelable
interface SoundEvent extends IPlayerEvent {
String getName();
float getPitch();
float getVolume();
}
@Cancelable
interface FallEvent extends IPlayerEvent {
float getDistance();
}
interface JumpEvent extends IPlayerEvent {
}
interface KilledEntityEvent extends IPlayerEvent {
IEntityLivingBase getEntity();
}
interface DiedEvent extends IPlayerEvent {
IDamageSource getDamageSource();
String getType();
IEntity getSource();
}
@Cancelable
interface RangedLaunchedEvent extends IPlayerEvent {
IItemStack getBow();
int getCharge();
}
@Cancelable
interface AttackEvent extends IPlayerEvent {
IDamageSource getDamageSource();
IEntity getTarget();
float getDamage();
}
@Cancelable
interface DamagedEntityEvent extends IPlayerEvent {
IDamageSource getDamageSource();
IEntity getTarget();
float getDamage();
}
interface ContainerClosed extends IPlayerEvent {
IContainer getContainer();
}
interface ContainerOpen extends IPlayerEvent {
IContainer getContainer();
}
@Cancelable
interface PickUpEvent extends IPlayerEvent {
IItemStack getItem();
}
@Cancelable
interface DropEvent extends IPlayerEvent {
IItemStack[] getItems();
}
@Cancelable
interface TossEvent extends IPlayerEvent {
IItemStack getItem();
}
@Cancelable
interface InteractEvent extends IPlayerEvent {
int getType();
IEntity getTarget();
}
interface UpdateEvent extends IPlayerEvent {
}
interface InitEvent extends IPlayerEvent {
}
interface StartUsingItem extends IPlayerEvent {
IItemStack getItem();
int getDuration();
}
interface UsingItem extends IPlayerEvent {
IItemStack getItem();
int getDuration();
}
interface StopUsingItem extends IPlayerEvent {
IItemStack getItem();
int getDuration();
}
interface FinishUsingItem extends IPlayerEvent {
IItemStack getItem();
int getDuration();
}
@Cancelable
interface BreakEvent extends IPlayerEvent {
IBlock getBlock();
int getExp();
}
interface UseHoeEvent extends IPlayerEvent {
IItemStack getHoe();
int getX();
int getY();
int getZ();
}
interface WakeUpEvent extends IPlayerEvent {
boolean setSpawn();
}
interface SleepEvent extends IPlayerEvent {
int getX();
int getY();
int getZ();
}
interface AchievementEvent extends IPlayerEvent {
String getDescription();
}
interface FillBucketEvent extends IPlayerEvent {
IItemStack getCurrent() ;
IItemStack getFilled();
}
interface BonemealEvent extends IPlayerEvent {
IBlock getBlock();
int getX();
int getY();
int getZ();
}
interface RangedChargeEvent extends IPlayerEvent {
}
}
@@ -1,31 +0,0 @@
package noppes.npcs.api.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import noppes.npcs.api.entity.IPlayer;
import noppes.npcs.api.handler.data.IQuest;
import noppes.npcs.api.item.IItemStack;
public interface IQuestEvent extends ICustomNPCsEvent {
IPlayer getPlayer();
IQuest getQuest();
interface QuestCompletedEvent extends IQuestEvent {
}
@Cancelable
interface QuestStartEvent extends IQuestEvent {
}
@Cancelable
interface QuestTurnedInEvent extends IQuestEvent {
void setExpReward(int expReward);
void setItemRewards(IItemStack[] itemRewards);
int getExpReward();
IItemStack[] getItemRewards();
}
}
@@ -1,30 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.gui;
public interface IButton extends ICustomGuiComponent {
int getWidth();
int getHeight();
IButton setSize(int var1, int var2);
String getLabel();
IButton setLabel(String var1);
String getTexture();
boolean hasTexture();
IButton setTexture(String var1);
int getTextureX();
int getTextureY();
IButton setTextureOffset(int var1, int var2);
}
@@ -1,78 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.gui;
import net.minecraft.nbt.NBTTagCompound;
import noppes.npcs.api.item.IItemStack;
import noppes.npcs.api.entity.IPlayer;
import java.util.List;
public interface ICustomGui {
int getID();
int getWidth();
int getHeight();
List<ICustomGuiComponent> getComponents();
List<IItemSlot> getSlots();
void setSize(int var1, int var2);
void setDoesPauseGame(boolean var1);
void setBackgroundTexture(String var1);
IButton addButton(int var1, String var2, int var3, int var4);
IButton addButton(int var1, String var2, int var3, int var4, int var5, int var6);
IButton addTexturedButton(int var1, String var2, int var3, int var4, int var5, int var6, String var7);
IButton addTexturedButton(int var1, String var2, int var3, int var4, int var5, int var6, String var7, int var8, int var9);
ILabel addLabel(int var1, String var2, int var3, int var4, int var5, int var6);
ILabel addLabel(int var1, String var2, int var3, int var4, int var5, int var6, int var7);
ITextField addTextField(int var1, int var2, int var3, int var4, int var5);
ITexturedRect addTexturedRect(int var1, String var2, int var3, int var4, int var5, int var6);
ITexturedRect addTexturedRect(int var1, String var2, int var3, int var4, int var5, int var6, int var7, int var8);
IScroll addScroll(int var1, int var2, int var3, int var4, int var5, String[] var6);
ILine addLine(int id, int x1, int y1, int x2, int y2, int color, int thickness);
ILine addLine(int id, int x1, int y1, int x2, int y2);
IItemSlot addItemSlot(int var1, int var2);
IItemSlot addItemSlot(int var1, int var2, IItemStack var3);
void showPlayerInventory(int var1, int var2);
ICustomGuiComponent getComponent(int var1);
void removeComponent(int var1);
void updateComponent(ICustomGuiComponent var1);
void update(IPlayer var1);
boolean getShowPlayerInv();
int getPlayerInvX();
int getPlayerInvY();
ICustomGui fromNBT(NBTTagCompound tag);
NBTTagCompound toNBT();
}
@@ -1,44 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.gui;
import net.minecraft.nbt.NBTTagCompound;
public interface ICustomGuiComponent {
int getID();
ICustomGuiComponent setID(int var1);
int getPosX();
int getPosY();
ICustomGuiComponent setPos(int var1, int var2);
boolean hasHoverText();
String[] getHoverText();
ICustomGuiComponent setHoverText(String var1);
ICustomGuiComponent setHoverText(String[] var1);
int getColor();
ICustomGuiComponent setColor(int color);
float getAlpha();
void setAlpha(float alpha);
float getRotation();
void setRotation(float rotation);
NBTTagCompound toNBT(NBTTagCompound nbt);
ICustomGuiComponent fromNBT(NBTTagCompound nbt);
}
@@ -1,19 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.gui;
import net.minecraft.inventory.Slot;
import noppes.npcs.api.item.IItemStack;
public interface IItemSlot extends ICustomGuiComponent {
boolean hasStack();
IItemStack getStack();
IItemSlot setStack(IItemStack var1);
Slot getMCSlot();
}
@@ -1,26 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.gui;
public interface ILabel extends ICustomGuiComponent {
String getText();
ILabel setText(String var1);
int getWidth();
int getHeight();
ILabel setSize(int var1, int var2);
float getScale();
ILabel setScale(float var1);
boolean getShadow();
void setShadow(boolean shadow);
}
@@ -1,15 +0,0 @@
package noppes.npcs.api.gui;
public interface ILine extends ICustomGuiComponent {
int getX1();
int getY1();
int getX2();
int getY2();
int getThickness();
void setX1(int x1);
void setY1(int y1);
void setX2(int x2);
void setY2(int y2);
void setThickness(int thickness);
}
@@ -1,26 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.gui;
public interface IScroll extends ICustomGuiComponent {
int getWidth();
int getHeight();
IScroll setSize(int var1, int var2);
String[] getList();
IScroll setList(String[] var1);
int getDefaultSelection();
IScroll setDefaultSelection(int var1);
boolean isMultiSelect();
IScroll setMultiSelect(boolean var1);
}
@@ -1,18 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.gui;
public interface ITextField extends ICustomGuiComponent {
int getWidth();
int getHeight();
ITextField setSize(int var1, int var2);
String getText();
ITextField setText(String var1);
}
@@ -1,28 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.gui;
public interface ITexturedRect extends ICustomGuiComponent {
String getTexture();
ITexturedRect setTexture(String var1);
int getWidth();
int getHeight();
ITexturedRect setSize(int var1, int var2);
float getScale();
ITexturedRect setScale(float var1);
int getTextureX();
int getTextureY();
ITexturedRect setTextureOffset(int var1, int var2);
}
@@ -1,27 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler;
import noppes.npcs.api.IPos;
import noppes.npcs.api.IWorld;
import noppes.npcs.api.entity.IEntity;
public interface ICloneHandler {
IEntity spawn(double x, double y, double z, int tab, String name, IWorld world, boolean ignoreProtection);
IEntity spawn(IPos pos, int tab, String name, IWorld world, boolean ignoreProtection);
IEntity spawn(double x, double y, double z, int tab, String name, IWorld world);
IEntity spawn(IPos pos, int tab, String name, IWorld world);
IEntity[] getTab(int tab, IWorld world);
IEntity get(int tab, String name, IWorld world);
void set(int tab, String name, IEntity entity);
void remove(int tab, String name);
}
@@ -1,17 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler;
import noppes.npcs.api.handler.data.IDialog;
import noppes.npcs.api.handler.data.IDialogCategory;
import java.util.List;
public interface IDialogHandler {
List<IDialogCategory> categories();
IDialog get(int var1);
}
@@ -1,20 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler;
import noppes.npcs.api.handler.data.IFaction;
import java.util.List;
public interface IFactionHandler {
List<IFaction> list();
IFaction delete(int var1);
IFaction create(String var1, int var2);
IFaction get(int var1);
}
@@ -1,18 +0,0 @@
package noppes.npcs.api.handler;
import noppes.npcs.api.handler.data.INaturalSpawn;
public interface INaturalSpawnsHandler {
void save();
INaturalSpawn[] getSpawns();
INaturalSpawn[] getSpawns(String biome);
void addSpawn(INaturalSpawn spawn);
void removeSpawn(INaturalSpawn spawn);
INaturalSpawn createSpawn();
}
@@ -1,18 +0,0 @@
package noppes.npcs.api.handler;
import noppes.npcs.api.ISkinOverlay;
public interface IOverlayHandler {
void add(int id, ISkinOverlay overlay);
ISkinOverlay get(int id);
boolean has(int id);
boolean remove(int id);
int size();
void clear();
}
@@ -1,4 +0,0 @@
package noppes.npcs.api.handler;
public interface IPlayerBankData {
}
@@ -1,29 +0,0 @@
package noppes.npcs.api.handler;
import noppes.npcs.api.entity.ICustomNpc;
public interface IPlayerData {
void setCompanion(ICustomNpc npc);
ICustomNpc getCompanion();
boolean hasCompanion();
int getCompanionID();
IPlayerDialogData getDialogData();
IPlayerBankData getBankData();
IPlayerQuestData getQuestData();
IPlayerTransportData getTransportData();
IPlayerFactionData getFactionData();
IPlayerItemGiverData getItemGiverData();
IPlayerMailData getMailData();
void save();
}
@@ -1,10 +0,0 @@
package noppes.npcs.api.handler;
public interface IPlayerDialogData {
boolean hasReadDialog(int id);
void readDialog(int id);
void unreadDialog(int id);
}
@@ -1,10 +0,0 @@
package noppes.npcs.api.handler;
public interface IPlayerFactionData {
int getPoints(int id);
void addPoints(int id, int points);
void setPoints(int id, int points);
}
@@ -1,14 +0,0 @@
package noppes.npcs.api.handler;
import noppes.npcs.api.jobs.IJobItemGiver;
public interface IPlayerItemGiverData {
long getTime(IJobItemGiver jobItemGiver);
void setTime(IJobItemGiver jobItemGiver, long day);
boolean hasInteractedBefore(IJobItemGiver jobItemGiver);
IJobItemGiver[] getItemGivers();
}
@@ -1,22 +0,0 @@
package noppes.npcs.api.handler;
import noppes.npcs.api.handler.data.IPlayerMail;
public interface IPlayerMailData {
boolean hasMail();
void addMail(IPlayerMail mail);
void removeMail(IPlayerMail mail);
boolean hasMail(IPlayerMail mail);
IPlayerMail[] getAllMail();
IPlayerMail[] getUnreadMail();
IPlayerMail[] getReadMail();
IPlayerMail[] getMailFrom(String sender);
}
@@ -1,24 +0,0 @@
package noppes.npcs.api.handler;
import noppes.npcs.api.handler.data.IQuest;
public interface IPlayerQuestData {
IQuest getTrackedQuest();
void startQuest(int id);
void finishQuest(int id);
void stopQuest(int id);
void removeQuest(int id);
boolean hasFinishedQuest(int id);
public boolean hasActiveQuest(int id);
IQuest[] getActiveQuests();
IQuest[] getFinishedQuests();
}
@@ -1,18 +0,0 @@
package noppes.npcs.api.handler;
import noppes.npcs.api.handler.data.ITransportLocation;
public interface IPlayerTransportData {
boolean hasTransport(int id);
void addTransport(int id);
void addTransport(ITransportLocation location);
ITransportLocation getTransport(int id);
ITransportLocation[] getTransports();
void removeTransport(int id);
}
@@ -1,17 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler;
import noppes.npcs.api.handler.data.IQuest;
import noppes.npcs.api.handler.data.IQuestCategory;
import java.util.List;
public interface IQuestHandler {
List<IQuestCategory> categories();
IQuest get(int var1);
}
@@ -1,22 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler;
import java.util.List;
import net.minecraft.item.ItemStack;
import noppes.npcs.api.handler.data.IRecipe;
public interface IRecipeHandler {
List<IRecipe> getGlobalList();
List<IRecipe> getCarpentryList();
void addRecipe(String var1, boolean var2, ItemStack var3, Object... var4);
void addRecipe(String var1, boolean var2, ItemStack var3, int var4, int var5, ItemStack... var6);
IRecipe delete(int var1);
}
@@ -1,14 +0,0 @@
package noppes.npcs.api.handler;
import noppes.npcs.api.handler.data.ITransportCategory;
public interface ITransportHandler {
ITransportCategory[] categories();
void createCategory(String title);
ITransportCategory getCategory(String title);
void removeCategory(String title);
}
@@ -1,36 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler.data;
import noppes.npcs.api.entity.IPlayer;
public interface IAvailability {
boolean isAvailable(IPlayer var1);
int getDaytime();
void setDaytime(int var1);
int getMinPlayerLevel();
void setMinPlayerLevel(int var1);
int getDialog(int var1);
void setDialog(int var1, int var2, int var3);
void removeDialog(int var1);
int getQuest(int var1);
void setQuest(int var1, int var2, int var3);
void removeQuest(int var1);
void setFaction(int var1, int var2, int var3, int var4);
void removeFaction(int var1);
}
@@ -1,138 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler.data;
import java.util.List;
public interface IDialog {
int getId();
String getName();
void setName(String var1);
String getText();
void setText(String var1);
IQuest getQuest();
void setQuest(IQuest var1);
String getCommand();
void setCommand(String var1);
List<IDialogOption> getOptions();
IDialogOption getOption(int var1);
IAvailability getAvailability();
IDialogCategory getCategory();
void setDarkenScreen(boolean darkenScreen);
boolean getDarkenScreen();
void setDisableEsc(boolean disableEsc);
boolean getDisableEsc();
void setShowWheel(boolean showWheel);
boolean getShowWheel();
void setHideNPC(boolean hideNPC);
boolean getHideNPC();
void setSound(String sound);
String getSound();
void save();
void setColor(int color);
int getColor();
void setTitleColor(int titleColor);
int getTitleColor();
void renderGradual(boolean gradual);
boolean renderGradual();
void showPreviousBlocks(boolean show);
boolean showPreviousBlocks();
void showOptionLine(boolean show);
boolean showOptionLine();
void setTextSound(String textSound);
String getTextSound();
void setTextPitch(float textPitch);
float getTextPitch();
void setTitlePos(int pos);
int getTitlePos();
void setNPCScale(float scale);
float getNpcScale();
void setNpcOffset(int offsetX, int offsetY);
int getNpcOffsetX();
int getNpcOffsetY();
void textWidthHeight(int textWidth, int textHeight);
int getTextWidth();
int setTextHeight();
void setTextOffset(int offsetX, int offsetY);
int getTextOffsetX();
int getTextOffsetY();
void setTitleOffset(int offsetX, int offsetY);
int getTitleOffsetX();
int getTitleOffsetY();
void setOptionOffset(int offsetX, int offsetY);
int getOptionOffsetX();
int getOptionOffsetY();
void setOptionSpacing(int spaceX, int spaceY);
int getOptionSpaceX();
int getOptionSpaceY();
void addImage(int id, IDialogImage image);
IDialogImage getImage(int id);
IDialogImage createImage();
IDialogImage[] getImages();
boolean hasImage(int id);
void removeImage(int id);
void clearImages();
}
@@ -1,16 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler.data;
import java.util.List;
public interface IDialogCategory {
List<IDialog> dialogs();
String getName();
IDialog create();
}
@@ -1,41 +0,0 @@
package noppes.npcs.api.handler.data;
public interface IDialogImage {
int getId();
void setTexture(String texture);
String getTexture();
void setPosition(int x, int y);
int getX();
int getY();
void setWidthHeight(int width, int height);
int getWidth();
int getHeight();
void setTextureOffset(int offsetX, int offsetY);
int getTextureX();
int getTextureY();
void setColor(int color);
int getColor();
void setSelectedColor(int color);
int getSelectedColor();
void setScale(float scale);
float getScale();
void setAlpha(float alpha);
float getAlpha();
void setRotation(float rotation);
float getRotation();
void setImageType(int imageType);
int getImageType();
void setAlignment(int alignment);
int getAlignment();
}
@@ -1,14 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler.data;
public interface IDialogOption {
int getSlot();
String getName();
int getType();
}
@@ -1,55 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler.data;
import noppes.npcs.api.entity.ICustomNpc;
import noppes.npcs.api.entity.IPlayer;
public interface IFaction {
int getId();
String getName();
void setName(String name);
void setDefaultPoints(int var1);
int getDefaultPoints();
void setFriendlyPoints(int p);
int getFriendlyPoints();
void setNeutralPoints(int p);
int getNeutralPoints();
void setColor(int c);
int getColor();
int playerStatus(IPlayer player);
boolean isAggressiveToNpc(ICustomNpc npc);
boolean getIsHidden();
void setIsHidden(boolean hidden);
boolean attackedByMobs();
void setAttackedByMobs(boolean attacked);
boolean isEnemyFaction(IFaction faction);
IFaction[] getEnemyFactions();
void addEnemyFaction(IFaction faction);
void removeEnemyFaction(IFaction faction);
void save();
}
@@ -1,47 +0,0 @@
package noppes.npcs.api.handler.data;
import noppes.npcs.api.IWorld;
import noppes.npcs.api.entity.IEntity;
public interface INaturalSpawn {
void setName(String name);
String getName();
void setEntity(IEntity entity, int slot);
IEntity getEntity(IWorld world, int slot);
void setWeight(int weight);
int getWeight();
void setMinHeight(int height);
int getMinHeight();
void setMaxHeight(int height);
int getMaxHeight();
void spawnsLikeAnimal(boolean spawns);
boolean spawnsLikeAnimal();
void spawnsLikeMonster(boolean spawns);
boolean spawnsLikeMonster();
void spawnsInLiquid(boolean spawns);
boolean spawnsInLiquid();
void spawnsInAir(boolean spawns);
boolean spawnsInAir();
String[] getBiomes();
void setBiomes(String[] biomes);
}
@@ -1,32 +0,0 @@
package noppes.npcs.api.handler.data;
import noppes.npcs.api.item.IItemStack;
public interface IPlayerMail {
void setPageText(String[] pages);
String[] getPageText();
int getPageCount();
void setSender(String sender);
String getSender();
void setSubject(String subject);
String getSubject();
long getTimePast();
long getTimeSent();
boolean hasQuest();
IQuest getQuest();
IItemStack[] getItems();
void setItems(IItemStack[] items);
}
@@ -1,49 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler.data;
import noppes.npcs.api.IContainer;
import noppes.npcs.api.entity.IPlayer;
public interface IQuest {
int getId();
String getName();
void setName(String var1);
int getType();
void setType(int var1);
String getLogText();
void setLogText(String var1);
String getCompleteText();
void setCompleteText(String var1);
IQuest getNextQuest();
void setNextQuest(IQuest var1);
IQuestObjective[] getObjectives(IPlayer var1);
IQuestCategory getCategory();
IContainer getRewards();
String getNpcName();
void setNpcName(String var1);
void save();
boolean getIsRepeatable();
IQuestInterface getQuestInterface();
}
@@ -1,16 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler.data;
import java.util.List;
public interface IQuestCategory {
List<IQuest> quests();
String getName();
IQuest create();
}
@@ -1,4 +0,0 @@
package noppes.npcs.api.handler.data;
public interface IQuestDialog extends IQuestInterface {
}
@@ -1,4 +0,0 @@
package noppes.npcs.api.handler.data;
public interface IQuestInterface {
}
@@ -1,12 +0,0 @@
package noppes.npcs.api.handler.data;
public interface IQuestItem extends IQuestInterface {
void setLeaveItems(boolean leaveItems);
boolean getLeaveItems();
void setIgnoreDamage(boolean ignoreDamage);
boolean getIgnoreDamage();
void setIgnoreNbt(boolean ignoreNbt);
boolean getIgnoreNbt();
}
@@ -1,6 +0,0 @@
package noppes.npcs.api.handler.data;
public interface IQuestKill extends IQuestInterface {
void setTargetType(int type);
int getTargetType();
}
@@ -1,12 +0,0 @@
package noppes.npcs.api.handler.data;
public interface IQuestLocation extends IQuestInterface {
void setLocation1(String loc1);
String getLocation1();
void setLocation2(String loc2);
String getLocation2();
void setLocation3(String loc3);
String getLocation3();
}
@@ -1,18 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler.data;
public interface IQuestObjective {
int getProgress();
void setProgress(int var1);
int getMaxProgress();
boolean isCompleted();
String getText();
}
@@ -1,36 +0,0 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package noppes.npcs.api.handler.data;
import net.minecraft.item.ItemStack;
public interface IRecipe {
String getName();
boolean isGlobal();
void setIsGlobal(boolean var1);
boolean getIgnoreNBT();
void setIgnoreNBT(boolean var1);
boolean getIgnoreDamage();
void setIgnoreDamage(boolean var1);
int getWidth();
int getHeight();
ItemStack getResult();
ItemStack[] getRecipe();
void delete();
int getId();
}
@@ -1,37 +0,0 @@
package noppes.npcs.api.handler.data;
import noppes.npcs.api.IPos;
import noppes.npcs.api.entity.IEntity;
public interface ISound {
void setEntity(IEntity entity);
IEntity getEntity();
void setRepeat(boolean repeat);
boolean repeats();
void setRepeatDelay(int delay);
int getRepeatDelay();
void setVolume(float volume);
float getVolume();
void setPitch(float pitch);
float getPitch();
void setPosition(IPos pos);
void setPosition(float x, float y, float z);
float getX();
float getY();
float getZ();
}
@@ -1,16 +0,0 @@
package noppes.npcs.api.handler.data;
public interface ITransportCategory {
int getId();
void setTitle(String title);
String getTitle();
void addLocation(String name);
ITransportLocation getLocation(String name);
void removeLocation(String name);
}
@@ -1,32 +0,0 @@
package noppes.npcs.api.handler.data;
import noppes.npcs.api.IPos;
public interface ITransportLocation {
int getId();
void setName(String name);
String getName();
void setDimension(int dimension);
int getDimension();
void setType(int type);
int getType();
void setPosition(int x, int y, int z);
void setPosition(IPos pos);
double getX();
double getY();
double getZ();
void save();
}
@@ -1,7 +0,0 @@
package noppes.npcs.api.item;
public interface IItemArmor {
int getArmorSlot();
String getArmorMaterial();
}
@@ -1,5 +0,0 @@
package noppes.npcs.api.item;
public interface IItemBlock {
String getBlockName();
}
@@ -1,15 +0,0 @@
package noppes.npcs.api.item;
public interface IItemBook {
String[] getText();
void setText(String[] var1);
String getAuthor();
void setAuthor(String var1);
String getTitle();
void setTitle(String var1);
}
@@ -1,86 +0,0 @@
package noppes.npcs.api.item;
public interface IItemCustom extends IItemStack {
boolean getEnabled();
void setEnabled(boolean bo);
String getTexture();
void setTexture(String var2);
void setArmorType(int armorType);
int getArmorType();
void setIsTool(boolean isTool);
boolean isTool();
void setDigSpeed(int digSpeed);
int getDigSpeed();
void setMaxStackSize(int var1);
double getDurabilityValue();
void setDurabilityValue(float var1);
boolean getDurabilityShow();
void setDurabilityShow(boolean var1);
int getDurabilityColor();
void setDurabilityColor(int var1);
int getColor();
void setColor(int var1);
int getMaxItemUseDuration();
void setMaxItemUseDuration(int duration);
void setItemUseAction(int action);
int getItemUseAction();
int getEnchantability();
void setEnchantability(int enchantability);
void setRotation(float rotationX, float rotationY, float rotationZ);
void setRotationRate(float rotationXRate, float rotationYRate, float rotationZRate);
void setScale(float scaleX, float scaleY, float scaleZ);
void setTranslate(float translateX, float translateY, float translateZ);
float getRotationX();
float getRotationY();
float getRotationZ();
float getRotationXRate();
float getRotationYRate();
float getRotationZRate();
float getScaleX();
float getScaleY();
float getScaleZ();
float getTranslateX();
float getTranslateY();
float getTranslateZ();
}
@@ -1,137 +0,0 @@
package noppes.npcs.api.item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import noppes.npcs.api.INbt;
public interface IItemStack {
String getName();
/**
* @return Returns the stacksize
*/
int getStackSize();
/**
* @return Return whether the item has a custom name
*/
boolean hasCustomName();
/**
* @param name The custom name this item will get
*/
void setCustomName(String name);
/**
* @return Return the ingame displayed name. This is either the item name or the custom name if it has one.
*/
String getDisplayName();
/**
* @return Get the items ingame name. Use this incase the item ingame has custom name and you want the original name.
*/
String getItemName();
/**
* @param size The size of the itemstack. A number between 1 and 64
*/
void setStackSize(int size);
int getMaxStackSize();
/**
* @return Returns the item damage of this item. For tools this is the durability for other items the color and more.
*/
int getItemDamage();
/**
* @param value The value to be set as item damage. For tools this is the durability for other items the color and more.
*/
void setItemDamage(int value);
/**
* @param key The key of this NBTTag
* @param value The value to be stored. Can be a Number or String
*/
void setTag(String key, Object value);
/**
* @param key The key of the NBTTag
* @return Returns whether or not the key exists
*/
boolean hasTag(String key);
/**
* @param key The key of the NBTTag
* @return Returns the value associated with the key. Returns null of it doesnt exist
*/
Object getTag(String key);
INbt removeTags();
boolean isEnchanted();
/**
* @since 1.7.10d
* @param id The enchantment id
* @return
*/
boolean hasEnchant(int id);
void addEnchant(int id, int strength);
void setAttribute(String name, double value);
double getAttribute(String name);
String[] getLore();
boolean hasLore();
void setLore(String[] lore);
boolean hasAttribute(String name);
/**
* @since 1.7.10d
* @return Returns whether this item is a book
*/
boolean isWrittenBook();
/**
* @since 1.7.10d
* @return Returns the books title
*/
String getBookTitle();
/**
* @since 1.7.10d
* @return Returns the books author
*/
String getBookAuthor();
/**
* @since 1.7.10d
* @return If the item is a book, returns a string array with book pages
*/
String[] getBookText();
/**
* @return Returns whether or not this item is a block
*/
boolean isBlock();
INbt getNbt();
INbt getItemNbt();
/**
* No support is given for this method. Dont use if you dont know what you are doing.
* @return Minecraft ItemStack
*/
ItemStack getMCItemStack();
NBTTagCompound getMCNbt();
void setMCNbt(NBTTagCompound compound);
}
@@ -1,10 +0,0 @@
package noppes.npcs.api.jobs;
import noppes.npcs.api.entity.ICustomNpc;
public interface IJob {
int getType();
ICustomNpc getNpc();
}
@@ -1,24 +0,0 @@
package noppes.npcs.api.jobs;
public interface IJobBard extends IJob {
String getSong();
void setSong(String song);
void setInstrument(int i);
int getInstrumentId();
void setMinRange(int range);
int getMinRange();
void setMaxRange(int range);
int getMaxRange();
void setStreaming(boolean streaming);
boolean getStreaming();
void hasOffRange(boolean value);
boolean hasOffRange();
}
@@ -1,5 +0,0 @@
package noppes.npcs.api.jobs;
public interface IJobConversation extends IJob {
}
@@ -1,14 +0,0 @@
package noppes.npcs.api.jobs;
import noppes.npcs.api.entity.ICustomNpc;
public interface IJobFollower extends IJob {
String getFollowingName();
void setFollowingName(String name);
ICustomNpc getFollowingNpc();
boolean isFollowing();
}
@@ -1,12 +0,0 @@
package noppes.npcs.api.jobs;
public interface IJobGuard extends IJob {
boolean attackCreepers();
void attackCreepers(boolean value);
boolean attacksAnimals();
void attacksAnimals(boolean value);
boolean attackHostileMobs();
void attackHostileMobs(boolean value);
}
@@ -1,14 +0,0 @@
package noppes.npcs.api.jobs;
import noppes.npcs.api.entity.IEntityLivingBase;
public interface IJobHealer extends IJob {
void heal(IEntityLivingBase entity, float amount);
void setRange(int range);
int getRange();
void setSpeed(int speed);
int getSpeed();
}
@@ -1,34 +0,0 @@
package noppes.npcs.api.jobs;
import noppes.npcs.api.entity.IPlayer;
import noppes.npcs.api.handler.data.IAvailability;
import noppes.npcs.api.item.IItemStack;
public interface IJobItemGiver extends IJob {
void setCooldown(int cooldown);
void setCooldownType(int type);
int getCooldownType();
void setGivingMethod(int method);
int getGivingMethod();
void setLines(String[] lines);
String[] getLines();
void setAvailability(IAvailability availability);
IAvailability getAvailability();
void setItem(int slot, IItemStack item);
IItemStack[] getItems();
boolean giveItems(IPlayer player);
boolean canPlayerInteract(IPlayer player);
}
@@ -1,20 +0,0 @@
package noppes.npcs.api.jobs;
public interface IJobPuppet extends IJob {
int getRotationX(int part);
int getRotationY(int part);
int getRotationZ(int part);
void setRotationX(int part, int rotation);
void setRotationY(int part, int rotation);
void setRotationZ(int part, int rotation);
boolean isEnabled(int part);
void setEnabled(int part, boolean bo);
}
@@ -1,31 +0,0 @@
package noppes.npcs.api.jobs;
import net.minecraft.entity.player.EntityPlayerMP;
import noppes.npcs.api.IPos;
import noppes.npcs.api.IWorld;
import noppes.npcs.api.entity.IEntityLivingBase;
import noppes.npcs.api.entity.IPlayer;
public interface IJobSpawner extends IJob {
IEntityLivingBase<?> spawnEntity(int number);
IEntityLivingBase<?> getEntity(int number, int x, int y, int z, IWorld world);
IEntityLivingBase<?> getEntity(int number, IPos pos, IWorld world);
void setEntity(int number, IEntityLivingBase<?> entityLivingBase);
/**
* Removes all spawned entities
*/
void removeAllSpawned();
IEntityLivingBase<?>[] getNearbySpawned();
boolean hasPixelmon();
boolean isEmpty();
boolean isOnCooldown(IPlayer<EntityPlayerMP> player);
}
@@ -1,40 +0,0 @@
package noppes.npcs.api.overlay;
import net.minecraft.nbt.NBTTagCompound;
import noppes.npcs.api.entity.IPlayer;
import java.util.List;
public interface ICustomOverlay {
int getID();
List<ICustomOverlayComponent> getComponents();
int getDefaultAlignment();
void setDefaultAlignment(int defaultAlignment);
IOverlayTexturedRect addTexturedRect(int id, String texture, int x, int y, int width, int height);
IOverlayTexturedRect addTexturedRect(int id, String texture, int x, int y, int width, int height, int textureX, int textureY);
IOverlayLabel addLabel(int id, String label, int x, int y, int width, int height);
IOverlayLabel addLabel(int id, String label, int x, int y, int width, int height, int color);
IOverlayLine addLine(int id, int x1, int y1, int x2, int y2, int color, int thickness);
IOverlayLine addLine(int id, int x1, int y1, int x2, int y2);
ICustomOverlayComponent getComponent(int componentID);
void removeComponent(int componentID);
void updateComponent(ICustomOverlayComponent component);
void update(IPlayer player);
ICustomOverlay fromNBT(NBTTagCompound tag);
NBTTagCompound toNBT();
}
@@ -1,35 +0,0 @@
package noppes.npcs.api.overlay;
import net.minecraft.nbt.NBTTagCompound;
public interface ICustomOverlayComponent {
int getID();
ICustomOverlayComponent setID(int id);
int getPosX();
int getPosY();
ICustomOverlayComponent setPos(int x, int y);
int getAlignment();
void setAlignment(int alignment);
int getColor();
ICustomOverlayComponent setColor(int color);
float getAlpha();
void setAlpha(float alpha);
float getRotation();
void setRotation(float rotation);
NBTTagCompound toNBT(NBTTagCompound nbt);
ICustomOverlayComponent fromNBT(NBTTagCompound nbt);
}
Loaded 100 of 113 files, more files were not shown because too many files have changed in this diff. Show more