mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 14:04:43 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b36c23d66 | ||
|
|
39b7f805b3 | ||
|
|
6d6daeb345 | ||
|
|
3844a26e8b | ||
|
|
2a4ace286e | ||
|
|
79ef0e07a1 | ||
|
|
7e0ff3c836 | ||
|
|
e3e55e4256 | ||
|
|
0c4ead5752 | ||
|
|
5d39c5b356 | ||
|
|
19ccdd60d2 | ||
|
|
d3145f4868 | ||
|
|
70536de655 | ||
|
|
1ebf747302 | ||
|
|
632e92f82e | ||
|
|
90ca1a0200 | ||
|
|
9109c134c1 | ||
|
|
1af875aea9 | ||
|
|
7de585843d | ||
|
|
67c83b1ce9 | ||
|
|
bc54e8cd7b | ||
|
|
8675d22ebb | ||
|
|
83e13285f9 | ||
|
|
3be088c4cc | ||
|
|
54fadbe63f | ||
|
|
da3b04e78e | ||
|
|
e7a19264b2 | ||
|
|
966ab4bf72 | ||
|
|
e5e1aa1972 | ||
|
|
be61bd4e17 | ||
|
|
534f716991 | ||
|
|
8b24dad211 | ||
|
|
6974476d92 | ||
|
|
fcaafe4b26 | ||
|
|
f876f13d77 | ||
|
|
989effb5c5 | ||
|
|
f14337f1bb | ||
|
|
eb45a6a959 | ||
|
|
a04f023d53 | ||
|
|
092b3ce0c1 | ||
|
|
971010bda8 | ||
|
|
06c730b166 | ||
|
|
b9bc1e5ed7 | ||
|
|
83756381e4 | ||
|
|
52f342302c | ||
|
|
0788b2750f | ||
|
|
8a9defd3a1 | ||
|
|
dff71c5a98 | ||
|
|
cb72f6c50e | ||
|
|
dd22f604cc | ||
|
|
05e6a97721 | ||
|
|
f8a6fe3d75 | ||
|
|
f9ab885ddd | ||
|
|
e0f77bdcff | ||
|
|
6ff2678f26 | ||
|
|
a1a0864692 | ||
|
|
b3098053ec | ||
|
|
2155566113 | ||
|
|
9d88da30cf | ||
|
|
24e8648a1d | ||
|
|
e1c283a19e | ||
|
|
aba9dd250a | ||
|
|
f508fbed1a | ||
|
|
007660f16f | ||
|
|
e10aa09728 | ||
|
|
4f38edc147 | ||
|
|
6a6548845b | ||
|
|
0aef0827ec | ||
|
|
791adfc1b4 | ||
|
|
2874643c84 | ||
|
|
b0da137db5 | ||
|
|
c28a9156d5 | ||
|
|
4ba6f3086f | ||
|
|
555ceb741f | ||
|
|
04def38b63 | ||
|
|
b024f800ae | ||
|
|
8919a182c5 | ||
|
|
6b9cfb9d25 | ||
|
|
d50f51e208 | ||
|
|
69f96519dc | ||
|
|
7808e4a433 | ||
|
|
d74a1f2bee | ||
|
|
c3541df1dc | ||
|
|
32792e7d6f | ||
|
|
73db2da124 | ||
|
|
6459e7fe2a | ||
|
|
a32db79a0b | ||
|
|
de5f119fd7 | ||
|
|
b330678104 | ||
|
|
e6f97784ff | ||
|
|
e676c808e3 | ||
|
|
e5edbe002e | ||
|
|
ce9b9fb59d | ||
|
|
c8f6a24baf | ||
|
|
2743fa17d8 | ||
|
|
5409e4e924 | ||
|
|
6573970840 | ||
|
|
efdd1d6679 | ||
|
|
4cca8e562c | ||
|
|
4c31236590 | ||
|
|
b62149d5f6 | ||
|
|
ff810cbc8d | ||
|
|
69d4fb20ff | ||
|
|
953f6e0459 | ||
|
|
1a78b2dad7 | ||
|
|
d46d0aba7e | ||
|
|
03ee733620 | ||
|
|
7d94e0e210 | ||
|
|
f03516b00f | ||
|
|
23384d1d67 | ||
|
|
6bdc68337c | ||
|
|
3a9789b3fd | ||
|
|
69b7a9aab4 | ||
|
|
9d9c481bdd | ||
|
|
98d2d943ae | ||
|
|
e9a4471cd2 | ||
|
|
934d5a69d6 | ||
|
|
12cb6a2937 | ||
|
|
cad275e845 | ||
|
|
816445bccd | ||
|
|
cf91d8638f | ||
|
|
03395ad750 | ||
|
|
f2da93451f | ||
|
|
00557df9a7 | ||
|
|
541958b630 | ||
|
|
eac3d2c214 | ||
|
|
ba0f21dc26 | ||
|
|
743cdb9db7 | ||
|
|
fc1c16032f | ||
|
|
b7d2dab905 | ||
|
|
9560228ba8 | ||
|
|
ba4bf107b5 | ||
|
|
81881e6e19 | ||
|
|
909f69575a | ||
|
|
34f6f670eb | ||
|
|
8c602c4d16 | ||
|
|
d66f532643 | ||
|
|
d37e986006 | ||
|
|
29db4bfe33 | ||
|
|
90eec7a57b | ||
|
|
94c7df410b | ||
|
|
c2564de470 | ||
|
|
2147bd00d0 | ||
|
|
922708bf97 | ||
|
|
43b3241801 | ||
|
|
12333de3a1 | ||
|
|
3cd1410c19 | ||
|
|
3c1bc30e44 | ||
|
|
cd5b4c0633 | ||
|
|
f14bc107d3 | ||
|
|
547f5ab82d | ||
|
|
23686dc3b8 | ||
|
|
44d4e74279 | ||
|
|
17eb612fb8 | ||
|
|
72869e6a78 | ||
|
|
e8dd3e7ddc | ||
|
|
3dd8a60702 | ||
|
|
71c81bce27 | ||
|
|
f39ed1fd37 | ||
|
|
f3ebf86b1e | ||
|
|
f64399e40d | ||
|
|
d79ec52994 | ||
|
|
3069488c54 | ||
|
|
24790b7952 | ||
|
|
edabe3890f | ||
|
|
ecbfd7dab0 | ||
|
|
d24422c3a1 | ||
|
|
8a7f40189e | ||
|
|
77c2897109 | ||
|
|
d5c13ae65f | ||
|
|
d2fe832508 | ||
|
|
03e4400b2e | ||
|
|
0d807b36d9 | ||
|
|
27b88c1fce | ||
|
|
40b39d3b20 | ||
|
|
70f1ff2613 | ||
|
|
6b2a9d92b1 | ||
|
|
2ffa9bfcfa | ||
|
|
27dce4a90a | ||
|
|
1478841098 | ||
|
|
6fcf566ef7 | ||
|
|
18aa2d099f | ||
|
|
b068c76fc8 | ||
|
|
a29058d696 | ||
|
|
d1c4adf371 | ||
|
|
4de969f6c9 | ||
|
|
a993c8feff | ||
|
|
5515f5ef83 | ||
|
|
8b710ed520 | ||
|
|
b15f5221fd | ||
|
|
40e738384f | ||
|
|
f88cbb8b51 | ||
|
|
c8f917d8fb | ||
|
|
bb1da8376d | ||
|
|
feeef71b5a | ||
|
|
15bfbcdbd1 | ||
|
|
72f2c3c60a | ||
|
|
c5ed7497c8 | ||
|
|
a9bce4a3e3 | ||
|
|
2d70b0091b | ||
|
|
047552d9e5 | ||
|
|
699182f4c0 | ||
|
|
6752f8baec | ||
|
|
6c8c7671b8 | ||
|
|
1ee14920ff | ||
|
|
6aa98aecf3 | ||
|
|
44bd1692d1 | ||
|
|
95d2814651 | ||
|
|
8b6e84a8d4 | ||
|
|
5a1c4757cf | ||
|
|
69877e8edf | ||
|
|
79339be79a | ||
|
|
58a1ccc3e7 | ||
|
|
a5f9ec103f | ||
|
|
4ba0460a16 | ||
|
|
71e13a177f | ||
|
|
c39ebc4909 | ||
|
|
f6d9149038 | ||
|
|
50e3ae7f83 | ||
|
|
b43d89f91e | ||
|
|
1c2534bfc4 | ||
|
|
61ad3dc849 | ||
|
|
6e9c693d49 | ||
|
|
fbc22fdef2 | ||
|
|
9f4ab7f01e | ||
|
|
2a378190ae | ||
|
|
459976c54d | ||
|
|
a2e869ddb3 | ||
|
|
1b3f9dc019 | ||
|
|
3727d1af7a | ||
|
|
7e7aaa805b | ||
|
|
c05c4fdb0d |
No files matched your search
@@ -1,40 +1,46 @@
|
||||
|
||||
## 👋 Welcome to the CustomNPC+ Repository.
|
||||

|
||||
|
||||
Welcome to the CustomNPC+ Repository.
|
||||
> CustomNPC+ is a [Minecraft](https://minecraft.net/) mod that allows you to add custom NPCs to your world. It is developed for creative and storytelling players who want to make their Minecraft worlds more in-depth and unique. CustomNPC+ is only a branch version of the **1.7.10** Forge version of the original (down below) and has no plans to add or update any other version. This is not an official version of CustomNPC.
|
||||
|
||||
CustomNPC+ is a [Minecraft](https://minecraft.net/) mod that allows you to add custom NPCs to your world. It is developed for creative and storytelling players who want to make their Minecraft worlds more in-depth and unique. CustomNPC+ is only a branch version of the **1.7.10** Forge version of the original (down below) and has no plans to add or update any other version. This is not an official version of CustomNPC.
|
||||
Link to CurseForge: [HERE](https://www.curseforge.com/minecraft/mc-mods/customnpc-plus)
|
||||
|
||||
#### Notice
|
||||
### ❗ Notice
|
||||
I am not the original creator of CustomNPC. The original creator is @[Noppes](https://github.com/Noppes). I have been permitted to update the 1.7.10 and post my results on GitHub. The original mod that is updated to the latest versions of Minecraft can be found on these links: [CurseForge](https://www.curseforge.com/minecraft/mc-mods/custom-npcs), [kodevelopment](http://www.kodevelopment.nl/minecraft/customnpcs)
|
||||
|
||||
#### First Release! V1.0 (Installation)
|
||||
### 🔹 First Release! V1.0 (Installation)
|
||||
This mod is an ***update*** to CustomNPC and not an add-on. Do not install CustomNPC with CustomNPC-Plus. CustomNPC-Plus does not remove any functional features from the original mod. It expands upon CustomNPC with original features and backported features from newer versions. Simply drag CustomNPC-Plus into any client/server mods folder to utilize. Please **backup** before using as this could still have unforeseen errors. Report any bugs if found, thank you and enjoy.
|
||||
|
||||
### Features:
|
||||
- [x] More Wing Types
|
||||
- [x] More Fin Types
|
||||
- [x] More Capes*
|
||||
- [x] More Overlays
|
||||
- [x] Added Horns
|
||||
- [x] Added Dolphin Tail
|
||||
- [x] Larger Clone GUI
|
||||
- [x] More Clone Tabs
|
||||
- [x] Increased Resolution to Additional Body Parts
|
||||
- [x] ~~Update Local Skin Textures (64x64) [WIP]~~
|
||||
- [x] Added (New) Local 64x64 Skin Textures
|
||||
- [x] 1.8 Skins (64x64)
|
||||
- [x] Alex Model (64x64)
|
||||
- [x] Fix Part Rendering
|
||||
- [x] Backported GUI Features
|
||||
- [x] Backported New Part Models
|
||||
- [ ] Custom Part Disabling [WIP]
|
||||
- [ ] Flying NPCS [WIP]
|
||||
### ❓ Features:
|
||||
- More Wing Types
|
||||
- More Fin Types
|
||||
- More Capes*
|
||||
- More Overlays
|
||||
- Added Horns
|
||||
- Added Dolphin Tail
|
||||
- Larger Clone GUI
|
||||
- More Clone Tabs
|
||||
- Increased Resolution to Additional Body Parts
|
||||
- ~~Update Local Skin Textures (64x64) [WIP]~~
|
||||
- Added (New) Local 64x64 Skin Textures
|
||||
- 1.8 Skins (64x64)
|
||||
- Alex Model (64x64)
|
||||
- Fix Part Rendering
|
||||
- Backported GUI Features
|
||||
- Backported New Part Models
|
||||
- Custom Part Disabling
|
||||
- Markov Name Generator
|
||||
- Flying NPCS
|
||||
- Better Script Speeds
|
||||
- Scripting Additions: [Documentation](https://github.com/PewDizinho/CustomNPCPlus-Script-Documentation)
|
||||
|
||||
--- Please Suggest New Features!
|
||||
|
||||
###### **Majority of these cape designs are taken from the internet with fair-usage.*
|
||||
|
||||
#### Skin Model Feature:
|
||||
##### Please note all *local* skins in this version of CustomNPC, must match the model selected.
|
||||
## 🔰 Skin Model Feature:
|
||||
###### **Majority of these cape designs are taken from the internet with fair-usage.*
|
||||
##### ❔ Please note all *local* skins in this version of CustomNPC, must match the model selected.
|
||||
<img src="images/skinAnimation.gif" width="474" height="260"/>
|
||||
|
||||
#### Scale/Puppet Reset:
|
||||
@@ -44,6 +50,11 @@ This mod is an ***update*** to CustomNPC and not an add-on. Do not install Custo
|
||||
<img src="images/Url64Example.gif" width="474" height="260"/>
|
||||
|
||||
|
||||
#### Want to check out my other mods?
|
||||
## 🔗 Want to check out my other mods?
|
||||
[Plugin Mod](https://github.com/KAMKEEL/Plugin-Mod) is a mod designed to add more aesthetic items for RPG and storytelling. It is compatible with CustomNPC+ and has many items intended to be used and wielded by created NPCs.
|
||||
|
||||
[](https://discord.gg/rgeWsmQaKa)
|
||||
[](https://discord.gg/pQqRTvFeJ5)
|
||||
[](https://www.curseforge.com/minecraft/mc-mods/customnpc-plus)
|
||||
[](https://github.com/KAMKEEL/Plugin-Mod)
|
||||
|
||||
Binary file not shown.
+6
-1
@@ -17,7 +17,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.2"
|
||||
version = "1.5.1-beta"
|
||||
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "CustomNPC-Plus"
|
||||
|
||||
@@ -26,6 +26,9 @@ minecraft {
|
||||
runDir = "eclipse"
|
||||
}
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
dependencies {
|
||||
// you may put jars on which you depend on in ./libs
|
||||
// or you may define them like so..
|
||||
@@ -61,3 +64,5 @@ processResources
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {main { output.resourcesDir = output.classesDir }}
|
||||
@@ -1,19 +0,0 @@
|
||||
package net.minecraft.block.properties;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/** This code is owned by Minecraft */
|
||||
|
||||
public interface IProperty<T extends Comparable<T>>
|
||||
{
|
||||
String getName();
|
||||
|
||||
Collection<T> getAllowedValues();
|
||||
|
||||
Class<T> getValueClass();
|
||||
|
||||
/**
|
||||
* Get the name for the given value.
|
||||
*/
|
||||
String getName(T value);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package net.minecraft.block.state;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import java.util.Collection;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
|
||||
/** This code is owned by Minecraft */
|
||||
|
||||
public interface IBlockState
|
||||
{
|
||||
Collection<IProperty> getPropertyNames();
|
||||
|
||||
<T extends Comparable<T>> T getValue(IProperty<T> property);
|
||||
|
||||
<T extends Comparable<T>, V extends T> IBlockState withProperty(IProperty<T> property, V value);
|
||||
|
||||
<T extends Comparable<T>> IBlockState cycleProperty(IProperty<T> property);
|
||||
|
||||
ImmutableMap<IProperty, Comparable> getProperties();
|
||||
|
||||
Block getBlock();
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
package net.minecraft.util;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/** This code is owned by Minecraft */
|
||||
|
||||
public class Vec3i implements Comparable<Vec3i>
|
||||
{
|
||||
/** The Null vector constant (0, 0, 0) */
|
||||
public static final Vec3i NULL_VECTOR = new Vec3i(0, 0, 0);
|
||||
/** X coordinate */
|
||||
private final int x;
|
||||
/** Y coordinate */
|
||||
private final int y;
|
||||
/** Z coordinate */
|
||||
private final int z;
|
||||
|
||||
public Vec3i(int xIn, int yIn, int zIn)
|
||||
{
|
||||
this.x = xIn;
|
||||
this.y = yIn;
|
||||
this.z = zIn;
|
||||
}
|
||||
|
||||
public Vec3i(double xIn, double yIn, double zIn)
|
||||
{
|
||||
this(MathHelper.floor_double(xIn), MathHelper.floor_double(yIn), MathHelper.floor_double(zIn));
|
||||
}
|
||||
|
||||
public boolean equals(Object p_equals_1_)
|
||||
{
|
||||
if (this == p_equals_1_)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (!(p_equals_1_ instanceof Vec3i))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Vec3i vec3i = (Vec3i)p_equals_1_;
|
||||
return this.getX() != vec3i.getX() ? false : (this.getY() != vec3i.getY() ? false : this.getZ() == vec3i.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
public int hashCode()
|
||||
{
|
||||
return (this.getY() + this.getZ() * 31) * 31 + this.getX();
|
||||
}
|
||||
|
||||
public int compareTo(Vec3i p_compareTo_1_)
|
||||
{
|
||||
return this.getY() == p_compareTo_1_.getY() ? (this.getZ() == p_compareTo_1_.getZ() ? this.getX() - p_compareTo_1_.getX() : this.getZ() - p_compareTo_1_.getZ()) : this.getY() - p_compareTo_1_.getY();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the X coordinate
|
||||
*/
|
||||
public int getX()
|
||||
{
|
||||
return this.x;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Y coordinate
|
||||
*/
|
||||
public int getY()
|
||||
{
|
||||
return this.y;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Z coordinate
|
||||
*/
|
||||
public int getZ()
|
||||
{
|
||||
return this.z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the cross product of this and the given Vector
|
||||
*/
|
||||
public Vec3i crossProduct(Vec3i vec)
|
||||
{
|
||||
return new Vec3i(this.getY() * vec.getZ() - this.getZ() * vec.getY(), this.getZ() * vec.getX() - this.getX() * vec.getZ(), this.getX() * vec.getY() - this.getY() * vec.getX());
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate squared distance to the given coordinates
|
||||
*/
|
||||
public double distanceSq(double toX, double toY, double toZ)
|
||||
{
|
||||
double d0 = (double)this.getX() - toX;
|
||||
double d1 = (double)this.getY() - toY;
|
||||
double d2 = (double)this.getZ() - toZ;
|
||||
return d0 * d0 + d1 * d1 + d2 * d2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute square of distance from point x, y, z to center of this Block
|
||||
*/
|
||||
public double distanceSqToCenter(double xIn, double yIn, double zIn)
|
||||
{
|
||||
double d0 = (double)this.getX() + 0.5D - xIn;
|
||||
double d1 = (double)this.getY() + 0.5D - yIn;
|
||||
double d2 = (double)this.getZ() + 0.5D - zIn;
|
||||
return d0 * d0 + d1 * d1 + d2 * d2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate squared distance to the given Vector
|
||||
*/
|
||||
public double distanceSq(Vec3i to)
|
||||
{
|
||||
return this.distanceSq((double)to.getX(), (double)to.getY(), (double)to.getZ());
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return Objects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString();
|
||||
}
|
||||
}
|
||||
@@ -1,407 +0,0 @@
|
||||
package net.minecraft.util.math;
|
||||
|
||||
import com.google.common.collect.AbstractIterator;
|
||||
import java.util.Iterator;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.Vec3i;
|
||||
|
||||
/** This code is owned by Minecraft */
|
||||
|
||||
public class BlockPos extends Vec3i{
|
||||
/** The BlockPos with all coordinates 0 */
|
||||
public static final BlockPos ORIGIN = new BlockPos(0, 0, 0);
|
||||
private static final int NUM_X_BITS = 1 + MathHelper.calculateLogBaseTwo(MathHelper.roundUpToPowerOfTwo(30000000));
|
||||
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(Vec3 source)
|
||||
{
|
||||
this(source.xCoord, source.yCoord, source.zCoord);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a version of this BlockPos that is guaranteed to be Immutable.
|
||||
* In most cases this will return 'this', but if 'this' is an instance of
|
||||
* MutableBlockPos it will return a new instance of BlockPos with the same values.
|
||||
*
|
||||
* When storing a parameter given to you for an extended period of time, make sure you
|
||||
* use this in case the value is changed internally.
|
||||
*
|
||||
* @return An immutable BlockPos.
|
||||
*/
|
||||
public BlockPos getImmutable()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
public static final class MutableBlockPos extends BlockPos
|
||||
{
|
||||
/** Mutable X Coordinate */
|
||||
private int x;
|
||||
/** Mutable Y Coordinate */
|
||||
private int y;
|
||||
/** Mutable Z Coordinate */
|
||||
private int z;
|
||||
|
||||
public MutableBlockPos()
|
||||
{
|
||||
this(0, 0, 0);
|
||||
}
|
||||
|
||||
public MutableBlockPos(int x_, int y_, int z_)
|
||||
{
|
||||
super(0, 0, 0);
|
||||
this.x = x_;
|
||||
this.y = y_;
|
||||
this.z = z_;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the values
|
||||
*
|
||||
* @param xIn The X value
|
||||
* @param yIn The Y value
|
||||
* @param zIn The Z value
|
||||
*/
|
||||
public BlockPos.MutableBlockPos set(int xIn, int yIn, int zIn)
|
||||
{
|
||||
this.x = xIn;
|
||||
this.y = yIn;
|
||||
this.z = zIn;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override public BlockPos getImmutable() { return new BlockPos(this); }
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
package nikedemos.markovnames;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class HashMap2D<T1, T2, T3> {
|
||||
|
||||
public final Map<T1, Map<T2, T3>> mMap;
|
||||
|
||||
/*
|
||||
https://stackoverflow.com/a/10299689/9355344
|
||||
*/
|
||||
|
||||
public HashMap2D() {
|
||||
mMap = new HashMap<T1, Map<T2, T3>>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Associates the specified value with the specified keys in this map (optional operation). If the map previously
|
||||
* contained a mapping for the key, the old value is replaced by the specified value.
|
||||
*
|
||||
* @param key1
|
||||
* the first key
|
||||
* @param key2
|
||||
* the second key
|
||||
* @param value
|
||||
* the value to be set
|
||||
* @return the value previously associated with (key1,key2), or <code>null</code> if none
|
||||
* @see Map#put(Object, Object)
|
||||
*/
|
||||
public T3 put(T1 key1, T2 key2, T3 value) {
|
||||
Map<T2, T3> map;
|
||||
if (mMap.containsKey(key1)) {
|
||||
map = mMap.get(key1);
|
||||
} else {
|
||||
map = new HashMap<T2, T3>();
|
||||
mMap.put(key1, map);
|
||||
}
|
||||
|
||||
return map.put(key2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value to which the specified key is mapped, or <code>null</code> if this map contains no mapping for
|
||||
* the key.
|
||||
*
|
||||
* @param key1
|
||||
* the first key whose associated value is to be returned
|
||||
* @param key2
|
||||
* the second key whose associated value is to be returned
|
||||
* @return the value to which the specified key is mapped, or <code>null</code> if this map contains no mapping for
|
||||
* the key
|
||||
* @see Map#get(Object)
|
||||
*/
|
||||
public T3 get(T1 key1, T2 key2) {
|
||||
if (mMap.containsKey(key1)) {
|
||||
return mMap.get(key1).get(key2);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if this map contains a mapping for the specified key
|
||||
*
|
||||
* @param key1
|
||||
* the first key whose presence in this map is to be tested
|
||||
* @param key2
|
||||
* the second key whose presence in this map is to be tested
|
||||
* @return Returns true if this map contains a mapping for the specified key
|
||||
* @see Map#containsKey(Object)
|
||||
*/
|
||||
public boolean containsKeys(T1 key1, T2 key2) {
|
||||
return mMap.containsKey(key1) && mMap.get(key1).containsKey(key2);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
mMap.clear();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package nikedemos.markovnames;
|
||||
|
||||
import nikedemos.markovnames.generators.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static final int GENDER_RANDOM=0;
|
||||
public static final int GENDER_MALE=1;
|
||||
public static final int GENDER_FEMALE=2;
|
||||
|
||||
public static HashMap<String, MarkovGenerator> GENERATORS = new HashMap<String, MarkovGenerator>();
|
||||
|
||||
public static void main(String[] args){
|
||||
|
||||
//all the generators neatly in one HashMap, so you can iterate or w/e
|
||||
|
||||
GENERATORS.put("ROMAN", new MarkovRoman(3));
|
||||
GENERATORS.put("JAPANESE", new MarkovJapanese(4));
|
||||
GENERATORS.put("SLAVIC", new MarkovSlavic(3));
|
||||
GENERATORS.put("WELSH", new MarkovWelsh(3));
|
||||
GENERATORS.put("SAAMI", new MarkovSaami(3));
|
||||
GENERATORS.put("OLDNORSE", new MarkovOldNorse(4));
|
||||
GENERATORS.put("ANCIENTGREEK", new MarkovAncientGreek(3));
|
||||
GENERATORS.put("AZTEC", new MarkovAztec(3));
|
||||
|
||||
//iterate through generators, generate 5 male and 5 female names, move on to the next
|
||||
Iterator<Entry<String, MarkovGenerator>> g = GENERATORS.entrySet().iterator();
|
||||
|
||||
while (g.hasNext()) {
|
||||
Entry<String, MarkovGenerator> pair = (Entry<String, MarkovGenerator>) g.next();
|
||||
|
||||
System.out.println("==="+pair.getKey()+"===");
|
||||
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
if (i==0)
|
||||
System.out.println("GENTLEMEN-----------");
|
||||
int gender = i<8 ? 1 : 2;
|
||||
String random_name = pair.getValue().fetch(gender);
|
||||
System.out.println(random_name);
|
||||
|
||||
if (i==15) //extra padding
|
||||
System.out.println("\n");
|
||||
else if (i==7) //separate genders
|
||||
System.out.println("LADIES--------------");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,270 +0,0 @@
|
||||
package nikedemos.markovnames;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Random;
|
||||
|
||||
public class MarkovDictionary {
|
||||
private Random rng;
|
||||
private int sequenceLen = 3;
|
||||
|
||||
private HashMap2D<String, String, Integer> occurrences = new HashMap2D<String, String, Integer>();
|
||||
|
||||
public MarkovDictionary(String dictionary, int seqlen, Random rng) {
|
||||
this.rng = rng;
|
||||
|
||||
try {
|
||||
applyDictionary(dictionary, seqlen);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public MarkovDictionary(String dictionary, int seqlen) {
|
||||
this(dictionary, seqlen, new Random());
|
||||
}
|
||||
|
||||
public MarkovDictionary(String dictionary) {
|
||||
this(dictionary, 3, new Random()); // 3 is the default, anyway
|
||||
}
|
||||
|
||||
public MarkovDictionary(String dictionary, Random rng) {
|
||||
this(dictionary, 3, rng); // 3 is the default, anyway
|
||||
}
|
||||
|
||||
// Blatantly copied from EnderIO:
|
||||
// https://github.com/SleepyTrousers/EnderIO/blob/master/enderio-base/src/main/java/crazypants/enderio/base/config/recipes/RecipeFactory.java#L44-L57
|
||||
// Thanks again for your help, Henry Loenwind!
|
||||
|
||||
private InputStream getResource(ResourceLocation resourceLocation) {
|
||||
final ModContainer container = Loader.instance().activeModContainer();
|
||||
if (container != null) {
|
||||
final String resourcePath = String.format("/%s/%s/%s", "assets", resourceLocation.getResourceDomain(),
|
||||
resourceLocation.getResourcePath());
|
||||
InputStream resourceAsStream = null;
|
||||
|
||||
try {
|
||||
resourceAsStream = container.getMod().getClass().getResourceAsStream(resourcePath);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (resourceAsStream != null) {
|
||||
return resourceAsStream;
|
||||
} else {
|
||||
throw new RuntimeException("Could not find resource " + resourceLocation);
|
||||
}
|
||||
} else {
|
||||
throw new RuntimeException("Failed to find current mod while looking for resource " + resourceLocation);
|
||||
}
|
||||
}
|
||||
|
||||
public String getCapitalized(String str) {
|
||||
if (str == null || str.isEmpty())
|
||||
return str;
|
||||
char[] chars = str.toCharArray();
|
||||
chars[0] = Character.toUpperCase(chars[0]);
|
||||
return new String(chars);
|
||||
}
|
||||
|
||||
public static String readFile(String path) throws IOException {
|
||||
byte[] encoded = Files.readAllBytes(Paths.get(path));
|
||||
return new String(encoded, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
public void incrementSafe(String str1, String str2) {
|
||||
// so for instance, "_DUP_AUX", "_TOTAL" will count how many "DUP" seqCurrs we have
|
||||
if (occurrences.containsKeys(str1, str2))
|
||||
{
|
||||
int curr = occurrences.get(str1, str2).intValue();
|
||||
occurrences.put(str1, str2, Integer.valueOf(curr + 1));
|
||||
} else {
|
||||
occurrences.put(str1, str2, Integer.valueOf(1));
|
||||
}
|
||||
}
|
||||
|
||||
public String generateWord() {
|
||||
|
||||
// let's pick the first element, from which further picking shall proceed.
|
||||
// first, we need to know how many top-level sequences (sequenceLen length)
|
||||
// strings
|
||||
// we have. So just take into account those surrounded by "_" - and count them.
|
||||
// From that we'll get the weights.
|
||||
|
||||
int allEntries = 0;
|
||||
|
||||
// first iteration: we count top level entries. There's just no other way.
|
||||
Iterator<Entry<String, Map<String, Integer>>> i = occurrences.mMap.entrySet().iterator();
|
||||
|
||||
while (i.hasNext()) {
|
||||
Entry<String, Map<String, Integer>> pair = (Entry<String, Map<String, Integer>>) i.next();
|
||||
|
||||
String k = pair.getKey();
|
||||
if (k.startsWith("_[") && k.endsWith("_")) // dealing with meta entry here
|
||||
{
|
||||
allEntries += occurrences.get(k, "_TOTAL_");
|
||||
}
|
||||
}
|
||||
if(allEntries == 0) {
|
||||
return "Kamkeel"; //shouldnt happen
|
||||
}
|
||||
int topLevelEntries;
|
||||
int randomNumber = rng.nextInt(allEntries);
|
||||
|
||||
// ok, so how does this weighted random work?
|
||||
// easy. Check if the randomNumber is LESS than
|
||||
// topLevelEntries variable for that entry (see below).
|
||||
// If it is, break the while loop - we got our first element,
|
||||
// from which we will go further. Just remember to
|
||||
// remove the underscores at both ends!
|
||||
|
||||
Iterator<Entry<String, Map<String, Integer>>> it = occurrences.mMap.entrySet().iterator();
|
||||
|
||||
StringBuilder sequence = new StringBuilder("");
|
||||
|
||||
while (it.hasNext()) {
|
||||
Entry<String, Map<String, Integer>> pair = (Entry<String, Map<String, Integer>>) it.next();
|
||||
|
||||
String k = pair.getKey();
|
||||
|
||||
if (k.startsWith("_[") && k.endsWith("_")) // dealing with meta entry here
|
||||
{
|
||||
topLevelEntries = occurrences.get(k, "_TOTAL_");
|
||||
|
||||
if (randomNumber < topLevelEntries) {
|
||||
sequence.append(k.substring(1, sequenceLen + 1)); // removing the underscores
|
||||
break;
|
||||
} else {
|
||||
// keep going
|
||||
randomNumber -= topLevelEntries;
|
||||
}
|
||||
}
|
||||
}
|
||||
// great! now that we have the first element, time for some generic iterations.
|
||||
// in a very similar manner. Basically - perform this loop till you encounter
|
||||
// "]" at the end
|
||||
StringBuilder word = new StringBuilder("");
|
||||
|
||||
word.append(sequence); // now we're gonna use firstElement to keep the sequence
|
||||
while (sequence.charAt(sequence.length() - 1) != ']') {
|
||||
// sequence is now your HashMap key for the 1st dimension.
|
||||
// for that sequence:
|
||||
// - get total elements that are not meta (not surrounded by underscores)
|
||||
// and count their total occurrences
|
||||
int subSize = 0;
|
||||
|
||||
Iterator<Entry<String, Integer>> j = occurrences.mMap.get(sequence.toString()).entrySet().iterator();
|
||||
|
||||
while (j.hasNext()) {
|
||||
Entry<String, Integer> entry = j.next();
|
||||
subSize += entry.getValue();
|
||||
}
|
||||
|
||||
// and now, the last iterator, with a random, just like before
|
||||
randomNumber = rng.nextInt(subSize);
|
||||
|
||||
Iterator<Entry<String, Integer>> k = occurrences.mMap.get(sequence.toString()).entrySet().iterator();
|
||||
|
||||
String chosen = "";
|
||||
|
||||
while (k.hasNext()) {
|
||||
Entry<String, Integer> entry = k.next();
|
||||
int occu = occurrences.get(sequence.toString(), entry.getKey());
|
||||
|
||||
if (randomNumber < occu) {
|
||||
chosen = entry.getKey();
|
||||
break;
|
||||
} else { // keep going!
|
||||
randomNumber -= occu;
|
||||
}
|
||||
}
|
||||
// now, append the word...
|
||||
word.append(chosen);
|
||||
|
||||
// delete the first character of the sequence,
|
||||
// and also append it with chosen character.
|
||||
// So if the Sequence is ABC, and chosen is D,
|
||||
// it now becomes BCD.
|
||||
sequence.delete(0, 1);
|
||||
sequence.append(chosen);
|
||||
// System.out.println("FINAL: "+sequence);
|
||||
// System.out.println("CHOSEN: "+chosen);
|
||||
|
||||
}
|
||||
// and now remove the square brackets surrounding it.
|
||||
return this.getPost(word.substring(1, word.length() - 1));
|
||||
}
|
||||
|
||||
public String getPost(String str) {
|
||||
return getCapitalized(str);
|
||||
}
|
||||
|
||||
public void applyDictionary(String dictionaryFile, int seqLen) throws IOException {
|
||||
StringBuilder input = new StringBuilder();
|
||||
|
||||
ResourceLocation resource = new ResourceLocation("customnpcs:markovnames/" + dictionaryFile);
|
||||
|
||||
BufferedReader readIn = new BufferedReader(new InputStreamReader(getResource(resource), "UTF-8"));
|
||||
// Thread.currentThread().getContextClassLoader().getResourceAsStream("path/to/resource/file.ext");
|
||||
|
||||
for (String line = readIn.readLine(); line != null; line = readIn.readLine()) {
|
||||
input.append(line).append(" ");
|
||||
}
|
||||
|
||||
readIn.close();
|
||||
|
||||
if (input.length() == 0) {
|
||||
throw new RuntimeException("Resource was empty: + " + resource);
|
||||
}
|
||||
// if seqLen != this.sequenceLen, we must clear occurrences
|
||||
|
||||
if (this.sequenceLen != seqLen) {
|
||||
sequenceLen = seqLen;
|
||||
this.occurrences.clear();
|
||||
}
|
||||
|
||||
String input_str = '[' + input.toString().toLowerCase().replaceAll("[\\t\\n\\r\\s]+", "][") + ']';
|
||||
|
||||
int maxCursorPos = input_str.length() - 1 - sequenceLen;
|
||||
|
||||
for (int i = 0; i <= maxCursorPos; i++) {
|
||||
String seqCurr = input_str.substring(i, i + (sequenceLen)); // i plus 2 characters next to it
|
||||
String seqNext = input_str.substring(i + sequenceLen, i + sequenceLen + 1); // next character after that
|
||||
incrementSafe(seqCurr, seqNext);
|
||||
// aux counters
|
||||
|
||||
StringBuilder meta = new StringBuilder("_").append(seqCurr).append("_");
|
||||
|
||||
// String aux1="_"+seqCurr+"_";
|
||||
incrementSafe(meta.toString(), "_TOTAL_");
|
||||
// String aux2="_"+seqNext+"_";
|
||||
// incrementSafe(aux1, aux2);
|
||||
|
||||
// debug, feel free to uncomment
|
||||
|
||||
/*
|
||||
* System.out.println("<"+seqCurr+"><"+seqNext+"> => "+occurrences.get(seqCurr,
|
||||
* seqNext));
|
||||
* System.out.println("<"+aux1+"><"+"_TOTAL_"+"> => "+occurrences.get(aux1,
|
||||
* "_TOTAL_"));
|
||||
* System.out.println("<"+aux1+"><"+aux2+"> => "+occurrences.get(aux1, aux2));
|
||||
* System.out.println("");
|
||||
*/
|
||||
|
||||
}
|
||||
// by now, we should have
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package nikedemos.markovnames;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
//used exclusively by the Spanish surname dictionary - because the capitalization is a little bit different
|
||||
public class MarkovDictionarySPA extends MarkovDictionary {
|
||||
|
||||
public MarkovDictionarySPA(String dictionary, int seqlen, Random rng) {
|
||||
super(dictionary, seqlen, rng);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPost(String str) {
|
||||
return getCapitalizedSPA(str);
|
||||
}
|
||||
|
||||
public String getCapitalizedSPA(String str) {
|
||||
// for spanish capitalization
|
||||
|
||||
String[] parts = str.split("#");
|
||||
|
||||
StringBuilder build = new StringBuilder("");
|
||||
|
||||
for (int p = 0; p < parts.length; p++) {
|
||||
// capitalize this part, but only if it's not "de", "del", "la" or "los"
|
||||
if (!parts[p].equals("de") && !parts[p].equals("del") && !parts[p].equals("la")
|
||||
&& !parts[p].equals("los")) {
|
||||
parts[p] = getCapitalized(parts[p]);
|
||||
}
|
||||
|
||||
if (p > 0) // don't add spaces before the first part
|
||||
build.append(" ");
|
||||
|
||||
build.append(parts[p]);
|
||||
}
|
||||
|
||||
return build.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package nikedemos.markovnames.generators;
|
||||
|
||||
import nikedemos.markovnames.MarkovDictionary;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MarkovAncientGreek extends MarkovGenerator {
|
||||
|
||||
public MarkovDictionary markov2;
|
||||
|
||||
public MarkovAncientGreek(int seqlen, Random rng)
|
||||
{
|
||||
this.rng = rng;
|
||||
this.markov = new MarkovDictionary("ancient_greek_male.txt",seqlen,rng);
|
||||
this.markov2 = new MarkovDictionary("ancient_greek_female.txt",seqlen,rng);
|
||||
}
|
||||
|
||||
public MarkovAncientGreek(int seqlen)
|
||||
{
|
||||
this(seqlen,new Random());
|
||||
|
||||
}
|
||||
|
||||
public MarkovAncientGreek()
|
||||
{
|
||||
this(3, new Random()); //3 seems best-suited for Welsh
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fetch(int gender)
|
||||
{
|
||||
|
||||
String seq1;
|
||||
|
||||
//check the gender.
|
||||
//0 = random gender, 1 = male, 2 = female
|
||||
//if there's no gender specified (0),
|
||||
//now it's time to pick it at random
|
||||
//
|
||||
if (gender==0)
|
||||
{
|
||||
gender = rng.nextBoolean()==true? 1 : 2;
|
||||
}
|
||||
|
||||
//now if it's 2 - a lady - feminize the 3 sequences
|
||||
if (gender==2)
|
||||
{
|
||||
seq1 = markov2.generateWord();
|
||||
}
|
||||
else
|
||||
{
|
||||
seq1 = markov.generateWord();
|
||||
}
|
||||
|
||||
|
||||
return seq1;
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package nikedemos.markovnames.generators;
|
||||
|
||||
import nikedemos.markovnames.MarkovDictionary;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MarkovAztec extends MarkovGenerator {
|
||||
|
||||
public MarkovAztec(int seqlen, Random rng)
|
||||
{
|
||||
this.rng = rng;
|
||||
this.markov = new MarkovDictionary("aztec_given.txt",seqlen,rng);
|
||||
}
|
||||
|
||||
public MarkovAztec(int seqlen)
|
||||
{
|
||||
this(seqlen,new Random());
|
||||
|
||||
}
|
||||
|
||||
public MarkovAztec()
|
||||
{
|
||||
this(3, new Random()); //3 seems best-suited for Aztec
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fetch(int gender) //Aztec names are genderless
|
||||
{
|
||||
return markov.generateWord();
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package nikedemos.markovnames.generators;
|
||||
|
||||
import nikedemos.markovnames.MarkovDictionary;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/* This implementation is made specifically for
|
||||
* CustomNPCs, one of the best Minecraft mods ever...
|
||||
* I'm a huge fan and would recommend it to anyone.
|
||||
* Check it out if you haven't yet, at
|
||||
* http://www.kodevelopment.nl/minecraft/category/customnpcs/
|
||||
* Minecraft 1.12.2 Java Edition + Forge required.
|
||||
* Also, you have to like cats, it's in CNPCs EULA, I'm quite sure
|
||||
*/
|
||||
|
||||
public class MarkovCustomNPCsClassic extends MarkovGenerator {
|
||||
|
||||
public MarkovCustomNPCsClassic(int seqlen, Random rng)
|
||||
{
|
||||
this.rng = rng;
|
||||
this.markov = new MarkovDictionary("customnpcs_classic.txt",seqlen,rng);
|
||||
}
|
||||
|
||||
public MarkovCustomNPCsClassic(int seqlen)
|
||||
{
|
||||
this(seqlen,new Random());
|
||||
|
||||
}
|
||||
|
||||
public MarkovCustomNPCsClassic()
|
||||
{
|
||||
this(3, new Random());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fetch(int gender)
|
||||
{
|
||||
return markov.generateWord();
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package nikedemos.markovnames.generators;
|
||||
|
||||
import nikedemos.markovnames.MarkovDictionary;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MarkovGenerator {
|
||||
|
||||
public MarkovDictionary markov;
|
||||
public Random rng;
|
||||
public String name;
|
||||
public String symbol;
|
||||
|
||||
public MarkovGenerator(int seqlen, Random rng)
|
||||
{
|
||||
this.rng = rng;
|
||||
}
|
||||
|
||||
public MarkovGenerator(int seqlen)
|
||||
{
|
||||
this(seqlen, new Random());
|
||||
}
|
||||
|
||||
public MarkovGenerator()
|
||||
{
|
||||
this(3, new Random());
|
||||
}
|
||||
|
||||
public String fetch(int gender) {
|
||||
return stylize(markov.generateWord());
|
||||
}
|
||||
|
||||
public String fetch()
|
||||
{
|
||||
return fetch(0); //0 = random gender, 1 = male, 2 = female
|
||||
}
|
||||
|
||||
public String stylize(String str)
|
||||
{
|
||||
return str;
|
||||
}
|
||||
|
||||
public String feminize(String element, boolean flag) {
|
||||
return element;
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package nikedemos.markovnames.generators;
|
||||
|
||||
import nikedemos.markovnames.MarkovDictionary;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MarkovJapanese extends MarkovGenerator {
|
||||
public MarkovDictionary markov2;
|
||||
public MarkovDictionary markov3;
|
||||
|
||||
public MarkovJapanese(int seqlen, Random rng) {
|
||||
this.rng = rng;
|
||||
this.markov = new MarkovDictionary("japanese_surnames.txt", seqlen, rng);
|
||||
this.markov2 = new MarkovDictionary("japanese_given_male.txt", seqlen, rng);
|
||||
this.markov3 = new MarkovDictionary("japanese_given_female.txt", seqlen, rng);
|
||||
}
|
||||
|
||||
public MarkovJapanese(int seqlen) {
|
||||
this(seqlen, new Random());
|
||||
|
||||
}
|
||||
|
||||
public MarkovJapanese() {
|
||||
this(4, new Random()); // 4 seems best suited for Japanese
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fetch(int gender) {
|
||||
|
||||
StringBuilder name = new StringBuilder(markov.generateWord());
|
||||
name.append(" ");
|
||||
|
||||
// check the gender.
|
||||
// 0 = random gender, 1 = male, 2 = female
|
||||
// if there's no gender specified (0),
|
||||
// now it's time to pick it at random
|
||||
//
|
||||
if (gender == 0) {
|
||||
gender = rng.nextBoolean() == true ? 1 : 2;
|
||||
}
|
||||
|
||||
if (gender == 2) {
|
||||
name.append(markov3.generateWord());
|
||||
}
|
||||
else {
|
||||
name.append(markov2.generateWord());
|
||||
}
|
||||
|
||||
return name.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package nikedemos.markovnames.generators;
|
||||
|
||||
import nikedemos.markovnames.MarkovDictionary;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MarkovOldNorse extends MarkovGenerator {
|
||||
|
||||
public MarkovDictionary markov2;
|
||||
|
||||
public MarkovOldNorse(int seqlen, Random rng)
|
||||
{
|
||||
this.rng = rng;
|
||||
this.markov = new MarkovDictionary("old_norse_bothgenders.txt",seqlen,rng);
|
||||
}
|
||||
|
||||
public MarkovOldNorse(int seqlen)
|
||||
{
|
||||
this(seqlen,new Random());
|
||||
}
|
||||
|
||||
public MarkovOldNorse()
|
||||
{
|
||||
this(4, new Random()); //4 seems best-suited for Old Norse
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fetch(int gender) //Old Norse names are genderless
|
||||
{
|
||||
return markov.generateWord();
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package nikedemos.markovnames.generators;
|
||||
|
||||
import nikedemos.markovnames.MarkovDictionary;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MarkovRoman extends MarkovGenerator {
|
||||
public MarkovDictionary markov2;
|
||||
public MarkovDictionary markov3;
|
||||
|
||||
public MarkovRoman(int seqlen, Random rng) {
|
||||
this.rng = rng;
|
||||
this.markov = new MarkovDictionary("roman_praenomina.txt", seqlen, rng);
|
||||
this.markov2 = new MarkovDictionary("roman_nomina.txt", seqlen, rng);
|
||||
this.markov3 = new MarkovDictionary("roman_cognomina.txt", seqlen, rng);
|
||||
}
|
||||
|
||||
public MarkovRoman(int seqlen) {
|
||||
this(seqlen, new Random());
|
||||
|
||||
}
|
||||
|
||||
public MarkovRoman() {
|
||||
this(3, new Random());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String feminize(String element, boolean flag) {
|
||||
// change "us" into "a" and "o" at the end into "a"
|
||||
if (element.endsWith("us")) {
|
||||
element = element.substring(0, element.length() - 2) + "a";
|
||||
}
|
||||
else if (element.endsWith("o")) {
|
||||
element = element.substring(0, element.length() - 2) + "a";
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fetch(int gender) {
|
||||
|
||||
String seq1 = markov.generateWord();
|
||||
String seq2 = markov2.generateWord();
|
||||
String seq3 = markov3.generateWord();
|
||||
|
||||
// check the gender.
|
||||
// 0 = random gender, 1 = male, 2 = female
|
||||
// if there's no gender specified (0),
|
||||
// now it's time to pick it at random
|
||||
//
|
||||
if (gender == 0) {
|
||||
gender = rng.nextBoolean() == true ? 1 : 2;
|
||||
}
|
||||
|
||||
// now if it's 2 - a lady - feminize the 3 sequences
|
||||
if (gender == 2) {
|
||||
seq1 = feminize(seq1, false);
|
||||
seq2 = feminize(seq2, false);
|
||||
seq3 = feminize(seq3, true);
|
||||
}
|
||||
|
||||
return (new StringBuilder(seq1).append(" ").append(seq2).append(" ").append(seq3).toString());
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package nikedemos.markovnames.generators;
|
||||
|
||||
import nikedemos.markovnames.MarkovDictionary;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MarkovSaami extends MarkovGenerator {
|
||||
|
||||
public MarkovDictionary markov2;
|
||||
|
||||
public MarkovSaami(int seqlen, Random rng)
|
||||
{
|
||||
this.rng = rng;
|
||||
this.markov = new MarkovDictionary("saami_bothgenders.txt",seqlen,rng);
|
||||
}
|
||||
|
||||
public MarkovSaami(int seqlen)
|
||||
{
|
||||
this(seqlen,new Random());
|
||||
|
||||
}
|
||||
|
||||
public MarkovSaami()
|
||||
{
|
||||
this(3, new Random()); //3 seems best-suited for Saami
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fetch(int gender) //Saami names are genderless
|
||||
{
|
||||
return markov.generateWord();
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
package nikedemos.markovnames.generators;
|
||||
|
||||
import nikedemos.markovnames.MarkovDictionary;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MarkovSlavic extends MarkovGenerator {
|
||||
|
||||
public MarkovSlavic(int seqlen, Random rng) {
|
||||
this.rng = rng;
|
||||
this.markov = new MarkovDictionary("slavic_given.txt", seqlen, rng);
|
||||
}
|
||||
|
||||
public MarkovSlavic(int seqlen) {
|
||||
this(seqlen, new Random());
|
||||
|
||||
}
|
||||
|
||||
public MarkovSlavic() {
|
||||
this(3, new Random()); // 3 seems best-suited for Slavic
|
||||
}
|
||||
|
||||
@Override
|
||||
public String feminize(String element, boolean flag) {
|
||||
// add "a" at the end, if there isn't one
|
||||
String lastChar = element.substring(element.length() - 1);
|
||||
|
||||
if (element.endsWith("o")) {
|
||||
element = element.substring(0, element.length() - 1) + "a";
|
||||
}
|
||||
else if (!lastChar.endsWith("a")) {
|
||||
element += "a";
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fetch(int gender) {
|
||||
|
||||
String seq1 = markov.generateWord();
|
||||
|
||||
// check the gender.
|
||||
// 0 = random gender, 1 = male, 2 = female
|
||||
// if there's no gender specified (0),
|
||||
// now it's time to pick it at random
|
||||
//
|
||||
if (gender == 0) {
|
||||
gender = rng.nextBoolean() == true ? 1 : 2;
|
||||
}
|
||||
|
||||
// now if it's 2 - a lady - feminize the 3 sequences
|
||||
if (gender == 2) {
|
||||
seq1 = feminize(seq1, false);
|
||||
}
|
||||
|
||||
return seq1;
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package nikedemos.markovnames.generators;
|
||||
|
||||
import nikedemos.markovnames.MarkovDictionary;
|
||||
import nikedemos.markovnames.MarkovDictionarySPA;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MarkovSpanish extends MarkovGenerator {
|
||||
public MarkovDictionary markov2;
|
||||
public MarkovDictionary markov3;
|
||||
|
||||
public MarkovSpanish(int seqlen, Random rng) {
|
||||
this.rng = rng;
|
||||
this.markov = new MarkovDictionary("spanish_given_male.txt", seqlen, rng);
|
||||
this.markov2 = new MarkovDictionary("spanish_given_female.txt", seqlen, rng);
|
||||
this.markov3 = new MarkovDictionarySPA("spanish_surnames.txt", seqlen, rng);
|
||||
}
|
||||
|
||||
public MarkovSpanish(int seqlen) {
|
||||
this(seqlen, new Random());
|
||||
}
|
||||
|
||||
public MarkovSpanish() {
|
||||
this(3, new Random());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fetch(int gender) {
|
||||
String giv = "";
|
||||
|
||||
String sur = markov3.generateWord();
|
||||
|
||||
// check the gender.
|
||||
// 0 = random gender, 1 = male, 2 = female
|
||||
// if there's no gender specified (0),
|
||||
// now it's time to pick it at random
|
||||
//
|
||||
if (gender == 0) {
|
||||
gender = rng.nextBoolean() == true ? 1 : 2;
|
||||
}
|
||||
|
||||
if (gender == 1) {
|
||||
giv = markov.generateWord();
|
||||
}
|
||||
else {
|
||||
giv = markov2.generateWord();
|
||||
|
||||
}
|
||||
|
||||
return new StringBuilder(giv).append(" ").append(sur).toString();
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package nikedemos.markovnames.generators;
|
||||
|
||||
import nikedemos.markovnames.MarkovDictionary;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MarkovWelsh extends MarkovGenerator {
|
||||
|
||||
public MarkovDictionary markov2;
|
||||
|
||||
public MarkovWelsh(int seqlen, Random rng) {
|
||||
this.rng = rng;
|
||||
this.markov = new MarkovDictionary("welsh_male.txt", seqlen, rng);
|
||||
this.markov2 = new MarkovDictionary("welsh_female.txt", seqlen, rng);
|
||||
}
|
||||
|
||||
public MarkovWelsh(int seqlen) {
|
||||
this(seqlen, new Random());
|
||||
|
||||
}
|
||||
|
||||
public MarkovWelsh() {
|
||||
this(3, new Random()); // 3 seems best-suited for Welsh
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fetch(int gender) {
|
||||
|
||||
String seq1;
|
||||
|
||||
// check the gender.
|
||||
// 0 = random gender, 1 = male, 2 = female
|
||||
// if there's no gender specified (0),
|
||||
// now it's time to pick it at random
|
||||
//
|
||||
if (gender == 0) {
|
||||
gender = rng.nextBoolean() == true ? 1 : 2;
|
||||
}
|
||||
|
||||
// now if it's 2 - a lady - feminize the 3 sequences
|
||||
if (gender == 2) {
|
||||
seq1 = markov2.generateWord();
|
||||
}
|
||||
else {
|
||||
seq1 = markov.generateWord();
|
||||
}
|
||||
|
||||
return seq1;
|
||||
}
|
||||
}
|
||||
@@ -32,9 +32,9 @@ import noppes.npcs.entity.EntityNPCInterface;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
public class CommonProxy implements IGuiHandler {
|
||||
|
||||
|
||||
public boolean newVersionAvailable = false;
|
||||
public int revision = 1;
|
||||
public int revision = 4;
|
||||
|
||||
public void load() {
|
||||
CustomNpcs.Channel.register(new PacketHandlerServer());
|
||||
|
||||
@@ -749,7 +749,7 @@ public class CustomItems {
|
||||
armor = new ItemNpcArmor(26922, armorEmerald,1,"fullemerald").setUnlocalizedName("npcFullEmeraldChest").setMaxStackSize(1).setTextureName("customnpcs:npcFullEmeraldChest");
|
||||
armor = new ItemNpcArmor(26923, armorEmerald,2,"fullemerald").setUnlocalizedName("npcFullEmeraldLeggings").setMaxStackSize(1).setTextureName("customnpcs:npcFullEmeraldLeggings");
|
||||
armor = new ItemNpcArmor(26924, armorEmerald,3,"fullemerald").setUnlocalizedName("npcFullEmeraldBoots").setMaxStackSize(1).setTextureName("customnpcs:npcFullEmeraldBoots");
|
||||
|
||||
|
||||
armor = new ItemNpcArmor(26880,ArmorMaterial.CLOTH,0,"fullwood").setUnlocalizedName("npcFullWoodenHead").setMaxStackSize(1).setTextureName("customnpcs:npcFullWoodenHead");
|
||||
armor = new ItemNpcArmor(26881,ArmorMaterial.CLOTH,1,"fullwood").setUnlocalizedName("npcFullWoodenChest").setMaxStackSize(1).setTextureName("customnpcs:npcFullWoodenChest");
|
||||
armor = new ItemNpcArmor(26882,ArmorMaterial.CLOTH,2,"fullwood").setUnlocalizedName("npcFullWoodenLeggings").setMaxStackSize(1).setTextureName("customnpcs:npcFullWoodenLeggings");
|
||||
|
||||
@@ -7,7 +7,11 @@ import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.*;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStartedEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStoppedEvent;
|
||||
import cpw.mods.fml.common.network.FMLEventChannel;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
@@ -22,7 +26,6 @@ import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import nikedemos.markovnames.generators.*;
|
||||
import noppes.npcs.config.ConfigLoader;
|
||||
import noppes.npcs.config.ConfigProp;
|
||||
import noppes.npcs.controllers.BankController;
|
||||
@@ -40,7 +43,15 @@ import noppes.npcs.controllers.ServerCloneController;
|
||||
import noppes.npcs.controllers.SpawnController;
|
||||
import noppes.npcs.controllers.TransportController;
|
||||
import noppes.npcs.enchants.EnchantInterface;
|
||||
import noppes.npcs.entity.*;
|
||||
import noppes.npcs.entity.EntityChairMount;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.EntityMagicProjectile;
|
||||
import noppes.npcs.entity.EntityNPCGolem;
|
||||
import noppes.npcs.entity.EntityNpcCrystal;
|
||||
import noppes.npcs.entity.EntityNpcDragon;
|
||||
import noppes.npcs.entity.EntityNpcPony;
|
||||
import noppes.npcs.entity.EntityNpcSlime;
|
||||
import noppes.npcs.entity.EntityProjectile;
|
||||
import noppes.npcs.entity.old.EntityNPCDwarfFemale;
|
||||
import noppes.npcs.entity.old.EntityNPCDwarfMale;
|
||||
import noppes.npcs.entity.old.EntityNPCElfFemale;
|
||||
@@ -60,7 +71,7 @@ import noppes.npcs.entity.old.EntityNpcNagaFemale;
|
||||
import noppes.npcs.entity.old.EntityNpcNagaMale;
|
||||
import noppes.npcs.entity.old.EntityNpcSkeleton;
|
||||
|
||||
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.2")
|
||||
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.7.10d")
|
||||
public class CustomNpcs {
|
||||
|
||||
@ConfigProp(info = "Disable Chat Bubbles")
|
||||
@@ -139,8 +150,6 @@ public class CustomNpcs {
|
||||
|
||||
public static ConfigLoader Config;
|
||||
|
||||
public static final MarkovGenerator[] MARKOV_GENERATOR = new MarkovGenerator[10];
|
||||
|
||||
public CustomNpcs() {
|
||||
instance = this;
|
||||
}
|
||||
@@ -202,8 +211,6 @@ public class CustomNpcs {
|
||||
registerNpc(EntityNPCGolem.class, "npcGolem");
|
||||
registerNpc(EntityCustomNpc.class, "CustomNpc");
|
||||
|
||||
|
||||
|
||||
registerNewEntity(EntityChairMount.class, "CustomNpcChairMount", 64, 10, false);
|
||||
registerNewEntity(EntityProjectile.class, "throwableitem", 64, 3, true);
|
||||
registerNewEntity(EntityMagicProjectile.class, "magicprojectile", 64, 3, true);
|
||||
@@ -217,22 +224,6 @@ public class CustomNpcs {
|
||||
PixelmonHelper.load();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void load(FMLInitializationEvent ev) {
|
||||
|
||||
MARKOV_GENERATOR[0] = new MarkovRoman(3);
|
||||
MARKOV_GENERATOR[1] = new MarkovJapanese(4);
|
||||
MARKOV_GENERATOR[2] = new MarkovSlavic(3);
|
||||
MARKOV_GENERATOR[3] = new MarkovWelsh(3);
|
||||
MARKOV_GENERATOR[4] = new MarkovSaami(3);
|
||||
MARKOV_GENERATOR[5] = new MarkovOldNorse(4);
|
||||
MARKOV_GENERATOR[6] = new MarkovAncientGreek(3);
|
||||
MARKOV_GENERATOR[7] = new MarkovAztec(3);
|
||||
MARKOV_GENERATOR[8] = new MarkovCustomNPCsClassic(3);
|
||||
MARKOV_GENERATOR[9] = new MarkovSpanish(3);
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void setAboutToStart(FMLServerAboutToStartEvent event) {
|
||||
ChunkController.instance.clear();
|
||||
|
||||
@@ -32,9 +32,6 @@ public class DataAI {
|
||||
public EnumNavType tacticalVariant = EnumNavType.Default;
|
||||
public int useRangeMelee = 0;
|
||||
public int tacticalRadius = 8;
|
||||
|
||||
// Fly Change
|
||||
// public int movementType = 0;
|
||||
|
||||
public EnumAnimation animationType = EnumAnimation.NONE;
|
||||
public EnumStandingType standingType = EnumStandingType.RotateBody;
|
||||
|
||||
@@ -19,38 +19,25 @@ public class DataDisplay {
|
||||
public String name;
|
||||
public String title = "";
|
||||
|
||||
private int markovGeneratorId = 8; //roman,japanese,slavic,welsh,sami,oldnorse,ancientgreek,aztec,classic,spanish (0 - 9 inclusively)
|
||||
private int markovGender = 0; //0:random, 1:male, 2:female
|
||||
|
||||
public byte skinType = 0; //0:normal, 1:player, 2:url, 3:url64
|
||||
|
||||
public byte skinType = 0; //0:normal, 1:player, 2:url
|
||||
public String url = "";
|
||||
|
||||
public GameProfile playerProfile;
|
||||
public String texture = "customnpcs:textures/entity/humanmale/Steve.png";
|
||||
public String texture = "customnpcs:textures/entity/humanmale/Steve.png";;
|
||||
public String cloakTexture = "";
|
||||
public String glowTexture = "";
|
||||
|
||||
public int visible = 0; //0:visible 1:Invisible 2:semi-invisible
|
||||
public int visible = 0;//0:visible 1:Invisible 2:semi-invisible
|
||||
|
||||
public int modelSize = 5;
|
||||
|
||||
public int showName = 0;
|
||||
|
||||
public int modelType = 0;
|
||||
|
||||
|
||||
public boolean disableLivingAnimation = false;
|
||||
|
||||
public byte showBossBar = 0;
|
||||
|
||||
|
||||
public DataDisplay(EntityNPCInterface npc){
|
||||
this.npc = npc;
|
||||
|
||||
/*
|
||||
Implementing MarkovNames generator. You can blame this blunder on Nikedemos.
|
||||
|
||||
Please refer to nikedemos.markovnames.generators.MarkovCustomNPCsClassic.java
|
||||
|
||||
String[] names = { "Noppes", "Noppes", "Noppes", "Noppes", "Atesson",
|
||||
"Rothcersul", "Achdranys", "Pegato", "Chald", "Gareld",
|
||||
"Nalworche", "Ineald", "Tia'kim", "Torerod", "Turturdar",
|
||||
@@ -61,41 +48,30 @@ public class DataDisplay {
|
||||
"Issraya", "Arisotura", "Honf", "Rilfom", "Estz", "Ghatroth",
|
||||
"Yosil", "Darage", "Aldny", "Tyltran", "Armos", "Loxiku",
|
||||
"Burhat", "Tinlt", "Ightyd", "Mia",
|
||||
"Ken", "Karla", "Lily", "Carina", "Daniel", "Slater", "Zidane", "Valentine", "Eirina",
|
||||
"Carnow", "Grave", "Shadow", "Drakken", "Kaoz", "Silk", "Drake", "Oldam", "Lynxx", "Lenyx",
|
||||
"Winter", "Seth", "Apolitho", "Amethyst", "Ankin", "Seinkan", "Ayumu", "Sakamoto", "Divina",
|
||||
"Div", "Magia", "Magnus", "Tiakono", "Ruin", "Hailinx", "Ethan", "Wate", "Carter", "William",
|
||||
"Ken", "Karla", "Lily", "Carina", "Daniel", "Slater", "Zidane", "Valentine", "Eirina",
|
||||
"Carnow", "Grave", "Shadow", "Drakken", "Kaoz", "Silk", "Drake", "Oldam", "Lynxx", "Lenyx",
|
||||
"Winter", "Seth", "Apolitho", "Amethyst", "Ankin", "Seinkan", "Ayumu", "Sakamoto", "Divina",
|
||||
"Div", "Magia", "Magnus", "Tiakono", "Ruin", "Hailinx", "Ethan", "Wate", "Carter", "William",
|
||||
"Brion", "Sparrow", "Basrrelen", "Gyaku", "Claire", "Crowfeather", "Blackwell", "Raven", "Farcri",
|
||||
"Lucas", "Bangheart", "Kamoku", "Kyoukan", "Blaze", "Benjamin", "Larianne", "Kakaragon",
|
||||
"Melancholy", "Epodyno", "Thanato", "Mika", "Dacks", "Ylander", "Neve", "Meadow", "Cuero",
|
||||
"Embrera", "Eldamore", "Faolan", "Chim", "Nasu", "Kathrine", "Ariel", "Arei", "Demytrix",
|
||||
"Kora", "Ava", "Larson", "Leonardo", "Wyrl", "Sakiama", "Lambton", "Kederath", "Malus", "Riplette",
|
||||
"Andern", "Ezall", "Lucien", "Droco", "Cray", "Tymen", "Zenix", "Entranger",
|
||||
"Saenorath", "Chris", "Christine", "Marble", "Mable", "Ross", "Rose", "Xalgan ", "Kennet", "Kamkeel"
|
||||
"Lucas", "Bangheart", "Kamoku", "Kyoukan", "Blaze", "Benjamin", "Larianne", "Kakaragon",
|
||||
"Melancholy", "Epodyno", "Thanato", "Mika", "Dacks", "Ylander", "Neve", "Meadow", "Cuero",
|
||||
"Embrera", "Eldamore", "Faolan", "Chim", "Nasu", "Kathrine", "Ariel", "Arei", "Demytrix",
|
||||
"Kora", "Ava", "Larson", "Leonardo", "Wyrl", "Sakiama", "Lambton", "Kederath", "Malus", "Riplette",
|
||||
"Andern", "Ezall", "Lucien", "Droco", "Cray", "Tymen", "Zenix", "Entranger",
|
||||
"Saenorath", "Chris", "Christine", "Marble", "Mable", "Ross", "Rose", "Xalgan ", "Kennet"
|
||||
};
|
||||
name = names[new Random().nextInt(names.length)];
|
||||
*/
|
||||
|
||||
markovGeneratorId = new Random().nextInt(CustomNpcs.MARKOV_GENERATOR.length-1);
|
||||
name = getRandomName();
|
||||
|
||||
}
|
||||
|
||||
public String getRandomName() {
|
||||
return CustomNpcs.MARKOV_GENERATOR[markovGeneratorId].fetch(markovGender);
|
||||
}
|
||||
|
||||
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound nbttagcompound) {
|
||||
nbttagcompound.setString("Name", name);
|
||||
nbttagcompound.setInteger("MarkovGeneratorId", markovGeneratorId);
|
||||
nbttagcompound.setInteger("MarkovGender", markovGender);
|
||||
nbttagcompound.setString("Title", title);
|
||||
nbttagcompound.setString("SkinUrl", url);
|
||||
nbttagcompound.setString("Texture", texture);
|
||||
nbttagcompound.setString("CloakTexture", cloakTexture);
|
||||
nbttagcompound.setString("GlowTexture", glowTexture);
|
||||
nbttagcompound.setByte("UsingSkinUrl", skinType);
|
||||
|
||||
|
||||
if (this.playerProfile != null)
|
||||
{
|
||||
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
@@ -104,7 +80,6 @@ public class DataDisplay {
|
||||
}
|
||||
|
||||
nbttagcompound.setInteger("Size", modelSize);
|
||||
nbttagcompound.setInteger("modelType", modelType);
|
||||
|
||||
nbttagcompound.setInteger("ShowName", showName);
|
||||
nbttagcompound.setInteger("NpcVisible", visible);
|
||||
@@ -115,15 +90,11 @@ public class DataDisplay {
|
||||
return nbttagcompound;
|
||||
}
|
||||
public void readToNBT(NBTTagCompound nbttagcompound) {
|
||||
setName(nbttagcompound.getString("Name"));
|
||||
setMarkovGeneratorId(nbttagcompound.getInteger("MarkovGeneratorId"));
|
||||
setMarkovGender(nbttagcompound.getInteger("MarkovGender"));
|
||||
|
||||
name = nbttagcompound.getString("Name");
|
||||
title = nbttagcompound.getString("Title");
|
||||
|
||||
url = nbttagcompound.getString("SkinUrl");
|
||||
|
||||
int prevSkinType = skinType;
|
||||
int prevSkinType = skinType;
|
||||
skinType = nbttagcompound.getByte("UsingSkinUrl");
|
||||
|
||||
this.playerProfile = null;
|
||||
@@ -144,8 +115,7 @@ public class DataDisplay {
|
||||
glowTexture = nbttagcompound.getString("GlowTexture");
|
||||
|
||||
modelSize = ValueUtil.CorrectInt(nbttagcompound.getInteger("Size"), 1, 30);
|
||||
modelType = nbttagcompound.getInteger("modelType");
|
||||
|
||||
|
||||
showName = nbttagcompound.getInteger("ShowName");
|
||||
visible = nbttagcompound.getInteger("NpcVisible");
|
||||
|
||||
@@ -182,49 +152,4 @@ public class DataDisplay {
|
||||
return false;
|
||||
return showName == 0 || (showName == 2 && npc.isAttacking());
|
||||
}
|
||||
|
||||
public String getSkinTexture(){
|
||||
return texture;
|
||||
}
|
||||
|
||||
public void setSkinTexture(String texture){
|
||||
if(this.texture.equals(texture))
|
||||
return;
|
||||
this.texture = texture;
|
||||
npc.textureLocation = null;
|
||||
skinType = 0;
|
||||
npc.updateClient = true;
|
||||
}
|
||||
|
||||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name){
|
||||
if(this.name.equals(name))
|
||||
return;
|
||||
this.name = name;
|
||||
npc.updateClient = true;
|
||||
}
|
||||
|
||||
public int getMarkovGender(){
|
||||
return markovGender;
|
||||
}
|
||||
|
||||
public void setMarkovGender(int gender) {
|
||||
if(markovGender == gender)
|
||||
return;
|
||||
this.markovGender = ValueUtil.CorrectInt(gender, 0, 2);
|
||||
}
|
||||
|
||||
public int getMarkovGeneratorId(){
|
||||
return markovGeneratorId;
|
||||
}
|
||||
|
||||
public void setMarkovGeneratorId(int id) {
|
||||
if(markovGeneratorId == id)
|
||||
return;
|
||||
this.markovGeneratorId = ValueUtil.CorrectInt(id, 0, CustomNpcs.MARKOV_GENERATOR.length-1);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -110,8 +110,14 @@ public class DataScript {
|
||||
ob = ScriptController.Instance.getScriptForEntity((Entity)ob);
|
||||
script.engine.put(obs[i].toString(), ob);
|
||||
}
|
||||
|
||||
return callScript(script);
|
||||
try {
|
||||
return callScript(script);
|
||||
}
|
||||
catch(Throwable e) {
|
||||
script.errored = true;
|
||||
script.appandConsole(e.getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isEnabled(){
|
||||
|
||||
@@ -27,18 +27,8 @@ public class ModelDataShared{
|
||||
|
||||
private HashMap<String,ModelPartData> parts = new HashMap<String,ModelPartData>();
|
||||
public byte breasts = 0;
|
||||
|
||||
// Enabled vs Disabled
|
||||
|
||||
public byte headwear = 2;
|
||||
public byte bodywear = 0;
|
||||
public byte armwear = 0;
|
||||
public byte legwear = 0;
|
||||
|
||||
// Hide Body Parts [0: None, 1: Both, 2: Right, 3: Left],
|
||||
public byte hideHead = 0;
|
||||
public byte hideBody = 0;
|
||||
public byte hideArms = 0;
|
||||
public byte hideLegs = 0;
|
||||
|
||||
public NBTTagCompound writeToNBT(){
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
@@ -54,11 +44,6 @@ public class ModelDataShared{
|
||||
compound.setTag("LegParts", legParts.writeToNBT());
|
||||
|
||||
compound.setByte("Headwear", headwear);
|
||||
compound.setByte("Bodywear", bodywear);
|
||||
|
||||
compound.setByte("Armwear", armwear);
|
||||
compound.setByte("Legwear", legwear);
|
||||
|
||||
compound.setByte("Breasts", breasts);
|
||||
compound.setTag("ExtraData", extra);
|
||||
|
||||
@@ -84,11 +69,6 @@ public class ModelDataShared{
|
||||
legParts.readFromNBT(compound.getCompoundTag("LegParts"));
|
||||
|
||||
headwear = compound.getByte("Headwear");
|
||||
bodywear = compound.getByte("Bodywear");
|
||||
|
||||
armwear = compound.getByte("Armwear");
|
||||
legwear = compound.getByte("Legwear");
|
||||
|
||||
breasts = compound.getByte("Breasts");
|
||||
extra = compound.getCompoundTag("ExtraData");
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ModelPartData {
|
||||
this.texture = texture;
|
||||
}
|
||||
else{
|
||||
this.texture = "customnpcs:textures/parts/"+ texture + ".png";
|
||||
this.texture = "moreplayermodels:textures/"+ texture + ".png";
|
||||
playerTexture = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,8 +324,7 @@ public class NoppesUtilServer {
|
||||
Map<String,Integer> map = new HashMap<String,Integer>();
|
||||
|
||||
if(type == EnumPlayerData.Players){
|
||||
File loc = PlayerDataController.instance.getSaveDir();
|
||||
for(String username : PlayerDataController.instance.getUsernameData().keySet()){
|
||||
for(String username : PlayerDataController.instance.nameUUIDs.keySet()){
|
||||
map.put(username, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@ public class EntityAIJob extends EntityAIBase {
|
||||
return false;
|
||||
return npc.jobInterface.aiShouldExecute();
|
||||
}
|
||||
|
||||
public void startExecuting()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void startExecuting(){
|
||||
npc.jobInterface.aiStartExecuting();
|
||||
}
|
||||
|
||||
@@ -29,12 +29,14 @@ public class EntityAIJob extends EntityAIBase {
|
||||
return false;
|
||||
return npc.jobInterface.aiContinueExecute();
|
||||
}
|
||||
|
||||
public void updateTask()
|
||||
{
|
||||
npc.jobInterface.aiUpdateTask();
|
||||
|
||||
@Override
|
||||
public void updateTask(){
|
||||
if(npc.jobInterface != null)
|
||||
npc.jobInterface.aiUpdateTask();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetTask() {
|
||||
if(npc.jobInterface != null)
|
||||
npc.jobInterface.resetTask();
|
||||
|
||||
@@ -105,8 +105,19 @@ import noppes.npcs.client.gui.roles.GuiNpcFollowerSetup;
|
||||
import noppes.npcs.client.gui.roles.GuiNpcItemGiver;
|
||||
import noppes.npcs.client.gui.roles.GuiNpcTraderSetup;
|
||||
import noppes.npcs.client.gui.roles.GuiNpcTransporter;
|
||||
import noppes.npcs.client.model.*;
|
||||
import noppes.npcs.client.renderer.*;
|
||||
import noppes.npcs.client.model.ModelNPCGolem;
|
||||
import noppes.npcs.client.model.ModelNpcCrystal;
|
||||
import noppes.npcs.client.model.ModelNpcDragon;
|
||||
import noppes.npcs.client.model.ModelNpcSlime;
|
||||
import noppes.npcs.client.model.ModelSkirtArmor;
|
||||
import noppes.npcs.client.renderer.NpcItemRenderer;
|
||||
import noppes.npcs.client.renderer.RenderCustomNpc;
|
||||
import noppes.npcs.client.renderer.RenderNPCHumanMale;
|
||||
import noppes.npcs.client.renderer.RenderNPCPony;
|
||||
import noppes.npcs.client.renderer.RenderNpcCrystal;
|
||||
import noppes.npcs.client.renderer.RenderNpcDragon;
|
||||
import noppes.npcs.client.renderer.RenderNpcSlime;
|
||||
import noppes.npcs.client.renderer.RenderProjectile;
|
||||
import noppes.npcs.client.renderer.blocks.BlockBannerRenderer;
|
||||
import noppes.npcs.client.renderer.blocks.BlockBarrelRenderer;
|
||||
import noppes.npcs.client.renderer.blocks.BlockBeamRenderer;
|
||||
@@ -150,7 +161,14 @@ import noppes.npcs.containers.ContainerNPCTraderSetup;
|
||||
import noppes.npcs.containers.ContainerNpcItemGiver;
|
||||
import noppes.npcs.containers.ContainerNpcQuestReward;
|
||||
import noppes.npcs.containers.ContainerNpcQuestTypeItem;
|
||||
import noppes.npcs.entity.*;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.EntityNPCGolem;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.entity.EntityNpcCrystal;
|
||||
import noppes.npcs.entity.EntityNpcDragon;
|
||||
import noppes.npcs.entity.EntityNpcPony;
|
||||
import noppes.npcs.entity.EntityNpcSlime;
|
||||
import noppes.npcs.entity.EntityProjectile;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
@@ -180,10 +198,7 @@ public class ClientProxy extends CommonProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityNpcDragon.class, new RenderNpcDragon(new ModelNpcDragon(0.0F), 0.5F));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityNpcSlime.class, new RenderNpcSlime(new ModelNpcSlime(16), new ModelNpcSlime(0), 0.25F));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityProjectile.class, new RenderProjectile());
|
||||
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityCustomNpc.class, new RenderCustomNpc());
|
||||
|
||||
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityNPCGolem.class, new RenderNPCHumanMale(
|
||||
new ModelNPCGolem(0), new ModelNPCGolem(1F), new ModelNPCGolem(0.5F)));
|
||||
FMLCommonHandler.instance().bus().register(new ClientTickHandler());
|
||||
@@ -191,7 +206,7 @@ public class ClientProxy extends CommonProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileBlockAnvil.class, new BlockCarpentryBenchRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileMailbox.class, new BlockMailboxRenderer());
|
||||
RenderingRegistry.registerBlockHandler(new BlockBorderRenderer());
|
||||
|
||||
|
||||
if(!CustomNpcs.DisableExtraBlock){
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileBanner.class, new BlockBannerRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileWallBanner.class, new BlockWallBannerRenderer());
|
||||
|
||||
@@ -1,22 +1,10 @@
|
||||
package noppes.npcs.client.controllers;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
import net.minecraft.block.BlockJukebox;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.ISound;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.audio.SoundHandler;
|
||||
import net.minecraft.client.audio.SoundManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemRecord;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.client.AssetsBrowser;
|
||||
|
||||
|
||||
public class MusicController {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class GuiNpcMobSpawner extends GuiNPCInterface implements IGuiData{
|
||||
|
||||
public GuiNpcMobSpawner(int i, int j, int k) {
|
||||
super();
|
||||
xSize = 384;
|
||||
xSize = 256;
|
||||
|
||||
posX = i;
|
||||
posY = j;
|
||||
@@ -56,7 +56,7 @@ public class GuiNpcMobSpawner extends GuiNPCInterface implements IGuiData{
|
||||
|
||||
if(scroll == null){
|
||||
scroll = new GuiCustomScroll(this,0);
|
||||
scroll.setSize(293, 188);
|
||||
scroll.setSize(165, 188);
|
||||
}
|
||||
else
|
||||
scroll.clear();
|
||||
@@ -64,7 +64,7 @@ public class GuiNpcMobSpawner extends GuiNPCInterface implements IGuiData{
|
||||
scroll.guiTop = guiTop + 26;
|
||||
addScroll(scroll);
|
||||
|
||||
addTextField(new GuiNpcTextField(1, this, fontRendererObj, guiLeft + 4, guiTop + 4, 293, 20, search));
|
||||
addTextField(new GuiNpcTextField(1, this, fontRendererObj, guiLeft + 4, guiTop + 4, 165, 20, search));
|
||||
|
||||
GuiMenuTopButton button;
|
||||
addTopButton(button = new GuiMenuTopButton(3,guiLeft + 4, guiTop - 17, "spawner.clones"));
|
||||
@@ -74,38 +74,28 @@ public class GuiNpcMobSpawner extends GuiNPCInterface implements IGuiData{
|
||||
addTopButton(button = new GuiMenuTopButton(5, button, "gui.server"));
|
||||
button.active = showingClones == 2;
|
||||
|
||||
addButton(new GuiNpcButton(1, guiLeft + 298, guiTop + 6, 82, 20, "item.monsterPlacer.name"));
|
||||
addButton(new GuiNpcButton(1, guiLeft + 170, guiTop + 6, 82, 20, "item.monsterPlacer.name"));
|
||||
|
||||
addButton(new GuiNpcButton(2, guiLeft + 298, guiTop + 100, 82, 20, "spawner.mobspawner"));
|
||||
addButton(new GuiNpcButton(2, guiLeft + 170, guiTop + 100, 82, 20, "spawner.mobspawner"));
|
||||
|
||||
if(showingClones == 0 || showingClones == 2){
|
||||
|
||||
addSideButton(new GuiMenuSideButton(21,guiLeft - 90, this.guiTop + 2, 90,22, "1"));
|
||||
addSideButton(new GuiMenuSideButton(22,guiLeft - 90, this.guiTop + 23, 90,22, "2"));
|
||||
addSideButton(new GuiMenuSideButton(23,guiLeft - 90, this.guiTop + 44, 90,22, "3"));
|
||||
addSideButton(new GuiMenuSideButton(24,guiLeft - 90, this.guiTop + 65, 90,22, "4"));
|
||||
addSideButton(new GuiMenuSideButton(25,guiLeft - 90, this.guiTop + 86, 90,22, "5"));
|
||||
addSideButton(new GuiMenuSideButton(26,guiLeft - 90, this.guiTop + 107, 45,22, "6"));
|
||||
addSideButton(new GuiMenuSideButton(27,guiLeft - 45, this.guiTop + 107, 45,22, "7"));
|
||||
addSideButton(new GuiMenuSideButton(28,guiLeft - 90, this.guiTop + 128, 45,22, "8"));
|
||||
addSideButton(new GuiMenuSideButton(29,guiLeft - 45, this.guiTop + 128, 45,22, "9"));
|
||||
addSideButton(new GuiMenuSideButton(30,guiLeft - 90, this.guiTop + 149, 45,22, "10"));
|
||||
addSideButton(new GuiMenuSideButton(31,guiLeft - 45, this.guiTop + 149, 45,22, "11"));
|
||||
addSideButton(new GuiMenuSideButton(32,guiLeft - 90, this.guiTop + 170, 45,22, "12"));
|
||||
addSideButton(new GuiMenuSideButton(33,guiLeft - 45, this.guiTop + 170, 45,22, "13"));
|
||||
addSideButton(new GuiMenuSideButton(34,guiLeft - 90, this.guiTop + 191, 45,22, "14"));
|
||||
addSideButton(new GuiMenuSideButton(35,guiLeft - 45, this.guiTop + 191, 45,22, "15"));
|
||||
|
||||
|
||||
|
||||
addButton(new GuiNpcButton(6, guiLeft + 298, guiTop + 190, 82, 20, "gui.remove"));
|
||||
|
||||
addSideButton(new GuiMenuSideButton(21,guiLeft - 69, this.guiTop + 2, 70,22, "Tab 1"));
|
||||
addSideButton(new GuiMenuSideButton(22,guiLeft - 69, this.guiTop + 23, 70,22, "Tab 2"));
|
||||
addSideButton(new GuiMenuSideButton(23,guiLeft - 69, this.guiTop + 44, 70,22, "Tab 3"));
|
||||
addSideButton(new GuiMenuSideButton(24,guiLeft - 69, this.guiTop + 65, 70,22, "Tab 4"));
|
||||
addSideButton(new GuiMenuSideButton(25,guiLeft - 69, this.guiTop + 86, 70,22, "Tab 5"));
|
||||
addSideButton(new GuiMenuSideButton(26,guiLeft - 69, this.guiTop + 107, 70,22, "Tab 6"));
|
||||
addSideButton(new GuiMenuSideButton(27,guiLeft - 69, this.guiTop + 128, 70,22, "Tab 7"));
|
||||
addSideButton(new GuiMenuSideButton(28,guiLeft - 69, this.guiTop + 149, 70,22, "Tab 8"));
|
||||
addSideButton(new GuiMenuSideButton(29,guiLeft - 69, this.guiTop + 170, 70,22, "Tab 9"));
|
||||
|
||||
addButton(new GuiNpcButton(6, guiLeft + 170, guiTop + 30, 82, 20, "gui.remove"));
|
||||
|
||||
getSideButton(20 + activeTab).active = true;
|
||||
showClones();
|
||||
}
|
||||
else{
|
||||
else
|
||||
showEntities();
|
||||
}
|
||||
}
|
||||
|
||||
private void showEntities() {
|
||||
@@ -129,6 +119,7 @@ public class GuiNpcMobSpawner extends GuiNPCInterface implements IGuiData{
|
||||
Client.sendData(EnumPacketServer.CloneList, activeTab);
|
||||
return;
|
||||
}
|
||||
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
this.list = ClientCloneController.Instance.getClones(activeTab);
|
||||
scroll.setList(getSearchList());
|
||||
|
||||
@@ -44,7 +44,7 @@ public class GuiNpcMobSpawnerAdd extends GuiNPCInterface implements GuiYesNoCall
|
||||
|
||||
|
||||
addLabel(new GuiNpcLabel(1, "Tab", guiLeft + 10, guiTop + 50));
|
||||
addButton(new GuiNpcButton(2, guiLeft + 40, guiTop + 45, 20, 20, new String[]{"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"}, tab - 1));
|
||||
addButton(new GuiNpcButton(2, guiLeft + 40, guiTop + 45, 20, 20, new String[]{"1","2","3","4","5","6","7","8","9"}, tab - 1));
|
||||
|
||||
addButton(new GuiNpcButton(3, guiLeft + 4, guiTop + 95, new String[]{"Client side", "Server side"}, serverSide?1:0));
|
||||
|
||||
|
||||
@@ -82,21 +82,15 @@ public class GuiNpcMobSpawnerMounter extends GuiNPCInterface implements IGuiData
|
||||
addButton(new GuiNpcButton(2, guiLeft + 170, guiTop + 50, 82, 20, "spawner.mountplayer"));
|
||||
|
||||
if(showingClones == 0 || showingClones == 2){
|
||||
addSideButton(new GuiMenuSideButton(21,guiLeft - 90, this.guiTop + 2, 90,22, "1"));
|
||||
addSideButton(new GuiMenuSideButton(22,guiLeft - 90, this.guiTop + 23, 90,22, "2"));
|
||||
addSideButton(new GuiMenuSideButton(23,guiLeft - 90, this.guiTop + 44, 90,22, "3"));
|
||||
addSideButton(new GuiMenuSideButton(24,guiLeft - 90, this.guiTop + 65, 90,22, "4"));
|
||||
addSideButton(new GuiMenuSideButton(25,guiLeft - 90, this.guiTop + 86, 90,22, "5"));
|
||||
addSideButton(new GuiMenuSideButton(26,guiLeft - 45, this.guiTop + 107, 45,22, "6"));
|
||||
addSideButton(new GuiMenuSideButton(27,guiLeft - 90, this.guiTop + 107, 45,22, "7"));
|
||||
addSideButton(new GuiMenuSideButton(28,guiLeft - 45, this.guiTop + 128, 45,22, "8"));
|
||||
addSideButton(new GuiMenuSideButton(29,guiLeft - 90, this.guiTop + 128, 45,22, "9"));
|
||||
addSideButton(new GuiMenuSideButton(30,guiLeft - 45, this.guiTop + 149, 45,22, "10"));
|
||||
addSideButton(new GuiMenuSideButton(31,guiLeft - 90, this.guiTop + 149, 45,22, "11"));
|
||||
addSideButton(new GuiMenuSideButton(32,guiLeft - 45, this.guiTop + 170, 45,22, "12"));
|
||||
addSideButton(new GuiMenuSideButton(33,guiLeft - 90, this.guiTop + 170, 45,22, "13"));
|
||||
addSideButton(new GuiMenuSideButton(34,guiLeft - 45, this.guiTop + 191, 45,22, "14"));
|
||||
addSideButton(new GuiMenuSideButton(35,guiLeft - 90, this.guiTop + 191, 45,22, "15"));
|
||||
addSideButton(new GuiMenuSideButton(21,guiLeft - 69, this.guiTop + 2, 70,22, "Tab 1"));
|
||||
addSideButton(new GuiMenuSideButton(22,guiLeft - 69, this.guiTop + 23, 70,22, "Tab 2"));
|
||||
addSideButton(new GuiMenuSideButton(23,guiLeft - 69, this.guiTop + 44, 70,22, "Tab 3"));
|
||||
addSideButton(new GuiMenuSideButton(24,guiLeft - 69, this.guiTop + 65, 70,22, "Tab 4"));
|
||||
addSideButton(new GuiMenuSideButton(25,guiLeft - 69, this.guiTop + 86, 70,22, "Tab 5"));
|
||||
addSideButton(new GuiMenuSideButton(26,guiLeft - 69, this.guiTop + 107, 70,22, "Tab 6"));
|
||||
addSideButton(new GuiMenuSideButton(27,guiLeft - 69, this.guiTop + 128, 70,22, "Tab 7"));
|
||||
addSideButton(new GuiMenuSideButton(28,guiLeft - 69, this.guiTop + 149, 70,22, "Tab 8"));
|
||||
addSideButton(new GuiMenuSideButton(29,guiLeft - 69, this.guiTop + 170, 70,22, "Tab 9"));
|
||||
|
||||
getSideButton(20 + activeTab).active = true;
|
||||
showClones();
|
||||
|
||||
@@ -59,22 +59,16 @@ public class GuiNpcMobSpawnerSelector extends SubGuiInterface implements IGuiDat
|
||||
|
||||
addButton(new GuiNpcButton(0, guiLeft + 171, guiTop + 80, 80, 20, "gui.done"));
|
||||
addButton(new GuiNpcButton(1, guiLeft + 171, guiTop + 103, 80, 20, "gui.cancel"));
|
||||
|
||||
addSideButton(new GuiMenuSideButton(21,guiLeft - 90, this.guiTop + 2, 90,22, "1"));
|
||||
addSideButton(new GuiMenuSideButton(22,guiLeft - 90, this.guiTop + 23, 90,22, "2"));
|
||||
addSideButton(new GuiMenuSideButton(23,guiLeft - 90, this.guiTop + 44, 90,22, "3"));
|
||||
addSideButton(new GuiMenuSideButton(24,guiLeft - 90, this.guiTop + 65, 90,22, "4"));
|
||||
addSideButton(new GuiMenuSideButton(25,guiLeft - 90, this.guiTop + 86, 90,22, "5"));
|
||||
addSideButton(new GuiMenuSideButton(26,guiLeft - 45, this.guiTop + 107, 45,22, "6"));
|
||||
addSideButton(new GuiMenuSideButton(27,guiLeft - 90, this.guiTop + 107, 45,22, "7"));
|
||||
addSideButton(new GuiMenuSideButton(28,guiLeft - 45, this.guiTop + 128, 45,22, "8"));
|
||||
addSideButton(new GuiMenuSideButton(29,guiLeft - 90, this.guiTop + 128, 45,22, "9"));
|
||||
addSideButton(new GuiMenuSideButton(30,guiLeft - 45, this.guiTop + 149, 45,22, "10"));
|
||||
addSideButton(new GuiMenuSideButton(31,guiLeft - 90, this.guiTop + 149, 45,22, "11"));
|
||||
addSideButton(new GuiMenuSideButton(32,guiLeft - 45, this.guiTop + 170, 45,22, "12"));
|
||||
addSideButton(new GuiMenuSideButton(33,guiLeft - 90, this.guiTop + 170, 45,22, "13"));
|
||||
addSideButton(new GuiMenuSideButton(34,guiLeft - 45, this.guiTop + 191, 45,22, "14"));
|
||||
addSideButton(new GuiMenuSideButton(35,guiLeft - 90, this.guiTop + 191, 45,22, "15"));
|
||||
|
||||
addSideButton(new GuiMenuSideButton(21,guiLeft - 69, this.guiTop + 2, 70,22, "Tab 1"));
|
||||
addSideButton(new GuiMenuSideButton(22,guiLeft - 69, this.guiTop + 23, 70,22, "Tab 2"));
|
||||
addSideButton(new GuiMenuSideButton(23,guiLeft - 69, this.guiTop + 44, 70,22, "Tab 3"));
|
||||
addSideButton(new GuiMenuSideButton(24,guiLeft - 69, this.guiTop + 65, 70,22, "Tab 4"));
|
||||
addSideButton(new GuiMenuSideButton(25,guiLeft - 69, this.guiTop + 86, 70,22, "Tab 5"));
|
||||
addSideButton(new GuiMenuSideButton(26,guiLeft - 69, this.guiTop + 107, 70,22, "Tab 6"));
|
||||
addSideButton(new GuiMenuSideButton(27,guiLeft - 69, this.guiTop + 128, 70,22, "Tab 7"));
|
||||
addSideButton(new GuiMenuSideButton(28,guiLeft - 69, this.guiTop + 149, 70,22, "Tab 8"));
|
||||
addSideButton(new GuiMenuSideButton(29,guiLeft - 69, this.guiTop + 170, 70,22, "Tab 9"));
|
||||
|
||||
getSideButton(20 + activeTab).active = true;
|
||||
showClones();
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
package noppes.npcs.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import noppes.npcs.DataDisplay;
|
||||
import noppes.npcs.client.gui.mainmenu.GuiNpcDisplay;
|
||||
import noppes.npcs.client.gui.util.*;
|
||||
|
||||
public class SubGuiNpcName extends SubGuiInterface implements ITextfieldListener {
|
||||
private DataDisplay display;
|
||||
public SubGuiNpcName(DataDisplay display){
|
||||
this.display = display;
|
||||
setBackground("menubg.png");
|
||||
xSize = 256;
|
||||
ySize = 216;
|
||||
closeOnEsc = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui(){
|
||||
super.initGui();
|
||||
int y = guiTop + 4;
|
||||
addButton(new GuiNpcButton(66, guiLeft + xSize - 24, y, 20, 20, "X"));
|
||||
|
||||
addTextField(new GuiNpcTextField(0,this, fontRendererObj, guiLeft + 4, y += 50, 226, 20, display.name));
|
||||
this.addButton(new GuiButtonBiDirectional(1, guiLeft + 4, y += 22 , 200, 20, new String[] {"markov.roman.name", "markov.japanese.name", "markov.slavic.name", "markov.welsh.name", "markov.sami.name", "markov.oldNorse.name", "markov.ancientGreek.name", "markov.aztec.name", "markov.classicCNPCs.name", "markov.spanish.name"}, display.getMarkovGeneratorId()));
|
||||
|
||||
this.addButton(new GuiButtonBiDirectional(2, guiLeft + 64, y += 22 , 120, 20, new String[] {"markov.gender.either", "markov.gender.male", "markov.gender.female"}, display.getMarkovGender()));
|
||||
addLabel(new GuiNpcLabel(2,"markov.gender.name", guiLeft + 5, y + 5));
|
||||
|
||||
addButton(new GuiNpcButton(3, guiLeft + 4, y += 42, 70, 20, "markov.generate"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unFocused(GuiNpcTextField textfield) {
|
||||
if(textfield.id == 0){
|
||||
if(!textfield.isEmpty())
|
||||
display.setName(textfield.getText());
|
||||
else
|
||||
textfield.setText(display.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton guibutton){
|
||||
GuiNpcButton button = (GuiNpcButton) guibutton;
|
||||
|
||||
if(button.id == 1) {
|
||||
display.setMarkovGeneratorId(button.getValue());
|
||||
}
|
||||
if(button.id == 2) {
|
||||
display.setMarkovGender(button.getValue());
|
||||
}
|
||||
if(button.id == 3) {
|
||||
String name = display.getRandomName();
|
||||
display.setName(name);
|
||||
getTextField(0).setText(name);
|
||||
((GuiNpcDisplay)parent).nameText.setText(name);
|
||||
}
|
||||
if(button.id == 66){
|
||||
close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,14 @@ import noppes.npcs.client.NoppesUtil;
|
||||
import noppes.npcs.client.gui.GuiNPCTextures;
|
||||
import noppes.npcs.client.gui.GuiNpcTextureCloaks;
|
||||
import noppes.npcs.client.gui.GuiNpcTextureOverlays;
|
||||
import noppes.npcs.client.gui.SubGuiNpcName;
|
||||
import noppes.npcs.client.gui.model.GuiCreationScreen;
|
||||
import noppes.npcs.client.gui.util.*;
|
||||
import noppes.npcs.client.gui.util.GuiHoverText;
|
||||
import noppes.npcs.client.gui.util.GuiNPCInterface2;
|
||||
import noppes.npcs.client.gui.util.GuiNpcButton;
|
||||
import noppes.npcs.client.gui.util.GuiNpcLabel;
|
||||
import noppes.npcs.client.gui.util.GuiNpcTextField;
|
||||
import noppes.npcs.client.gui.util.IGuiData;
|
||||
import noppes.npcs.client.gui.util.ITextfieldListener;
|
||||
import noppes.npcs.constants.EnumPacketServer;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
@@ -20,7 +25,6 @@ import noppes.npcs.entity.EntityNPCInterface;
|
||||
public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListener, IGuiData{
|
||||
|
||||
private DataDisplay display;
|
||||
public GuiNpcTextField nameText;
|
||||
|
||||
public GuiNpcDisplay(EntityNPCInterface npc) {
|
||||
super(npc,1);
|
||||
@@ -31,20 +35,9 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
|
||||
public void initGui(){
|
||||
super.initGui();
|
||||
int y = guiTop + 4;
|
||||
|
||||
// Old Implementation
|
||||
// addLabel(new GuiNpcLabel(0,"gui.name", guiLeft + 5, y + 5));
|
||||
// addTextField(new GuiNpcTextField(0,this, fontRendererObj, guiLeft + 50, y, 200, 20, display.name));
|
||||
// this.addButton(new GuiNpcButton(0, guiLeft + 253, y , 110, 20, new String[]{"display.show","display.hide","display.showAttacking"} ,display.showName));
|
||||
|
||||
addLabel(new GuiNpcLabel(0,"gui.name", guiLeft + 5, y + 5));
|
||||
nameText = new GuiNpcTextField(0,this, fontRendererObj, guiLeft + 50, y, 206, 20, display.name);
|
||||
addTextField(nameText);
|
||||
this.addButton(new GuiNpcButton(0, guiLeft + 253+52, y , 110, 20, new String[]{"display.show","display.hide","display.showAttacking"} ,display.showName));
|
||||
|
||||
|
||||
this.addButton(new GuiNpcButton(14, guiLeft + 259, y , 20, 20, Character.toString('\u21bb')));
|
||||
this.addButton(new GuiNpcButton(15, guiLeft + 259 + 22, y , 20, 20, Character.toString('\u22EE')));
|
||||
addLabel(new GuiNpcLabel(0,"gui.name", guiLeft + 5, y + 5));
|
||||
addTextField(new GuiNpcTextField(0,this, fontRendererObj, guiLeft + 50, y, 200, 20, display.name));
|
||||
this.addButton(new GuiNpcButton(0, guiLeft + 253, y , 110, 20, new String[]{"display.show","display.hide","display.showAttacking"} ,display.showName));
|
||||
|
||||
y+=23;
|
||||
addLabel(new GuiNpcLabel(11,"gui.title", guiLeft + 5, y + 5));
|
||||
@@ -63,7 +56,7 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
|
||||
addLabel(new GuiNpcLabel(4,"display.texture", guiLeft + 5, y + 5));
|
||||
addTextField(new GuiNpcTextField(3,this, fontRendererObj, guiLeft + 80, y, 200, 20, display.skinType == 0?display.texture:display.url));
|
||||
this.addButton(new GuiNpcButton(3, guiLeft + 325, y, 38, 20, "mco.template.button.select"));
|
||||
this.addButton(new GuiNpcButton(2, guiLeft + 283, y, 40, 20, new String[]{"display.texture","display.player", "display.url", "display.urlSix"},display.skinType));
|
||||
this.addButton(new GuiNpcButton(2, guiLeft + 283, y, 40, 20, new String[]{"display.texture","display.player", "display.url"},display.skinType));
|
||||
getButton(3).setEnabled(display.skinType == 0);
|
||||
if(display.skinType == 1 && display.playerProfile != null)
|
||||
getTextField(3).setText(display.playerProfile.getName());
|
||||
@@ -80,17 +73,18 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
|
||||
|
||||
y+=23;
|
||||
addLabel(new GuiNpcLabel(5,"display.livingAnimation", guiLeft + 5, y + 5));
|
||||
this.addButton(new GuiNpcButton(5, guiLeft + 120, y, 50, 20, new String[]{"gui.yes","gui.no"}, display.disableLivingAnimation?1:0));
|
||||
this.addButton(new GuiNpcButton(5, guiLeft + 120, y, 50, 20, new String[]{"gui.yes","gui.no"},display.disableLivingAnimation?1:0));
|
||||
|
||||
y+=23;
|
||||
y+=23;
|
||||
addLabel(new GuiNpcLabel(7,"display.visible", guiLeft + 5, y + 5));
|
||||
this.addButton(new GuiNpcButton(7, guiLeft + 120, y, 50, 20, new String[]{"gui.yes","gui.no","gui.partly"}, display.visible));
|
||||
|
||||
y+=23;
|
||||
addLabel(new GuiNpcLabel(10,"display.bossbar", guiLeft + 5, y + 5));
|
||||
this.addButton(new GuiNpcButton(10, guiLeft + 120, y, 110, 20, new String[]{"display.hide","display.show","display.showAttacking"}, display.showBossBar));
|
||||
|
||||
}
|
||||
|
||||
//addExtra(new GuiHoverText(0, "testing", guiLeft, guiTop));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unFocused(GuiNpcTextField textfield){
|
||||
@@ -104,10 +98,8 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
|
||||
display.modelSize = textfield.getInteger();
|
||||
}
|
||||
else if(textfield.id == 3){
|
||||
// SKIN CHANGE
|
||||
if(display.skinType == 2 || display.skinType == 3){
|
||||
if(display.skinType == 2)
|
||||
display.url = textfield.getText();
|
||||
}
|
||||
else if(display.skinType == 1){
|
||||
if(!textfield.isEmpty()){
|
||||
display.playerProfile = new GameProfile(null, textfield.getText());
|
||||
@@ -141,11 +133,7 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
|
||||
}
|
||||
if(button.id == 2){
|
||||
display.skinType = (byte) button.getValue();
|
||||
// System.out.println("Skin Type set to:" + display.skinType);
|
||||
// SKIN CHANGE
|
||||
if (display.skinType != 3){
|
||||
display.url = "";
|
||||
}
|
||||
display.url = "";
|
||||
display.playerProfile = null;
|
||||
initGui();
|
||||
}
|
||||
@@ -158,9 +146,6 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
|
||||
else if(button.id == 7){
|
||||
display.visible = button.getValue();
|
||||
}
|
||||
// else if(button.id == 300){
|
||||
// display.squareTexture = (byte)button.getValue();
|
||||
// }
|
||||
else if(button.id == 8){
|
||||
NoppesUtil.openGUI(player, new GuiNpcTextureCloaks(npc, this));
|
||||
}
|
||||
@@ -170,14 +155,6 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
|
||||
else if(button.id == 10){
|
||||
display.showBossBar = (byte)button.getValue();
|
||||
}
|
||||
else if(button.id == 14){
|
||||
String name = display.getRandomName();
|
||||
display.setName(name);
|
||||
getTextField(0).setText(name);
|
||||
}
|
||||
else if(button.id == 15){
|
||||
setSubGui(new SubGuiNpcName(display));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,7 +33,6 @@ import noppes.npcs.controllers.PixelmonHelper;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.EntityFakeLiving;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import org.lwjgl.Sys;
|
||||
|
||||
public class GuiCreationScreen extends GuiModelInterface implements ICustomScrollListener{
|
||||
|
||||
@@ -42,7 +41,7 @@ public class GuiCreationScreen extends GuiModelInterface implements ICustomScrol
|
||||
private final String[] ignoredTags = {"CanBreakDoors", "Bred", "PlayerCreated", "Tame", "HasReproduced"};
|
||||
|
||||
private GuiNpcButton prev,next;
|
||||
|
||||
|
||||
private GuiScreen parent;
|
||||
|
||||
private HashMap<Integer, String> mapped = new HashMap<Integer, String>();
|
||||
@@ -62,7 +61,7 @@ public class GuiCreationScreen extends GuiModelInterface implements ICustomScrol
|
||||
e.printStackTrace();
|
||||
} catch (NoSuchMethodException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
list = new ArrayList<String>(data.keySet());
|
||||
Collections.sort(list,String.CASE_INSENSITIVE_ORDER);
|
||||
}
|
||||
@@ -110,9 +109,6 @@ public class GuiCreationScreen extends GuiModelInterface implements ICustomScrol
|
||||
|
||||
addButton(new GuiNpcButton(7, guiLeft + 50, y += 22, 50, 20, "selectServer.edit"));
|
||||
addLabel(new GuiNpcLabel(4, "Legs", guiLeft, y + 5, 0xFFFFFF));
|
||||
|
||||
addButton(new GuiNpcButton(250, guiLeft + 50, y += 22, 50, 20, new String[]{"Default","Steve64","Alex"}, this.npc.display.modelType));
|
||||
addLabel(new GuiNpcLabel(250, "Model", guiLeft, y + 5, 0xFFFFFF));
|
||||
|
||||
addButton(new GuiNpcButton(44, guiLeft + 310, guiTop + 14, 80, 20, "Save Model"));
|
||||
addButton(new GuiNpcButton(45, guiLeft + 310, guiTop + 36, 80, 20, "Load Model"));
|
||||
@@ -252,7 +248,7 @@ public class GuiCreationScreen extends GuiModelInterface implements ICustomScrol
|
||||
}
|
||||
|
||||
if(button.id == 1){
|
||||
this.mc.displayGuiScreen(new GuiEntitySelection(this, playerdata, npc));
|
||||
this.mc.displayGuiScreen(new GuiEntitySelection(this, playerdata,npc));
|
||||
}
|
||||
|
||||
if(button.id == 4){
|
||||
@@ -267,27 +263,6 @@ public class GuiCreationScreen extends GuiModelInterface implements ICustomScrol
|
||||
if(button.id == 7){
|
||||
this.mc.displayGuiScreen(new GuiModelLegs(this, npc));
|
||||
}
|
||||
|
||||
// New Button for Changing Models
|
||||
// URL Swapper
|
||||
if(button.id == 250){
|
||||
if(npc.display.modelType == 0){
|
||||
if (npc.display.skinType == 2){
|
||||
npc.display.skinType = 3;
|
||||
}
|
||||
npc.display.modelType = 1;
|
||||
}
|
||||
else if(npc.display.modelType == 1){
|
||||
npc.display.modelType = 2;
|
||||
}
|
||||
else {
|
||||
if (npc.display.skinType == 3){
|
||||
npc.display.skinType = 2;
|
||||
}
|
||||
npc.display.modelType = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(button.id == 8){
|
||||
this.mc.displayGuiScreen(new GuiModelScale(this, playerdata, npc));
|
||||
}
|
||||
|
||||
@@ -46,9 +46,8 @@ public class GuiEntitySelection extends GuiNPCInterface
|
||||
list.add("CustomNPC");
|
||||
Collections.sort(list,String.CASE_INSENSITIVE_ORDER);
|
||||
slot = new GuiNPCStringSlot(list,this,false,18);
|
||||
if(playerdata.getEntityClass() != null){
|
||||
slot.selected = (String) EntityList.classToStringMapping.get(playerdata.getEntityClass());
|
||||
}
|
||||
if(playerdata.getEntityClass() != null)
|
||||
slot.selected = (String) EntityList.classToStringMapping.get(playerdata.getEntityClass());
|
||||
else{
|
||||
slot.selected = "CustomNPC";
|
||||
}
|
||||
@@ -120,7 +119,6 @@ public class GuiEntitySelection extends GuiNPCInterface
|
||||
playerdata.setEntityClass(parent.data.get(slot.selected));
|
||||
EntityLivingBase entity = playerdata.getEntity(npc);
|
||||
if(entity != null){
|
||||
npc.display.modelType = 0;
|
||||
RendererLivingEntity render = (RendererLivingEntity) RenderManager.instance.getEntityRenderObject(entity);
|
||||
npc.display.texture = NPCRendererHelper.getTexture(render,entity);
|
||||
}
|
||||
|
||||
@@ -10,9 +10,7 @@ import noppes.npcs.entity.EntityCustomNpc;
|
||||
|
||||
public class GuiModelArms extends GuiModelInterface{
|
||||
|
||||
private final String[] arrArm = new String[]{"gui.no","Both","Right","Left"};
|
||||
private final String[] arrArmwear = new String[]{"gui.no","Both","Left","Right"};
|
||||
private final String[] arrClaws = new String[]{"gui.no","Both","Left","Right"};
|
||||
private final String[] arrParticles = new String[]{"gui.no","Both","Left","Right"};
|
||||
|
||||
private GuiScreen parent;
|
||||
public GuiModelArms(GuiScreen parent, EntityCustomNpc npc){
|
||||
@@ -26,16 +24,8 @@ public class GuiModelArms extends GuiModelInterface{
|
||||
super.initGui();
|
||||
int y = guiTop + 20;
|
||||
|
||||
addButton(new GuiNpcButton(30, guiLeft + 50, y += 22, 70, 20, arrArm, playerdata.hideArms));
|
||||
addLabel(new GuiNpcLabel(30, "Hide", guiLeft, y + 5, 0xFFFFFF));
|
||||
|
||||
if (npc.display.modelType == 1 || npc.display.modelType == 2) {
|
||||
addButton(new GuiNpcButton(8, guiLeft + 50, y += 22, 70, 20, arrArmwear, playerdata.armwear));
|
||||
addLabel(new GuiNpcLabel(8, "Armwear", guiLeft, y + 5, 0xFFFFFF));
|
||||
}
|
||||
|
||||
ModelPartData claws = playerdata.getPartData("claws");
|
||||
addButton(new GuiNpcButton(0, guiLeft + 50, y += 22, 70, 20, arrClaws, claws == null?0:claws.type + 1));
|
||||
addButton(new GuiNpcButton(0, guiLeft + 50, y += 22, 70, 20, arrParticles, claws == null?0:claws.type + 1));
|
||||
addLabel(new GuiNpcLabel(0, "Claws", guiLeft, y + 5, 0xFFFFFF));
|
||||
if(claws != null)
|
||||
addButton(new GuiNpcButton(10, guiLeft + 122, y, 40, 20, claws.getColor()));
|
||||
@@ -47,12 +37,6 @@ public class GuiModelArms extends GuiModelInterface{
|
||||
super.actionPerformed(btn);
|
||||
GuiNpcButton button = (GuiNpcButton) btn;
|
||||
|
||||
if(button.id == 8){
|
||||
playerdata.armwear = (byte) button.getValue();
|
||||
}
|
||||
if(button.id == 30){
|
||||
playerdata.hideArms = (byte) button.getValue();
|
||||
}
|
||||
if(button.id == 0){
|
||||
if(button.getValue() == 0)
|
||||
playerdata.removePart("claws");
|
||||
|
||||
@@ -11,14 +11,10 @@ import noppes.npcs.entity.EntityCustomNpc;
|
||||
public class GuiModelBody extends GuiModelInterface{
|
||||
|
||||
private GuiScreen parent;
|
||||
private final String[] arrBody = new String[]{"gui.no","gui.yes"};
|
||||
private final String[] arrBodywear = new String[]{"gui.no","gui.yes"};
|
||||
private final String[] arrWing = new String[]{"gui.no","Player","Type1","Type2","Type3","Type4","Type5","Type6","Type7","Type8","Type9",
|
||||
"Type10","Type11","Type12","Type13"};
|
||||
private final String[] arrWing = new String[]{"gui.no","Player","Type1","Type2","Type3"};
|
||||
private final String[] arrBreasts = new String[]{"gui.no","Type1","Type2","Type3"};
|
||||
private final String[] arrParticles = new String[]{"gui.no","Player","Type1", "Type2", "Rainbow", "Type3", "Type4", "Type5", "Type6", "Type7"};
|
||||
private final String[] arrfins = new String[]{"gui.no","Player","Type1","Type2","Type3","Type4","Type5","Type6"};
|
||||
private final String[] arrskirt = new String[]{"gui.no","Player","Type1"};
|
||||
private final String[] arrParticles = new String[]{"gui.no","Player","Type1","Type2", "Rainbow"};
|
||||
private final String[] arrfins = new String[]{"gui.no","Player","Type1"};
|
||||
|
||||
public GuiModelBody(GuiScreen parent, EntityCustomNpc npc){
|
||||
super(npc);
|
||||
@@ -29,17 +25,7 @@ public class GuiModelBody extends GuiModelInterface{
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
int y = guiTop + 20;
|
||||
|
||||
addButton(new GuiNpcButton(30, guiLeft + 50, y += 22, 70, 20, arrBody, playerdata.hideBody));
|
||||
addLabel(new GuiNpcLabel(30, "Hide", guiLeft, y + 5, 0xFFFFFF));
|
||||
|
||||
if (npc.display.modelType == 1 || npc.display.modelType == 2) {
|
||||
addButton(new GuiNpcButton(8, guiLeft + 50, y += 22, 70, 20, arrBodywear, playerdata.bodywear));
|
||||
addLabel(new GuiNpcLabel(8, "Bodywear", guiLeft, y + 5, 0xFFFFFF));
|
||||
}
|
||||
|
||||
addButton(new GuiNpcButton(1, guiLeft + 50, y += 22, 70, 20, arrBreasts, playerdata.breasts));
|
||||
addLabel(new GuiNpcLabel(1, "Breasts", guiLeft, y + 5, 0xFFFFFF));
|
||||
|
||||
@@ -61,56 +47,13 @@ public class GuiModelBody extends GuiModelInterface{
|
||||
if(fin != null)
|
||||
addButton(new GuiNpcButton(13, guiLeft + 122, y, 40, 20, fin.getColor()));
|
||||
|
||||
ModelPartData skirt = playerdata.getPartData("skirt");
|
||||
addButton(new GuiNpcButton(4, guiLeft + 50, y += 22, 70, 20, arrskirt, getSkirtindex(skirt)));
|
||||
addLabel(new GuiNpcLabel(4, "Skirt", guiLeft, y + 5, 0xFFFFFF));
|
||||
if(skirt != null)
|
||||
addButton(new GuiNpcButton(14, guiLeft + 122, y, 40, 20, skirt.getColor()));
|
||||
}
|
||||
|
||||
|
||||
private int getFinIndex(ModelPartData fin) {
|
||||
if(fin == null)
|
||||
return 0;
|
||||
if(fin.type == 0){
|
||||
if(fin.playerTexture)
|
||||
return 1;
|
||||
if(fin.texture.contains("1"))
|
||||
return 2;
|
||||
if(fin.texture.contains("2"))
|
||||
return 3;
|
||||
if(fin.texture.contains("3"))
|
||||
return 4;
|
||||
if(fin.texture.contains("4"))
|
||||
return 5;
|
||||
if(fin.texture.contains("5"))
|
||||
return 6;
|
||||
if(fin.texture.contains("6"))
|
||||
return 7;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int getSkirtindex(ModelPartData skirt) {
|
||||
if(skirt == null)
|
||||
return 0;
|
||||
if(skirt.type == 0){
|
||||
if(skirt.playerTexture)
|
||||
return 1;
|
||||
if(skirt.texture.contains("1"))
|
||||
return 2;
|
||||
if(skirt.texture.contains("2"))
|
||||
return 3;
|
||||
if(skirt.texture.contains("3"))
|
||||
return 4;
|
||||
if(skirt.texture.contains("4"))
|
||||
return 5;
|
||||
if(skirt.texture.contains("5"))
|
||||
return 6;
|
||||
if(skirt.texture.contains("6"))
|
||||
return 7;
|
||||
}
|
||||
return 0;
|
||||
if(fin == null)
|
||||
return 0;
|
||||
return fin.playerTexture?1:2;
|
||||
}
|
||||
|
||||
private int getParticleIndex(ModelPartData particles) {
|
||||
@@ -123,16 +66,6 @@ public class GuiModelBody extends GuiModelInterface{
|
||||
return 2;
|
||||
if(particles.texture.contains("2"))
|
||||
return 3;
|
||||
if(particles.texture.contains("3"))
|
||||
return 5;
|
||||
if(particles.texture.contains("4"))
|
||||
return 6;
|
||||
if(particles.texture.contains("5"))
|
||||
return 7;
|
||||
if(particles.texture.contains("6"))
|
||||
return 8;
|
||||
if(particles.texture.contains("7"))
|
||||
return 9;
|
||||
}
|
||||
if(particles.type == 1){
|
||||
return 4;
|
||||
@@ -173,66 +106,23 @@ public class GuiModelBody extends GuiModelInterface{
|
||||
particles.setTexture("particle/type2", 0);
|
||||
if(value == 4)
|
||||
particles.setTexture("", 1);
|
||||
if(value == 5)
|
||||
particles.setTexture("particle/type3", 0);
|
||||
if(value == 6)
|
||||
particles.setTexture("particle/type4", 0);
|
||||
if(value == 7)
|
||||
particles.setTexture("particle/type5", 0);
|
||||
if(value == 8)
|
||||
particles.setTexture("particle/type6", 0);
|
||||
if(value == 9)
|
||||
particles.setTexture("particle/type7", 0);
|
||||
}
|
||||
initGui();
|
||||
}
|
||||
if(button.id == 3){
|
||||
int value = button.getValue();
|
||||
if(value == 0)
|
||||
playerdata.removePart("fin");
|
||||
else{
|
||||
ModelPartData particles = playerdata.getOrCreatePart("fin");
|
||||
if(value == 1)
|
||||
particles.setTexture("", 0);
|
||||
if(value == 2)
|
||||
particles.setTexture("fin/fin1", 0);
|
||||
if(value == 3)
|
||||
particles.setTexture("fin/fin2", 0);
|
||||
if(value == 4)
|
||||
particles.setTexture("fin/fin3", 0);
|
||||
if(value == 5)
|
||||
particles.setTexture("fin/fin4", 0);
|
||||
if(value == 6)
|
||||
particles.setTexture("fin/fin5", 0);
|
||||
if(value == 7)
|
||||
particles.setTexture("fin/fin6", 0);
|
||||
|
||||
}
|
||||
initGui();
|
||||
int value = button.getValue();
|
||||
if(value == 0)
|
||||
playerdata.removePart("fin");
|
||||
else{
|
||||
ModelPartData particles = playerdata.getOrCreatePart("fin");
|
||||
if(value == 1)
|
||||
particles.setTexture("", 0);
|
||||
if(value == 2)
|
||||
particles.setTexture("fin/fin1", 0);
|
||||
}
|
||||
initGui();
|
||||
}
|
||||
|
||||
if(button.id == 4){
|
||||
int value = button.getValue();
|
||||
if(value == 0)
|
||||
playerdata.removePart("skirt");
|
||||
else{
|
||||
ModelPartData skirt = playerdata.getOrCreatePart("skirt");
|
||||
if(value == 1)
|
||||
skirt.setTexture("", 0);
|
||||
if(value == 2)
|
||||
skirt.setTexture("skirt/skirt1", 0);
|
||||
}
|
||||
initGui();
|
||||
}
|
||||
|
||||
if(button.id == 8){
|
||||
playerdata.bodywear = (byte) button.getValue();
|
||||
}
|
||||
|
||||
if(button.id == 30){
|
||||
playerdata.hideBody = (byte) button.getValue();
|
||||
}
|
||||
|
||||
if(button.id == 11){
|
||||
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("wings"), npc));
|
||||
}
|
||||
@@ -242,9 +132,6 @@ public class GuiModelBody extends GuiModelInterface{
|
||||
if(button.id == 13){
|
||||
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("fin"), npc));
|
||||
}
|
||||
if(button.id == 14){
|
||||
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("skirt"), npc));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,16 +12,14 @@ public class GuiModelHead extends GuiModelInterface{
|
||||
|
||||
private GuiScreen parent;
|
||||
|
||||
private final String[] arrHead = new String[]{"gui.no","gui.yes"};
|
||||
private final String[] arrHeadwear = new String[]{"gui.no","gui.yes","Solid"};
|
||||
private final String[] arrHair = new String[]{"gui.no","Player","Long","Thin","Stylish","Ponytail"};
|
||||
private final String[] arrBeard = new String[]{"gui.no","Player","Standard","Viking","Long","Short"};
|
||||
private final String[] arrMohawk = new String[]{"gui.no","Type1","Type2","Type3"};
|
||||
private final String[] arrSnout = new String[]{"gui.no","Player Small","Player Medium", "Player Large", "Player Bunny",
|
||||
"Small1", "Medium1", "Large1", "Bunny1", "Beak1"};
|
||||
private final String[] arrMohawk = new String[]{"gui.no","Type1"};
|
||||
private final String[] arrSnout = new String[]{"gui.no","Player Small","Player Medium", "Player Large", "Player Bunny",
|
||||
"Small1", "Medium1", "Large1", "Bunny1"};
|
||||
private final String[] arrEars = new String[]{"gui.no","Player","Player Bunny","Bunny","Type1"};
|
||||
private final String[] arrHorns = new String[]{"gui.no", "Player Bull", "Player Antlers", "Player AntennasB", "Player AntennasF", "Bull", "Antlers", "AntennasB", "AntennasF" };
|
||||
|
||||
|
||||
public GuiModelHead(GuiScreen parent, EntityCustomNpc npc){
|
||||
super(npc);
|
||||
this.parent = parent;
|
||||
@@ -30,52 +28,42 @@ public class GuiModelHead extends GuiModelInterface{
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
super.initGui();
|
||||
|
||||
int y = guiTop + 20;
|
||||
|
||||
addButton(new GuiNpcButton(30, guiLeft + 50, y += 22, 70, 20, arrHead, playerdata.hideHead));
|
||||
addLabel(new GuiNpcLabel(30, "Hide", guiLeft, y + 5, 0xFFFFFF));
|
||||
|
||||
addButton(new GuiNpcButton(0, guiLeft + 50, y += 22, 70, 20, arrHeadwear, playerdata.headwear));
|
||||
|
||||
addButton(new GuiNpcButton(0, guiLeft + 50, y += 22, 70, 20, arrHeadwear, playerdata.headwear));
|
||||
addLabel(new GuiNpcLabel(0, "Headwear", guiLeft, y + 5, 0xFFFFFF));
|
||||
|
||||
ModelPartData hair = playerdata.getPartData("hair");
|
||||
addButton(new GuiNpcButton(1, guiLeft + 50, y += 22, 70, 20, arrHair, hair == null ? 0 : hair.type + 1));
|
||||
addButton(new GuiNpcButton(1, guiLeft + 50, y += 22, 70, 20, arrHair, hair == null?0:hair.type + 1));
|
||||
addLabel(new GuiNpcLabel(1, "Hair", guiLeft, y + 5, 0xFFFFFF));
|
||||
if (hair != null)
|
||||
if(hair != null)
|
||||
addButton(new GuiNpcButton(11, guiLeft + 122, y, 40, 20, hair.getColor()));
|
||||
|
||||
ModelPartData mohawk = playerdata.getPartData("mohawk");
|
||||
addButton(new GuiNpcButton(2, guiLeft + 50, y += 22, 70, 20, arrMohawk, mohawk == null ? 0 : mohawk.type));
|
||||
addButton(new GuiNpcButton(2, guiLeft + 50, y += 22, 70, 20, arrMohawk, mohawk == null?0:mohawk.type));
|
||||
addLabel(new GuiNpcLabel(2, "Mohawk", guiLeft, y + 5, 0xFFFFFF));
|
||||
if (mohawk != null)
|
||||
if(mohawk != null)
|
||||
addButton(new GuiNpcButton(12, guiLeft + 122, y, 40, 20, mohawk.getColor()));
|
||||
|
||||
ModelPartData beard = playerdata.getPartData("beard");
|
||||
addButton(new GuiNpcButton(3, guiLeft + 50, y += 22, 70, 20, arrBeard, beard == null ? 0 : beard.type + 1));
|
||||
addButton(new GuiNpcButton(3, guiLeft + 50, y += 22, 70, 20, arrBeard, beard == null?0:beard.type + 1));
|
||||
addLabel(new GuiNpcLabel(3, "Beard", guiLeft, y + 5, 0xFFFFFF));
|
||||
if (beard != null)
|
||||
if(beard != null)
|
||||
addButton(new GuiNpcButton(13, guiLeft + 122, y, 40, 20, beard.getColor()));
|
||||
|
||||
ModelPartData snout = playerdata.getPartData("snout");
|
||||
addButton(new GuiNpcButton(4, guiLeft + 50, y += 22, 70, 20, arrSnout, snout == null ? 0 : snout.type + (snout.playerTexture ? 1 : 5)));
|
||||
addButton(new GuiNpcButton(4, guiLeft + 50, y += 22, 70, 20, arrSnout, snout == null?0:snout.type + (snout.playerTexture?1:5)));
|
||||
addLabel(new GuiNpcLabel(4, "Snout", guiLeft, y + 5, 0xFFFFFF));
|
||||
if (snout != null)
|
||||
if(snout != null)
|
||||
addButton(new GuiNpcButton(14, guiLeft + 122, y, 40, 20, snout.getColor()));
|
||||
|
||||
ModelPartData ears = playerdata.getPartData("ears");
|
||||
addButton(new GuiNpcButton(5, guiLeft + 50, y += 22, 70, 20, arrEars, getEars(ears)));
|
||||
addButton(new GuiNpcButton(5, guiLeft + 50, y += 22, 70, 20, arrEars, getEars(ears)));
|
||||
addLabel(new GuiNpcLabel(5, "Ears", guiLeft, y + 5, 0xFFFFFF));
|
||||
if (ears != null)
|
||||
if(ears != null)
|
||||
addButton(new GuiNpcButton(15, guiLeft + 122, y, 40, 20, ears.getColor()));
|
||||
|
||||
ModelPartData horns = playerdata.getPartData("horns");
|
||||
y += 22;addButton(new GuiNpcButton(6, guiLeft + 50, y, 70, 20, arrHorns, getHorns(horns)));
|
||||
addLabel(new GuiNpcLabel(6, "Horns", guiLeft, y + 5, 16777215));
|
||||
if (horns != null) {
|
||||
addButton(new GuiNpcButton(16, guiLeft + 122, y, 40, 20, horns.getColor()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,15 +82,6 @@ public class GuiModelHead extends GuiModelInterface{
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int getHorns(ModelPartData data) {
|
||||
if (data == null)
|
||||
return 0;
|
||||
if (data.playerTexture) {
|
||||
return data.type + 1;
|
||||
}
|
||||
return data.type + 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton btn) {
|
||||
super.actionPerformed(btn);
|
||||
@@ -112,10 +91,6 @@ public class GuiModelHead extends GuiModelInterface{
|
||||
playerdata.headwear = (byte) button.getValue();
|
||||
}
|
||||
|
||||
if(button.id == 30){
|
||||
playerdata.hideHead = (byte) button.getValue();
|
||||
}
|
||||
|
||||
if(button.id == 1){
|
||||
if(button.getValue() == 0)
|
||||
playerdata.removePart("hair");
|
||||
@@ -149,28 +124,26 @@ public class GuiModelHead extends GuiModelInterface{
|
||||
initGui();
|
||||
}
|
||||
|
||||
if(button.id == 4){
|
||||
if(button.getValue() == 0)
|
||||
playerdata.removePart("snout");
|
||||
else if(button.getValue() < 5){
|
||||
ModelPartData data = playerdata.getOrCreatePart("snout");
|
||||
data.type = (byte) (button.getValue() - 1);
|
||||
}
|
||||
else{
|
||||
ModelPartData data = playerdata.getOrCreatePart("snout");
|
||||
byte type = 0;
|
||||
if(button.displayString.startsWith("Medium"))
|
||||
type = 1;
|
||||
if(button.displayString.startsWith("Large"))
|
||||
type = 2;
|
||||
if(button.displayString.startsWith("Bunny"))
|
||||
type = 3;
|
||||
if(button.displayString.startsWith("Beak"))
|
||||
type = 4;
|
||||
data.setTexture("snout/" + button.displayString.toLowerCase(), type);
|
||||
}
|
||||
initGui();
|
||||
}
|
||||
if(button.id == 4){
|
||||
if(button.getValue() == 0)
|
||||
playerdata.removePart("snout");
|
||||
else if(button.getValue() < 5){
|
||||
ModelPartData data = playerdata.getOrCreatePart("snout");
|
||||
data.type = (byte) (button.getValue() - 1);
|
||||
}
|
||||
else{
|
||||
ModelPartData data = playerdata.getOrCreatePart("snout");
|
||||
byte type = 0;
|
||||
if(button.displayString.startsWith("Medium"))
|
||||
type = 1;
|
||||
if(button.displayString.startsWith("Large"))
|
||||
type = 2;
|
||||
if(button.displayString.startsWith("Bunny"))
|
||||
type = 3;
|
||||
data.setTexture("snout/" + button.displayString.toLowerCase(), type);
|
||||
}
|
||||
initGui();
|
||||
}
|
||||
|
||||
if(button.id == 5){
|
||||
int value = button.getValue();
|
||||
@@ -190,26 +163,6 @@ public class GuiModelHead extends GuiModelInterface{
|
||||
initGui();
|
||||
}
|
||||
|
||||
if(button.id == 6){
|
||||
int value = button.getValue();
|
||||
if(value == 0)
|
||||
playerdata.removePart("horns");
|
||||
else{
|
||||
ModelPartData data = playerdata.getOrCreatePart("horns");
|
||||
if(value <= 4)
|
||||
data.setTexture("", value - 1);
|
||||
if(value == 5)
|
||||
data.setTexture("horns/bull", 0);
|
||||
if(value == 6)
|
||||
data.setTexture("horns/antlers", 1);
|
||||
if(value == 7)
|
||||
data.setTexture("horns/antennas", 2);
|
||||
if(value == 8)
|
||||
data.setTexture("horns/antennas", 3);
|
||||
}
|
||||
initGui();
|
||||
}
|
||||
|
||||
if(button.id == 11){
|
||||
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("hair"), npc));
|
||||
}
|
||||
@@ -225,9 +178,6 @@ public class GuiModelHead extends GuiModelInterface{
|
||||
if(button.id == 15){
|
||||
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("ears"), npc));
|
||||
}
|
||||
if(button.id == 16){
|
||||
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("horns"), npc));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,10 +11,8 @@ import noppes.npcs.entity.EntityCustomNpc;
|
||||
public class GuiModelLegs extends GuiModelInterface{
|
||||
|
||||
private GuiScreen parent;
|
||||
private final String[] arrLeg = new String[]{"gui.no","Both","Right","Left"};
|
||||
private final String[] arrLegwear = new String[]{"gui.no","Both","Left","Right"};
|
||||
private final String[] arrLegs = new String[]{"gui.no","Player","Player Naga","Spider","Horse","Naga", "Mermaid", "Mermaid 2", "Digitigrade"};
|
||||
private final String[] arrTail = new String[]{"gui.no","Player", "Player Dragon","Cat","Wolf","Horse","Dragon", "Squirrel", "Fin", "Rodent", "Feather"};
|
||||
private final String[] arrLegs = new String[]{"gui.no","Player","Player Naga","Spider","Horse","Naga", "Mermaid","Digitigrade"};
|
||||
private final String[] arrTail = new String[]{"gui.no","Player", "Player Dragon","Cat","Wolf","Horse","Dragon", "Squirrel"};
|
||||
public GuiModelLegs(GuiScreen parent, EntityCustomNpc npc){
|
||||
super(npc);
|
||||
this.parent = parent;
|
||||
@@ -26,15 +24,7 @@ public class GuiModelLegs extends GuiModelInterface{
|
||||
super.initGui();
|
||||
int y = guiTop + 20;
|
||||
|
||||
addButton(new GuiNpcButton(30, guiLeft + 50, y += 22, 70, 20, arrLeg, playerdata.hideLegs));
|
||||
addLabel(new GuiNpcLabel(30, "Hide", guiLeft, y + 5, 0xFFFFFF));
|
||||
|
||||
if (npc.display.modelType == 1 || npc.display.modelType == 2) {
|
||||
addButton(new GuiNpcButton(8, guiLeft + 50, y += 22, 70, 20, arrLegwear, playerdata.legwear));
|
||||
addLabel(new GuiNpcLabel(8, "Legwear", guiLeft, y + 5, 0xFFFFFF));
|
||||
}
|
||||
|
||||
addButton(new GuiNpcButton(1, guiLeft + 50, y += 22, 70, 20, arrLegs, getLegIndex(playerdata.legParts)));
|
||||
addButton(new GuiNpcButton(1, guiLeft + 50, y += 22, 70, 20, arrLegs, getNagaIndex(playerdata.legParts)));
|
||||
addLabel(new GuiNpcLabel(1, "Legs", guiLeft, y + 5, 0xFFFFFF));
|
||||
if(playerdata.legParts.type > 0)
|
||||
addButton(new GuiNpcButton(11, guiLeft + 122, y, 40, 20, playerdata.legParts.getColor()));
|
||||
@@ -45,40 +35,33 @@ public class GuiModelLegs extends GuiModelInterface{
|
||||
if(tail != null)
|
||||
addButton(new GuiNpcButton(12, guiLeft + 122, y, 40, 20, tail.getColor()));
|
||||
}
|
||||
|
||||
private int getLegIndex(ModelPartData data) {
|
||||
private int getNagaIndex(ModelPartData data) {
|
||||
if(!data.playerTexture && data.type == 1)
|
||||
return 5;
|
||||
if(data.type == 4)
|
||||
return 6;
|
||||
if(data.type == 5)
|
||||
return 8;
|
||||
return 7;
|
||||
return data.type + 1;
|
||||
}
|
||||
|
||||
private int getTailIndex(ModelPartData data){
|
||||
if(data == null)
|
||||
return 0;
|
||||
if(data.playerTexture && data.type == 0)
|
||||
return 1;
|
||||
if(data.type == 0 && data.texture.contains("tail1"))
|
||||
return 3;
|
||||
if(data.type == 0 && data.texture.contains("tail2"))
|
||||
return 4;
|
||||
if(data.playerTexture && data.type == 1)
|
||||
return 2;
|
||||
if(data.type == 1)
|
||||
return 6;
|
||||
if(data.type == 2)
|
||||
return 5;
|
||||
if(data.type == 3)
|
||||
return 7;
|
||||
if(data.type == 4)
|
||||
return 8;
|
||||
if(data.type == 5)
|
||||
return 9;
|
||||
if(data.type == 6)
|
||||
return 10;
|
||||
if(data == null)
|
||||
return 0;
|
||||
if(data.playerTexture && data.type == 0)
|
||||
return 1;
|
||||
if(data.type == 0 && data.texture.contains("tail1"))
|
||||
return 3;
|
||||
if(data.type == 0 && data.texture.contains("tail2"))
|
||||
return 4;
|
||||
if(data.playerTexture && data.type == 1)
|
||||
return 2;
|
||||
if(data.type == 1)
|
||||
return 6;
|
||||
if(data.type == 2)
|
||||
return 5;
|
||||
if(data.type == 3)
|
||||
return 7;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -88,12 +71,6 @@ public class GuiModelLegs extends GuiModelInterface{
|
||||
super.actionPerformed(btn);
|
||||
GuiNpcButton button = (GuiNpcButton) btn;
|
||||
|
||||
if(button.id == 8){
|
||||
playerdata.legwear = (byte) button.getValue();
|
||||
}
|
||||
if(button.id == 30){
|
||||
playerdata.hideLegs = (byte) button.getValue();
|
||||
}
|
||||
if(button.id == 1){
|
||||
ModelPartData data = playerdata.legParts;
|
||||
int value = button.getValue() - 1;
|
||||
@@ -107,53 +84,40 @@ public class GuiModelLegs extends GuiModelInterface{
|
||||
if(value == 3)
|
||||
data.setTexture("legs/horse1", 3);
|
||||
if(value == 4)
|
||||
if (npc.display.modelType == 1 || npc.display.modelType == 2){
|
||||
data.setTexture("legs/naga2", 1);
|
||||
}
|
||||
else{
|
||||
data.setTexture("legs/naga1", 1);
|
||||
}
|
||||
data.setTexture("legs/naga1", 1);
|
||||
if(value == 5)
|
||||
data.setTexture("legs/mermaid1", 4);
|
||||
if(value == 6)
|
||||
data.setTexture("legs/mermaid1", 6);
|
||||
if(value == 7)
|
||||
if(value == 6)
|
||||
data.setTexture("", 5);
|
||||
|
||||
initGui();
|
||||
|
||||
}
|
||||
|
||||
if(button.id == 2){
|
||||
if(button.id == 2){
|
||||
int value = button.getValue();
|
||||
if(value == 0)
|
||||
playerdata.removePart("tail");
|
||||
else{
|
||||
ModelPartData data = playerdata.getOrCreatePart("tail");
|
||||
if(value == 1)
|
||||
data.setTexture("", 0);
|
||||
if(value == 2)
|
||||
data.setTexture("", 1);
|
||||
if(value == 3)
|
||||
data.setTexture("tail/tail1", 0);
|
||||
if(value == 4)
|
||||
data.setTexture("tail/tail2", 0);
|
||||
if(value == 5)
|
||||
data.setTexture("tail/horse1", 2);
|
||||
if(value == 6)
|
||||
data.setTexture("tail/dragon1", 1);
|
||||
if(value == 7)
|
||||
data.setTexture("tail/squirrel1", 3);
|
||||
if(value == 8)
|
||||
data.setTexture("tail/fin1", 4);
|
||||
if(value == 9)
|
||||
data.setTexture("tail/rodent1", 5);
|
||||
if(value == 10)
|
||||
data.setTexture("tail/feather1", 6);
|
||||
|
||||
}
|
||||
initGui();
|
||||
}
|
||||
if(value == 0)
|
||||
playerdata.removePart("tail");
|
||||
else{
|
||||
ModelPartData data = playerdata.getOrCreatePart("tail");
|
||||
if(value == 1)
|
||||
data.setTexture("", 0);
|
||||
if(value == 2)
|
||||
data.setTexture("", 1);
|
||||
if(value == 3)
|
||||
data.setTexture("tail/tail1", 0);
|
||||
if(value == 4)
|
||||
data.setTexture("tail/tail2", 0);
|
||||
if(value == 5)
|
||||
data.setTexture("tail/horse1", 2);
|
||||
if(value == 6)
|
||||
data.setTexture("tail/dragon1", 1);
|
||||
if(value == 7)
|
||||
data.setTexture("tail/squirrel1", 3);
|
||||
|
||||
}
|
||||
initGui();
|
||||
}
|
||||
if(button.id == 11){
|
||||
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.legParts, npc));
|
||||
}
|
||||
|
||||
@@ -15,11 +15,6 @@ public class GuiModelScale extends GuiModelInterface implements ISliderListener{
|
||||
|
||||
private GuiScreen parent;
|
||||
private int type = 0;
|
||||
|
||||
private GuiNpcSlider scaleWidth;
|
||||
private GuiNpcSlider scaleHeight;
|
||||
private GuiNpcSlider scaleDepth;
|
||||
|
||||
public GuiModelScale(GuiScreen parent, ModelData data, EntityCustomNpc npc){
|
||||
super(npc);
|
||||
this.parent = parent;
|
||||
@@ -72,69 +67,29 @@ public class GuiModelScale extends GuiModelInterface implements ISliderListener{
|
||||
addButton(new GuiNpcButton(3, guiLeft + 110, y , 60, 20, "Edit"));
|
||||
y += 24;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void drawSlider(int y, ModelPartConfig config){
|
||||
y += 15;
|
||||
addLabel(new GuiNpcLabel(10, "Width", guiLeft - 25, y + 5, 0xFFFFFF));
|
||||
scaleWidth = new GuiNpcSlider(this, 10, guiLeft + 50, y, config.scaleX - 0.5f);
|
||||
addSlider(scaleWidth);
|
||||
addButton(new GuiNpcButton(170, guiLeft + 8, y, 40, 20, "Reset"));
|
||||
addLabel(new GuiNpcLabel(10, "Width", guiLeft, y + 5, 0xFFFFFF));
|
||||
addSlider(new GuiNpcSlider(this, 10, guiLeft + 50, y, config.scaleX - 0.5f));
|
||||
y += 22;
|
||||
addLabel(new GuiNpcLabel(11, "Height", guiLeft - 25, y + 5, 0xFFFFFF));
|
||||
scaleHeight = new GuiNpcSlider(this, 11, guiLeft + 50, y, config.scaleY - 0.5f);
|
||||
addSlider(scaleHeight);
|
||||
addButton(new GuiNpcButton(171, guiLeft + 8, y, 40, 20, "Reset"));
|
||||
addLabel(new GuiNpcLabel(11, "Height", guiLeft, y + 5, 0xFFFFFF));
|
||||
addSlider(new GuiNpcSlider(this, 11, guiLeft + 50, y, config.scaleY - 0.5f));
|
||||
y += 22;
|
||||
addLabel(new GuiNpcLabel(12, "Depth", guiLeft - 25, y + 5, 0xFFFFFF));
|
||||
scaleDepth = new GuiNpcSlider(this, 12, guiLeft + 50, y, config.scaleZ - 0.5f);
|
||||
addSlider(scaleDepth);
|
||||
addButton(new GuiNpcButton(172, guiLeft + 8, y, 40, 20, "Reset"));
|
||||
addLabel(new GuiNpcLabel(12, "Depth", guiLeft, y + 5, 0xFFFFFF));
|
||||
addSlider(new GuiNpcSlider(this, 12, guiLeft + 50, y, config.scaleZ - 0.5f));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton btn) {
|
||||
super.actionPerformed(btn);
|
||||
|
||||
if(btn.id < 4){
|
||||
type = btn.id;
|
||||
initGui();
|
||||
}
|
||||
else{
|
||||
// Resetting Type
|
||||
ModelPartConfig config = playerdata.head;
|
||||
if(type == 1)
|
||||
config = playerdata.body;
|
||||
else if(type == 2)
|
||||
config = playerdata.arms;
|
||||
else if(type == 3)
|
||||
config = playerdata.legs;
|
||||
|
||||
if(btn.id == 170){
|
||||
config.scaleX = 1.0f;
|
||||
scaleWidth.sliderValue = 0.5f;
|
||||
int percent = (int) (50 + scaleWidth.sliderValue * 100);
|
||||
scaleWidth.setString(percent + "%");
|
||||
npc.updateHitbox();
|
||||
}
|
||||
else if(btn.id == 171){
|
||||
config.scaleY = 1.0f;
|
||||
scaleHeight.sliderValue = 0.5f;
|
||||
int percent = (int) (50 + scaleHeight.sliderValue * 100);
|
||||
scaleHeight.setString(percent + "%");
|
||||
npc.updateHitbox();
|
||||
}
|
||||
else if(btn.id == 172){
|
||||
config.scaleZ = 1.0f;
|
||||
scaleDepth.sliderValue = 0.5f;
|
||||
int percent = (int) (50 + scaleDepth.sliderValue * 100);
|
||||
scaleDepth.setString(percent + "%");
|
||||
npc.updateHitbox();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,10 +22,6 @@ public class GuiNpcPuppet extends GuiModelInterface implements ISliderListener{
|
||||
private int type = 6;
|
||||
private JobPuppet job;
|
||||
private PartConfig part;
|
||||
|
||||
private GuiNpcSlider rotateX;
|
||||
private GuiNpcSlider rotateY;
|
||||
private GuiNpcSlider rotateZ;
|
||||
|
||||
public GuiNpcPuppet(GuiScreen parent, EntityCustomNpc npc){
|
||||
super(npc);
|
||||
@@ -122,20 +118,14 @@ public class GuiNpcPuppet extends GuiModelInterface implements ISliderListener{
|
||||
addButton(new GuiNpcButton(29, guiLeft + 100, y , 80, 20, new String[]{"gui.enabled","gui.disabled"}, config.disabled?1:0));
|
||||
y += 22;
|
||||
addLabel(new GuiNpcLabel(10, "X", guiLeft, y + 5, 0xFFFFFF));
|
||||
rotateX = new GuiNpcSlider(this, 10, guiLeft + 50, y, config.rotationX + 0.5f);
|
||||
addSlider(rotateX);
|
||||
addButton(new GuiNpcButton(170, guiLeft + 8, y, 40, 20, "Reset"));
|
||||
addSlider(new GuiNpcSlider(this, 10, guiLeft + 50, y, config.rotationX + 0.5f));
|
||||
y += 22;
|
||||
addLabel(new GuiNpcLabel(11, "Y", guiLeft, y + 5, 0xFFFFFF));
|
||||
rotateY = new GuiNpcSlider(this, 11, guiLeft + 50, y, config.rotationY + 0.5f);
|
||||
addSlider(rotateY);
|
||||
addButton(new GuiNpcButton(171, guiLeft + 8, y, 40, 20, "Reset"));
|
||||
addSlider(new GuiNpcSlider(this, 11, guiLeft + 50, y, config.rotationY + 0.5f));
|
||||
y += 22;
|
||||
addLabel(new GuiNpcLabel(12, "Z", guiLeft, y + 5, 0xFFFFFF));
|
||||
rotateZ = new GuiNpcSlider(this, 12, guiLeft + 50, y, config.rotationZ + 0.5f);
|
||||
addSlider(rotateZ);
|
||||
addButton(new GuiNpcButton(172, guiLeft + 8, y, 40, 20, "Reset"));
|
||||
}
|
||||
addSlider(new GuiNpcSlider(this, 12, guiLeft + 50, y, config.rotationZ + 0.5f));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@@ -161,29 +151,6 @@ public class GuiNpcPuppet extends GuiModelInterface implements ISliderListener{
|
||||
if(btn.id == 32){
|
||||
job.whileAttacking = button.getValue() == 0;
|
||||
}
|
||||
if(btn.id == 170 || btn.id == 171 || btn.id == 172){
|
||||
if(btn.id == 170){
|
||||
System.out.println(part.rotationX);
|
||||
System.out.println(rotateX.sliderValue);
|
||||
part.rotationX = 0.0f;
|
||||
rotateX.sliderValue = 0.5f;
|
||||
int percent = (int) ((rotateX.sliderValue) * 360);
|
||||
rotateX.setString(percent + "%");
|
||||
}
|
||||
else if(btn.id == 171){
|
||||
part.rotationY = 0.0f;
|
||||
rotateY.sliderValue = 0.5f;
|
||||
int percent = (int) ((rotateY.sliderValue) * 360);
|
||||
rotateY.setString(percent + "%");
|
||||
}
|
||||
else{
|
||||
part.rotationZ = 0.0f;
|
||||
rotateZ.sliderValue = 0.5f;
|
||||
int percent = (int) ((rotateZ.sliderValue) * 360);
|
||||
rotateZ.setString(percent + "%");
|
||||
}
|
||||
npc.updateHitbox();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,14 +23,6 @@ public class GuiNpcSlider extends GuiButton {
|
||||
if(parent instanceof ISliderListener)
|
||||
listener = (ISliderListener) parent;
|
||||
}
|
||||
|
||||
public GuiNpcSlider(GuiScreen parent, int id, int xPos, int yPos, int width, int height, String displayString, float sliderValue) {
|
||||
super(id, xPos, yPos, width, height, NoppesStringUtils.translate(displayString));
|
||||
this.id = id;
|
||||
this.sliderValue = sliderValue;
|
||||
if(parent instanceof ISliderListener)
|
||||
listener = (ISliderListener) parent;
|
||||
}
|
||||
|
||||
public GuiNpcSlider(GuiScreen parent, int id, int xPos, int yPos, float sliderValue) {
|
||||
this(parent, id, xPos, yPos, "", sliderValue);
|
||||
|
||||
@@ -14,7 +14,18 @@ import noppes.npcs.ModelPartData;
|
||||
import noppes.npcs.client.ClientProxy;
|
||||
import noppes.npcs.client.model.animation.AniCrawling;
|
||||
import noppes.npcs.client.model.animation.AniHug;
|
||||
import noppes.npcs.client.model.part.*;
|
||||
import noppes.npcs.client.model.part.ModelBeard;
|
||||
import noppes.npcs.client.model.part.ModelBreasts;
|
||||
import noppes.npcs.client.model.part.ModelClaws;
|
||||
import noppes.npcs.client.model.part.ModelEars;
|
||||
import noppes.npcs.client.model.part.ModelFin;
|
||||
import noppes.npcs.client.model.part.ModelHair;
|
||||
import noppes.npcs.client.model.part.ModelHeadwear;
|
||||
import noppes.npcs.client.model.part.ModelLegs;
|
||||
import noppes.npcs.client.model.part.ModelMohawk;
|
||||
import noppes.npcs.client.model.part.ModelSnout;
|
||||
import noppes.npcs.client.model.part.ModelTail;
|
||||
import noppes.npcs.client.model.part.ModelWings;
|
||||
import noppes.npcs.client.model.util.ModelPartInterface;
|
||||
import noppes.npcs.client.model.util.ModelScaleRenderer;
|
||||
import noppes.npcs.constants.EnumAnimation;
|
||||
@@ -33,244 +44,91 @@ public class ModelMPM extends ModelNPCMale{
|
||||
private ModelPartInterface snout;
|
||||
private ModelPartInterface ears;
|
||||
private ModelPartInterface fin;
|
||||
private ModelPartInterface skirt;
|
||||
private ModelPartInterface horns;
|
||||
|
||||
private ModelPartInterface clawsR;
|
||||
private ModelPartInterface clawsL;
|
||||
|
||||
// New
|
||||
public ModelRenderer bipedBodywear;
|
||||
public ModelRenderer bipedRightArmwear;
|
||||
public ModelRenderer bipedLeftArmwear;
|
||||
public ModelRenderer bipedRightLegWear;
|
||||
public ModelRenderer bipedLeftLegWear;
|
||||
|
||||
|
||||
private ModelLegs legs;
|
||||
private ModelScaleRenderer headwear;
|
||||
|
||||
// private ModelScaleRenderer bodywear;
|
||||
// private ModelScaleRenderer armwear;
|
||||
// private ModelScaleRenderer legwear;
|
||||
|
||||
private ModelTail tail;
|
||||
public ModelBase entityModel;
|
||||
public EntityLivingBase entity;
|
||||
|
||||
|
||||
public boolean currentlyPlayerTexture;
|
||||
|
||||
|
||||
public boolean isArmor;
|
||||
|
||||
public float alpha = 1;
|
||||
|
||||
// Check Legacy Code for Old Version
|
||||
|
||||
// Updated False = 64x32 Skin
|
||||
// Steve 64x64 and Alex 64x64
|
||||
public ModelMPM(float par1, boolean arms) {
|
||||
|
||||
super(par1, arms);
|
||||
isArmor = par1 > 0;
|
||||
float par2 = 0;
|
||||
|
||||
this.bipedCloak = new ModelRenderer(this, 0, 0);
|
||||
this.bipedCloak.setTextureSize(64,32);
|
||||
this.bipedCloak.addBox(-5.0F, 0.0F, -1.0F, 10, 16, 1, par1);
|
||||
|
||||
this.bipedEars = new ModelRenderer(this, 24, 0);
|
||||
this.bipedEars.addBox(-3.0F, -6.0F, -1.0F, 6, 6, 1, par1);
|
||||
|
||||
this.bipedHead = (new ModelScaleRenderer(this, 0, 0));
|
||||
this.bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, par1);
|
||||
this.bipedHead.setRotationPoint(0.0F, 0.0F + par2, 0.0F);
|
||||
|
||||
this.bipedHeadwear = (new ModelScaleRenderer(this, 32, 0));
|
||||
this.bipedHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, par1 + 0.5F);
|
||||
this.bipedHeadwear.setRotationPoint(0.0F, 0.0F + par2, 0.0F);
|
||||
|
||||
this.bipedBody = (new ModelScaleRenderer(this, 16, 16));
|
||||
this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, par1);
|
||||
this.bipedBody.setRotationPoint(0.0F, 0.0F + par2, 0.0F);
|
||||
|
||||
// New Extension
|
||||
this.bipedBodywear = (new ModelScaleRenderer(this, 16, 32));
|
||||
this.bipedBodywear.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, par1 + 0.5F);
|
||||
this.bipedBody.addChild(this.bipedBodywear);
|
||||
// this.bipedBodywear.setRotationPoint(0.0F, 0.0F + par2, 0.0F);
|
||||
|
||||
// Steve 64x64 Model or Alex 64x64 Model
|
||||
if (arms){
|
||||
// Alex Version
|
||||
this.bipedRightArm = (new ModelScaleRenderer(this, 40, 16));
|
||||
this.bipedRightArm.addBox(-2.0F, -2.0F, -2.0F, 3, 12, 4, par1);
|
||||
// this.bipedRightArm.setRotationPoint(-5.0F, 2.5F + par2, 0.0F);
|
||||
|
||||
this.bipedLeftArm = new ModelScaleRenderer(this, 32, 48);
|
||||
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 3, 12, 4, par1);
|
||||
this.bipedLeftArm.setRotationPoint(5.0F, 2.5F + par2, 0.0F);
|
||||
|
||||
this.bipedRightArmwear = (new ModelScaleRenderer(this, 40, 32));
|
||||
this.bipedRightArmwear.addBox(-2.0F, -2.0F, -2.0F, 3, 12, 4, par1 + 0.25F);
|
||||
this.bipedRightArm.addChild(this.bipedRightArmwear);
|
||||
// this.bipedRightArmWear.setRotationPoint(-5.0F, 2.5F + par2, 0.0F);
|
||||
|
||||
this.bipedLeftArmwear = new ModelScaleRenderer(this, 48, 48);
|
||||
this.bipedLeftArmwear.addBox(-1.0F, -2.0F, -2.0F, 3, 12, 4, par1 + 0.25F);
|
||||
this.bipedLeftArm.addChild(this.bipedLeftArmwear);
|
||||
// this.bipedLeftArmWear.setRotationPoint(5.0F, 2.5F + par2, 0.0F);
|
||||
}
|
||||
else{
|
||||
// Steve Version
|
||||
this.bipedRightArm = (new ModelScaleRenderer(this, 40, 16));
|
||||
this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, par1);
|
||||
this.bipedRightArm.setRotationPoint(-5.0F, 2.0F + par2, 0.0F);
|
||||
|
||||
this.bipedLeftArm = new ModelScaleRenderer(this, 32, 48);
|
||||
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, par1);
|
||||
this.bipedLeftArm.setRotationPoint(5.0F, 2.0F + par2, 0.0F);
|
||||
|
||||
this.bipedRightArmwear = (new ModelScaleRenderer(this, 40, 32));
|
||||
this.bipedRightArmwear.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, par1 + 0.25F);
|
||||
this.bipedRightArm.addChild(this.bipedRightArmwear);
|
||||
//this.bipedRightArmWear.setRotationPoint(-5.0F, 2.0F + par2, 0.0F);
|
||||
|
||||
this.bipedLeftArmwear = new ModelScaleRenderer(this, 48, 48);
|
||||
this.bipedLeftArmwear.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, par1 + 0.25F);
|
||||
this.bipedLeftArm.addChild(this.bipedLeftArmwear);
|
||||
//this.bipedLeftArmWear.setRotationPoint(5.0F, 2.0F + par2, 0.0F);
|
||||
}
|
||||
|
||||
this.bipedRightLeg = (new ModelScaleRenderer(this, 0, 16));
|
||||
this.bipedRightLeg.addBox(-2.08F, 0.0F, -2.0F, 4, 12, 4, par1);
|
||||
this.bipedRightLeg.setRotationPoint(-1.9F, 12.0F + par2, 0.0F);
|
||||
|
||||
this.bipedLeftLeg = new ModelScaleRenderer(this, 16, 48);
|
||||
this.bipedLeftLeg.addBox(-1.92F, 0.0F, -2.0F, 4, 12, 4, par1);
|
||||
this.bipedLeftLeg.setRotationPoint(1.9F, 12.0F + par2, 0.0F);
|
||||
|
||||
this.bipedRightLegWear = (new ModelScaleRenderer(this, 0, 32));
|
||||
this.bipedRightLegWear.addBox(-2.08F, 0.0F, -2.0F, 4, 12, 4, par1 + 0.25F);
|
||||
this.bipedRightLeg.addChild(this.bipedRightLegWear);
|
||||
// this.bipedRightLegWear.setRotationPoint(-1.9F, 12.0F + par2, 0.0F);
|
||||
|
||||
this.bipedLeftLegWear = new ModelScaleRenderer(this, 0, 48);
|
||||
this.bipedLeftLegWear.addBox(-1.92F, 0.0F, -2.0F, 4, 12, 4, par1 + 0.25F);
|
||||
this.bipedLeftLeg.addChild(this.bipedLeftLegWear);
|
||||
|
||||
headwear = new ModelHeadwear(this);
|
||||
legs = new ModelLegs(this, (ModelScaleRenderer)bipedRightLeg, (ModelScaleRenderer)bipedLeftLeg, 64, 64);
|
||||
// bodywear = new ModelBodywear(this);
|
||||
|
||||
this.bipedBody.addChild(breasts = new ModelBreasts(this, 64, 64));
|
||||
if(!isArmor){
|
||||
this.bipedHead.addChild(ears = new ModelEars(this));
|
||||
this.bipedHead.addChild(mohawk = new ModelMohawk(this));
|
||||
this.bipedHead.addChild(hair = new ModelHair(this));
|
||||
this.bipedHead.addChild(beard = new ModelBeard(this));
|
||||
|
||||
// Completed
|
||||
this.bipedHead.addChild(snout = new ModelSnout(this));
|
||||
this.bipedHead.addChild(horns = new ModelHorns(this));
|
||||
|
||||
// Completed
|
||||
tail = new ModelTail(this);
|
||||
|
||||
this.bipedBody.addChild(wings = new ModelWings(this));
|
||||
this.bipedBody.addChild(fin = new ModelFin(this));
|
||||
|
||||
// Fix This
|
||||
this.bipedBody.addChild(skirt = new ModelSkirt(this));
|
||||
this.bipedLeftArm.addChild(clawsL = new ModelClaws(this, false));
|
||||
this.bipedRightArm.addChild(clawsR = new ModelClaws(this, true));
|
||||
}
|
||||
}
|
||||
|
||||
// Steve 64x32
|
||||
public ModelMPM(float par1) {
|
||||
|
||||
super(par1);
|
||||
isArmor = par1 > 0;
|
||||
float par2 = 0;
|
||||
|
||||
this.bipedCloak = new ModelRenderer(this, 0, 0);
|
||||
this.bipedCloak.setTextureSize(64,32);
|
||||
this.bipedCloak.addBox(-5.0F, 0.0F, -1.0F, 10, 16, 1, par1);
|
||||
|
||||
this.bipedEars = new ModelRenderer(this, 24, 0);
|
||||
this.bipedEars.addBox(-3.0F, -6.0F, -1.0F, 6, 6, 1, par1);
|
||||
|
||||
this.bipedHead = (new ModelScaleRenderer(this, 0, 0));
|
||||
this.bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, par1);
|
||||
this.bipedHead.setRotationPoint(0.0F, 0.0F + par2, 0.0F);
|
||||
|
||||
this.bipedHeadwear = (new ModelScaleRenderer(this, 32, 0));
|
||||
this.bipedHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, par1 + 0.5F);
|
||||
this.bipedHeadwear.setRotationPoint(0.0F, 0.0F + par2, 0.0F);
|
||||
|
||||
this.bipedBody = (new ModelScaleRenderer(this, 16, 16));
|
||||
this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, par1);
|
||||
this.bipedBody.setRotationPoint(0.0F, 0.0F + par2, 0.0F);
|
||||
|
||||
this.bipedRightArm = new ModelScaleRenderer(this, 40, 16);
|
||||
this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, par1);
|
||||
this.bipedRightArm.setRotationPoint(-5.0F, 2.0F + par2, 0.0F);
|
||||
|
||||
this.bipedLeftArm = new ModelScaleRenderer(this, 40, 16);
|
||||
this.bipedLeftArm.mirror = true;
|
||||
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, par1);
|
||||
this.bipedLeftArm.setRotationPoint(5.0F, 2.0F + par2, 0.0F);
|
||||
|
||||
this.bipedRightLeg = new ModelScaleRenderer(this, 0, 16);
|
||||
this.bipedRightLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, par1);
|
||||
this.bipedRightLeg.setRotationPoint(-1.9F, 12.0F + par2, 0.0F);
|
||||
|
||||
this.bipedLeftLeg = new ModelScaleRenderer(this, 0, 16);
|
||||
this.bipedLeftLeg.mirror = true;
|
||||
this.bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, par1);
|
||||
this.bipedLeftLeg.setRotationPoint(1.9F, 12.0F + par2, 0.0F);
|
||||
|
||||
// Body
|
||||
this.bipedBodywear = (new ModelScaleRenderer(this, 0, 0));
|
||||
this.bipedBody.addChild(this.bipedBodywear);
|
||||
|
||||
// Arms
|
||||
this.bipedRightArmwear = (new ModelScaleRenderer(this, 0, 0));
|
||||
this.bipedRightArm.addChild(this.bipedRightArmwear);
|
||||
this.bipedLeftArmwear = new ModelScaleRenderer(this, 0, 0);
|
||||
this.bipedLeftArm.addChild(this.bipedLeftArmwear);
|
||||
|
||||
// Legs
|
||||
this.bipedRightLegWear = (new ModelScaleRenderer(this, 0, 0));
|
||||
this.bipedRightLeg.addChild(this.bipedRightLegWear);
|
||||
this.bipedLeftLegWear = new ModelScaleRenderer(this, 0, 0);
|
||||
this.bipedLeftLeg.addChild(this.bipedLeftLegWear);
|
||||
|
||||
headwear = new ModelHeadwear(this, true);
|
||||
legs = new ModelLegs(this, (ModelScaleRenderer)bipedRightLeg, (ModelScaleRenderer)bipedLeftLeg, 64, 32);
|
||||
|
||||
this.bipedBody.addChild(breasts = new ModelBreasts(this, 64, 32));
|
||||
this.bipedCloak = new ModelRenderer(this, 0, 0);
|
||||
this.bipedCloak.addBox(-5.0F, 0.0F, -1.0F, 10, 16, 1, par1);
|
||||
this.bipedEars = new ModelRenderer(this, 24, 0);
|
||||
this.bipedEars.addBox(-3.0F, -6.0F, -1.0F, 6, 6, 1, par1);
|
||||
this.bipedHead = new ModelScaleRenderer(this, 0, 0);
|
||||
this.bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, par1);
|
||||
this.bipedHead.setRotationPoint(0.0F, 0.0F + par2, 0.0F);
|
||||
this.bipedHeadwear = new ModelScaleRenderer(this, 32, 0);
|
||||
this.bipedHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, par1 + 0.5F);
|
||||
this.bipedHeadwear.setRotationPoint(0.0F, 0.0F + par2, 0.0F);
|
||||
this.bipedBody = new ModelScaleRenderer(this, 16, 16);
|
||||
this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, par1);
|
||||
this.bipedBody.setRotationPoint(0.0F, 0.0F + par2, 0.0F);
|
||||
this.bipedRightArm = new ModelScaleRenderer(this, 40, 16);
|
||||
this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, par1);
|
||||
this.bipedRightArm.setRotationPoint(-5.0F, 2.0F + par2, 0.0F);
|
||||
this.bipedLeftArm = new ModelScaleRenderer(this, 40, 16);
|
||||
this.bipedLeftArm.mirror = true;
|
||||
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, par1);
|
||||
this.bipedLeftArm.setRotationPoint(5.0F, 2.0F + par2, 0.0F);
|
||||
this.bipedRightLeg = new ModelScaleRenderer(this, 0, 16);
|
||||
this.bipedRightLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, par1);
|
||||
this.bipedRightLeg.setRotationPoint(-1.9F, 12.0F + par2, 0.0F);
|
||||
this.bipedLeftLeg = new ModelScaleRenderer(this, 0, 16);
|
||||
this.bipedLeftLeg.mirror = true;
|
||||
this.bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, par1);
|
||||
this.bipedLeftLeg.setRotationPoint(1.9F, 12.0F + par2, 0.0F);
|
||||
|
||||
headwear = new ModelHeadwear(this);
|
||||
legs = new ModelLegs(this, (ModelScaleRenderer)bipedRightLeg, (ModelScaleRenderer)bipedLeftLeg);
|
||||
|
||||
breasts = new ModelBreasts(this);
|
||||
this.bipedBody.addChild(breasts);
|
||||
if(!isArmor){
|
||||
this.bipedHead.addChild(ears = new ModelEars(this));
|
||||
this.bipedHead.addChild(mohawk = new ModelMohawk(this));
|
||||
this.bipedHead.addChild(hair = new ModelHair(this));
|
||||
this.bipedHead.addChild(beard = new ModelBeard(this));
|
||||
|
||||
// Completed
|
||||
this.bipedHead.addChild(snout = new ModelSnout(this));
|
||||
this.bipedHead.addChild(horns = new ModelHorns(this));
|
||||
|
||||
// Completed
|
||||
ears = new ModelEars(this);
|
||||
this.bipedHead.addChild(ears);
|
||||
|
||||
mohawk = new ModelMohawk(this);
|
||||
this.bipedHead.addChild(mohawk);
|
||||
|
||||
hair = new ModelHair(this);
|
||||
this.bipedHead.addChild(hair);
|
||||
|
||||
beard = new ModelBeard(this);
|
||||
this.bipedHead.addChild(beard);
|
||||
|
||||
snout = new ModelSnout(this);
|
||||
this.bipedHead.addChild(snout);
|
||||
|
||||
tail = new ModelTail(this);
|
||||
|
||||
wings = new ModelWings(this);
|
||||
this.bipedBody.addChild(wings);
|
||||
|
||||
fin = new ModelFin(this);
|
||||
this.bipedBody.addChild(fin);
|
||||
|
||||
clawsL = new ModelClaws(this, false);
|
||||
this.bipedLeftArm.addChild(clawsL);
|
||||
|
||||
this.bipedBody.addChild(wings = new ModelWings(this));
|
||||
this.bipedBody.addChild(fin = new ModelFin(this));
|
||||
|
||||
// Fix This
|
||||
this.bipedBody.addChild(skirt = new ModelSkirt(this));
|
||||
this.bipedLeftArm.addChild(clawsL = new ModelClaws(this, false));
|
||||
this.bipedRightArm.addChild(clawsR = new ModelClaws(this, true));
|
||||
clawsR = new ModelClaws(this, true);
|
||||
this.bipedRightArm.addChild(clawsR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void setPlayerData(EntityCustomNpc entity){
|
||||
if(!isArmor){
|
||||
mohawk.setData(entity.modelData, entity);
|
||||
@@ -283,17 +141,15 @@ public class ModelMPM extends ModelNPCMale{
|
||||
ears.setData(entity.modelData, entity);
|
||||
clawsL.setData(entity.modelData, entity);
|
||||
clawsR.setData(entity.modelData, entity);
|
||||
skirt.setData(entity.modelData, entity);
|
||||
horns.setData(entity.modelData, entity);
|
||||
}
|
||||
breasts.setData(entity.modelData, entity);
|
||||
legs.setData(entity);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7){
|
||||
EntityCustomNpc npc = (EntityCustomNpc) par1Entity;
|
||||
|
||||
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7){
|
||||
EntityCustomNpc npc = (EntityCustomNpc) par1Entity;
|
||||
|
||||
if(entityModel != null){
|
||||
if(!isArmor){
|
||||
@@ -312,171 +168,150 @@ public class ModelMPM extends ModelNPCMale{
|
||||
}
|
||||
else{
|
||||
alpha = npc.isInvisible() && !npc.isInvisibleToPlayer(Minecraft.getMinecraft().thePlayer)?0.15f:1;
|
||||
setPlayerData(npc);
|
||||
currentlyPlayerTexture = true;
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
if(npc.advanced.job == EnumJobType.Puppet){
|
||||
JobPuppet job = (JobPuppet) npc.jobInterface;
|
||||
if(job.isActive()){
|
||||
float pi = (float) Math.PI;
|
||||
setPlayerData(npc);
|
||||
currentlyPlayerTexture = true;
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
if(npc.advanced.job == EnumJobType.Puppet){
|
||||
JobPuppet job = (JobPuppet) npc.jobInterface;
|
||||
if(job.isActive()){
|
||||
float pi = (float) Math.PI;
|
||||
|
||||
if(!job.head.disabled){
|
||||
bipedHeadwear.rotateAngleX = bipedHead.rotateAngleX = job.head.rotationX * pi;
|
||||
bipedHeadwear.rotateAngleY = bipedHead.rotateAngleY = job.head.rotationY * pi;
|
||||
bipedHeadwear.rotateAngleZ = bipedHead.rotateAngleZ = job.head.rotationZ * pi;
|
||||
}
|
||||
|
||||
if(!job.head.disabled){
|
||||
bipedHeadwear.rotateAngleX = bipedHead.rotateAngleX = job.head.rotationX * pi;
|
||||
bipedHeadwear.rotateAngleY = bipedHead.rotateAngleY = job.head.rotationY * pi;
|
||||
bipedHeadwear.rotateAngleZ = bipedHead.rotateAngleZ = job.head.rotationZ * pi;
|
||||
}
|
||||
if(!job.body.disabled){
|
||||
bipedBody.rotateAngleX = job.body.rotationX * pi;
|
||||
bipedBody.rotateAngleY = job.body.rotationY * pi;
|
||||
bipedBody.rotateAngleZ = job.body.rotationZ * pi;
|
||||
}
|
||||
|
||||
if(!job.body.disabled){
|
||||
bipedBody.rotateAngleX = job.body.rotationX * pi;
|
||||
bipedBody.rotateAngleY = job.body.rotationY * pi;
|
||||
bipedBody.rotateAngleZ = job.body.rotationZ * pi;
|
||||
}
|
||||
if(!job.larm.disabled){
|
||||
bipedLeftArm.rotateAngleX = job.larm.rotationX * pi;
|
||||
bipedLeftArm.rotateAngleY = job.larm.rotationY * pi;
|
||||
bipedLeftArm.rotateAngleZ = job.larm.rotationZ * pi;
|
||||
|
||||
if(!npc.display.disableLivingAnimation){
|
||||
this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(par3 * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedLeftArm.rotateAngleX -= MathHelper.sin(par3 * 0.067F) * 0.05F;
|
||||
}
|
||||
}
|
||||
|
||||
if(!job.larm.disabled){
|
||||
bipedLeftArm.rotateAngleX = job.larm.rotationX * pi;
|
||||
bipedLeftArm.rotateAngleY = job.larm.rotationY * pi;
|
||||
bipedLeftArm.rotateAngleZ = job.larm.rotationZ * pi;
|
||||
if(!job.rarm.disabled){
|
||||
bipedRightArm.rotateAngleX = job.rarm.rotationX * pi;
|
||||
bipedRightArm.rotateAngleY = job.rarm.rotationY * pi;
|
||||
bipedRightArm.rotateAngleZ = job.rarm.rotationZ * pi;
|
||||
|
||||
if(!npc.display.disableLivingAnimation){
|
||||
this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(par3 * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedLeftArm.rotateAngleX -= MathHelper.sin(par3 * 0.067F) * 0.05F;
|
||||
}
|
||||
}
|
||||
if(!npc.display.disableLivingAnimation){
|
||||
this.bipedRightArm.rotateAngleZ += MathHelper.cos(par3 * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedRightArm.rotateAngleX += MathHelper.sin(par3 * 0.067F) * 0.05F;
|
||||
}
|
||||
}
|
||||
|
||||
if(!job.rarm.disabled){
|
||||
bipedRightArm.rotateAngleX = job.rarm.rotationX * pi;
|
||||
bipedRightArm.rotateAngleY = job.rarm.rotationY * pi;
|
||||
bipedRightArm.rotateAngleZ = job.rarm.rotationZ * pi;
|
||||
if(!job.rleg.disabled){
|
||||
bipedRightLeg.rotateAngleX = job.rleg.rotationX * pi;
|
||||
bipedRightLeg.rotateAngleY = job.rleg.rotationY * pi;
|
||||
bipedRightLeg.rotateAngleZ = job.rleg.rotationZ * pi;
|
||||
}
|
||||
|
||||
if(!npc.display.disableLivingAnimation){
|
||||
this.bipedRightArm.rotateAngleZ += MathHelper.cos(par3 * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedRightArm.rotateAngleX += MathHelper.sin(par3 * 0.067F) * 0.05F;
|
||||
}
|
||||
}
|
||||
|
||||
if(!job.rleg.disabled){
|
||||
bipedRightLeg.rotateAngleX = job.rleg.rotationX * pi;
|
||||
bipedRightLeg.rotateAngleY = job.rleg.rotationY * pi;
|
||||
bipedRightLeg.rotateAngleZ = job.rleg.rotationZ * pi;
|
||||
}
|
||||
|
||||
if(!job.lleg.disabled){
|
||||
bipedLeftLeg.rotateAngleX = job.lleg.rotationX * pi;
|
||||
bipedLeftLeg.rotateAngleY = job.lleg.rotationY * pi;
|
||||
bipedLeftLeg.rotateAngleZ = job.lleg.rotationZ * pi;
|
||||
}
|
||||
}
|
||||
}
|
||||
renderHead(npc, par7);
|
||||
renderArms(npc, par7,false);
|
||||
renderBody(npc, par7);
|
||||
renderLegs(npc, par7);
|
||||
if(!job.lleg.disabled){
|
||||
bipedLeftLeg.rotateAngleX = job.lleg.rotationX * pi;
|
||||
bipedLeftLeg.rotateAngleY = job.lleg.rotationY * pi;
|
||||
bipedLeftLeg.rotateAngleZ = job.lleg.rotationZ * pi;
|
||||
}
|
||||
}
|
||||
}
|
||||
renderHead(npc, par7);
|
||||
renderArms(npc, par7,false);
|
||||
renderBody(npc, par7);
|
||||
renderLegs(npc, par7);
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity entity)
|
||||
{
|
||||
EntityCustomNpc npc = (EntityCustomNpc) entity;
|
||||
|
||||
}
|
||||
@Override
|
||||
public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity entity)
|
||||
{
|
||||
EntityCustomNpc npc = (EntityCustomNpc) entity;
|
||||
isRiding = npc.isRiding();
|
||||
if(isSneak && (npc.currentAnimation == EnumAnimation.CRAWLING || npc.currentAnimation == EnumAnimation.LYING))
|
||||
isSneak = false;
|
||||
|
||||
// Body Rotations
|
||||
this.bipedBody.rotationPointX = 0;
|
||||
this.bipedBody.rotationPointY = 0;
|
||||
this.bipedBody.rotationPointZ = 0;
|
||||
if(isSneak && (npc.currentAnimation == EnumAnimation.CRAWLING || npc.currentAnimation == EnumAnimation.LYING))
|
||||
isSneak = false;
|
||||
this.bipedBody.rotationPointX = 0;
|
||||
this.bipedBody.rotationPointY = 0;
|
||||
this.bipedBody.rotationPointZ = 0;
|
||||
this.bipedBody.rotateAngleX = 0;
|
||||
this.bipedBody.rotateAngleY = 0;
|
||||
this.bipedBody.rotateAngleZ = 0;
|
||||
|
||||
this.bipedBodywear.rotationPointX = 0;
|
||||
this.bipedBodywear.rotationPointY = 0;
|
||||
this.bipedBodywear.rotationPointZ = 0;
|
||||
this.bipedBodywear.rotateAngleX = 0;
|
||||
this.bipedBodywear.rotateAngleY = 0;
|
||||
this.bipedBodywear.rotateAngleZ = 0;
|
||||
|
||||
// Head Rotations
|
||||
this.bipedHead.rotateAngleZ = 0;
|
||||
this.bipedHeadwear.rotateAngleZ = 0;
|
||||
|
||||
// Leg Rotations
|
||||
this.bipedLeftLeg.rotateAngleX = 0;
|
||||
this.bipedLeftLeg.rotateAngleY = 0;
|
||||
this.bipedLeftLeg.rotateAngleZ = 0;
|
||||
|
||||
this.bipedRightLeg.rotateAngleX = 0;
|
||||
this.bipedRightLeg.rotateAngleY = 0;
|
||||
this.bipedRightLeg.rotateAngleZ = 0;
|
||||
|
||||
// Arm Rotations
|
||||
this.bipedLeftArm.rotationPointY = 2;
|
||||
this.bipedLeftArm.rotationPointZ = 0;
|
||||
|
||||
this.bipedRightArm.rotationPointY = 2;
|
||||
this.bipedRightArm.rotationPointZ = 0;
|
||||
|
||||
super.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
|
||||
super.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
|
||||
if(!isArmor){
|
||||
hair.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
beard.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
wings.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
tail.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
skirt.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
hair.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
beard.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
wings.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
tail.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
}
|
||||
legs.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
legs.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
|
||||
if(isSleeping(entity)){
|
||||
if(bipedHead.rotateAngleX < 0){
|
||||
bipedHead.rotateAngleX = 0;
|
||||
bipedHeadwear.rotateAngleX = 0;
|
||||
}
|
||||
}
|
||||
else if(npc.currentAnimation == EnumAnimation.CRY)
|
||||
bipedHeadwear.rotateAngleX = bipedHead.rotateAngleX = 0.7f;
|
||||
else if(npc.currentAnimation == EnumAnimation.HUG){
|
||||
AniHug.setRotationAngles(par1, par2, par3, par4, par5, par6, entity, this);
|
||||
}
|
||||
else if(npc.currentAnimation == EnumAnimation.CRAWLING)
|
||||
AniCrawling.setRotationAngles(par1, par2, par3, par4, par5, par6, entity, this);
|
||||
else if(npc.currentAnimation == EnumAnimation.WAVING){
|
||||
bipedRightArm.rotateAngleX = -0.1f;
|
||||
bipedRightArm.rotateAngleY = 0;
|
||||
bipedRightArm.rotateAngleZ = (float) (Math.PI - 1f - Math.sin(entity.ticksExisted * 0.27f) * 0.5f );
|
||||
}
|
||||
else if(isSneak)
|
||||
this.bipedBody.rotateAngleX = 0.5F / npc.modelData.body.scaleY;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(isSleeping(entity)){
|
||||
if(bipedHead.rotateAngleX < 0){
|
||||
bipedHead.rotateAngleX = 0;
|
||||
bipedHeadwear.rotateAngleX = 0;
|
||||
}
|
||||
}
|
||||
else if(npc.currentAnimation == EnumAnimation.CRY)
|
||||
bipedHeadwear.rotateAngleX = bipedHead.rotateAngleX = 0.7f;
|
||||
|
||||
else if(npc.currentAnimation == EnumAnimation.HUG){
|
||||
AniHug.setRotationAngles(par1, par2, par3, par4, par5, par6, entity, this);
|
||||
}
|
||||
|
||||
else if(npc.currentAnimation == EnumAnimation.CRAWLING)
|
||||
AniCrawling.setRotationAngles(par1, par2, par3, par4, par5, par6, entity, this);
|
||||
|
||||
else if(npc.currentAnimation == EnumAnimation.WAVING){
|
||||
bipedRightArm.rotateAngleX = -0.1f;
|
||||
bipedRightArm.rotateAngleY = 0;
|
||||
bipedRightArm.rotateAngleZ = (float) (Math.PI - 1f - Math.sin(entity.ticksExisted * 0.27f) * 0.5f );
|
||||
}
|
||||
else if(isSneak){
|
||||
this.bipedBody.rotateAngleX = 0.5F / npc.modelData.body.scaleY;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setLivingAnimations(EntityLivingBase par1EntityLivingBase, float par2, float par3, float par4)
|
||||
{
|
||||
public void setLivingAnimations(EntityLivingBase par1EntityLivingBase, float par2, float par3, float par4)
|
||||
{
|
||||
if(entityModel != null){
|
||||
entityModel.setLivingAnimations(entity, par2, par3, par4);
|
||||
}
|
||||
else{
|
||||
EntityCustomNpc npc = (EntityCustomNpc) par1EntityLivingBase;
|
||||
EntityCustomNpc npc = (EntityCustomNpc) par1EntityLivingBase;
|
||||
if(!isArmor){
|
||||
ModelPartData partData = npc.modelData.getPartData("tail");
|
||||
if(partData != null)
|
||||
tail.setLivingAnimations(partData, par1EntityLivingBase, par2, par3, par4);
|
||||
ModelPartData partData = npc.modelData.getPartData("tail");
|
||||
if(partData != null)
|
||||
tail.setLivingAnimations(partData, par1EntityLivingBase, par2, par3, par4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void loadPlayerTexture(EntityCustomNpc npc){
|
||||
public void loadPlayerTexture(EntityCustomNpc npc){
|
||||
if(!isArmor && !currentlyPlayerTexture){
|
||||
ClientProxy.bindTexture(npc.textureLocation);
|
||||
currentlyPlayerTexture = true;
|
||||
ClientProxy.bindTexture(npc.textureLocation);
|
||||
currentlyPlayerTexture = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void renderHead(EntityCustomNpc entity, float f) {
|
||||
loadPlayerTexture(entity);
|
||||
float x = 0;
|
||||
@@ -484,15 +319,11 @@ public class ModelMPM extends ModelNPCMale{
|
||||
float z = 0;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
if(entity.currentAnimation == EnumAnimation.DANCING){
|
||||
float dancing = entity.ticksExisted / 4f;
|
||||
GL11.glTranslatef((float)Math.sin(dancing) * 0.075F, (float)Math.abs(Math.cos(dancing)) * 0.125F - 0.02F, (float)(-Math.abs(Math.cos(dancing))) * 0.075F);
|
||||
}
|
||||
if(entity.currentAnimation == EnumAnimation.DANCING){
|
||||
float dancing = entity.ticksExisted / 4f;
|
||||
GL11.glTranslatef((float)Math.sin(dancing) * 0.075F, (float)Math.abs(Math.cos(dancing)) * 0.125F - 0.02F, (float)(-Math.abs(Math.cos(dancing))) * 0.075F);
|
||||
}
|
||||
ModelPartConfig head = entity.modelData.head;
|
||||
|
||||
// Hide Head
|
||||
((ModelScaleRenderer)this.bipedHead).isHidden = entity.modelData.hideHead == 1;
|
||||
|
||||
if(bipedHeadwear.showModel && !bipedHeadwear.isHidden){
|
||||
if(entity.modelData.headwear == 1 || isArmor){
|
||||
((ModelScaleRenderer)this.bipedHeadwear).setConfig(head,x,y,z);
|
||||
@@ -514,7 +345,7 @@ public class ModelMPM extends ModelNPCMale{
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
private void renderBody(EntityCustomNpc entity, float f) {
|
||||
loadPlayerTexture(entity);
|
||||
float x = 0;
|
||||
@@ -522,23 +353,16 @@ public class ModelMPM extends ModelNPCMale{
|
||||
float z = 0;
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if(entity.currentAnimation == EnumAnimation.DANCING){
|
||||
if(entity.currentAnimation == EnumAnimation.DANCING){
|
||||
float dancing = entity.ticksExisted / 4f;
|
||||
GL11.glTranslatef((float)Math.sin(dancing) * 0.015F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
GL11.glTranslatef((float)Math.sin(dancing) * 0.015F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
ModelPartConfig body = entity.modelData.body;
|
||||
|
||||
// Hide Body
|
||||
((ModelScaleRenderer)this.bipedBody).isHidden = entity.modelData.hideBody == 1;
|
||||
|
||||
// Hide Bodywear
|
||||
((ModelScaleRenderer)this.bipedBodywear).isHidden = entity.modelData.bodywear != 1;
|
||||
|
||||
((ModelScaleRenderer)this.bipedBody).setConfig(body,x,y,z);
|
||||
((ModelScaleRenderer)this.bipedBody).render(f);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
}
|
||||
public void renderArms(EntityCustomNpc entity, float f, boolean bo){
|
||||
loadPlayerTexture(entity);
|
||||
@@ -550,47 +374,11 @@ public class ModelMPM extends ModelNPCMale{
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if(entity.currentAnimation == EnumAnimation.DANCING){
|
||||
if(entity.currentAnimation == EnumAnimation.DANCING){
|
||||
float dancing = entity.ticksExisted / 4f;
|
||||
GL11.glTranslatef((float)Math.sin(dancing) * 0.025F, (float)Math.abs(Math.cos(dancing)) * 0.125F - 0.02F, 0.0F);
|
||||
}
|
||||
|
||||
// Hide Arms
|
||||
if(entity.modelData.hideArms == 1){
|
||||
((ModelScaleRenderer)this.bipedRightArm).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedLeftArm).isHidden = true;
|
||||
}
|
||||
else if(entity.modelData.hideArms == 2){
|
||||
((ModelScaleRenderer)this.bipedRightArm).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedLeftArm).isHidden = false;
|
||||
}
|
||||
else if(entity.modelData.hideArms == 3){
|
||||
((ModelScaleRenderer)this.bipedRightArm).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedLeftArm).isHidden = true;
|
||||
}
|
||||
else{
|
||||
((ModelScaleRenderer)this.bipedRightArm).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedLeftArm).isHidden = false;
|
||||
}
|
||||
|
||||
// Hide Armwear
|
||||
if(entity.modelData.armwear == 1){
|
||||
((ModelScaleRenderer)this.bipedRightArmwear).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = false;
|
||||
}
|
||||
else if(entity.modelData.armwear == 2){
|
||||
((ModelScaleRenderer)this.bipedRightArmwear).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = false;
|
||||
}
|
||||
else if(entity.modelData.armwear == 3){
|
||||
((ModelScaleRenderer)this.bipedRightArmwear).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = true;
|
||||
}
|
||||
else{
|
||||
((ModelScaleRenderer)this.bipedRightArmwear).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = true;
|
||||
}
|
||||
|
||||
GL11.glTranslatef((float)Math.sin(dancing) * 0.025F, (float)Math.abs(Math.cos(dancing)) * 0.125F - 0.02F, 0.0F);
|
||||
}
|
||||
|
||||
if(!bo){
|
||||
((ModelScaleRenderer)this.bipedLeftArm).setConfig(arms,-x,y,z);
|
||||
((ModelScaleRenderer)this.bipedLeftArm).render(f);
|
||||
@@ -613,44 +401,6 @@ public class ModelMPM extends ModelNPCMale{
|
||||
float z = 0;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
|
||||
// Hide Legs
|
||||
if(entity.modelData.hideLegs == 1){
|
||||
((ModelScaleRenderer)this.bipedRightLeg).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedLeftLeg).isHidden = true;
|
||||
}
|
||||
else if(entity.modelData.hideLegs == 2){
|
||||
((ModelScaleRenderer)this.bipedRightLeg).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedLeftLeg).isHidden = false;
|
||||
}
|
||||
else if(entity.modelData.hideLegs == 3){
|
||||
((ModelScaleRenderer)this.bipedRightLeg).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedLeftLeg).isHidden = true;
|
||||
}
|
||||
else{
|
||||
((ModelScaleRenderer)this.bipedRightLeg).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedLeftLeg).isHidden = false;
|
||||
}
|
||||
|
||||
// Hide Legwear
|
||||
if(entity.modelData.legwear == 1){
|
||||
((ModelScaleRenderer)this.bipedRightLegWear).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedLeftLegWear).isHidden = false;
|
||||
}
|
||||
else if(entity.modelData.legwear == 2){
|
||||
((ModelScaleRenderer)this.bipedRightLegWear).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedLeftLegWear).isHidden = false;
|
||||
}
|
||||
else if(entity.modelData.legwear == 3){
|
||||
((ModelScaleRenderer)this.bipedRightLegWear).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedLeftLegWear).isHidden = true;
|
||||
}
|
||||
else{
|
||||
((ModelScaleRenderer)this.bipedRightLegWear).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedLeftLegWear).isHidden = true;
|
||||
}
|
||||
|
||||
this.legs.setConfig(legs,x,y,z);
|
||||
this.legs.render(f);
|
||||
if(!isArmor){
|
||||
@@ -660,22 +410,22 @@ public class ModelMPM extends ModelNPCMale{
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@Override
|
||||
public ModelRenderer getRandomModelBox(Random par1Random)
|
||||
{
|
||||
public ModelRenderer getRandomModelBox(Random par1Random)
|
||||
{
|
||||
int random = par1Random.nextInt(5);
|
||||
switch(random){
|
||||
case 0:
|
||||
return bipedRightLeg;
|
||||
case 1:
|
||||
return bipedHead;
|
||||
case 2:
|
||||
return bipedLeftArm;
|
||||
case 3:
|
||||
return bipedRightArm;
|
||||
case 4:
|
||||
return bipedLeftLeg;
|
||||
case 0:
|
||||
return bipedRightLeg;
|
||||
case 1:
|
||||
return bipedHead;
|
||||
case 2:
|
||||
return bipedLeftArm;
|
||||
case 3:
|
||||
return bipedRightArm;
|
||||
case 4:
|
||||
return bipedLeftLeg;
|
||||
}
|
||||
|
||||
return bipedBody;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,6 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.client.model.util.ModelScaleRenderer;
|
||||
import noppes.npcs.constants.EnumAnimation;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
@@ -18,110 +17,36 @@ public class ModelNPCMale extends ModelBiped
|
||||
{
|
||||
public boolean isDancing;
|
||||
public boolean isSleeping;
|
||||
|
||||
|
||||
public float animationTick;
|
||||
public float dancingTicks;
|
||||
|
||||
|
||||
public ModelNPCMale(float f)
|
||||
{
|
||||
init(f, 0.0F);
|
||||
init(f, 0.0F);
|
||||
}
|
||||
|
||||
public ModelNPCMale(float f, boolean arms)
|
||||
{
|
||||
super(f, 0.0F, 64, 64);
|
||||
init(f, 0.0F, arms);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLivingAnimations(EntityLivingBase par1EntityLiving, float f6, float f5, float par9){
|
||||
animationTick += par9;
|
||||
dancingTicks = CustomNpcs.ticks / 3.978873F;
|
||||
animationTick += par9;
|
||||
dancingTicks = CustomNpcs.ticks / 3.978873F;
|
||||
}
|
||||
|
||||
|
||||
// 64x64 Skin
|
||||
public void init(float f, float f1, boolean arms)
|
||||
{
|
||||
|
||||
heldItemLeft = 0;
|
||||
heldItemRight = 0;
|
||||
isSneak = false;
|
||||
aimedBow = false;
|
||||
|
||||
// Changed
|
||||
bipedCloak = new ModelRenderer(this, 0, 0);
|
||||
bipedCloak.setTextureSize(64, 32);
|
||||
bipedCloak.addBox(-5.0F, 0.0F, -1.0F, 10, 16, 1, f);
|
||||
|
||||
// Same
|
||||
bipedEars = new ModelRenderer(this, 24, 0);
|
||||
bipedEars.setTextureSize(64, 32); // NEW LINE
|
||||
bipedEars.addBox(-3F, -6F, -1F, 6, 6, 1, f);
|
||||
|
||||
bipedHead = new ModelRenderer(this, 0, 0);
|
||||
bipedHead.addBox(-4F, -8F, -4F, 8, 8, 8, f);
|
||||
bipedHead.setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
bipedHeadwear = new ModelRenderer(this, 32, 0);
|
||||
bipedHeadwear.addBox(-4F, -8F, -4F, 8, 8, 8, f + 0.5F);
|
||||
bipedHeadwear.setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
bipedBody = new ModelRenderer(this, 16, 16);
|
||||
bipedBody.addBox(-4F, 0.0F, -2F, 8, 12, 4, f);
|
||||
bipedBody.setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
if (arms){
|
||||
// Alex Version
|
||||
bipedRightArm = (new ModelScaleRenderer(this, 40, 16));
|
||||
bipedRightArm.addBox(-2.0F, -2.0F, -2.0F, 3, 12, 4, f);
|
||||
bipedRightArm.setRotationPoint(-5.0F, 2.5F + f1, 0.0F);
|
||||
|
||||
bipedLeftArm = new ModelScaleRenderer(this, 32, 48);
|
||||
bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 3, 12, 4, f);
|
||||
bipedLeftArm.setRotationPoint(5.0F, 2.5F + f1, 0.0F);
|
||||
}
|
||||
else{
|
||||
// Steve Version
|
||||
bipedRightArm = new ModelRenderer(this, 40, 16);
|
||||
bipedRightArm.addBox(-3F, -2F, -2F, 4, 12, 4, f);
|
||||
bipedRightArm.setRotationPoint(-5F, 2.0F + f1, 0.0F);
|
||||
|
||||
bipedLeftArm = new ModelRenderer(this, 32, 48);
|
||||
bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, f);
|
||||
bipedLeftArm.setRotationPoint(5.0F, 2.0F + f1, 0.0F);
|
||||
}
|
||||
|
||||
bipedRightLeg = new ModelRenderer(this, 0, 16);
|
||||
bipedRightLeg.addBox(-2F, 0.0F, -2F, 4, 12, 4, f);
|
||||
bipedRightLeg.setRotationPoint(-2F, 12F + f1, 0.0F);
|
||||
|
||||
bipedLeftLeg = new ModelRenderer(this, 16, 48);
|
||||
bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, f);
|
||||
bipedLeftLeg.setRotationPoint(1.9F, 12.0F + f1, 0.0F);
|
||||
|
||||
}
|
||||
|
||||
// 64x32
|
||||
public void init(float f, float f1)
|
||||
{
|
||||
heldItemLeft = 0;
|
||||
heldItemRight = 0;
|
||||
isSneak = false;
|
||||
aimedBow = false;
|
||||
|
||||
bipedCloak = new ModelRenderer(this, 0, 0);
|
||||
bipedCloak.textureHeight = 32;
|
||||
bipedCloak.addBox(-5F, 0.0F, -1F, 10, 16, 1, f);
|
||||
|
||||
|
||||
bipedEars = new ModelRenderer(this, 24, 0);
|
||||
bipedEars.addBox(-3F, -6F, -1F, 6, 6, 1, f);
|
||||
|
||||
|
||||
bipedHead = new ModelRenderer(this, 0, 0);
|
||||
bipedHead.addBox(-4F, -8F, -4F, 8, 8, 8, f);
|
||||
bipedHead.setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
|
||||
|
||||
bipedHeadwear = new ModelRenderer(this, 32, 0);
|
||||
bipedHeadwear.addBox(-4F, -8F, -4F, 8, 8, 8, f + 0.5F);
|
||||
bipedHeadwear.setRotationPoint(0.0F, 0.0F + f1, 0.0F);
|
||||
@@ -142,95 +67,92 @@ public class ModelNPCMale extends ModelBiped
|
||||
bipedLeftLeg.mirror = true;
|
||||
bipedLeftLeg.addBox(-2F, 0.0F, -2F, 4, 12, 4, f);
|
||||
bipedLeftLeg.setRotationPoint(2.0F, 12F + f1, 0.0F);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7){
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
|
||||
if(!isDancing){
|
||||
bipedHead.render(par7);
|
||||
bipedBody.render(par7);
|
||||
bipedRightArm.render(par7);
|
||||
bipedLeftArm.render(par7);
|
||||
bipedRightLeg.render(par7);
|
||||
bipedLeftLeg.render(par7);
|
||||
bipedHeadwear.render(par7);
|
||||
}
|
||||
else{
|
||||
renderHead(par1Entity, par7);
|
||||
renderArms(par1Entity, par7);
|
||||
renderBody(par1Entity, par7);
|
||||
renderLegs(par1Entity, par7);
|
||||
}
|
||||
if(!isDancing){
|
||||
bipedHead.render(par7);
|
||||
bipedBody.render(par7);
|
||||
bipedRightArm.render(par7);
|
||||
bipedLeftArm.render(par7);
|
||||
bipedRightLeg.render(par7);
|
||||
bipedLeftLeg.render(par7);
|
||||
bipedHeadwear.render(par7);
|
||||
}
|
||||
else{
|
||||
renderHead(par1Entity, par7);
|
||||
renderArms(par1Entity, par7);
|
||||
renderBody(par1Entity, par7);
|
||||
renderLegs(par1Entity, par7);
|
||||
}
|
||||
}
|
||||
public void renderHead(Entity entityliving,float par7){
|
||||
if(isDancing){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)Math.sin(dancingTicks) * 0.075F, (float)Math.abs(Math.cos(dancingTicks)) * 0.125F - 0.02F, (float)(-Math.abs(Math.cos(dancingTicks))) * 0.075F);
|
||||
bipedHead.render(par7);
|
||||
bipedHeadwear.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else{
|
||||
bipedHead.render(par7);
|
||||
bipedHeadwear.render(par7);
|
||||
}
|
||||
if(isDancing){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)Math.sin(dancingTicks) * 0.075F, (float)Math.abs(Math.cos(dancingTicks)) * 0.125F - 0.02F, (float)(-Math.abs(Math.cos(dancingTicks))) * 0.075F);
|
||||
bipedHead.render(par7);
|
||||
bipedHeadwear.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else{
|
||||
bipedHead.render(par7);
|
||||
bipedHeadwear.render(par7);
|
||||
}
|
||||
}
|
||||
public void renderLeftArm(Entity entityliving,float par7){
|
||||
if(isDancing){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)Math.sin(dancingTicks) * 0.025F, (float)Math.abs(Math.cos(dancingTicks)) * 0.125F - 0.02F, 0.0F);
|
||||
bipedLeftArm.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else{
|
||||
bipedLeftArm.render(par7);
|
||||
}
|
||||
if(isDancing){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)Math.sin(dancingTicks) * 0.025F, (float)Math.abs(Math.cos(dancingTicks)) * 0.125F - 0.02F, 0.0F);
|
||||
bipedLeftArm.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else{
|
||||
bipedLeftArm.render(par7);
|
||||
}
|
||||
}
|
||||
public void renderArms(Entity entity,float par7){
|
||||
renderLeftArm(entity,par7);
|
||||
renderRightArm(entity,par7);
|
||||
renderLeftArm(entity,par7);
|
||||
renderRightArm(entity,par7);
|
||||
}
|
||||
public void renderRightArm(Entity entityliving,float par7){
|
||||
if(isDancing){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)Math.sin(dancingTicks) * 0.025F, (float)Math.abs(Math.cos(dancingTicks)) * 0.125F - 0.02F, 0.0F);
|
||||
bipedRightArm.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else{
|
||||
bipedRightArm.render(par7);
|
||||
}
|
||||
if(isDancing){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)Math.sin(dancingTicks) * 0.025F, (float)Math.abs(Math.cos(dancingTicks)) * 0.125F - 0.02F, 0.0F);
|
||||
bipedRightArm.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else{
|
||||
bipedRightArm.render(par7);
|
||||
}
|
||||
}
|
||||
public void renderBody(Entity entityliving,float par7){
|
||||
if(isDancing){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)Math.sin(dancingTicks) * 0.015F, 0.0F, 0.0F);
|
||||
bipedBody.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else{
|
||||
bipedBody.render(par7);
|
||||
}
|
||||
if(isDancing){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)Math.sin(dancingTicks) * 0.015F, 0.0F, 0.0F);
|
||||
bipedBody.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else{
|
||||
bipedBody.render(par7);
|
||||
}
|
||||
}
|
||||
public void renderLegs(Entity entityliving,float par7){
|
||||
bipedRightLeg.render(par7);
|
||||
bipedLeftLeg.render(par7);
|
||||
}
|
||||
|
||||
|
||||
public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity entity)
|
||||
{
|
||||
EntityNPCInterface npc = (EntityNPCInterface) entity;
|
||||
isRiding = npc.isRiding();
|
||||
|
||||
|
||||
if(isSneak && (npc.currentAnimation == EnumAnimation.CRAWLING || npc.currentAnimation == EnumAnimation.LYING))
|
||||
isSneak = false;
|
||||
EntityNPCInterface npc = (EntityNPCInterface) entity;
|
||||
isRiding = npc.isRiding();
|
||||
|
||||
|
||||
if(isSneak && (npc.currentAnimation == EnumAnimation.CRAWLING || npc.currentAnimation == EnumAnimation.LYING))
|
||||
isSneak = false;
|
||||
bipedHead.rotateAngleY = par4 / (180F / (float)Math.PI);
|
||||
bipedHead.rotateAngleX = par5 / (180F / (float)Math.PI);
|
||||
bipedHeadwear.rotateAngleY = bipedHead.rotateAngleY;
|
||||
@@ -243,7 +165,7 @@ public class ModelNPCMale extends ModelBiped
|
||||
bipedLeftLeg.rotateAngleX = MathHelper.cos(par1 * 0.6662F + (float)Math.PI) * 1.4F * par2;
|
||||
bipedRightLeg.rotateAngleY = 0.0F;
|
||||
bipedLeftLeg.rotateAngleY = 0.0F;
|
||||
|
||||
|
||||
if (isRiding)
|
||||
{
|
||||
bipedRightArm.rotateAngleX += -((float)Math.PI / 5F);
|
||||
@@ -347,19 +269,19 @@ public class ModelNPCMale extends ModelBiped
|
||||
|
||||
public void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
|
||||
public void renderCloak(float f)
|
||||
{
|
||||
bipedCloak.render(f);
|
||||
}
|
||||
|
||||
public boolean isSleeping(Entity entity) {
|
||||
if(entity instanceof EntityPlayer && ((EntityPlayer)entity).isPlayerSleeping())
|
||||
return true;
|
||||
return ((EntityNPCInterface)entity).currentAnimation == EnumAnimation.LYING;
|
||||
}
|
||||
public boolean isSleeping(Entity entity) {
|
||||
if(entity instanceof EntityPlayer && ((EntityPlayer)entity).isPlayerSleeping())
|
||||
return true;
|
||||
return ((EntityNPCInterface)entity).currentAnimation == EnumAnimation.LYING;
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package noppes.npcs.client.model.part;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import noppes.npcs.client.model.util.Model2DRenderer;
|
||||
import noppes.npcs.client.model.util.ModelScaleRenderer;
|
||||
|
||||
public class ModelBodywear extends ModelScaleRenderer{
|
||||
|
||||
public ModelBodywear(ModelBase base) {
|
||||
super(base);
|
||||
|
||||
float scaler = 0.81f;
|
||||
float thick = 0.65f;
|
||||
|
||||
float x = -0.10f;
|
||||
float y = 12.76f;
|
||||
float z = -0.5f;
|
||||
|
||||
float z1 = 0.27f;
|
||||
|
||||
Model2DRenderer front = new Model2DRenderer(base, 20, 36, 8, 12, 64, 64);
|
||||
front.setRotationPoint(-4.588f, 0 + y, -2.302f + z);
|
||||
front.setScale(scaler);
|
||||
front.setThickness(thick);
|
||||
setRotation(front, 0, 0, 0);
|
||||
this.addChild(front);
|
||||
|
||||
Model2DRenderer back = new Model2DRenderer(base, 32, 36, 8, 12, 64, 64);
|
||||
back.setRotationPoint(4.588f, 0 + y, 2.302f);
|
||||
back.setScale(scaler);
|
||||
back.setThickness(thick);
|
||||
setRotation(back, 0, (float)(Math.PI), 0);
|
||||
this.addChild(back);
|
||||
|
||||
Model2DRenderer right = new Model2DRenderer(base, 28, 36, 4, 12, 64, 64);
|
||||
right.setRotationPoint(3.9425f, 0 + y, 2.29695f);
|
||||
right.setScale(scaler);
|
||||
right.setThickness(thick);
|
||||
setRotation(right, 0, (float)(Math.PI/2f), 0);
|
||||
this.addChild(right);
|
||||
|
||||
Model2DRenderer left = new Model2DRenderer(base, 16, 36, 4, 12, 64, 64);
|
||||
left.setRotationPoint(-3.9425f, 0 + y, -2.29695f + z);
|
||||
left.setScale(scaler);
|
||||
left.setThickness(thick);
|
||||
setRotation(left, 0, (float)(Math.PI/-2f), 0);
|
||||
this.addChild(left);
|
||||
|
||||
|
||||
Model2DRenderer top = new Model2DRenderer(base, 20, 32, 8, 4, 64, 64);
|
||||
top.setRotationPoint(-4.588f, -13.0f + y, -2.29695f);
|
||||
top.setScale(scaler/3);
|
||||
top.setThickness(thick);
|
||||
setRotation(top, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(top);
|
||||
|
||||
Model2DRenderer bottom = new Model2DRenderer(base, 28, 32, 8, 4, 64, 64);
|
||||
bottom.setRotationPoint(-4.588f, -0.65f + y, -2.29695f);
|
||||
bottom.setScale(scaler/3);
|
||||
bottom.setThickness(thick);
|
||||
setRotation(bottom, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(bottom);
|
||||
}
|
||||
|
||||
public void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,22 +12,19 @@ public class ModelBreasts extends ModelPartInterface {
|
||||
private ModelRenderer breasts2;
|
||||
private ModelRenderer breasts3;
|
||||
|
||||
public ModelBreasts(ModelMPM base, int width, int height) {
|
||||
public ModelBreasts(ModelMPM base) {
|
||||
super(base);
|
||||
|
||||
breasts = new Model2DRenderer(base, 20f, 22, 8, 3, width, height);
|
||||
breasts.setTextureSize(width, height);
|
||||
breasts = new Model2DRenderer(base, 20f, 22, 8, 3, 64, 32);
|
||||
breasts.setRotationPoint(-3.6F, 5.2f, -3f);
|
||||
breasts.setScale(0.17f, 0.19f);
|
||||
breasts.setThickness(1);
|
||||
this.addChild(breasts);
|
||||
|
||||
breasts2 = new ModelRenderer(base);
|
||||
breasts2.setTextureSize(width, height);
|
||||
this.addChild(breasts2);
|
||||
|
||||
Model2DRenderer bottom = new Model2DRenderer(base, 20f, 22, 8, 4, width, height);
|
||||
bottom.setTextureSize(width, height);
|
||||
Model2DRenderer bottom = new Model2DRenderer(base, 20f, 22, 8, 4, 64, 32);
|
||||
bottom.setRotationPoint(-3.6F, 5f, -3.1f);
|
||||
bottom.setScale(0.225f, 0.20f);
|
||||
bottom.setThickness(2f);
|
||||
@@ -35,65 +32,56 @@ public class ModelBreasts extends ModelPartInterface {
|
||||
breasts2.addChild(bottom);
|
||||
|
||||
breasts3 = new ModelRenderer(base);
|
||||
breasts3.setTextureSize(width, height);
|
||||
this.addChild(breasts3);
|
||||
|
||||
Model2DRenderer right = new Model2DRenderer(base, 20f, 22, 3, 2, width, height);
|
||||
right.setTextureSize(width, height);
|
||||
Model2DRenderer right = new Model2DRenderer(base, 20f, 22, 3, 2, 64, 32);
|
||||
right.setRotationPoint(-3.8F, 5.3f, -3.6f);
|
||||
right.setScale(0.12f, 0.14f);
|
||||
right.setThickness(1.75f);
|
||||
breasts3.addChild(right);
|
||||
|
||||
Model2DRenderer right2 = new Model2DRenderer(base, 20f, 22, 3, 1, width, height);
|
||||
right2.setTextureSize(width, height);
|
||||
Model2DRenderer right2 = new Model2DRenderer(base, 20f, 22, 3, 1, 64, 32);
|
||||
right2.setRotationPoint(-3.8F, 4.1f, -3.14f);
|
||||
right2.setScale(0.06f, 0.07f);
|
||||
right2.setThickness(1.75f);
|
||||
right2.rotateAngleX = (float) (Math.PI / 9);
|
||||
breasts3.addChild(right2);
|
||||
|
||||
Model2DRenderer right3 = new Model2DRenderer(base, 20f, 24, 3, 1, width, height);
|
||||
right3.setTextureSize(width, height);
|
||||
Model2DRenderer right3 = new Model2DRenderer(base, 20f, 24, 3, 1, 64, 32);
|
||||
right3.setRotationPoint(-3.8F, 5.3f, -3.6f);
|
||||
right3.setScale(0.06f, 0.07f);
|
||||
right3.setThickness(1.75f);
|
||||
right3.rotateAngleX = (float) (-Math.PI / 9);
|
||||
breasts3.addChild(right3);
|
||||
|
||||
Model2DRenderer right4 = new Model2DRenderer(base, 23f, 22, 1, 2, width, height);
|
||||
right4.setTextureSize(width, height);
|
||||
Model2DRenderer right4 = new Model2DRenderer(base, 23f, 22, 1, 2, 64, 32);
|
||||
right4.setRotationPoint(-1.8f, 5.3f, -3.14f);
|
||||
right4.setScale(0.12f, 0.14f);
|
||||
right4.setThickness(1.75f);
|
||||
right4.rotateAngleY = (float) (Math.PI / 9);
|
||||
breasts3.addChild(right4);
|
||||
|
||||
Model2DRenderer left = new Model2DRenderer(base, 25f, 22, 3, 2, width, height);
|
||||
left.setTextureSize(width, height);
|
||||
Model2DRenderer left = new Model2DRenderer(base, 25f, 22, 3, 2, 64, 32);
|
||||
left.setRotationPoint(0.8F, 5.3f, -3.6f);
|
||||
left.setScale(0.12f, 0.14f);
|
||||
left.setThickness(1.75f);
|
||||
breasts3.addChild(left);
|
||||
|
||||
Model2DRenderer left2 = new Model2DRenderer(base, 25f, 22, 3, 1, width, height);
|
||||
left2.setTextureSize(width, height);
|
||||
Model2DRenderer left2 = new Model2DRenderer(base, 25f, 22, 3, 1, 64, 32);
|
||||
left2.setRotationPoint(0.8F, 4.1f, -3.18f);
|
||||
left2.setScale(0.06f, 0.07f);
|
||||
left2.setThickness(1.75f);
|
||||
left2.rotateAngleX = (float) (Math.PI / 9);
|
||||
breasts3.addChild(left2);
|
||||
|
||||
Model2DRenderer left3 = new Model2DRenderer(base, 25f, 24, 3, 1, width, height);
|
||||
left3.setTextureSize(width, height);
|
||||
Model2DRenderer left3 = new Model2DRenderer(base, 25f, 24, 3, 1, 64, 32);
|
||||
left3.setRotationPoint(0.8F, 5.3f, -3.6f);
|
||||
left3.setScale(0.06f, 0.07f);
|
||||
left3.setThickness(1.75f);
|
||||
left3.rotateAngleX = (float) (-Math.PI / 9);
|
||||
breasts3.addChild(left3);
|
||||
|
||||
Model2DRenderer left4 = new Model2DRenderer(base, 24f, 22, 1, 2, width, height);
|
||||
left4.setTextureSize(width, height);
|
||||
Model2DRenderer left4 = new Model2DRenderer(base, 24f, 22, 1, 2, 64, 32);
|
||||
left4.setRotationPoint(0.8f, 5.3f, -3.6f);
|
||||
left4.setScale(0.12f, 0.14f);
|
||||
left4.setThickness(1.75f);
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
package noppes.npcs.client.model.part;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
import noppes.npcs.client.model.util.ModelPartInterface;
|
||||
|
||||
public class ModelDuckBeak extends ModelRenderer {
|
||||
ModelRenderer Top3;
|
||||
ModelRenderer Top2;
|
||||
ModelRenderer Bottom;
|
||||
ModelRenderer Left;
|
||||
ModelRenderer Right;
|
||||
ModelRenderer Middle;
|
||||
ModelRenderer Top;
|
||||
|
||||
public ModelDuckBeak(ModelMPM base) {
|
||||
super(base);
|
||||
|
||||
Top3 = new ModelRenderer(base, 14, 0);
|
||||
Top3.setTextureSize(64,32);
|
||||
Top3.addBox(0F, 0F, 0F, 2, 1, 3);
|
||||
Top3.setRotationPoint(-1F, -2F, -5F);
|
||||
setRotation(Top3, 0.3346075F, 0F, 0F);
|
||||
addChild(Top3);
|
||||
|
||||
Top2 = new ModelRenderer(base, 0, 0);
|
||||
Top2.setTextureSize(64,32);
|
||||
Top2.addBox(0F, 0F, -0.4F, 4, 1, 3);
|
||||
Top2.setRotationPoint(-2F, -3F, -2F);
|
||||
setRotation(Top2, 0.3346075F, 0F, 0F);
|
||||
addChild(Top2);
|
||||
|
||||
Bottom = new ModelRenderer(base, 24, 0);
|
||||
Bottom.setTextureSize(64,32);
|
||||
Bottom.addBox(0F, 0F, 0F, 2, 1, 5);
|
||||
Bottom.setRotationPoint(-1F, -1F, -5F);
|
||||
addChild(Bottom);
|
||||
|
||||
Left = new ModelRenderer(base, 0, 4);
|
||||
Left.setTextureSize(64,32);
|
||||
Left.mirror = true;
|
||||
Left.addBox(0F, 0F, 0F, 1, 3, 2);
|
||||
Left.setRotationPoint(0.98F, -3F, -2F);
|
||||
addChild(Left);
|
||||
|
||||
Right = new ModelRenderer(base, 0, 4);
|
||||
Right.setTextureSize(64,32);
|
||||
Right.addBox(0F, 0F, 0F, 1, 3, 2);
|
||||
Right.setRotationPoint(-1.98F, -3F, -2F);
|
||||
addChild(Right);
|
||||
|
||||
Middle = new ModelRenderer(base, 3, 0);
|
||||
Middle.setTextureSize(64,32);
|
||||
Middle.addBox(0F, 0F, 0F, 2, 1, 3);
|
||||
Middle.setRotationPoint(-1F, -2F, -5F);
|
||||
addChild(Middle);
|
||||
|
||||
Top = new ModelRenderer(base, 6, 4);
|
||||
Top.setTextureSize(64,32);
|
||||
Top.addBox(0F, 0F, 0F, 2, 2, 1);
|
||||
Top.setRotationPoint(-1F, -4.4F, -1F);
|
||||
addChild(Top);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(float f)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0, 0, -1f * f);
|
||||
GL11.glScalef(0.82f, 0.82f, 0.70f);
|
||||
super.render(f);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,7 +13,7 @@ public class ModelFin extends ModelPartInterface {
|
||||
|
||||
public ModelFin(ModelMPM base) {
|
||||
super(base);
|
||||
model = new Model2DRenderer(base, 48, 8, 16, 24, 64, 32);
|
||||
model = new Model2DRenderer(base, 56, 20, 8, 12, 64, 32);
|
||||
model.setRotationPoint(-0.5F, 12, 10);
|
||||
model.setScale(0.74f);
|
||||
model.rotateAngleY = (float)Math.PI / 2;
|
||||
|
||||
@@ -6,94 +6,49 @@ import noppes.npcs.client.model.util.Model2DRenderer;
|
||||
import noppes.npcs.client.model.util.ModelScaleRenderer;
|
||||
|
||||
public class ModelHeadwear extends ModelScaleRenderer{
|
||||
|
||||
|
||||
public ModelHeadwear(ModelBase base) {
|
||||
super(base);
|
||||
Model2DRenderer right = new Model2DRenderer(base, 32, 8, 8, 8, 64, 64);
|
||||
right.setRotationPoint(-4.641F, .8f, 4.64f);
|
||||
right.setScale(0.58f);
|
||||
right.setThickness(0.65f);
|
||||
setRotation(right, 0, (float)(Math.PI/2f), 0);
|
||||
this.addChild(right);
|
||||
|
||||
Model2DRenderer left = new Model2DRenderer(base, 48, 8, 8, 8, 64, 64);
|
||||
left.setRotationPoint(4.639F, .8f, -4.64f);
|
||||
left.setScale(0.58f);
|
||||
left.setThickness(0.65f);
|
||||
setRotation(left, 0, (float)(Math.PI/-2f), 0);
|
||||
this.addChild(left);
|
||||
|
||||
Model2DRenderer front = new Model2DRenderer(base, 40, 8, 8, 8, 64, 64);
|
||||
front.setRotationPoint(-4.64F, .801f, -4.641f);
|
||||
front.setScale(0.58f);
|
||||
front.setThickness(0.65f);
|
||||
setRotation(front, 0, 0, 0);
|
||||
this.addChild(front);
|
||||
|
||||
Model2DRenderer back = new Model2DRenderer(base, 56, 8, 8, 8, 64, 64);
|
||||
back.setRotationPoint(4.64F, .801f, 4.639f);
|
||||
back.setScale(0.58f);
|
||||
back.setThickness(0.65f);
|
||||
setRotation(back, 0, (float)(Math.PI), 0);
|
||||
this.addChild(back);
|
||||
|
||||
Model2DRenderer top = new Model2DRenderer(base, 40, 0, 8, 8, 64, 64);
|
||||
top.setRotationPoint(-4.64F, -8.5f, -4.64f);
|
||||
top.setScale(0.5799f);
|
||||
top.setThickness(0.65f);
|
||||
setRotation(top, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(top);
|
||||
|
||||
Model2DRenderer bottom = new Model2DRenderer(base, 48, 0, 8, 8, 64, 64);
|
||||
bottom.setRotationPoint(-4.64F, 0f, -4.64f);
|
||||
bottom.setScale(0.5799f);
|
||||
bottom.setThickness(0.65f);
|
||||
setRotation(bottom, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(bottom);
|
||||
}
|
||||
|
||||
public ModelHeadwear(ModelBase base, boolean steve32) {
|
||||
super(base);
|
||||
super(base);
|
||||
Model2DRenderer right = new Model2DRenderer(base, 32, 8, 8, 8, 64, 32);
|
||||
right.setRotationPoint(-4.641F, .8f, 4.64f);
|
||||
right.setScale(0.58f);
|
||||
right.setThickness(0.65f);
|
||||
setRotation(right, 0, (float)(Math.PI/2f), 0);
|
||||
setRotation(right, 0, (float)(Math.PI/2f), 0);
|
||||
this.addChild(right);
|
||||
|
||||
|
||||
Model2DRenderer left = new Model2DRenderer(base, 48, 8, 8, 8, 64, 32);
|
||||
left.setRotationPoint(4.639F, .8f, -4.64f);
|
||||
left.setScale(0.58f);
|
||||
left.setThickness(0.65f);
|
||||
setRotation(left, 0, (float)(Math.PI/-2f), 0);
|
||||
setRotation(left, 0, (float)(Math.PI/-2f), 0);
|
||||
this.addChild(left);
|
||||
|
||||
|
||||
Model2DRenderer front = new Model2DRenderer(base, 40, 8, 8, 8, 64, 32);
|
||||
front.setRotationPoint(-4.64F, .801f, -4.641f);
|
||||
front.setScale(0.58f);
|
||||
front.setThickness(0.65f);
|
||||
setRotation(front, 0, 0, 0);
|
||||
setRotation(front, 0, 0, 0);
|
||||
this.addChild(front);
|
||||
|
||||
|
||||
Model2DRenderer back = new Model2DRenderer(base, 56, 8, 8, 8, 64, 32);
|
||||
back.setRotationPoint(4.64F, .801f, 4.639f);
|
||||
back.setScale(0.58f);
|
||||
back.setThickness(0.65f);
|
||||
setRotation(back, 0, (float)(Math.PI), 0);
|
||||
setRotation(back, 0, (float)(Math.PI), 0);
|
||||
this.addChild(back);
|
||||
|
||||
|
||||
Model2DRenderer top = new Model2DRenderer(base, 40, 0, 8, 8, 64, 32);
|
||||
top.setRotationPoint(-4.64F, -8.5f, -4.64f);
|
||||
top.setScale(0.5799f);
|
||||
top.setThickness(0.65f);
|
||||
setRotation(top, (float)(Math.PI / -2), 0, 0);
|
||||
setRotation(top, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(top);
|
||||
|
||||
|
||||
Model2DRenderer bottom = new Model2DRenderer(base, 48, 0, 8, 8, 64, 32);
|
||||
bottom.setRotationPoint(-4.64F, 0f, -4.64f);
|
||||
bottom.setScale(0.5799f);
|
||||
bottom.setThickness(0.65f);
|
||||
setRotation(bottom, (float)(Math.PI / -2), 0, 0);
|
||||
setRotation(bottom, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(bottom);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
package noppes.npcs.client.model.part;
|
||||
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.ModelPartData;
|
||||
import noppes.npcs.ModelData;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
import noppes.npcs.client.model.util.ModelPartInterface;
|
||||
import noppes.npcs.client.model.part.horns.ModelAntennasBack;
|
||||
import noppes.npcs.client.model.part.horns.ModelAntennasFront;
|
||||
import noppes.npcs.client.model.part.horns.ModelAntlerHorns;
|
||||
import noppes.npcs.client.model.part.horns.ModelBullHorns;
|
||||
|
||||
public class ModelHorns extends ModelPartInterface {
|
||||
private ModelRenderer bull;
|
||||
private ModelRenderer antlers;
|
||||
private ModelRenderer antennasBack;
|
||||
private ModelRenderer antennasFront;
|
||||
|
||||
public ModelHorns(ModelMPM base) {
|
||||
super(base);
|
||||
|
||||
this.addChild(bull = new ModelBullHorns(base));
|
||||
this.addChild(antlers = new ModelAntlerHorns(base));
|
||||
this.addChild(antennasBack = new ModelAntennasBack(base));
|
||||
this.addChild(antennasFront = new ModelAntennasFront(base));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float par1, float par2, float par3,
|
||||
float par4, float par5, float par6, Entity entity) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData(ModelData data) {
|
||||
ModelPartData config = data.getPartData("horns");
|
||||
if(config == null)
|
||||
{
|
||||
isHidden = true;
|
||||
return;
|
||||
}
|
||||
color = config.color;
|
||||
isHidden = false;
|
||||
|
||||
bull.isHidden = config.type != 0;
|
||||
antlers.isHidden = config.type != 1;
|
||||
antennasBack.isHidden = config.type != 2;
|
||||
antennasFront.isHidden = config.type != 3;
|
||||
|
||||
if(!config.playerTexture){
|
||||
location = config.getResource();
|
||||
}
|
||||
else
|
||||
location = null;
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,6 @@ import noppes.npcs.client.ClientProxy;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
import noppes.npcs.client.model.part.legs.ModelDigitigradeLegs;
|
||||
import noppes.npcs.client.model.part.legs.ModelMermaidLegs;
|
||||
import noppes.npcs.client.model.part.legs.ModelMermaidLegs2;
|
||||
import noppes.npcs.client.model.part.legs.ModelNagaLegs;
|
||||
import noppes.npcs.client.model.util.ModelScaleRenderer;
|
||||
import noppes.npcs.constants.EnumAnimation;
|
||||
@@ -28,7 +27,6 @@ public class ModelLegs extends ModelScaleRenderer{
|
||||
private ModelNagaLegs naga;
|
||||
private ModelDigitigradeLegs digitigrade;
|
||||
private ModelMermaidLegs mermaid;
|
||||
private ModelMermaidLegs2 mermaid2;
|
||||
|
||||
private ModelRenderer spiderLeg1;
|
||||
private ModelRenderer spiderLeg2;
|
||||
@@ -59,9 +57,8 @@ public class ModelLegs extends ModelScaleRenderer{
|
||||
|
||||
private ModelMPM base;
|
||||
|
||||
public ModelLegs(ModelMPM base, ModelScaleRenderer leg1, ModelScaleRenderer leg2, int textWidth, int textHeight) {
|
||||
public ModelLegs(ModelMPM base, ModelScaleRenderer leg1, ModelScaleRenderer leg2) {
|
||||
super(base);
|
||||
|
||||
this.base = base;
|
||||
this.leg1 = leg1;
|
||||
this.leg2 = leg2;
|
||||
@@ -74,61 +71,51 @@ public class ModelLegs extends ModelScaleRenderer{
|
||||
float var1 = 0.0F;
|
||||
byte var2 = 15;
|
||||
spiderNeck = new ModelRenderer(base, 0, 0);
|
||||
spiderNeck.setTextureSize(64,32);
|
||||
spiderNeck.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6, var1);
|
||||
spiderNeck.setRotationPoint(0.0F, (float)var2, 2.0F);
|
||||
spider.addChild(spiderNeck);
|
||||
|
||||
spiderBody = new ModelRenderer(base, 0, 12);
|
||||
spiderBody.setTextureSize(64,32);
|
||||
spiderBody.addBox(-5.0F, -4.0F, -6.0F, 10, 8, 12, var1);
|
||||
spiderBody.setRotationPoint(0.0F, (float)var2, 11.0F);
|
||||
spider.addChild(spiderBody);
|
||||
|
||||
this.spiderLeg1 = new ModelRenderer(base, 18, 0);
|
||||
this.spiderLeg1.setTextureSize(64,32);
|
||||
this.spiderLeg1.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, var1);
|
||||
this.spiderLeg1.setRotationPoint(-4.0F, (float)var2, 4.0F);
|
||||
spider.addChild(spiderLeg1);
|
||||
|
||||
this.spiderLeg2 = new ModelRenderer(base, 18, 0);
|
||||
this.spiderLeg2.setTextureSize(64,32);
|
||||
this.spiderLeg2.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, var1);
|
||||
this.spiderLeg2.setRotationPoint(4.0F, (float)var2, 4.0F);
|
||||
spider.addChild(spiderLeg2);
|
||||
|
||||
this.spiderLeg3 = new ModelRenderer(base, 18, 0);
|
||||
this.spiderLeg3.setTextureSize(64,32);
|
||||
this.spiderLeg3.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, var1);
|
||||
this.spiderLeg3.setRotationPoint(-4.0F, (float)var2, 3.0F);
|
||||
spider.addChild(spiderLeg3);
|
||||
|
||||
this.spiderLeg4 = new ModelRenderer(base, 18, 0);
|
||||
this.spiderLeg4.setTextureSize(64,32);
|
||||
this.spiderLeg4.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, var1);
|
||||
this.spiderLeg4.setRotationPoint(4.0F, (float)var2, 3.0F);
|
||||
spider.addChild(spiderLeg4);
|
||||
|
||||
this.spiderLeg5 = new ModelRenderer(base, 18, 0);
|
||||
this.spiderLeg5.setTextureSize(64,32);
|
||||
this.spiderLeg5.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, var1);
|
||||
this.spiderLeg5.setRotationPoint(-4.0F, (float)var2, 2.0F);
|
||||
spider.addChild(spiderLeg5);
|
||||
|
||||
this.spiderLeg6 = new ModelRenderer(base, 18, 0);
|
||||
this.spiderLeg6.setTextureSize(64,32);
|
||||
this.spiderLeg6.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, var1);
|
||||
this.spiderLeg6.setRotationPoint(4.0F, (float)var2, 2.0F);
|
||||
spider.addChild(spiderLeg6);
|
||||
|
||||
this.spiderLeg7 = new ModelRenderer(base, 18, 0);
|
||||
this.spiderLeg7.setTextureSize(64,32);
|
||||
this.spiderLeg7.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, var1);
|
||||
this.spiderLeg7.setRotationPoint(-4.0F, (float)var2, 1.0F);
|
||||
spider.addChild(spiderLeg7);
|
||||
|
||||
this.spiderLeg8 = new ModelRenderer(base, 18, 0);
|
||||
this.spiderLeg8.setTextureSize(64,32);
|
||||
this.spiderLeg8.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, var1);
|
||||
this.spiderLeg8.setRotationPoint(4.0F, (float)var2, 1.0F);
|
||||
spider.addChild(spiderLeg8);
|
||||
@@ -212,19 +199,10 @@ public class ModelLegs extends ModelScaleRenderer{
|
||||
naga = new ModelNagaLegs(base);
|
||||
this.addChild(naga);
|
||||
|
||||
// Add Mermaid Legs
|
||||
mermaid = new ModelMermaidLegs(base);
|
||||
mermaid2 = new ModelMermaidLegs2(base);
|
||||
this.addChild(mermaid);
|
||||
this.addChild(mermaid2);
|
||||
|
||||
boolean mirror = false;
|
||||
if(textHeight != textWidth){
|
||||
mirror = true;
|
||||
}
|
||||
|
||||
digitigrade = new ModelDigitigradeLegs(base, mirror, textWidth, textHeight);
|
||||
|
||||
|
||||
digitigrade = new ModelDigitigradeLegs(base);
|
||||
this.addChild(digitigrade);
|
||||
}
|
||||
public void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
@@ -318,18 +296,9 @@ public class ModelLegs extends ModelScaleRenderer{
|
||||
naga.isSneaking = base.isSneak;
|
||||
naga.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
}
|
||||
else if(part.type == 4 || part.type == 6){
|
||||
mermaid.isRiding = base.isRiding;
|
||||
mermaid.isSleeping = base.isSleeping(entity);
|
||||
mermaid.isCrawling = this.entity.currentAnimation == EnumAnimation.CRAWLING;
|
||||
mermaid.isSneaking = base.isSneak;
|
||||
mermaid2.isRiding = base.isRiding;
|
||||
mermaid2.isSleeping = base.isSleeping(entity);
|
||||
mermaid2.isCrawling = this.entity.currentAnimation == EnumAnimation.CRAWLING;
|
||||
mermaid2.isSneaking = base.isSneak;
|
||||
mermaid.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
mermaid2.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
}
|
||||
else if(part.type == 4){
|
||||
mermaid.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
}
|
||||
else if(part.type == 5){
|
||||
digitigrade.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
|
||||
}
|
||||
@@ -345,7 +314,7 @@ public class ModelLegs extends ModelScaleRenderer{
|
||||
return;
|
||||
GL11.glPushMatrix();
|
||||
if(part.type == 4)
|
||||
part.playerTexture = false;
|
||||
part.playerTexture = !entity.isInWater();
|
||||
if(!base.isArmor){
|
||||
if(!part.playerTexture){
|
||||
ClientProxy.bindTexture(part.getResource());
|
||||
@@ -356,19 +325,18 @@ public class ModelLegs extends ModelScaleRenderer{
|
||||
base.currentlyPlayerTexture = true;
|
||||
}
|
||||
}
|
||||
if(part.type == 0){
|
||||
leg1.setConfig(config, x, y, z);
|
||||
leg1.render(par1);
|
||||
leg2.setConfig(config, -x, y, z);
|
||||
leg2.render(par1);
|
||||
}
|
||||
if(part.type == 0 || part.type == 4 && !entity.isInWater()){
|
||||
leg1.setConfig(config, x, y, z);
|
||||
leg1.render(par1);
|
||||
leg2.setConfig(config, -x, y, z);
|
||||
leg2.render(par1);
|
||||
}
|
||||
|
||||
if(!base.isArmor){
|
||||
naga.isHidden = part.type != 1;
|
||||
spider.isHidden = part.type != 2;
|
||||
horse.isHidden = part.type != 3;
|
||||
mermaid.isHidden = part.type != 4;
|
||||
mermaid2.isHidden = part.type != 6;
|
||||
mermaid.isHidden = part.type != 4 || !entity.isInWater();
|
||||
digitigrade.isHidden = part.type != 5;
|
||||
|
||||
if(!horse.isHidden){
|
||||
@@ -384,7 +352,7 @@ public class ModelLegs extends ModelScaleRenderer{
|
||||
x = 0;
|
||||
y *= 2f;
|
||||
}
|
||||
else if(!mermaid.isHidden || !mermaid2.isHidden || !digitigrade.isHidden){
|
||||
else if(!mermaid.isHidden || !digitigrade.isHidden){
|
||||
x = 0;
|
||||
y *= 2f;
|
||||
}
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
package noppes.npcs.client.model.part;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.ModelData;
|
||||
import noppes.npcs.ModelPartData;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
import noppes.npcs.client.model.util.ModelPartInterface;
|
||||
import noppes.npcs.client.model.util.ModelPlane;
|
||||
import noppes.npcs.client.model.util.ModelPlaneRenderer;
|
||||
|
||||
public class ModelSkirt extends ModelPartInterface {
|
||||
private ModelPlaneRenderer Shape1;
|
||||
public ModelSkirt(ModelMPM base) {
|
||||
super(base);
|
||||
float pi = (float) (Math.PI / 5);
|
||||
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
Shape1 = new ModelPlaneRenderer(base, 58, 18);
|
||||
Shape1.setTextureSize(64,32);
|
||||
Shape1.addSidePlane(0, 0, 0, 9, 2);
|
||||
|
||||
ModelPlaneRenderer part1 = new ModelPlaneRenderer(base, 58, 18);
|
||||
part1.setTextureSize(64,32);
|
||||
part1.addSidePlane(2, 0, 0, 9, 2);
|
||||
part1.rotateAngleY = -(float) (Math.PI/2);
|
||||
Shape1.addChild(part1);
|
||||
|
||||
Shape1.setRotationPoint(2.4F, 8.8F, 0F);
|
||||
setRotation(Shape1, 0.3F, -0.2f, -0.2F);
|
||||
}
|
||||
public void render(float par1)
|
||||
{
|
||||
if (this.isHidden || !this.showModel)
|
||||
return;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.7f, 1.04f, 1.6f);
|
||||
super.render(par1);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
public void renderParts(float par1) {
|
||||
for(int i = 0; i < 10; i++){
|
||||
GL11.glRotatef(36, 0, 1, 0);
|
||||
Shape1.render(par1);
|
||||
}
|
||||
}
|
||||
|
||||
public void setRotationAngles(float par1, float par2, float par3,
|
||||
float par4, float par5, float par6, Entity entity) {
|
||||
setRotation(Shape1, 0.3F, -0.2f, -0.2F);
|
||||
Shape1.rotateAngleX += base.bipedLeftArm.rotateAngleX * 0.04f;
|
||||
Shape1.rotateAngleZ += base.bipedLeftArm.rotateAngleX * 0.06f;
|
||||
//this.Shape1.rotateAngleX -= MathHelper.sin(par3 * 0.067F) * 0.05F;
|
||||
this.Shape1.rotateAngleZ -= MathHelper.cos(par3 * 0.09F) * 0.04F - 0.05F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData(ModelData data) {
|
||||
ModelPartData config = data.getPartData("skirt");
|
||||
if(config == null)
|
||||
{
|
||||
isHidden = true;
|
||||
return;
|
||||
}
|
||||
color = config.color;
|
||||
isHidden = false;
|
||||
location = (ResourceLocation) config.getResource();
|
||||
}
|
||||
}
|
||||
@@ -13,45 +13,34 @@ public class ModelSnout extends ModelPartInterface {
|
||||
private ModelRenderer medium;
|
||||
private ModelRenderer large;
|
||||
private ModelRenderer bunny;
|
||||
private ModelRenderer beak;
|
||||
|
||||
public ModelSnout(ModelMPM base) {
|
||||
super(base);
|
||||
|
||||
small = new ModelRenderer(base, 24, 0);
|
||||
small.setTextureSize(64,32);
|
||||
small.addBox(0F, 0F, 0F, 4, 3, 1);
|
||||
small.setRotationPoint(-2F, -3F, -5F);
|
||||
this.addChild(small);
|
||||
|
||||
medium = new ModelRenderer(base, 24, 0);
|
||||
medium.setTextureSize(64,32);
|
||||
medium.addBox(0F, 0F, 0F, 4, 3, 2);
|
||||
medium.setRotationPoint(-2F, -3F, -6F);
|
||||
this.addChild(medium);
|
||||
|
||||
large = new ModelRenderer(base, 24, 0);
|
||||
large.setTextureSize(64,32);
|
||||
large.addBox(0F, 0F, 0F, 4, 3, 3);
|
||||
large.setRotationPoint(-2F, -3F, -7F);
|
||||
this.addChild(large);
|
||||
|
||||
bunny = new ModelRenderer(base, 24, 0);
|
||||
bunny.setTextureSize(64,32);
|
||||
bunny.addBox(1F, 1F, 0F, 4, 2, 1);
|
||||
bunny.setRotationPoint(-3F, -4F, -5F);
|
||||
this.addChild(bunny);
|
||||
|
||||
ModelRenderer tooth = new ModelRenderer(base, 24, 3);
|
||||
tooth.setTextureSize(64,32);
|
||||
tooth.addBox(2F, 3f, 0F, 2, 1, 1);
|
||||
tooth.setRotationPoint(0F, 0F, 0F);
|
||||
bunny.addChild(tooth);
|
||||
|
||||
beak = new ModelDuckBeak(base);
|
||||
beak.setTextureSize(64,32);
|
||||
beak.setRotationPoint(0, 0, -4F);
|
||||
this.addChild(beak);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -75,7 +64,6 @@ public class ModelSnout extends ModelPartInterface {
|
||||
medium.isHidden = config.type != 1;
|
||||
large.isHidden = config.type != 2;
|
||||
bunny.isHidden = config.type != 3;
|
||||
beak.isHidden = config.type != 4;
|
||||
|
||||
if(!config.playerTexture){
|
||||
location = config.getResource();
|
||||
|
||||
@@ -10,7 +10,8 @@ import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.ModelPartData;
|
||||
import noppes.npcs.client.ClientProxy;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
import noppes.npcs.client.model.part.tails.*;
|
||||
import noppes.npcs.client.model.part.tails.ModelDragonTail;
|
||||
import noppes.npcs.client.model.part.tails.ModelSquirrelTail;
|
||||
import noppes.npcs.client.model.util.ModelScaleRenderer;
|
||||
import noppes.npcs.constants.EnumAnimation;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
@@ -25,9 +26,6 @@ public class ModelTail extends ModelScaleRenderer {
|
||||
private ModelRenderer dragon;
|
||||
private ModelRenderer squirrel;
|
||||
private ModelRenderer horse;
|
||||
private ModelRenderer fin;
|
||||
private ModelRenderer rodent;
|
||||
private ModelRenderer feather;
|
||||
|
||||
private int color = 0xFFFFFF;
|
||||
|
||||
@@ -39,7 +37,6 @@ public class ModelTail extends ModelScaleRenderer {
|
||||
this.rotationPointY = 11;
|
||||
|
||||
tail = new ModelRenderer(base, 56, 21);
|
||||
tail.setTextureSize(64, 32);
|
||||
tail.addBox(-1F, 0F, 0F, 2, 9, 2);
|
||||
tail.setRotationPoint(0F, 0, 1F);
|
||||
setRotation(tail, 0.8714253F, 0F, 0F);
|
||||
@@ -71,11 +68,6 @@ public class ModelTail extends ModelScaleRenderer {
|
||||
this.addChild(dragon = new ModelDragonTail(base));
|
||||
|
||||
this.addChild(squirrel = new ModelSquirrelTail(base));
|
||||
|
||||
this.addChild(fin = new ModelTailFin(base));
|
||||
this.addChild(rodent = new ModelRodentTail(base));
|
||||
|
||||
this.addChild(feather = new ModelFeatherTail(base));
|
||||
}
|
||||
|
||||
public void setData(EntityCustomNpc entity) {
|
||||
@@ -126,9 +118,6 @@ public class ModelTail extends ModelScaleRenderer {
|
||||
dragon.isHidden = config.type != 1;
|
||||
horse.isHidden = config.type != 2;
|
||||
squirrel.isHidden = config.type != 3;
|
||||
fin.isHidden = config.type != 4;
|
||||
rodent.isHidden = config.type != 5;
|
||||
feather.isHidden = config.type != 6;
|
||||
if(!config.playerTexture){
|
||||
location = config.getResource();
|
||||
}
|
||||
|
||||
@@ -17,14 +17,14 @@ public class ModelWings extends ModelPartInterface {
|
||||
public ModelWings(ModelMPM base) {
|
||||
super(base);
|
||||
|
||||
lWing = new Model2DRenderer(base, 48, 32, 16, 32, 64, 32);
|
||||
lWing = new Model2DRenderer(base, 56, 16, 8, 16, 64, 32);
|
||||
lWing.mirror = true;
|
||||
lWing.setRotationPoint(2F, 4, 2F);
|
||||
lWing.setRotationOffset(-16, -12);
|
||||
setRotation(lWing, 0.7141593F, -0.5235988F, -0.5090659F);
|
||||
this.addChild(lWing);
|
||||
|
||||
rWing = new Model2DRenderer(base, 48, 32, 16, 32, 64, 32);
|
||||
rWing = new Model2DRenderer(base, 56, 16, 8, 16, 64, 32);
|
||||
rWing.setRotationPoint(-2F, 4F, 2F);
|
||||
rWing.setRotationOffset(-16, -12);
|
||||
setRotation(rWing, 0.7141593F, 0.5235988F, 0.5090659F);
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
package noppes.npcs.client.model.part.horns;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
|
||||
public class ModelAntennasBack extends ModelRenderer {
|
||||
|
||||
public ModelAntennasBack(ModelMPM base) {
|
||||
super(base);
|
||||
|
||||
ModelRenderer rightantenna1 = new ModelRenderer(base, 36, 0);
|
||||
rightantenna1.setTextureSize(64,32);
|
||||
rightantenna1.addBox(-1F, 0F, 0F, 1, 4, 1);
|
||||
rightantenna1.setRotationPoint(3F, -10.9F, 0F);
|
||||
setRotation(rightantenna1, -0.7504916F, 0.0698132F, 0.0698132F);
|
||||
addChild(rightantenna1);
|
||||
|
||||
ModelRenderer leftantenna1 = new ModelRenderer(base, 32, 0);
|
||||
leftantenna1.setTextureSize(64,32);
|
||||
leftantenna1.mirror = true;
|
||||
leftantenna1.addBox(0F, 0F, 0F, 1, 4, 1);
|
||||
leftantenna1.setRotationPoint(-3F, -10.9F, 0F);
|
||||
setRotation(leftantenna1, -0.7504916F, -0.0698132F, -0.0698132F);
|
||||
addChild(leftantenna1);
|
||||
|
||||
ModelRenderer rightantenna2 = new ModelRenderer(base, 36, 0);
|
||||
rightantenna2.setTextureSize(64,32);
|
||||
rightantenna2.addBox(-1F, 0F, 0F, 1, 4, 1);
|
||||
rightantenna2.setRotationPoint(4.6F, -12.2F, 3.4F);
|
||||
setRotation(rightantenna2, -1.22173F, 0.4363323F, 0.0698132F);
|
||||
addChild(rightantenna2);
|
||||
|
||||
ModelRenderer leftantenna2 = new ModelRenderer(base, 32, 0);
|
||||
leftantenna2.setTextureSize(64,32);
|
||||
leftantenna2.mirror = true;
|
||||
leftantenna2.addBox(0F, 0F, 0F, 1, 4, 1);
|
||||
leftantenna2.setRotationPoint(-4.6F, -12.2F, 3.4F);
|
||||
setRotation(leftantenna2, -1.22173F, -0.4363323F, -0.0698132F);
|
||||
addChild(leftantenna2);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package noppes.npcs.client.model.part.horns;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
|
||||
public class ModelAntennasFront extends ModelRenderer {
|
||||
|
||||
public ModelAntennasFront(ModelMPM base) {
|
||||
super(base);
|
||||
|
||||
ModelRenderer rightantenna1 = new ModelRenderer(base, 36, 0);
|
||||
rightantenna1.setTextureSize(64,32);
|
||||
rightantenna1.addBox(0F, 0F, 0F, 1, 4, 1);
|
||||
rightantenna1.setRotationPoint(2F, -9.4F, -2F);
|
||||
setRotation(rightantenna1, 0.4014257F, 0.0698132F, 0.0698132F);
|
||||
addChild(rightantenna1);
|
||||
|
||||
ModelRenderer leftantenna1 = new ModelRenderer(base, 32, 0);
|
||||
leftantenna1.setTextureSize(64,32);
|
||||
leftantenna1.mirror = true;
|
||||
leftantenna1.addBox(-1F, 0F, 0F, 1, 4, 1);
|
||||
leftantenna1.setRotationPoint(-2F, -9.4F, -2F);
|
||||
setRotation(leftantenna1, 0.4014257F, -0.0698132F, -0.0698132F);
|
||||
addChild(leftantenna1);
|
||||
|
||||
ModelRenderer rightantenna2 = new ModelRenderer(base, 36, 0);
|
||||
rightantenna2.setTextureSize(64,32);
|
||||
rightantenna2.addBox(0F, 0F, 0F, 1, 4, 1);
|
||||
rightantenna2.setRotationPoint(3F, -10.2F, -5.3F);
|
||||
setRotation(rightantenna2, 1.22173F, -0.2094395F, 0.0698132F);
|
||||
addChild(rightantenna2);
|
||||
|
||||
ModelRenderer leftantenna2 = new ModelRenderer(base, 32, 0);
|
||||
leftantenna2.setTextureSize(64,32);
|
||||
leftantenna2.mirror = true;
|
||||
leftantenna2.addBox(-1F, 0F, 0F, 1, 4, 1);
|
||||
leftantenna2.setRotationPoint(-3F, -10.2F, -5.3F);
|
||||
setRotation(leftantenna2, 1.22173F, 0.2094395F, -0.0698132F);
|
||||
addChild(leftantenna2);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
package noppes.npcs.client.model.part.horns;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
|
||||
public class ModelAntlerHorns extends ModelRenderer {
|
||||
|
||||
public ModelAntlerHorns(ModelMPM base) {
|
||||
super(base);
|
||||
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
ModelRenderer right_base_horn = new ModelRenderer(base, 58, 20);
|
||||
right_base_horn.setTextureSize(64,32);
|
||||
right_base_horn.addBox(0F, -5F, 0F, 1, 6, 1);
|
||||
right_base_horn.setRotationPoint(-2.5F, -6F, -1F);
|
||||
setRotation(right_base_horn, 0F, 0F, -0.2F);
|
||||
addChild(right_base_horn);
|
||||
|
||||
ModelRenderer right_horn1 = new ModelRenderer(base, 58, 20);
|
||||
right_horn1.setTextureSize(64,32);
|
||||
right_horn1.addBox(0F, -5F, 0F, 1, 5, 1);
|
||||
right_horn1.setRotationPoint(0F, -4F, 0F);
|
||||
setRotation(right_horn1, 1F, 0F, -1F);
|
||||
right_base_horn.addChild(right_horn1);
|
||||
|
||||
ModelRenderer right_horn2 = new ModelRenderer(base, 58, 20);
|
||||
right_horn2.setTextureSize(64,32);
|
||||
right_horn2.addBox(0F, -4F, 0F, 1, 5, 1);
|
||||
right_horn2.setRotationPoint(-0F, -6F, -0F);
|
||||
setRotation(right_horn2, -0.5F, -0.5F, 0F);
|
||||
right_base_horn.addChild(right_horn2);
|
||||
|
||||
ModelRenderer things1 = new ModelRenderer(base, 58, 20);
|
||||
things1.setTextureSize(64,32);
|
||||
things1.addBox(0F, -5F, 0F, 1, 5, 1);
|
||||
things1.setRotationPoint(0F, -3F, 1F);
|
||||
setRotation(things1, 2F, 0.5f, 0.5f);
|
||||
right_horn2.addChild(things1);
|
||||
|
||||
ModelRenderer things2 = new ModelRenderer(base, 58, 20);
|
||||
things2.setTextureSize(64,32);
|
||||
things2.addBox(0F, -5F, 0F, 1, 5, 1);
|
||||
things2.setRotationPoint(0F, -3F, 1F);
|
||||
setRotation(things2, 2F, -0.5f, -0.5f);
|
||||
right_horn2.addChild(things2);
|
||||
|
||||
ModelRenderer left_base_horn = new ModelRenderer(base, 58, 20);
|
||||
left_base_horn.setTextureSize(64,32);
|
||||
left_base_horn.addBox(0F, -5F, 0F, 1, 6, 1);
|
||||
left_base_horn.setRotationPoint(1.5F, -6F, -1F);
|
||||
setRotation(left_base_horn, 0F, 0F, 0.2F);
|
||||
addChild(left_base_horn);
|
||||
|
||||
ModelRenderer left_horn1 = new ModelRenderer(base, 58, 20);
|
||||
left_horn1.setTextureSize(64,32);
|
||||
left_horn1.addBox(0F, -5F, 0F, 1, 5, 1);
|
||||
left_horn1.setRotationPoint(0F, -5F, 0F);
|
||||
setRotation(left_horn1, 1F, 0F, 1F);
|
||||
left_base_horn.addChild(left_horn1);
|
||||
|
||||
ModelRenderer left_horn2 = new ModelRenderer(base, 58, 20);
|
||||
left_horn2.setTextureSize(64,32);
|
||||
left_horn2.addBox(0F, -4F, 0F, 1, 5, 1);
|
||||
left_horn2.setRotationPoint(0F, -6F, 1F);
|
||||
setRotation(left_horn2, -0.5F, 0.5F, 0F);
|
||||
left_base_horn.addChild(left_horn2);
|
||||
|
||||
ModelRenderer things8 = new ModelRenderer(base, 58, 20);
|
||||
things8.setTextureSize(64,32);
|
||||
things8.addBox(0F, -5F, 0F, 1, 5, 1);
|
||||
things8.setRotationPoint(0F, -3F, 1F);
|
||||
setRotation(things8, 2F, -0.5f, -0.5f);
|
||||
left_horn2.addChild(things8);
|
||||
|
||||
ModelRenderer things4 = new ModelRenderer(base, 58, 20);
|
||||
things4.setTextureSize(64,32);
|
||||
things4.addBox(0F, -5F, 0F, 1, 5, 1);
|
||||
things4.setRotationPoint(0F, -3F, 1F);
|
||||
setRotation(things4, 2F, 0.5f, 0.5f);
|
||||
left_horn2.addChild(things4);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package noppes.npcs.client.model.part.horns;
|
||||
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
|
||||
public class ModelBullHorns extends ModelRenderer {
|
||||
|
||||
public ModelBullHorns(ModelMPM base) {
|
||||
super(base);
|
||||
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
ModelRenderer Left1 = new ModelRenderer(base, 36, 16);
|
||||
Left1.setTextureSize(64,32);
|
||||
Left1.mirror = true;
|
||||
Left1.addBox(0F, 0F, 0F, 2, 2, 2);
|
||||
Left1.setRotationPoint(4F, -8F, -2F);
|
||||
addChild(Left1);
|
||||
|
||||
ModelRenderer Right1 = new ModelRenderer(base, 36, 16);
|
||||
Right1.setTextureSize(64,32);
|
||||
Right1.addBox(-3F, 0F, 0F, 2, 2, 2);
|
||||
Right1.setRotationPoint(-3F, -8F, -2F);
|
||||
addChild(Right1);
|
||||
|
||||
ModelRenderer Left2 = new ModelRenderer(base, 12, 16);
|
||||
Left2.setTextureSize(64,32);
|
||||
Left2.mirror = true;
|
||||
Left2.addBox(0F, 0F, 0F, 2, 2, 2);
|
||||
Left2.setRotationPoint(5F, -8F, -2F);
|
||||
setRotation(Left2, 0.0371786F, 0.3346075F, -0.2602503F);
|
||||
addChild(Left2);
|
||||
|
||||
ModelRenderer Right2 = new ModelRenderer(base, 12, 16);
|
||||
Right2.setTextureSize(64,32);
|
||||
Right2.addBox(-2F, 0F, 0F, 2, 2, 2);
|
||||
Right2.setRotationPoint(-5F, -8F, -2F);
|
||||
setRotation(Right2, 0.0371786F, -0.3346075F, 0.2602503F);
|
||||
addChild(Right2);
|
||||
|
||||
ModelRenderer Left3 = new ModelRenderer(base, 13, 17);
|
||||
Left3.setTextureSize(64,32);
|
||||
Left3.mirror = true;
|
||||
Left3.addBox(-1F, 0F, 0F, 2, 1, 1);
|
||||
Left3.setRotationPoint(7F, -8F, -2F);
|
||||
setRotation(Left3, 0.2602503F, 0.8551081F, -0.4089647F);
|
||||
addChild(Left3);
|
||||
|
||||
ModelRenderer Right3 = new ModelRenderer(base, 13, 17);
|
||||
Right3.setTextureSize(64,32);
|
||||
Right3.addBox(-1F, 0F, 0F, 2, 1, 1);
|
||||
Right3.setRotationPoint(-7F, -8F, -2F);
|
||||
setRotation(Right3, -0.2602503F, -0.8551081F, 0.4089647F);
|
||||
addChild(Right3);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -22,40 +22,34 @@ public class ModelDigitigradeLegs extends ModelRenderer {
|
||||
|
||||
private ModelMPM base;
|
||||
|
||||
public ModelDigitigradeLegs(ModelMPM base, boolean mirror, int textWidth, int textHeight) {
|
||||
public ModelDigitigradeLegs(ModelMPM base) {
|
||||
super(base);
|
||||
this.base = base;
|
||||
|
||||
rightleg = new ModelRenderer(base, 0, 16);
|
||||
rightleg.setTextureSize(textWidth, textHeight);
|
||||
rightleg.addBox(-2F, 0F, -2F, 4, 6, 4);
|
||||
rightleg.setRotationPoint(-2.1F, 11F, 0F);
|
||||
setRotation(rightleg, -0.3F, 0F, 0F);
|
||||
this.addChild(rightleg);
|
||||
|
||||
rightleg2 = new ModelRenderer(base, 0, 20);
|
||||
rightleg2.setTextureSize(textWidth, textHeight);
|
||||
rightleg2.addBox(-1.5F, -1F, -2F, 3, 7, 3);
|
||||
rightleg2.setRotationPoint(0F, 4.1F, 0F);
|
||||
setRotation(rightleg2, 1.1f, 0F, 0F);
|
||||
rightleg.addChild(rightleg2);
|
||||
|
||||
rightleglow = new ModelRenderer(base, 0, 24);
|
||||
rightleglow.setTextureSize(textWidth, textHeight);
|
||||
rightleglow.addBox(-1.5F, 0F, -1F, 3, 5, 2);
|
||||
rightleglow.setRotationPoint(0F, 5F, 0F);
|
||||
setRotation(rightleglow, -1.35F, 0F, 0F);
|
||||
rightleg2.addChild(rightleglow);
|
||||
|
||||
rightfoot = new ModelRenderer(base, 1, 26);
|
||||
rightfoot.setTextureSize(textWidth, textHeight);
|
||||
rightfoot.addBox(-1.5F, 0F, -5F, 3, 2, 4);
|
||||
rightfoot.setRotationPoint(0F, 3.7F, 1.2F);
|
||||
setRotation(rightfoot, 0.55F, 0F, 0F);
|
||||
rightleglow.addChild(rightfoot);
|
||||
|
||||
leftleg = new ModelRenderer(base, 0, 16);
|
||||
leftleg.setTextureSize(textWidth, textHeight);
|
||||
leftleg.mirror = true;
|
||||
leftleg.addBox(-2F, 0F, -2F, 4, 6, 4);
|
||||
leftleg.setRotationPoint(2.1F, 11F, 0F);
|
||||
@@ -63,7 +57,6 @@ public class ModelDigitigradeLegs extends ModelRenderer {
|
||||
this.addChild(leftleg);
|
||||
|
||||
leftleg2 = new ModelRenderer(base, 0, 20);
|
||||
leftleg2.setTextureSize(textWidth, textHeight);
|
||||
leftleg2.mirror = true;
|
||||
leftleg2.addBox(-1.5F, -1F, -2F, 3, 7, 3);
|
||||
leftleg2.setRotationPoint(0F, 4.1F, 0F);
|
||||
@@ -71,7 +64,6 @@ public class ModelDigitigradeLegs extends ModelRenderer {
|
||||
leftleg.addChild(leftleg2);
|
||||
|
||||
leftleglow = new ModelRenderer(base, 0, 24);
|
||||
leftleglow.setTextureSize(textWidth, textHeight);
|
||||
leftleglow.mirror = true;
|
||||
leftleglow.addBox(-1.5F, 0F, -1F, 3, 5, 2);
|
||||
leftleglow.setRotationPoint(0F, 5F, 0F);
|
||||
@@ -79,7 +71,6 @@ public class ModelDigitigradeLegs extends ModelRenderer {
|
||||
leftleg2.addChild(leftleglow);
|
||||
|
||||
leftfoot = new ModelRenderer(base, 1, 26);
|
||||
leftfoot.setTextureSize(textWidth, textHeight);
|
||||
leftfoot.mirror = true;
|
||||
leftfoot.addBox(-1.5F, 0F, -5F, 3, 2, 4);
|
||||
leftfoot.setRotationPoint(0F, 3.7F, 1.2F);
|
||||
|
||||
@@ -4,11 +4,6 @@ import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.ModelData;
|
||||
import noppes.npcs.constants.EnumAnimation;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
|
||||
public class ModelMermaidLegs extends ModelRenderer {
|
||||
|
||||
@@ -18,52 +13,42 @@ public class ModelMermaidLegs extends ModelRenderer {
|
||||
ModelRenderer fin1;
|
||||
ModelRenderer fin2;
|
||||
|
||||
public boolean isRiding = false;
|
||||
public boolean isSneaking = false;
|
||||
public boolean isSleeping = false;
|
||||
public boolean isCrawling = false;
|
||||
|
||||
public ModelMermaidLegs(ModelBase base) {
|
||||
super(base);
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
super(base);
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
top = new ModelRenderer(base, 0, 16);
|
||||
top.setTextureSize(64,32);
|
||||
top.addBox(-2F, -2.5F, -2F, 8, 9, 4);
|
||||
top.setRotationPoint(-2F, 14F, 1F);
|
||||
setRotation(top, 0.26F, 0F, 0F);
|
||||
top = new ModelRenderer(base, 0, 16);
|
||||
top.addBox(-2F, -2.5F, -2F, 8, 9, 4);
|
||||
top.setRotationPoint(-2F, 14F, 1F);
|
||||
setRotation(top, 0.26F, 0F, 0F);
|
||||
|
||||
middle = new ModelRenderer(base, 28, 0);
|
||||
middle.setTextureSize(64,32);
|
||||
middle.addBox(0F, 0F, 0F, 7, 6, 4);
|
||||
middle.setRotationPoint(-1.5F, 6.5F, -1F);
|
||||
setRotation(middle, 0.86f, 0F, 0F);
|
||||
top.addChild(middle);
|
||||
middle = new ModelRenderer(base, 28, 0);
|
||||
middle.addBox(0F, 0F, 0F, 7, 6, 4);
|
||||
middle.setRotationPoint(-1.5F, 6.5F, -1F);
|
||||
setRotation(middle, 0.86f, 0F, 0F);
|
||||
top.addChild(middle);
|
||||
|
||||
bottom = new ModelRenderer(base, 24, 16);
|
||||
bottom.setTextureSize(64,32);
|
||||
bottom.addBox(0F, 0F, 0F, 6, 7, 3);
|
||||
bottom.setRotationPoint(0.5F, 6F, 0.5f);
|
||||
setRotation(bottom, 0.15f, 0F, 0F);
|
||||
middle.addChild(bottom);
|
||||
bottom = new ModelRenderer(base, 24, 16);
|
||||
bottom.addBox(0F, 0F, 0F, 6, 7, 3);
|
||||
bottom.setRotationPoint(0.5F, 6F, 0.5f);
|
||||
setRotation(bottom, 0.15f, 0F, 0F);
|
||||
middle.addChild(bottom);
|
||||
|
||||
fin1 = new ModelRenderer(base, 0, 0);
|
||||
fin1.setTextureSize(64,32);
|
||||
fin1.addBox(0F, 0F, 0F, 5, 9, 1);
|
||||
fin1.setRotationPoint(0F, 4.5F, 1F);
|
||||
setRotation(fin1, 0.05f, 0, 0.5911399F);
|
||||
bottom.addChild(fin1);
|
||||
fin1 = new ModelRenderer(base, 0, 0);
|
||||
fin1.addBox(0F, 0F, 0F, 5, 9, 1);
|
||||
fin1.setRotationPoint(0F, 4.5F, 1F);
|
||||
setRotation(fin1, 0.05f, 0, 0.5911399F);
|
||||
bottom.addChild(fin1);
|
||||
|
||||
fin2 = new ModelRenderer(base, 0, 0);
|
||||
fin2.mirror = true;
|
||||
fin2.addBox(-5F, 0F, 0F, 5, 9, 1);
|
||||
fin2.setRotationPoint(6F, 4.5F, 1F);
|
||||
setRotation(fin2, 0.05f, 0, -0.591143F);
|
||||
bottom.addChild(fin2);
|
||||
|
||||
fin2 = new ModelRenderer(base, 0, 0);
|
||||
fin2.setTextureSize(64,32);
|
||||
fin2.mirror = true;
|
||||
fin2.addBox(-5F, 0F, 0F, 5, 9, 1);
|
||||
fin2.setRotationPoint(6F, 4.5F, 1F);
|
||||
setRotation(fin2, 0.05f, 0, -0.591143F);
|
||||
bottom.addChild(fin2);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(float f5) {
|
||||
@@ -81,21 +66,12 @@ public class ModelMermaidLegs extends ModelRenderer {
|
||||
public void setRotationAngles(float par1, float par2, float par3,
|
||||
float par4, float par5, float par6, Entity entity) {
|
||||
float ani = MathHelper.sin(par1 * 0.6662F);
|
||||
top.setRotationPoint(-2F, 14F, 1F);
|
||||
if(ani > 0.2)
|
||||
ani /= 3f;
|
||||
if(this.isSleeping || this.isCrawling){
|
||||
top.rotateAngleX = middle.rotateAngleX = bottom.rotateAngleX = fin2.rotateAngleX = 0;
|
||||
}
|
||||
else{
|
||||
top.rotateAngleX = 0.26F - ani * 0.2F * par2;
|
||||
middle.rotateAngleX = 0.86f - ani * 0.24F * par2;
|
||||
bottom.rotateAngleX = 0.15f - ani * 0.28F * par2;
|
||||
fin2.rotateAngleX = fin1.rotateAngleX = 0.05f - ani * 0.35F * par2;
|
||||
|
||||
if(entity.isSneaking()){
|
||||
top.setRotationPoint(-2F, 12F, 6F);
|
||||
}
|
||||
}
|
||||
top.rotateAngleX = 0.26F - ani * 0.2F * par2;
|
||||
middle.rotateAngleX = 0.86f - ani * 0.24F * par2;
|
||||
bottom.rotateAngleX = 0.15f - ani * 0.28F * par2;
|
||||
fin2.rotateAngleX = fin1.rotateAngleX = 0.05f - ani * 0.35F * par2;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
package noppes.npcs.client.model.part.legs;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import noppes.npcs.ModelData;
|
||||
import noppes.npcs.constants.EnumAnimation;
|
||||
|
||||
public class ModelMermaidLegs2 extends ModelRenderer {
|
||||
|
||||
ModelRenderer Tail1;
|
||||
ModelRenderer Tail2;
|
||||
ModelRenderer Tail3;
|
||||
ModelRenderer Tail4;
|
||||
ModelRenderer Tail5;
|
||||
ModelRenderer Tail6;
|
||||
ModelRenderer Tail7;
|
||||
ModelRenderer Tail8;
|
||||
|
||||
public boolean isRiding = false;
|
||||
public boolean isSneaking = false;
|
||||
public boolean isSleeping = false;
|
||||
public boolean isCrawling = false;
|
||||
|
||||
public ModelMermaidLegs2(ModelBase base) {
|
||||
super(base);
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
Tail1 = new ModelRenderer(base, 0, 18);
|
||||
Tail1.setTextureSize(64,32);
|
||||
Tail1.addBox(0F, 0F, 0F, 8, 6, 4);
|
||||
Tail1.setRotationPoint(-4F, 12F, -2F);
|
||||
setRotation(Tail1, 0.075F, 0F, 0F);
|
||||
|
||||
Tail2 = new ModelRenderer(base, 0, 18);
|
||||
Tail2.setTextureSize(64,32);
|
||||
Tail2.addBox(0F, 0F, 0F, 6, 5, 3);
|
||||
Tail2.setRotationPoint(1F, 5.5F, 0.3F);
|
||||
setRotation(Tail2, 0.56F, 0F, 0F);
|
||||
Tail1.addChild(Tail2);
|
||||
|
||||
Tail3 = new ModelRenderer(base, 0, 18);
|
||||
Tail3.setTextureSize(64,32);
|
||||
Tail3.addBox(0F, 0F, 0F, 5, 5, 2);
|
||||
Tail3.setRotationPoint(5.5F, 4F, 2.5F);
|
||||
setRotation(Tail3, -0.37818F, 3.141593F, 0F);
|
||||
Tail2.addChild(Tail3);
|
||||
|
||||
Tail4 = new ModelRenderer(base, 0, 20);
|
||||
Tail4.setTextureSize(64,32);
|
||||
Tail4.addBox(0F, 0F, 0F, 4, 3, 1);
|
||||
Tail4.setRotationPoint(0.5F, 4.5F, 0.5F);
|
||||
setRotation(Tail4, -0.1f, 0, 0F);
|
||||
Tail3.addChild(Tail4);
|
||||
|
||||
Tail5 = new ModelRenderer(base, 0, 20);
|
||||
Tail5.setTextureSize(64,32);
|
||||
Tail5.addBox(0F, 0F, 0F, 1, 3, 1);
|
||||
Tail5.setRotationPoint(-1F, 1.5F, 0F);
|
||||
setRotation(Tail5, 0, 0, 0F);
|
||||
Tail4.addChild(Tail5);
|
||||
|
||||
Tail6 = new ModelRenderer(base, 0, 20);
|
||||
Tail6.setTextureSize(64,32);
|
||||
Tail6.addBox(0F, 0F, 0F, 1, 3, 1);
|
||||
Tail6.setRotationPoint(-2F, 3F, 0F);
|
||||
setRotation(Tail6, 0, 0, 0F);
|
||||
Tail4.addChild(Tail6);
|
||||
|
||||
Tail7 = new ModelRenderer(base, 0, 20);
|
||||
Tail7.setTextureSize(64,32);
|
||||
Tail7.addBox(0F, 0F, 0F, 1, 3, 1);
|
||||
Tail7.setRotationPoint(4F, 1.5F, 0F);
|
||||
setRotation(Tail7, 0, 0, 0F);
|
||||
Tail4.addChild(Tail7);
|
||||
|
||||
Tail8 = new ModelRenderer(base, 0, 20);
|
||||
Tail8.setTextureSize(64,32);
|
||||
Tail8.addBox(0F, 0F, 0F, 1, 3, 1);
|
||||
Tail8.setRotationPoint(5F, 3F, 0F);
|
||||
setRotation(Tail8, 0, 0, 0F);
|
||||
Tail4.addChild(Tail8);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(float f5) {
|
||||
if (isHidden || !showModel)
|
||||
return;
|
||||
Tail1.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6,
|
||||
Entity entity) {
|
||||
Tail1.setRotationPoint(-4F, 12F, -2F);
|
||||
float ani = MathHelper.sin(par1 * 0.6662F);
|
||||
if (ani > 0.2)
|
||||
ani /= 3f;
|
||||
if(this.isSleeping || this.isCrawling){
|
||||
Tail1.rotateAngleX = Tail2.rotateAngleX = Tail3.rotateAngleX = Tail4.rotateAngleX = 0;
|
||||
}
|
||||
else{
|
||||
Tail1.rotateAngleX = 0.2F - ani * 0.2F * par2;
|
||||
Tail2.rotateAngleX = 0.56F - ani * 0.24F * par2;
|
||||
Tail3.rotateAngleX = -0.4F + ani * 0.24F * par2;
|
||||
Tail4.rotateAngleX = -0.1f + ani * 0.10F * par2;
|
||||
|
||||
if(entity.isSneaking()){
|
||||
Tail1.setRotationPoint(-4F, 10F, 3F);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -25,11 +25,8 @@ public class ModelNagaLegs extends ModelRenderer{
|
||||
super(base);
|
||||
|
||||
nagaPart1 = new ModelRenderer(base,0,0);
|
||||
// nagaPart1.setTextureSize(64,32);
|
||||
|
||||
ModelRenderer legPart = new ModelRenderer(base,0,16);
|
||||
// legPart.setTextureSize(64,32);
|
||||
|
||||
legPart.addBox(0, -2, -2, 4, 4, 4);
|
||||
legPart.setRotationPoint(-4, 0, 0);
|
||||
nagaPart1.addChild(legPart);
|
||||
@@ -39,11 +36,9 @@ public class ModelNagaLegs extends ModelRenderer{
|
||||
nagaPart1.addChild(legPart);
|
||||
|
||||
nagaPart2 = new ModelRenderer(base,0,0);
|
||||
// nagaPart2.setTextureSize(64,32);
|
||||
nagaPart2.childModels = nagaPart1.childModels;
|
||||
|
||||
nagaPart3 = new ModelRenderer(base,0,0);
|
||||
// nagaPart3.setTextureSize(64,32);
|
||||
|
||||
ModelPlaneRenderer plane = new ModelPlaneRenderer(base, 4, 24);
|
||||
plane.addBackPlane(0,-2, 0, 4, 4);
|
||||
@@ -94,11 +89,9 @@ public class ModelNagaLegs extends ModelRenderer{
|
||||
nagaPart3.addChild(plane);
|
||||
|
||||
nagaPart4 = new ModelRenderer(base,0,0);
|
||||
// nagaPart4.setTextureSize(64,32);
|
||||
nagaPart4.childModels = nagaPart3.childModels;
|
||||
|
||||
nagaPart5 = new ModelRenderer(base,0,0);
|
||||
// nagaPart5.setTextureSize(64,32);
|
||||
|
||||
legPart = new ModelRenderer(base,56,20);
|
||||
legPart.addBox(0, 0, -2, 2, 5, 2);
|
||||
|
||||
@@ -14,49 +14,38 @@ public class ModelDragonTail extends ModelRenderer {
|
||||
int y = 16;
|
||||
|
||||
ModelRenderer dragon = new ModelRenderer(base, x, y);
|
||||
dragon.setTextureSize(64,32);
|
||||
dragon.setRotationPoint(0F, 0F, 3F);
|
||||
this.addChild(dragon);
|
||||
|
||||
ModelRenderer DragonTail2 = new ModelRenderer(base, x, y);
|
||||
DragonTail2.setTextureSize(64, 32);
|
||||
DragonTail2.setRotationPoint(0F, 2F, 2F);
|
||||
|
||||
ModelRenderer DragonTail3 = new ModelRenderer(base, x, y);
|
||||
DragonTail3.setTextureSize(64, 32);
|
||||
DragonTail3.setRotationPoint(0F, 4.5F, 4F);
|
||||
|
||||
ModelRenderer DragonTail4 = new ModelRenderer(base, x, y);
|
||||
DragonTail4.setTextureSize(64, 32);
|
||||
DragonTail4.setRotationPoint(0F, 7F, 5.75F);
|
||||
|
||||
ModelRenderer DragonTail5 = new ModelRenderer(base, x, y);
|
||||
DragonTail5.setTextureSize(64, 32);
|
||||
DragonTail5.setRotationPoint(0F, 9F, 8F);
|
||||
|
||||
ModelPlaneRenderer planeLeft = new ModelPlaneRenderer(base, x, y);
|
||||
planeLeft.setTextureSize(64, 32);
|
||||
planeLeft.addSidePlane(-1.5F, -1.5F, -1.5F, 3, 3);
|
||||
ModelPlaneRenderer planeRight = new ModelPlaneRenderer(base, x, y);
|
||||
planeRight.setTextureSize(64, 32);
|
||||
planeRight.addSidePlane(-1.5F, -1.5F, -1.5F, 3, 3);
|
||||
setRotation(planeRight, (float)Math.PI, (float)Math.PI ,0);
|
||||
|
||||
ModelPlaneRenderer planeTop = new ModelPlaneRenderer(base, x, y);
|
||||
planeTop.setTextureSize(64, 32);
|
||||
planeTop.addTopPlane(-1.5F, -1.5F, -1.5F, 3, 3);
|
||||
setRotation(planeTop, 0 ,-(float)Math.PI / 2,0);
|
||||
ModelPlaneRenderer planeBottom = new ModelPlaneRenderer(base, x, y);
|
||||
planeBottom.setTextureSize(64, 32);
|
||||
planeBottom.addTopPlane(-1.5F, -1.5F, -1.5F, 3, 3);
|
||||
setRotation(planeBottom, 0 ,-(float)Math.PI / 2, (float)Math.PI);
|
||||
|
||||
ModelPlaneRenderer planeBack = new ModelPlaneRenderer(base, x, y);
|
||||
planeBack.setTextureSize(64, 32);
|
||||
planeBack.addBackPlane(-1.5F, -1.5F, -1.5F, 3, 3);
|
||||
setRotation(planeBack, 0, 0 ,(float)Math.PI / 2);
|
||||
ModelPlaneRenderer planeFront = new ModelPlaneRenderer(base, x, y);
|
||||
planeFront.setTextureSize(64, 32);
|
||||
planeFront.addBackPlane(-1.5F, -1.5F, -1.5F, 3, 3);
|
||||
setRotation(planeFront, 0, (float)Math.PI ,-(float)Math.PI / 2);
|
||||
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
package noppes.npcs.client.model.part.tails;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelFeatherTail extends ModelRenderer {
|
||||
ModelRenderer feather1;
|
||||
ModelRenderer feather2;
|
||||
ModelRenderer feather3;
|
||||
ModelRenderer feather4;
|
||||
ModelRenderer feather5;
|
||||
|
||||
public ModelFeatherTail(ModelBiped base) {
|
||||
super(base);
|
||||
|
||||
int x = 56;
|
||||
int y = 16;
|
||||
|
||||
feather1 = new ModelRenderer(base, x, y);
|
||||
feather1.setTextureSize(64,32);
|
||||
feather1.addBox(-1.5F, 0F, 0F, 3, 8, 0);
|
||||
feather1.setRotationPoint(1F, -0.5F, 2F);
|
||||
setRotation(feather1, 1.482807F, 0.2602503F, 0.1487144F);
|
||||
addChild(feather1);
|
||||
|
||||
feather2 = new ModelRenderer(base, x, y);
|
||||
feather2.setTextureSize(64,32);
|
||||
feather2.addBox(-1.5F, 0F, 0F, 3, 8, 0);
|
||||
feather2.setRotationPoint(0F, -0.5F, 1F);
|
||||
setRotation(feather2, 1.200559F, 0.3717861F, 0.1858931F);
|
||||
addChild(feather2);
|
||||
|
||||
feather3 = new ModelRenderer(base, x, y);
|
||||
feather3.setTextureSize(64,32);
|
||||
feather3.mirror = true;
|
||||
feather3.addBox(-1.5F, -0.5F, 0F, 3, 8, 0);
|
||||
feather3.setRotationPoint(-1F, 0, 2F);
|
||||
setRotation(feather3, 1.256389F, -0.4089647F, -0.4833219F);
|
||||
addChild(feather3);
|
||||
|
||||
feather4 = new ModelRenderer(base, x, y);
|
||||
feather4.setTextureSize(64,32);
|
||||
feather4.addBox(-1.5F, 0F, 0F, 3, 8, 0);
|
||||
feather4.setRotationPoint(0F, -0.5F, 2F);
|
||||
setRotation(feather4, 1.786329F, 0F, 0F);
|
||||
addChild(feather4);
|
||||
|
||||
feather5 = new ModelRenderer(base, x, y);
|
||||
feather5.setTextureSize(64,32);
|
||||
feather5.mirror = true;
|
||||
feather5.addBox(-1.5F, 0F, 0F, 3, 8, 0);
|
||||
feather5.setRotationPoint(-1F, -0.5F, 2F);
|
||||
setRotation(feather5, 1.570073F, -0.2602503F, -0.2230717F);
|
||||
addChild(feather5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
package noppes.npcs.client.model.part.tails;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
|
||||
public class ModelRodentTail extends ModelRenderer {
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
|
||||
public ModelRodentTail(ModelMPM base) {
|
||||
super(base);
|
||||
|
||||
Shape1 = new ModelRenderer(base, 0, 0);
|
||||
Shape1.setTextureSize(64,32);
|
||||
Shape1.addBox(-0.5333334F, -0.4666667F, -1F, 1, 1, 6);
|
||||
Shape1.setRotationPoint(0F, 0F, 2F);
|
||||
setRotation(Shape1, -0.9294653F, 0F, 0F);
|
||||
addChild(Shape1);
|
||||
|
||||
Shape2 = new ModelRenderer(base, 1, 1);
|
||||
Shape2.setTextureSize(64,32);
|
||||
Shape2.addBox(-0.5F, -0.1666667F, 1F, 1, 1, 5);
|
||||
Shape2.setRotationPoint(0F, 3F, 4F);
|
||||
setRotation(Shape2, -0.4833219F, 0F, 0F);
|
||||
addChild(Shape2);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -16,35 +16,30 @@ public class ModelSquirrelTail extends ModelRenderer {
|
||||
textureHeight = 32;
|
||||
|
||||
ModelRenderer Shape1 = new ModelRenderer(base, 0, 0);
|
||||
Shape1.setTextureSize(64,32);
|
||||
Shape1.addBox(-1F, -1F, -1F, 2, 2, 3);
|
||||
Shape1.setRotationPoint(0F, -1F, 3F);
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
this.addChild(Shape1);
|
||||
|
||||
ModelRenderer Shape2 = new ModelRenderer(base, 0, 9);
|
||||
Shape2.setTextureSize(64,32);
|
||||
Shape2.addBox(-2F, -5F, -1F, 4, 5, 3);
|
||||
Shape2.setRotationPoint(0F, 0F, 1F);
|
||||
setRotation(Shape2, -0.37F, 0F, 0F);
|
||||
Shape1.addChild(Shape2);
|
||||
|
||||
ModelRenderer Shape3 = new ModelRenderer(base, 0, 18);
|
||||
Shape3.setTextureSize(64,32);
|
||||
Shape3.addBox(-2.466667F, -6F, -1F, 5, 7, 3);
|
||||
Shape3.setRotationPoint(0F, -5F, 0F);
|
||||
setRotation(Shape3, 0.3f, 0F, 0F);
|
||||
Shape2.addChild(Shape3);
|
||||
|
||||
ModelRenderer Shape4 = new ModelRenderer(base, 25, 0);
|
||||
Shape4.setTextureSize(64,32);
|
||||
Shape4.addBox(-3F, -0.6F, -1F, 6, 5, 3);
|
||||
Shape4.setRotationPoint(0F, -5F, 1F);
|
||||
setRotation(Shape4, 2.5F, 0F, 0F);
|
||||
Shape3.addChild(Shape4);
|
||||
|
||||
ModelRenderer Shape5 = new ModelRenderer(base, 25, 10);
|
||||
Shape5.setTextureSize(64,32);
|
||||
Shape5.addBox(-3F, -2F, -1F, 6, 3, 5);
|
||||
Shape5.setRotationPoint(0F, 3.5F, 0F);
|
||||
setRotation(Shape5, -2.5F, 0F, 0F);
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
package noppes.npcs.client.model.part.tails;
|
||||
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
|
||||
public class ModelTailFin extends ModelRenderer {
|
||||
|
||||
public ModelTailFin(ModelMPM base) {
|
||||
super(base);
|
||||
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
ModelRenderer Shape1 = new ModelRenderer(base, 0, 0);
|
||||
Shape1.setTextureSize(64,32);
|
||||
Shape1.addBox(-2F, -2F, -2F, 3, 3, 8);
|
||||
Shape1.setRotationPoint(0.5F, 0F, 1F);
|
||||
setRotation(Shape1, -0.669215F, 0F, 0F);
|
||||
addChild(Shape1);
|
||||
|
||||
ModelRenderer Shape2 = new ModelRenderer(base, 2, 2);
|
||||
Shape2.setTextureSize(64,32);
|
||||
Shape2.addBox(-1F, -1F, 1F, 3, 2, 6);
|
||||
Shape2.setRotationPoint(-0.5F, 3F, 4.5F);
|
||||
setRotation(Shape2, -0.2602503F, 0F, 0F);
|
||||
addChild(Shape2);
|
||||
|
||||
ModelRenderer Shape3 = new ModelRenderer(base, 0, 11);
|
||||
Shape3.setTextureSize(64,32);
|
||||
Shape3.addBox(-1F, -1F, -1F, 3, 1, 6);
|
||||
Shape3.setRotationPoint(0.5F, 5F, 12F);
|
||||
setRotation(Shape3, 0F, 1.07818F, 0F);
|
||||
addChild(Shape3);
|
||||
|
||||
ModelRenderer Shape4 = new ModelRenderer(base, 0, 11);
|
||||
Shape4.setTextureSize(64,32);
|
||||
Shape4.mirror = true;
|
||||
Shape4.addBox(-2F, 0F, -1F, 3, 1, 6);
|
||||
Shape4.setRotationPoint(-0.5F, 4F, 12F);
|
||||
setRotation(Shape4, 0F, -1.003822F, 0F);
|
||||
addChild(Shape4);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -3,62 +3,42 @@ package noppes.npcs.client.renderer;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.DataBufferInt;
|
||||
import java.awt.image.ImageObserver;
|
||||
|
||||
import net.minecraft.client.renderer.ImageBufferDownload;
|
||||
|
||||
public class ImageBufferDownloadAlt extends ImageBufferDownload {
|
||||
public class ImageBufferDownloadAlt extends ImageBufferDownload
|
||||
{
|
||||
private int imageData[];
|
||||
private int imageWidth;
|
||||
private int imageHeight;
|
||||
private boolean version;
|
||||
|
||||
// If Version == true, use 64 Loader
|
||||
public ImageBufferDownloadAlt(boolean ver){
|
||||
this.version = ver;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BufferedImage parseUserSkin(BufferedImage bufferedimage) {
|
||||
|
||||
if(this.version){
|
||||
imageWidth = bufferedimage.getWidth(null);
|
||||
imageHeight = bufferedimage.getHeight(null);
|
||||
|
||||
BufferedImage bufferedimage1 = new BufferedImage(imageWidth, imageHeight, 2);
|
||||
Graphics g = bufferedimage1.getGraphics();
|
||||
g.drawImage(bufferedimage, 0, 0, null);
|
||||
g.dispose();
|
||||
|
||||
imageData = ((DataBufferInt) bufferedimage1.getRaster().getDataBuffer()).getData();
|
||||
setAreaTransparent(imageWidth / 2, 0, imageWidth, imageHeight / 4);
|
||||
return bufferedimage1;
|
||||
}
|
||||
|
||||
else{
|
||||
imageWidth = bufferedimage.getWidth(null);
|
||||
imageHeight = imageWidth / 2;
|
||||
|
||||
BufferedImage bufferedimage1 = new BufferedImage(imageWidth, imageHeight, 2);
|
||||
Graphics g = bufferedimage1.getGraphics();
|
||||
g.drawImage(bufferedimage, 0, 0, null);
|
||||
g.dispose();
|
||||
imageData = ((DataBufferInt)bufferedimage1.getRaster().getDataBuffer()).getData();
|
||||
|
||||
setAreaTransparent(imageWidth / 2, 0, imageWidth, imageHeight / 2);
|
||||
return bufferedimage1;
|
||||
}
|
||||
public BufferedImage parseUserSkin(BufferedImage bufferedimage)
|
||||
{
|
||||
imageWidth = bufferedimage.getWidth(null);
|
||||
imageHeight = imageWidth / 2;
|
||||
|
||||
BufferedImage bufferedimage1 = new BufferedImage(imageWidth, imageHeight, 2);
|
||||
Graphics g = bufferedimage1.getGraphics();
|
||||
g.drawImage(bufferedimage, 0, 0, null);
|
||||
g.dispose();
|
||||
imageData = ((DataBufferInt)bufferedimage1.getRaster().getDataBuffer()).getData();
|
||||
setAreaTransparent(imageWidth / 2, 0, imageWidth, imageHeight / 2);
|
||||
return bufferedimage1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the given area of the image transparent if it was previously completely opaque (used to remove the outer
|
||||
* layer of a skin around the head if it was saved all opaque; this would be redundant so it's assumed that the skin
|
||||
* maker is just using an image editor without an alpha channel)
|
||||
*/
|
||||
private void setAreaTransparent(int par1, int par2, int par3, int par4) {
|
||||
if (!this.hasTransparency(par1, par2, par3, par4)) {
|
||||
for (int i1 = par1; i1 < par3; ++i1) {
|
||||
for (int j1 = par2; j1 < par4; ++j1) {
|
||||
private void setAreaTransparent(int par1, int par2, int par3, int par4)
|
||||
{
|
||||
if (!this.hasTransparency(par1, par2, par3, par4))
|
||||
{
|
||||
for (int i1 = par1; i1 < par3; ++i1)
|
||||
{
|
||||
for (int j1 = par2; j1 < par4; ++j1)
|
||||
{
|
||||
this.imageData[i1 + j1 * this.imageWidth] &= 16777215;
|
||||
}
|
||||
}
|
||||
@@ -68,12 +48,16 @@ public class ImageBufferDownloadAlt extends ImageBufferDownload {
|
||||
/**
|
||||
* Returns true if the given area of the image contains transparent pixels
|
||||
*/
|
||||
private boolean hasTransparency(int par1, int par2, int par3, int par4) {
|
||||
for (int i1 = par1; i1 < par3; ++i1) {
|
||||
for (int j1 = par2; j1 < par4; ++j1) {
|
||||
private boolean hasTransparency(int par1, int par2, int par3, int par4)
|
||||
{
|
||||
for (int i1 = par1; i1 < par3; ++i1)
|
||||
{
|
||||
for (int j1 = par2; j1 < par4; ++j1)
|
||||
{
|
||||
int k1 = this.imageData[i1 + j1 * this.imageWidth];
|
||||
|
||||
if ((k1 >> 24 & 255) < 128) {
|
||||
if ((k1 >> 24 & 255) < 128)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -81,4 +65,191 @@ public class ImageBufferDownloadAlt extends ImageBufferDownload {
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//
|
||||
// private boolean loadPlayerData(BufferedImage bufferedimage,EntityPlayer player) {
|
||||
// if(player == null)
|
||||
// return false;
|
||||
// PlayerData data = RenderMorePlayer.getPlayerData(player);
|
||||
// data.setPlayerModel(checkSkin(bufferedimage,player.username));
|
||||
// data.isChanged = true;
|
||||
// return data.model != null;
|
||||
// }
|
||||
// public static ModelData checkSkin(BufferedImage bufferedimage,String player){
|
||||
// if(bufferedimage == null)
|
||||
// return null;
|
||||
//
|
||||
// if (!new Color(bufferedimage.getRGB(0, 0), true).equals(new Color(128, 128, 128, 255))) {
|
||||
// return null;
|
||||
// }
|
||||
// ModelData data = new ModelData();
|
||||
// Color type = new Color(bufferedimage.getRGB(1, 0), true);
|
||||
// if (type.equals(new Color(255, 0, 255, 255))) {
|
||||
// data.type = EnumPlayerModelType.HUMANFEMALE;
|
||||
// data.mainModel = new ModelHumanFemale(data,0);
|
||||
// data.modelArmor = new ModelHumanFemale(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelHumanFemale(data,0.8f);
|
||||
// data.scaleX = 0.9075f;
|
||||
// data.scaleY = 0.9075f;
|
||||
// data.scaleZ = 0.9075f;
|
||||
// } else if (type.equals(new Color(128, 0, 0, 255))) {
|
||||
// data.type = EnumPlayerModelType.DWARFMALE;
|
||||
// data.mainModel = new ModelDwarfMale(data,0);
|
||||
// data.modelArmor = new ModelDwarfMale(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelDwarfMale(data,0.8f);
|
||||
// data.scaleX = 0.85f;
|
||||
// data.scaleY = 0.6875f;
|
||||
// data.scaleZ = 0.85f;
|
||||
// } else if (type.equals(new Color(255, 0, 0, 255))) {
|
||||
// data.type = EnumPlayerModelType.DWARFFEMALE;
|
||||
// data.mainModel = new ModelDwarfFemale(data,0);
|
||||
// data.modelArmor = new ModelDwarfFemale(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelDwarfFemale(data,0.8f);
|
||||
// data.scaleX = 0.75f;
|
||||
// data.scaleY = 0.6275f;
|
||||
// data.scaleZ = 0.75f;
|
||||
// } else if (type.equals(new Color(0, 128, 0, 255))) {
|
||||
// data.type = EnumPlayerModelType.ORCMALE;
|
||||
// data.mainModel = new ModelOrcMale(data,0);
|
||||
// data.modelArmor = new ModelOrcMale(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelOrcMale(data,0.8f);
|
||||
// data.scaleX = 1.2f;
|
||||
// data.scaleY = 1f;
|
||||
// data.scaleZ = 1.2f;
|
||||
// } else if (type.equals(new Color(0, 255, 0, 255))) {
|
||||
// data.type = EnumPlayerModelType.ORCFEMALE;
|
||||
// data.mainModel = new ModelOrcFemale(data,0);
|
||||
// data.modelArmor = new ModelOrcFemale(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelOrcFemale(data,0.8f);
|
||||
// } else if (type.equals(new Color(0, 0, 128, 255))) {
|
||||
// data.type = EnumPlayerModelType.FURRYMALE;
|
||||
// data.mainModel = new ModelFurryMale(data,0);
|
||||
// data.modelArmor = new ModelFurryMale(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelFurryMale(data,0.8f);
|
||||
// } else if (type.equals(new Color(0, 0, 255, 255))) {
|
||||
// data.type = EnumPlayerModelType.FURRYFEMALE;
|
||||
// data.mainModel = new ModelFurryFemale(data,0);
|
||||
// data.modelArmor = new ModelFurryFemale(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelFurryFemale(data,0.8f);
|
||||
// data.scaleX = 0.9075f;
|
||||
// data.scaleY = 0.9075f;
|
||||
// data.scaleZ = 0.9075f;
|
||||
// }else if (type.equals(new Color(255, 128, 0, 255))) {
|
||||
// data.type = EnumPlayerModelType.MONSTERMALE;
|
||||
// data.mainModel = new ModelMonsterMale(data,0);
|
||||
// data.modelArmor = new ModelMonsterMale(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelMonsterMale(data,0.8f);
|
||||
// } else if (type.equals(new Color(255, 255, 0, 255))) {
|
||||
// data.type = EnumPlayerModelType.MONSTERFEMALE;
|
||||
// data.mainModel = new ModelMonsterFemale(data,0);
|
||||
// data.modelArmor = new ModelMonsterFemale(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelMonsterFemale(data,0.8f);
|
||||
// data.scaleX = 0.9075f;
|
||||
// data.scaleY = 0.9075f;
|
||||
// data.scaleZ = 0.9075f;
|
||||
// }else if (type.equals(new Color(0,255, 128, 255))) {
|
||||
// data.type = EnumPlayerModelType.ELFMALE;
|
||||
// data.mainModel = new ModelElfMale(data,0);
|
||||
// data.modelArmor = new ModelElfMale(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelElfMale(data,0.8f);
|
||||
// data.scaleX = 0.85f;
|
||||
// data.scaleY = 1.07f;
|
||||
// data.scaleZ = 0.85f;
|
||||
// } else if (type.equals(new Color(0, 255, 255, 255))) {
|
||||
// data.type = EnumPlayerModelType.ELFFEMALE;
|
||||
// data.mainModel = new ModelElfFemale(data,0);
|
||||
// data.modelArmor = new ModelElfFemale(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelElfFemale(data,0.8f);
|
||||
// data.scaleX = 0.8f;
|
||||
// data.scaleY = 1f;
|
||||
// data.scaleZ = 0.8f;
|
||||
// } else if (type.equals(new Color(32, 32, 32, 255))) {
|
||||
// data.type = EnumPlayerModelType.ENDER;
|
||||
// data.mainModel = new ModelEnderChibi(data,0);
|
||||
// data.modelArmor = new ModelEnderChibi(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelEnderChibi(data,0.8f);
|
||||
// }
|
||||
// else if (type.equals(new Color(128, 255, 0, 255))) {
|
||||
// data.type = EnumPlayerModelType.NAGAMALE;
|
||||
// data.mainModel = new ModelNagaMale(data,0);
|
||||
// data.modelArmor = new ModelNagaMale(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelNagaMale(data,0.8f);
|
||||
// }
|
||||
// else if (type.equals(new Color(128, 128, 0, 255))) {
|
||||
// data.type = EnumPlayerModelType.NAGAFEMALE;
|
||||
// data.mainModel = new ModelNagaFemale(data,0);
|
||||
// data.modelArmor = new ModelNagaFemale(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelNagaFemale(data,0.8f);
|
||||
// }
|
||||
// else if(RenderMorePlayer.superUsers.contains(player)){
|
||||
// if (type.equals(new Color(66, 66, 66, 255))){
|
||||
// data.mainModel = new ModelCrystal(data,0);
|
||||
// data.modelArmor = new ModelCrystal(data,0.3f);
|
||||
// data.modelArmorChestplate = new ModelCrystal(data,0.8f);
|
||||
// }
|
||||
// else if (type.equals(new Color(13, 13, 13, 255))){
|
||||
// data.mainModel = new ModelFail(data);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// Color sizeColor = new Color(bufferedimage.getRGB(2, 0), true);
|
||||
// int size = 3;
|
||||
// if (sizeColor.equals(new Color(255, 0, 0, 255)))
|
||||
// size = 4;
|
||||
// else if (sizeColor.equals(new Color(0, 255, 0, 255)))
|
||||
// size = 2;
|
||||
// else if (sizeColor.equals(new Color(0, 0, 255, 255)))
|
||||
// size = 1;
|
||||
// else if (sizeColor.equals(new Color(255, 0, 255, 255)))
|
||||
// size = 0;
|
||||
// data.size = size;
|
||||
//
|
||||
// Color headVissible = new Color(bufferedimage.getRGB(3, 0), true);
|
||||
// if (headVissible.equals(new Color(255, 0, 0, 255)))
|
||||
// data.showHelmet = false;
|
||||
// else if (headVissible.equals(new Color(0, 255, 0, 255)))
|
||||
// data.showHeadwear = false;
|
||||
// else if (headVissible.equals(new Color(255, 255, 0, 255))){
|
||||
// data.showHeadwear = false;
|
||||
// data.showHelmet = false;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// int extraOption1 = getValue(new Color(bufferedimage.getRGB(7, 0), true));
|
||||
// data.mainModel.setExtraOption1(extraOption1);
|
||||
// data.modelArmorChestplate.setExtraOption1(extraOption1);
|
||||
// data.modelArmor.setExtraOption1(extraOption1);
|
||||
//
|
||||
// int extraOption2 = getValue(new Color(bufferedimage.getRGB(7, 1), true));
|
||||
// data.mainModel.setExtraOption2(extraOption2);
|
||||
// data.modelArmorChestplate.setExtraOption2(extraOption2);
|
||||
// data.modelArmor.setExtraOption2(extraOption2);
|
||||
//
|
||||
// int extraOption3 = getValue(new Color(bufferedimage.getRGB(7, 2), true));
|
||||
// data.mainModel.setExtraOption3(extraOption3);
|
||||
// data.modelArmorChestplate.setExtraOption3(extraOption3);
|
||||
// data.modelArmor.setExtraOption3(extraOption3);
|
||||
//
|
||||
// Color color = new Color(bufferedimage.getRGB(7, 3), true);
|
||||
// data.mainModel.setExtraColor(color);
|
||||
//
|
||||
// Color claws = new Color(bufferedimage.getRGB(0, 1), true);
|
||||
// if (claws.equals(new Color(255, 0, 0, 255)))
|
||||
// ((ModelInterface)data.mainModel).addClaws();
|
||||
//
|
||||
// data.headSize = getValue(new Color(bufferedimage.getRGB(1, 1), true));
|
||||
//
|
||||
// data.bellySize = getValue(new Color(bufferedimage.getRGB(2, 1), true));
|
||||
// return data;
|
||||
// }
|
||||
// private static int getValue(Color color){
|
||||
// if (color.equals(new Color(255, 0, 0, 255)))
|
||||
// return 1;
|
||||
// else if (color.equals(new Color(0, 255, 0, 255)))
|
||||
// return 2;
|
||||
// else if (color.equals(new Color(0, 0, 255, 255)))
|
||||
// return 3;
|
||||
// else if (color.equals(new Color(255, 0, 255, 255)))
|
||||
// return 4;
|
||||
// return 0;
|
||||
// }
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package noppes.npcs.client.renderer;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.NPCRendererHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
@@ -10,10 +9,8 @@ import net.minecraft.client.renderer.entity.RendererLivingEntity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.boss.BossStatus;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
import noppes.npcs.client.model.util.ModelRenderPassHelper;
|
||||
import noppes.npcs.constants.EnumStandingType;
|
||||
import noppes.npcs.controllers.PixelmonHelper;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
@@ -24,14 +21,13 @@ public class RenderCustomNpc extends RenderNPCHumanMale{
|
||||
|
||||
private RendererLivingEntity renderEntity;
|
||||
private EntityLivingBase entity;
|
||||
|
||||
|
||||
private ModelRenderPassHelper renderpass = new ModelRenderPassHelper();
|
||||
|
||||
// Default Renderer
|
||||
|
||||
public RenderCustomNpc() {
|
||||
super(new ModelMPM(0), new ModelMPM(1), new ModelMPM(0.5f));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderPlayer(EntityNPCInterface npcInterface, double d, double d1, double d2, float f, float f1){
|
||||
EntityCustomNpc npc = (EntityCustomNpc) npcInterface;
|
||||
@@ -110,13 +106,6 @@ public class RenderCustomNpc extends RenderNPCHumanMale{
|
||||
super.preRenderCallback(entityliving, f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(EntityLiving entityliving, double d, double d1, double d2, float f, float f1){
|
||||
EntityNPCInterface npc = (EntityNPCInterface) entityliving;
|
||||
|
||||
super.doRender(entityliving, d, d1, d2, f, f1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float handleRotationFloat(EntityLivingBase par1EntityLivingBase, float par2){
|
||||
if(renderEntity != null){
|
||||
|
||||
@@ -2,8 +2,8 @@ package noppes.npcs.client.renderer;
|
||||
|
||||
import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED;
|
||||
import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
@@ -21,7 +21,6 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
import noppes.npcs.client.model.ModelNPCMale;
|
||||
import noppes.npcs.constants.EnumAnimation;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
@@ -38,15 +37,10 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
||||
protected ModelNPCMale modelArmorChestplate;
|
||||
protected ModelNPCMale modelArmor;
|
||||
|
||||
protected final ModelNPCMale originalBipedMain;
|
||||
protected final ModelMPM steve = new ModelMPM(0, false);
|
||||
protected final ModelMPM alex = new ModelMPM(0, true);
|
||||
|
||||
public RenderNPCHumanMale(ModelNPCMale mainmodel, ModelNPCMale armorChest, ModelNPCMale armor)
|
||||
{
|
||||
super(mainmodel, 0.5F);
|
||||
modelBipedMain = mainmodel;
|
||||
originalBipedMain = mainmodel;
|
||||
modelArmorChestplate = armorChest;
|
||||
modelArmor = armor;
|
||||
}
|
||||
@@ -116,29 +110,6 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
||||
public void renderPlayer(EntityNPCInterface npc, double d, double d1, double d2,
|
||||
float f, float f1)
|
||||
{
|
||||
// SEEMS TO WORK FOR NOW. Keeps NPC from outsyncing with Creature Models
|
||||
if(npc instanceof EntityCustomNpc){
|
||||
EntityCustomNpc test = (EntityCustomNpc) npc;
|
||||
if(test.modelData.entityClass == null){
|
||||
int modelVal = npc.display.modelType;
|
||||
if(modelVal == 1){
|
||||
this.mainModel = steve;
|
||||
this.modelBipedMain = steve;
|
||||
}
|
||||
else if(modelVal == 2){
|
||||
this.mainModel = alex;
|
||||
this.modelBipedMain = alex;
|
||||
}
|
||||
else{
|
||||
((EntityCustomNpc) npc).modelData.bodywear = 0;
|
||||
((EntityCustomNpc) npc).modelData.armwear = 0;
|
||||
((EntityCustomNpc) npc).modelData.legwear = 0;
|
||||
this.mainModel = originalModel;
|
||||
this.modelBipedMain = originalBipedMain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack itemstack = npc.getHeldItem();
|
||||
modelArmorChestplate.heldItemRight = modelArmor.heldItemRight = modelBipedMain.heldItemRight =
|
||||
itemstack == null ? 0 : npc.hurtResistantTime > 0 ? 3 : 1;
|
||||
|
||||
@@ -34,14 +34,10 @@ import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;
|
||||
|
||||
public class RenderNPCInterface extends RenderLiving{
|
||||
public static long LastTextureTick = 0;
|
||||
|
||||
public ModelBase originalModel;
|
||||
|
||||
public RenderNPCInterface(ModelBase model, float f){
|
||||
super(model, f);
|
||||
this.originalModel = model;
|
||||
}
|
||||
|
||||
|
||||
protected void renderName(EntityNPCInterface npc, double d, double d1, double d2) {
|
||||
if (!this.func_110813_b(npc))
|
||||
return;
|
||||
@@ -179,6 +175,29 @@ public class RenderNPCInterface extends RenderLiving{
|
||||
}
|
||||
else {
|
||||
super.rotateCorpse(npc, f, f1, f2);
|
||||
// if(npc.deathTime > 0)
|
||||
// {
|
||||
// float x = (float) -Math.cos(Math.toRadians(180 - f1));
|
||||
// float y = (float) -Math.sin(Math.toRadians(f1));
|
||||
// x = (x/ 5f) * npc.getModelSize();
|
||||
// y = (y/ 5f) * npc.getModelSize();
|
||||
// GL11.glTranslatef(x, 0, y);
|
||||
//
|
||||
//
|
||||
// float f3 = ((((float)npc.deathTime+ f2) - 1.0F) / 20F) * 1.6F;
|
||||
// f3 = MathHelper.sqrt_float(f3);
|
||||
// if(f3 > 1.0F)
|
||||
// {
|
||||
// f3 = 1.0F;
|
||||
// }
|
||||
// GL11.glRotatef(f1, 0.0F, 1.0F, 0.0F);
|
||||
// GL11.glRotatef(f3 * getDeathMaxRotation(npc), 0.0F, 0.0F, 1.0F);
|
||||
// GL11.glRotatef(180F - f1, 0.0F, 1.0F, 0.0F);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GL11.glRotatef(180F - f1, 0.0F, 1.0F, 0.0F);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +214,6 @@ public class RenderNPCInterface extends RenderLiving{
|
||||
@Override
|
||||
public void doRender(EntityLiving entityliving, double d, double d1, double d2, float f, float f1){
|
||||
EntityNPCInterface npc = (EntityNPCInterface) entityliving;
|
||||
|
||||
if(npc.isKilled() && npc.stats.hideKilledBody && npc.deathTime > 20){
|
||||
return;
|
||||
}
|
||||
@@ -207,7 +225,7 @@ public class RenderNPCInterface extends RenderLiving{
|
||||
}
|
||||
super.doRender(entityliving, d, d1, d2, f, f1);
|
||||
}
|
||||
|
||||
|
||||
protected void renderModel(EntityLivingBase entityliving, float par2, float par3, float par4, float par5, float par6, float par7){
|
||||
super.renderModel(entityliving, par2, par3, par4, par5, par6, par7);
|
||||
EntityNPCInterface npc = (EntityNPCInterface) entityliving;
|
||||
@@ -264,26 +282,22 @@ public class RenderNPCInterface extends RenderLiving{
|
||||
|
||||
@Override
|
||||
public ResourceLocation getEntityTexture(Entity entity) {
|
||||
|
||||
EntityNPCInterface npc = (EntityNPCInterface) entity;
|
||||
if(npc.textureLocation == null){
|
||||
if(npc.display.skinType == 0) {
|
||||
if (!(npc.display.texture).equals("")) {
|
||||
npc.textureLocation = new ResourceLocation(npc.display.texture);
|
||||
}
|
||||
}
|
||||
if(npc.display.skinType == 0)
|
||||
npc.textureLocation = new ResourceLocation(npc.display.texture);
|
||||
else if(LastTextureTick < 5){ //fixes request flood somewhat
|
||||
return AbstractClientPlayer.locationStevePng;
|
||||
}
|
||||
else if(npc.display.skinType == 1 && npc.display.playerProfile != null){
|
||||
Minecraft minecraft = Minecraft.getMinecraft();
|
||||
Map map = minecraft.func_152342_ad().func_152788_a(npc.display.playerProfile);
|
||||
Map map = minecraft.func_152342_ad().func_152788_a(npc.display.playerProfile);
|
||||
if (map.containsKey(Type.SKIN)){
|
||||
npc.textureLocation = minecraft.func_152342_ad().func_152792_a((MinecraftProfileTexture)map.get(Type.SKIN), Type.SKIN);
|
||||
}
|
||||
LastTextureTick = 0;
|
||||
}
|
||||
else if(npc.display.skinType == 2 || npc.display.skinType == 3){
|
||||
else if(npc.display.skinType == 2){
|
||||
try{
|
||||
MessageDigest digest = MessageDigest.getInstance("MD5");
|
||||
byte[] hash = digest.digest(npc.display.url.getBytes("UTF-8"));
|
||||
@@ -291,19 +305,12 @@ public class RenderNPCInterface extends RenderLiving{
|
||||
for(byte b : hash){
|
||||
sb.append(String.format("%02x", b&0xff));
|
||||
}
|
||||
// SKIN CHANGE
|
||||
if(npc.display.skinType == 2){
|
||||
npc.textureLocation = new ResourceLocation("skins/" + sb.toString());
|
||||
loadSkin(null, npc.textureLocation, npc.display.url, false);
|
||||
}
|
||||
else{
|
||||
npc.textureLocation = new ResourceLocation("skins64/" + sb.toString());
|
||||
loadSkin(null, npc.textureLocation, npc.display.url, true);
|
||||
}
|
||||
npc.textureLocation = new ResourceLocation("skins/" + sb.toString());
|
||||
func_110301_a(null, npc.textureLocation, npc.display.url);
|
||||
LastTextureTick = 0;
|
||||
}
|
||||
catch(Exception ex){
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -312,11 +319,9 @@ public class RenderNPCInterface extends RenderLiving{
|
||||
return npc.textureLocation;
|
||||
}
|
||||
|
||||
// 64x64 Skin is True
|
||||
private void loadSkin(File file, ResourceLocation resource, String par1Str, boolean version){
|
||||
private void func_110301_a(File file, ResourceLocation resource, String par1Str){
|
||||
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
|
||||
ITextureObject object = new ImageDownloadAlt(file, par1Str, SkinManager.field_152793_a, new ImageBufferDownloadAlt(version));
|
||||
ITextureObject object = new ImageDownloadAlt(file, par1Str, SkinManager.field_152793_a, new ImageBufferDownloadAlt());
|
||||
texturemanager.loadTexture(resource, object);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -290,6 +290,12 @@ public class GlyphCache
|
||||
return font.deriveFont(style, fontSize);
|
||||
}
|
||||
}
|
||||
|
||||
Font fa = new Font("Arial Unicode MS", Font.PLAIN, fontSize);
|
||||
if(fa.canDisplayUpTo(text, start, limit) != start){
|
||||
usedFonts.add(fa);
|
||||
return fa;
|
||||
}
|
||||
|
||||
/* If still not found, try searching through all fonts installed on the system for the first that can layout this string */
|
||||
iterator = allFonts.iterator();
|
||||
|
||||
@@ -14,13 +14,16 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.LogWriter;
|
||||
import noppes.npcs.util.CustomNPCsScheduler;
|
||||
import noppes.npcs.util.NBTJsonUtil;
|
||||
|
||||
public class PlayerDataController {
|
||||
public static PlayerDataController instance;
|
||||
public Map<String, String> nameUUIDs;
|
||||
|
||||
public PlayerDataController(){
|
||||
instance = this;
|
||||
nameUUIDs = getUsernameData();
|
||||
}
|
||||
public File getSaveDir(){
|
||||
try{
|
||||
@@ -72,11 +75,10 @@ public class PlayerDataController {
|
||||
String filename = player;
|
||||
if(filename.isEmpty())
|
||||
filename = "noplayername";
|
||||
filename += ".json";
|
||||
try {
|
||||
File file = new File(saveDir, filename);
|
||||
File file = new File(saveDir, filename + ".json");
|
||||
if(file.exists()){
|
||||
return NBTJsonUtil.LoadFile(file);
|
||||
return NBTJsonUtil.LoadFile(file);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogWriter.error("Error loading: " + filename, e);
|
||||
@@ -86,20 +88,26 @@ public class PlayerDataController {
|
||||
}
|
||||
|
||||
public void savePlayerData(PlayerData data){
|
||||
NBTTagCompound compound = data.getNBT();
|
||||
String filename = data.uuid + ".json";
|
||||
try {
|
||||
File saveDir = getSaveDir();
|
||||
File file = new File(saveDir, filename+"_new");
|
||||
File file1 = new File(saveDir, filename);
|
||||
NBTJsonUtil.SaveFile(file, compound);
|
||||
if(file1.exists()){
|
||||
file1.delete();
|
||||
}
|
||||
file.renameTo(file1);
|
||||
} catch (Exception e) {
|
||||
LogWriter.except(e);
|
||||
}
|
||||
final NBTTagCompound compound = data.getNBT();
|
||||
final String filename = data.uuid + ".json";
|
||||
nameUUIDs.put(data.playername, data.uuid);
|
||||
CustomNPCsScheduler.runTack(new Runnable(){
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
File saveDir = getSaveDir();
|
||||
File file = new File(saveDir, filename+"_new");
|
||||
File file1 = new File(saveDir, filename);
|
||||
NBTJsonUtil.SaveFile(file, compound);
|
||||
if(file1.exists()){
|
||||
file1.delete();
|
||||
}
|
||||
file.renameTo(file1);
|
||||
} catch (Exception e) {
|
||||
LogWriter.except(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public PlayerBankData getBankData(EntityPlayer player, int bankId) {
|
||||
@@ -122,7 +130,7 @@ public class PlayerDataController {
|
||||
return data;
|
||||
}
|
||||
public String hasPlayer(String username) {
|
||||
for(String name : getUsernameData().keySet()){
|
||||
for(String name : nameUUIDs.keySet()){
|
||||
if(name.equalsIgnoreCase(username))
|
||||
return name;
|
||||
}
|
||||
@@ -134,11 +142,10 @@ public class PlayerDataController {
|
||||
EntityPlayer player = MinecraftServer.getServer().getConfigurationManager().func_152612_a(username);
|
||||
PlayerData data = null;
|
||||
if(player == null){
|
||||
Map<String, NBTTagCompound> map = getUsernameData();
|
||||
for(String name : map.keySet()){
|
||||
for(String name : nameUUIDs.keySet()){
|
||||
if(name.equalsIgnoreCase(username)){
|
||||
data = new PlayerData();
|
||||
data.setNBT(map.get(name));
|
||||
data.setNBT(loadPlayerData(nameUUIDs.get(name)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -158,15 +165,15 @@ public class PlayerDataController {
|
||||
savePlayerData(data);
|
||||
}
|
||||
|
||||
public Map<String, NBTTagCompound> getUsernameData(){
|
||||
Map<String, NBTTagCompound> map = new HashMap<String, NBTTagCompound>();
|
||||
private Map<String, String> getUsernameData(){
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
for(File file : getSaveDir().listFiles()){
|
||||
if(file.isDirectory() || !file.getName().endsWith(".json"))
|
||||
continue;
|
||||
try {
|
||||
NBTTagCompound compound = NBTJsonUtil.LoadFile(file);
|
||||
if(compound.hasKey("PlayerName")){
|
||||
map.put(compound.getString("PlayerName"), compound);
|
||||
map.put(compound.getString("PlayerName"), file.getName().substring(0, file.getName().length() - 5));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogWriter.error("Error loading: " + file.getAbsolutePath(), e);
|
||||
|
||||
@@ -76,6 +76,5 @@ public class EntityCustomNpc extends EntityNPCInterface{
|
||||
this.setPosition(posX, posY, posZ);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,15 +9,15 @@ import net.minecraft.world.World;
|
||||
public class EntityMagicProjectile extends EntityProjectile{
|
||||
private EntityPlayer player;
|
||||
private ItemStack equiped;
|
||||
|
||||
public EntityMagicProjectile(World par1World){
|
||||
super(par1World);
|
||||
}
|
||||
|
||||
|
||||
public EntityMagicProjectile(World par1World){
|
||||
super(par1World);
|
||||
}
|
||||
|
||||
public EntityMagicProjectile(World par1World,
|
||||
EntityPlayer player, ItemStack item, boolean isNPC) {
|
||||
EntityPlayer player, ItemStack item, boolean isNPC) {
|
||||
super(par1World, player, item, isNPC);
|
||||
|
||||
|
||||
this.player = player;
|
||||
this.equiped = player.inventory.getCurrentItem();
|
||||
}
|
||||
@@ -28,9 +28,9 @@ public class EntityMagicProjectile extends EntityProjectile{
|
||||
this.setDead();
|
||||
super.onUpdate();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getCommandSenderName(){
|
||||
return StatCollector.translateToLocal("entity.throwableitem.name");
|
||||
}
|
||||
public String getCommandSenderName(){
|
||||
return StatCollector.translateToLocal("entity.throwableitem.name");
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
package noppes.npcs.entity;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
|
||||
public abstract class EntityNPCFlying extends EntityNPCInterface {
|
||||
|
||||
public EntityNPCFlying(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
// FLY CHANGE [WIP]
|
||||
|
||||
// @Override
|
||||
// public boolean canFly(){
|
||||
// return ai.movementType == 1;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void fall(float distance) {
|
||||
// if(!canFly())
|
||||
// super.fall(distance);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected void updateFallState(double p_180433_1_, boolean p_180433_3_) {
|
||||
// if(!canFly())
|
||||
// super.updateFallState(p_180433_1_, p_180433_3_);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void moveEntityWithHeading(float p_70612_1_, float p_70612_2_){
|
||||
// if(!canFly()){
|
||||
// super.moveEntityWithHeading(p_70612_1_, p_70612_2_);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (this.isInWater()){
|
||||
// this.moveFlying(p_70612_1_, p_70612_2_, 0.02F);
|
||||
// this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
// this.motionX *= 0.800000011920929D;
|
||||
// this.motionY *= 0.800000011920929D;
|
||||
// this.motionZ *= 0.800000011920929D;
|
||||
// }
|
||||
// else if (this.isInsideOfMaterial(Material.lava)){
|
||||
// this.moveFlying(p_70612_1_, p_70612_2_, 0.02F);
|
||||
// this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
// this.motionX *= 0.5D;
|
||||
// this.motionY *= 0.5D;
|
||||
// this.motionZ *= 0.5D;
|
||||
// }
|
||||
// else{
|
||||
// float f2 = 0.91F;
|
||||
//
|
||||
// if (this.onGround){
|
||||
// f2 = this.worldObj.getBlock((int)this.posX, (int)this.boundingBox.minY - 1, (int)this.posZ).slipperiness * 0.91F;
|
||||
// }
|
||||
//
|
||||
// float f3 = 0.16277136F / (f2 * f2 * f2);
|
||||
// this.moveFlying(p_70612_1_, p_70612_2_, this.onGround ? 0.1F * f3 : 0.02F);
|
||||
// f2 = 0.91F;
|
||||
//
|
||||
// if (this.onGround){
|
||||
// f2 = this.worldObj.getBlock((int)this.posX, (int)this.boundingBox.minY - 1, (int)this.posZ).slipperiness * 0.91F;
|
||||
// }
|
||||
//
|
||||
// this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
// this.motionX *= (double)f2;
|
||||
// this.motionY *= (double)f2;
|
||||
// this.motionZ *= (double)f2;
|
||||
// }
|
||||
//
|
||||
// this.prevLimbSwingAmount = this.limbSwingAmount;
|
||||
// double d1 = this.posX - this.prevPosX;
|
||||
// double d0 = this.posZ - this.prevPosZ;
|
||||
// float f4 = MathHelper.sqrt_double(d1 * d1 + d0 * d0) * 4.0F;
|
||||
//
|
||||
// if (f4 > 1.0F){
|
||||
// f4 = 1.0F;
|
||||
// }
|
||||
//
|
||||
// this.limbSwingAmount += (f4 - this.limbSwingAmount) * 0.4F;
|
||||
// this.limbSwing += this.limbSwingAmount;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isOnLadder(){
|
||||
// return false;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -21,12 +21,17 @@ import net.minecraft.entity.EnumCreatureAttribute;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.NPCEntityHelper;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIBase;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILeapAtTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOpenDoor;
|
||||
import net.minecraft.entity.ai.EntityAIRestrictSun;
|
||||
import net.minecraft.entity.ai.EntityAITasks;
|
||||
import net.minecraft.entity.ai.EntityAITasks.EntityAITaskEntry;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.boss.IBossDisplayData;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.monster.EntityBlaze;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.entity.passive.EntityBat;
|
||||
@@ -38,7 +43,6 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.pathfinding.PathNavigate;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@@ -70,11 +74,31 @@ import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.NpcDamageSource;
|
||||
import noppes.npcs.Server;
|
||||
import noppes.npcs.VersionCompatibility;
|
||||
import noppes.npcs.ai.*;
|
||||
import noppes.npcs.ai.EntityAIAmbushTarget;
|
||||
import noppes.npcs.ai.EntityAIAnimation;
|
||||
import noppes.npcs.ai.EntityAIAttackTarget;
|
||||
import noppes.npcs.ai.EntityAIAvoidTarget;
|
||||
import noppes.npcs.ai.EntityAIBustDoor;
|
||||
import noppes.npcs.ai.EntityAIDodgeShoot;
|
||||
import noppes.npcs.ai.EntityAIFindShade;
|
||||
import noppes.npcs.ai.EntityAIFollow;
|
||||
import noppes.npcs.ai.EntityAIJob;
|
||||
import noppes.npcs.ai.EntityAILook;
|
||||
import noppes.npcs.ai.EntityAIMoveIndoors;
|
||||
import noppes.npcs.ai.EntityAIMovingPath;
|
||||
import noppes.npcs.ai.EntityAIOrbitTarget;
|
||||
import noppes.npcs.ai.EntityAIPanic;
|
||||
import noppes.npcs.ai.EntityAIRangedAttack;
|
||||
import noppes.npcs.ai.EntityAIReturn;
|
||||
import noppes.npcs.ai.EntityAIRole;
|
||||
import noppes.npcs.ai.EntityAISprintToTarget;
|
||||
import noppes.npcs.ai.EntityAIStalkTarget;
|
||||
import noppes.npcs.ai.EntityAITransform;
|
||||
import noppes.npcs.ai.EntityAIWander;
|
||||
import noppes.npcs.ai.EntityAIWatchClosest;
|
||||
import noppes.npcs.ai.EntityAIWaterNav;
|
||||
import noppes.npcs.ai.EntityAIWorldLines;
|
||||
import noppes.npcs.ai.EntityAIZigZagTarget;
|
||||
import noppes.npcs.ai.selector.NPCAttackSelector;
|
||||
import noppes.npcs.ai.target.EntityAIClearTarget;
|
||||
import noppes.npcs.ai.target.EntityAIClosestTarget;
|
||||
@@ -142,7 +166,6 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
public long totalTicksAlive = 0;
|
||||
private int taskCount = 1;
|
||||
public int lastInteract = 0;
|
||||
|
||||
public Faction faction; //should only be used server side
|
||||
|
||||
private EntityAIRangedAttack aiRange;
|
||||
@@ -162,10 +185,6 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
public boolean updateClient = false;
|
||||
public boolean updateAI = false;
|
||||
|
||||
// Fly Change
|
||||
// protected EntityMoveHelper moveHelper;
|
||||
// protected PathNavigate navigator;
|
||||
|
||||
public EntityNPCInterface(World world) {
|
||||
super(world);
|
||||
try{
|
||||
@@ -592,7 +611,7 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
if (worldObj == null || worldObj.isRemote)
|
||||
return;
|
||||
aiLeap = aiAttackTarget = aiResponse = aiSprint = aiRange = null;
|
||||
|
||||
|
||||
clearTasks(tasks);
|
||||
clearTasks(targetTasks);
|
||||
IEntitySelector attackEntitySelector = new NPCAttackSelector(this);
|
||||
@@ -601,18 +620,8 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
this.targetTasks.addTask(2, new EntityAIClosestTarget(this, EntityLivingBase.class, 4, this.ai.directLOS, false, attackEntitySelector));
|
||||
this.targetTasks.addTask(3, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(4, new EntityAIOwnerHurtTarget(this));
|
||||
|
||||
|
||||
// if(canFly()){
|
||||
// this.moveHelper = new FlyingMoveHelper(this);
|
||||
// this.navigator = new PathNavigateFlying(this, worldObj);
|
||||
// }
|
||||
// else{
|
||||
// this.moveHelper = new EntityMoveHelper(this);
|
||||
// this.navigator = new PathNavigateGround(this, worldObj);
|
||||
this.tasks.addTask(0, new EntityAIWaterNav(this));
|
||||
// }
|
||||
// this.tasks.addTask(0, new EntityAIWaterNav(this));
|
||||
|
||||
this.tasks.addTask(0, new EntityAIWaterNav(this));
|
||||
this.taskCount = 1;
|
||||
this.doorInteractType();
|
||||
this.seekShelter();
|
||||
@@ -699,9 +708,7 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
/*
|
||||
* Branch task function for adjusting NPC door interactivity
|
||||
*/
|
||||
public void doorInteractType(){
|
||||
if(canFly()) //currently flying does not support opening doors
|
||||
return;
|
||||
public void doorInteractType(){
|
||||
EntityAIBase aiDoor = null;
|
||||
if (this.ai.doorInteract == 1)
|
||||
{
|
||||
@@ -724,8 +731,7 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
}
|
||||
else if (this.ai.findShelter == 1)
|
||||
{
|
||||
if(!canFly()) // doesnt work when flying
|
||||
this.tasks.addTask(this.taskCount++, new EntityAIRestrictSun(this));
|
||||
this.tasks.addTask(this.taskCount++, new EntityAIRestrictSun(this));
|
||||
this.tasks.addTask(this.taskCount++, new EntityAIFindShade(this));
|
||||
}
|
||||
}
|
||||
@@ -1567,11 +1573,7 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
public boolean canBeCollidedWith(){
|
||||
return !isKilled();
|
||||
}
|
||||
|
||||
public boolean canFly(){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public EntityAIRangedAttack getRangedTask(){
|
||||
return this.aiRange;
|
||||
}
|
||||
@@ -1690,15 +1692,4 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
public boolean shouldDismountInWater(Entity rider){
|
||||
return false;
|
||||
}
|
||||
|
||||
// Model Types: 0: Steve 64x32, 1: Steve 64x64, 2: Alex 64x64
|
||||
public int getModelType()
|
||||
{
|
||||
return this.display.modelType;
|
||||
}
|
||||
|
||||
public void setModelType(int val)
|
||||
{
|
||||
this.display.modelType = val;
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,6 @@ public class ItemNpcWeaponInterface extends ItemSword implements ItemRenderInter
|
||||
CustomNpcs.proxy.registerItem(this);
|
||||
setCreativeTab(CustomItems.tabWeapon);
|
||||
}
|
||||
|
||||
public void renderSpecial(){
|
||||
GL11.glScalef(0.66f, 0.66f,0.66f);
|
||||
GL11.glTranslatef(0.16f, 0.26f, 0.06f);
|
||||
|
||||
@@ -179,7 +179,7 @@ public class ScriptLivingBase extends ScriptEntity{
|
||||
|
||||
/**
|
||||
* Note not all Living Entities support this
|
||||
* @param slot Slot of what armor piece to get, 0:boots, 1:pants, 2:body, 3:head
|
||||
* @param slot Slot of what armor piece to get, 0:boots, 1:pants, 2:body, 3:head, for npcs its 0:head, 1:body, 2:pants, 3:boots, small mistake on my part
|
||||
* @return The item in the given slot
|
||||
*/
|
||||
public ScriptItemStack getArmor(int slot){
|
||||
@@ -192,7 +192,7 @@ public class ScriptLivingBase extends ScriptEntity{
|
||||
/**
|
||||
* 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 slot Slot of what armor piece to set, 0:boots, 1:pants, 2:body, 3:head, for npcs its 0:head, 1:body, 2:pants, 3:boots, small mistake on my part
|
||||
* @param item Item to be set
|
||||
*/
|
||||
public void setArmor(int slot, ScriptItemStack item){
|
||||
|
||||
@@ -57,25 +57,6 @@ public class ScriptNpc extends ScriptLiving{
|
||||
npc.display.modelSize = size;
|
||||
npc.script.clientNeedsUpdate = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the current npcs modelType of the NPC
|
||||
*/
|
||||
public int getModelType(){
|
||||
return npc.display.modelType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param modelType The modelType of the NPC. 0: Steve, 1: Steve64, 2: Alex
|
||||
*/
|
||||
public void setModelType(int modelType){
|
||||
if(modelType > 2)
|
||||
modelType = 2;
|
||||
else if(modelType < 0)
|
||||
modelType = 0;
|
||||
npc.display.modelType = modelType;
|
||||
npc.script.clientNeedsUpdate = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The npcs name
|
||||
@@ -585,7 +566,7 @@ public class ScriptNpc extends ScriptLiving{
|
||||
* @since 1.7.10c
|
||||
* @param resistance Explosion resistance (0-2) default is 1
|
||||
*/
|
||||
public void setExplosionResistance(float resistance){
|
||||
public void seExplosionResistance(float resistance){
|
||||
npc.stats.resistances.explosion = ValueUtil.correctFloat(resistance, 0, 2);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package noppes.npcs.util;
|
||||
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class CustomNPCsScheduler {
|
||||
private final static ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
|
||||
|
||||
public static void runTack(Runnable task, int delay){
|
||||
executor.schedule(task, delay, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
public static void runTack(Runnable task){
|
||||
executor.schedule(task, 0, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,6 @@ display.livingAnimation=Lebende Animation
|
||||
display.visible=Sichtbar
|
||||
display.bossbar=Boss-Lebensanzeige
|
||||
display.url=Url
|
||||
display.urlSix=Url64
|
||||
|
||||
inv.minExp=Min. Xp
|
||||
inv.maxExp=Max. Xp
|
||||
|
||||
@@ -126,9 +126,6 @@ remote.freeze=Freeze NPCs
|
||||
|
||||
spawner.entities=Entities
|
||||
spawner.clones=Clones
|
||||
spawner.clones2=Clones 2
|
||||
spawner.clones3=Clones 3
|
||||
spawner.clones4=Clones 4
|
||||
spawner.mobspawner=MobSpawner
|
||||
spawner.mount=Mount by
|
||||
spawner.mountplayer=Player mounts
|
||||
@@ -173,9 +170,7 @@ display.selectTexture=Select Texture
|
||||
display.livingAnimation=Has a living animation
|
||||
display.visible=Visible
|
||||
display.bossbar=BossBar
|
||||
display.squareTexture=Square Texture
|
||||
display.url=Url
|
||||
display.urlSix=Url64
|
||||
|
||||
inv.minExp=Min Exp
|
||||
inv.maxExp=Max Exp
|
||||
@@ -925,23 +920,4 @@ companion.stage=Stage
|
||||
companion.owner=Owner
|
||||
companion.strength=Strength
|
||||
companion.talent=Talent
|
||||
companion.level=Level
|
||||
|
||||
markov.generic.name=Generic Generator
|
||||
markov.ancientGreek.name=Ancient Greek
|
||||
markov.aztec.name=Aztec
|
||||
markov.classicCNPCs.name=Classic CNPCs
|
||||
markov.japanese.name=Japanese
|
||||
markov.oldNorse.name=Old Norse
|
||||
markov.roman.name=Roman (Latin)
|
||||
markov.sami.name=Lappish (Sami)
|
||||
markov.slavic.name=Old Polish
|
||||
markov.welsh.name=Breton (Welsh)
|
||||
markov.spanish.name=Spanish (Latino)
|
||||
|
||||
markov.gender.name=Gender
|
||||
markov.gender.either=Either
|
||||
markov.gender.female=Female
|
||||
markov.gender.male=Male
|
||||
|
||||
markov.generate=Generate
|
||||
companion.level=Level
|
||||
@@ -1,406 +0,0 @@
|
||||
Achaeis
|
||||
Achaia
|
||||
Achradina
|
||||
Actae
|
||||
Acte
|
||||
Ada
|
||||
Adeia
|
||||
Aedon
|
||||
Aegiolea
|
||||
Aegle
|
||||
Aerope
|
||||
Aethre
|
||||
Agamede
|
||||
Aganippe
|
||||
Agape
|
||||
Agapia
|
||||
Agarista
|
||||
Agathe
|
||||
Agathonice
|
||||
Agave
|
||||
Aglaia
|
||||
Aglaurus
|
||||
Aikaterine
|
||||
Aithra
|
||||
Aketa
|
||||
Alcandre
|
||||
Alcestis
|
||||
Alcippe
|
||||
Alcmene
|
||||
Alcyone
|
||||
Alemene
|
||||
Alkmena
|
||||
Althaea
|
||||
Althaia
|
||||
Althea
|
||||
Amarhyllis
|
||||
Amathea
|
||||
Amatheia
|
||||
Amphithoe
|
||||
Amphitrite
|
||||
Ampinomene
|
||||
Amplias
|
||||
Anais
|
||||
Anastasia
|
||||
Andromeda
|
||||
Antehe
|
||||
Anteia
|
||||
Antheia
|
||||
Anthousa
|
||||
Anthusa
|
||||
Anticleia
|
||||
Antigone
|
||||
Antiochis
|
||||
Antiope
|
||||
Anysia
|
||||
Appollonia
|
||||
Apseudes
|
||||
Arete
|
||||
Arethusa
|
||||
Argeia
|
||||
Ariadne
|
||||
Arisbe
|
||||
Aristonike
|
||||
Aristophane
|
||||
Arsinoe
|
||||
Artemidora
|
||||
Artemisia
|
||||
Aspasia
|
||||
Astera
|
||||
Astyoche
|
||||
Astyocheia
|
||||
Atalanta
|
||||
Ate
|
||||
Athis
|
||||
Auge
|
||||
Augo
|
||||
Autonoe
|
||||
Auxesia
|
||||
Axiothea
|
||||
Barbara
|
||||
Basiane
|
||||
Baucis
|
||||
Berenike
|
||||
Bito
|
||||
Briseis
|
||||
Caenis
|
||||
Caleope
|
||||
Callianeira
|
||||
Callianessa
|
||||
Calliphana
|
||||
Calypso
|
||||
Canace
|
||||
Castianiera
|
||||
Charis
|
||||
Chione
|
||||
Chiore
|
||||
Chloe
|
||||
Chloris
|
||||
Chryse
|
||||
Chryseis
|
||||
Chrysothemis
|
||||
Cilissa
|
||||
Cilla
|
||||
Circe
|
||||
Clio
|
||||
Clymene
|
||||
Clymere
|
||||
Colubra
|
||||
Corythia
|
||||
Cratais
|
||||
Creusa
|
||||
Crisa
|
||||
Ctimene
|
||||
Cybele
|
||||
Cydippe
|
||||
Cymodoce
|
||||
Cymothoe
|
||||
Cyrene
|
||||
Cythereia
|
||||
Cytheris
|
||||
Damaris
|
||||
Damia
|
||||
Danae
|
||||
Deianeira
|
||||
Deineira
|
||||
Deiphobe
|
||||
Deipyle
|
||||
Delias
|
||||
Demetria
|
||||
Demophile
|
||||
Dexamene
|
||||
Dianeme
|
||||
Diomede
|
||||
Dione
|
||||
Dirce
|
||||
Doris
|
||||
Dorothea
|
||||
Doto
|
||||
Drosis
|
||||
Dynamene
|
||||
Egeria
|
||||
Egina
|
||||
Eidothee
|
||||
Eileithyia
|
||||
Elcmene
|
||||
Electra
|
||||
Elpir
|
||||
Endeis
|
||||
Enyo
|
||||
Eos
|
||||
Epicaste
|
||||
Eriboea
|
||||
Erigone
|
||||
Eriopis
|
||||
Eriphyle
|
||||
Eris
|
||||
Eucarpia
|
||||
Eudokia
|
||||
Eunice
|
||||
Euodias
|
||||
Euphro
|
||||
Euphrosyne
|
||||
Europa
|
||||
Eurycleia
|
||||
Eurydike
|
||||
Eurynome
|
||||
Evadne
|
||||
Galatea
|
||||
Glauce
|
||||
Glyke
|
||||
Gorgo
|
||||
Gygaea
|
||||
Haidee
|
||||
Halie
|
||||
Harmodias
|
||||
Harmonia
|
||||
Hecuba
|
||||
Hekabe
|
||||
Hekaline
|
||||
Hekate
|
||||
Helice
|
||||
Helike
|
||||
Heliodora
|
||||
Hellanike
|
||||
Helle
|
||||
Hermine
|
||||
Hermione
|
||||
Hero
|
||||
Herophile
|
||||
Hesione
|
||||
Hilaera
|
||||
Hippodameia
|
||||
Hippodamia
|
||||
Hippolyta
|
||||
Hypsipyle
|
||||
Hyrmina
|
||||
Iaera
|
||||
Ianeira
|
||||
Ianessa
|
||||
Ianthe
|
||||
Ino
|
||||
Iola
|
||||
Iolanthe
|
||||
Iole
|
||||
Iomene
|
||||
Ione
|
||||
Iphianassa
|
||||
Iphigenia
|
||||
Iphimedeia
|
||||
Iphis
|
||||
Iphitheme
|
||||
Irene
|
||||
Iris
|
||||
Isadora
|
||||
Ismene
|
||||
Issa
|
||||
Jocasta
|
||||
Kallisto
|
||||
Kallixeina
|
||||
Kassandra
|
||||
Katana
|
||||
Katina
|
||||
Kephissa
|
||||
Kharmion
|
||||
Khloe
|
||||
Khloris
|
||||
Kleio
|
||||
Kleopatra
|
||||
Klymene
|
||||
Klytemnestra
|
||||
Koré
|
||||
Koritto
|
||||
Kydilla
|
||||
Kynna
|
||||
Kynthia
|
||||
Kypris
|
||||
Kyra
|
||||
Labda
|
||||
Lais
|
||||
Lalage
|
||||
Lampetie
|
||||
Lampito
|
||||
Lanike
|
||||
Laodameia
|
||||
Laodamia
|
||||
Laodice
|
||||
Laothoe
|
||||
Lasthena
|
||||
Latona
|
||||
Leda
|
||||
Lede
|
||||
Leto
|
||||
Leucothea
|
||||
Leucothoe
|
||||
Limnoreia
|
||||
Lois
|
||||
Lyra
|
||||
Maeonia
|
||||
Maera
|
||||
Maia
|
||||
Maiandria
|
||||
Marpessa
|
||||
Medea
|
||||
Medesicaste
|
||||
Megaera
|
||||
Megara
|
||||
Megare
|
||||
Melanie
|
||||
Melantho
|
||||
Melissa
|
||||
Melita
|
||||
Melite
|
||||
Menelaia
|
||||
Merope
|
||||
Metis
|
||||
Metriche
|
||||
Milo
|
||||
Milto
|
||||
Molpadia
|
||||
Monima
|
||||
Monime
|
||||
Mykale
|
||||
Myrine
|
||||
Nausicaa
|
||||
Neaera
|
||||
Nemerte
|
||||
Nephele
|
||||
Nesaea
|
||||
Nicopolis
|
||||
Nikaia
|
||||
Nikasepolis
|
||||
Niko
|
||||
Niobe
|
||||
Nysa
|
||||
Oenone
|
||||
Oitane
|
||||
Olympias
|
||||
Omphale
|
||||
Oreithuia
|
||||
Oreithyia
|
||||
Orithyia
|
||||
Orthia
|
||||
Otonia
|
||||
Pales
|
||||
Panope
|
||||
Panora
|
||||
Parthenia
|
||||
Parthenope
|
||||
Pasiphae
|
||||
Pelopia
|
||||
Penelope
|
||||
Penthesilea
|
||||
Percalus
|
||||
Perialla
|
||||
Periboea
|
||||
Pero
|
||||
Perse
|
||||
Persephone
|
||||
Persis
|
||||
Pervica
|
||||
Pervinca
|
||||
Phaedra
|
||||
Phaedre
|
||||
Phaethusa
|
||||
Phaia
|
||||
Pherenike
|
||||
Pherusa
|
||||
Phigaleia
|
||||
Philea
|
||||
Philinna
|
||||
Philomache
|
||||
Philomela
|
||||
Philona
|
||||
Phoebe
|
||||
Phryne
|
||||
Phylace
|
||||
Phylia
|
||||
Phyllis
|
||||
Phylo
|
||||
Phylomedusa
|
||||
Podarge
|
||||
Polycaste
|
||||
Polydamna
|
||||
Polydora
|
||||
Polymede
|
||||
Polyxena
|
||||
Procne
|
||||
Procris
|
||||
Prone
|
||||
Proto
|
||||
Protogonia
|
||||
Psamathe
|
||||
Psyche
|
||||
Pylia
|
||||
Pyrrha
|
||||
Pythias
|
||||
Raisa
|
||||
Rhea
|
||||
Rhene
|
||||
Rhoda
|
||||
Rhode
|
||||
Rhodope
|
||||
Roxane
|
||||
Sappho
|
||||
Scylla
|
||||
Sebasteia
|
||||
Semele
|
||||
Sophia
|
||||
Sotera
|
||||
Speio
|
||||
Stheneboea
|
||||
Stratonice
|
||||
Tecmessa
|
||||
Telephassa
|
||||
Thais
|
||||
Thalassa
|
||||
Thaleia
|
||||
Theano
|
||||
Thebe
|
||||
Thelma
|
||||
Themis
|
||||
Theodotis
|
||||
Theophane
|
||||
Theophania
|
||||
Theophano
|
||||
Theresa
|
||||
Thessala
|
||||
Thessalonike
|
||||
Thetis
|
||||
Thisbe
|
||||
Thoe
|
||||
Thoosa
|
||||
Thyia
|
||||
Timandra
|
||||
Timo
|
||||
Tryphena
|
||||
Tryphosa
|
||||
Tyro
|
||||
Xanthe
|
||||
Xanthippe
|
||||
Xantippe
|
||||
Xene
|
||||
Xenophile
|
||||
Zenobia
|
||||
Zita
|
||||
Zoe
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,133 +0,0 @@
|
||||
Acalan
|
||||
Acatl
|
||||
Acue
|
||||
Ahuatzi
|
||||
Ahuic
|
||||
Amoxtli
|
||||
Anacaona
|
||||
Apozanolotl
|
||||
Atlacamani
|
||||
Atlacoya
|
||||
Atlatonin
|
||||
Atzi
|
||||
Ayauhteotl
|
||||
Chalchi
|
||||
Chalmeca
|
||||
Chantico
|
||||
Chicomecoatl
|
||||
Chiconahui
|
||||
Chimalley
|
||||
Chimalli
|
||||
Chimalma
|
||||
Chipahua
|
||||
Cihuaton
|
||||
Cipactonal
|
||||
Citlalee
|
||||
Citlalic
|
||||
Citlalicue
|
||||
Coatl
|
||||
Coaxoch
|
||||
Coyotl
|
||||
Coyolxauhqui
|
||||
Cozamalotl
|
||||
Cuahutéemoc
|
||||
Cuallea
|
||||
Cuallee
|
||||
Cucyo
|
||||
Cuetzpallea
|
||||
Cuetzpallee
|
||||
Cuicatl
|
||||
Etapalli
|
||||
Eztli
|
||||
Guatemoc
|
||||
Huitzilin
|
||||
Huixtocihuatl
|
||||
Huitl
|
||||
Ichtacka
|
||||
Ilamatecuhtli
|
||||
Ilhicamina
|
||||
Itzcali
|
||||
Itzcoatl
|
||||
Itzli
|
||||
Itzpapalotl
|
||||
Itztli
|
||||
Ixcuiname
|
||||
Ixtli
|
||||
Macuilxochitl
|
||||
Matlalihuitl
|
||||
Metztli
|
||||
Mictlantecuhtli
|
||||
Mixcoatl
|
||||
Miyaoaxochitl
|
||||
Mizquixaual
|
||||
Montezuma
|
||||
Nahuatl
|
||||
Necahual
|
||||
Nenetl
|
||||
Netzahual
|
||||
Nochehuatl
|
||||
Nochtli
|
||||
Ocotlan
|
||||
Ohtli
|
||||
Patlea
|
||||
Patlee
|
||||
Patli
|
||||
Quetzalcoatl
|
||||
Quetzalli
|
||||
Tayanna
|
||||
Teicuih
|
||||
Teiuc
|
||||
Tenoch
|
||||
Tezcacoatl
|
||||
Tlachinolli
|
||||
Tlanextic
|
||||
Tlanextli
|
||||
Tlazohtzin
|
||||
Tlilpotonqui
|
||||
Tochtlea
|
||||
Tochtlee
|
||||
Tochtli
|
||||
Toltecatl
|
||||
Tonalnan
|
||||
Tonantzin
|
||||
Tonatiuh
|
||||
Tonauac
|
||||
Tototl
|
||||
Tozi
|
||||
Tupack
|
||||
Tupoc
|
||||
Ueman
|
||||
Xicohtencatl
|
||||
Xihuitl
|
||||
Xilonen
|
||||
Xiloxoch
|
||||
Xipil
|
||||
Xipilli
|
||||
Xitllali
|
||||
Xiuhcoatl
|
||||
Xiuhtonal
|
||||
Xiutecuhtli
|
||||
Xochicotzin
|
||||
Xochil
|
||||
Xochilt
|
||||
Xochipilli
|
||||
Xochiquetzal
|
||||
Xochitl
|
||||
Xochiyotl
|
||||
Xoco
|
||||
Xocotzin
|
||||
Xocoyotl
|
||||
Xolotl
|
||||
Yaotel
|
||||
Yaotl
|
||||
Yaotyl
|
||||
Yaretzi
|
||||
Yolihuani
|
||||
Yolotli
|
||||
Yoloxochitl
|
||||
Yolyamanitzin
|
||||
Zeltzin
|
||||
Zipactonal
|
||||
Zolin
|
||||
Zuma
|
||||
Zyanya
|
||||
@@ -1,155 +0,0 @@
|
||||
Ach-aldhat
|
||||
Achdranys
|
||||
Adkal
|
||||
Aldny
|
||||
Amethyst
|
||||
Andern
|
||||
Ankin
|
||||
Aphmau
|
||||
Apolitho
|
||||
Arei
|
||||
Ariel
|
||||
Arisotura
|
||||
Armos
|
||||
Atesson
|
||||
Athi
|
||||
Ava
|
||||
Ayumu
|
||||
Bangheart
|
||||
Basrrelen
|
||||
Benjamin
|
||||
Blackwell
|
||||
Blaze
|
||||
Brion
|
||||
Burhat
|
||||
Carina
|
||||
Carnow
|
||||
Carter
|
||||
Chald
|
||||
Chim
|
||||
Chris
|
||||
Christine
|
||||
Claire
|
||||
Cray
|
||||
Crowfeather
|
||||
Cuero
|
||||
Dacks
|
||||
Daniel
|
||||
Darage
|
||||
Demytrix
|
||||
Div
|
||||
Divina
|
||||
Drake
|
||||
Drakken
|
||||
Droco
|
||||
Dyntan
|
||||
Eirina
|
||||
Eldamore
|
||||
Elmn
|
||||
Embrera
|
||||
Entranger
|
||||
Epodyno
|
||||
Estz
|
||||
Ethan
|
||||
Ezall
|
||||
Faolan
|
||||
Farcri
|
||||
Fian
|
||||
Gakih
|
||||
Gareld
|
||||
Gharis
|
||||
Ghatroth
|
||||
Grave
|
||||
Gyaku
|
||||
Hailinx
|
||||
Hir
|
||||
Honf
|
||||
Ightech
|
||||
Ightyd
|
||||
Ineald
|
||||
Issraya
|
||||
Itageray
|
||||
Kakaragon
|
||||
Kamoku
|
||||
Kaoz
|
||||
Karla
|
||||
Kathrine
|
||||
Kederath
|
||||
Ken
|
||||
Kennet
|
||||
Kineth
|
||||
Kora
|
||||
Kyoukan
|
||||
Lambton
|
||||
Larianne
|
||||
Larson
|
||||
Lenyx
|
||||
Leonardo
|
||||
Lily
|
||||
Loxiku
|
||||
Lucas
|
||||
Lucien
|
||||
Lynxx
|
||||
Mable
|
||||
Magia
|
||||
Magnus
|
||||
Malus
|
||||
Marble
|
||||
Meadow
|
||||
Melancholy
|
||||
Mia
|
||||
Mika
|
||||
Naif
|
||||
Nalworche
|
||||
Nasu
|
||||
Neve
|
||||
Oldam
|
||||
Oldrake
|
||||
Pegato
|
||||
Qua'an
|
||||
Ranler
|
||||
Raven
|
||||
Rilfom
|
||||
Riplette
|
||||
Ristai
|
||||
Rods
|
||||
Rose
|
||||
Ross
|
||||
Rothcersul
|
||||
Ruin
|
||||
Saenorath
|
||||
Sakamoto
|
||||
Sakiama
|
||||
Seinkan
|
||||
Seth
|
||||
Shadow
|
||||
Sieq
|
||||
Silk
|
||||
Slater
|
||||
Smaik
|
||||
Snow
|
||||
Sparrow
|
||||
Tanal
|
||||
Taradien
|
||||
Tasr
|
||||
Thanato
|
||||
Tia'kim
|
||||
Tiakono
|
||||
Tinlt
|
||||
Torerod
|
||||
Turturdar
|
||||
Tyltran
|
||||
Tymen
|
||||
Urnp
|
||||
Valentine
|
||||
Vorbani
|
||||
Waran-ess
|
||||
Wate
|
||||
William
|
||||
Winter
|
||||
Wyrl
|
||||
Xalgan
|
||||
Ylander
|
||||
Yosil
|
||||
Zenix
|
||||
Zidane
|
||||
@@ -1,386 +0,0 @@
|
||||
Ai
|
||||
Aika
|
||||
Aiko
|
||||
Aimi
|
||||
Aina
|
||||
Airi
|
||||
Akane
|
||||
Akari
|
||||
Akemi
|
||||
Akeno
|
||||
Aki
|
||||
Akie
|
||||
Akiko
|
||||
Akina
|
||||
Akiyo
|
||||
Amane
|
||||
Ami
|
||||
Anzu
|
||||
Aoi
|
||||
Arisa
|
||||
Asako
|
||||
Asami
|
||||
Asuka
|
||||
Asumi
|
||||
Asuna
|
||||
Atsuko
|
||||
Atsumi
|
||||
Aya
|
||||
Ayaka
|
||||
Ayako
|
||||
Ayame
|
||||
Ayami
|
||||
Ayana
|
||||
Ayane
|
||||
Ayano
|
||||
Ayu
|
||||
Ayuka
|
||||
Ayuko
|
||||
Ayumi
|
||||
Azumi
|
||||
Azusa
|
||||
Chie
|
||||
Chieko
|
||||
Chiemi
|
||||
Chiharu
|
||||
Chiho
|
||||
Chika
|
||||
Chikako
|
||||
Chinami
|
||||
Chinatsu
|
||||
Chisato
|
||||
Chitose
|
||||
Chiyako
|
||||
Chiyo
|
||||
Chiyoko
|
||||
Chizuko
|
||||
Chizuru
|
||||
Eiko
|
||||
Eimi
|
||||
Emi
|
||||
Emiko
|
||||
Emiri
|
||||
Eri
|
||||
Erika
|
||||
Eriko
|
||||
Erina
|
||||
Etsuko
|
||||
Fujie
|
||||
Fujiko
|
||||
Fūka
|
||||
Fukumi
|
||||
Fumi
|
||||
Fumie
|
||||
Fumika
|
||||
Fumiko
|
||||
Fumino
|
||||
Fumiyo
|
||||
Fusako
|
||||
Fuyuko
|
||||
Fuyumi
|
||||
Hana
|
||||
Hanae
|
||||
Hanako
|
||||
Harue
|
||||
Haruhi
|
||||
Haruka
|
||||
Haruko
|
||||
Haruna
|
||||
Haruyo
|
||||
Hatsue
|
||||
Hideko
|
||||
Hidemi
|
||||
Hikari
|
||||
Himeko
|
||||
Hina
|
||||
Hinako
|
||||
Hiroe
|
||||
Hiroka
|
||||
Hiroko
|
||||
Hiroyo
|
||||
Hisa
|
||||
Hisae
|
||||
Hisako
|
||||
Hisaya
|
||||
Hisayo
|
||||
Hitomi
|
||||
Honami
|
||||
Honoka
|
||||
Ichiko
|
||||
Ikue
|
||||
Ikuko
|
||||
Ikumi
|
||||
Ikuyo
|
||||
Itsuko
|
||||
Itsumi
|
||||
Jitsuko
|
||||
Junko
|
||||
Kaede
|
||||
Kaguya
|
||||
Kaho
|
||||
Kahoru
|
||||
Kana
|
||||
Kanae
|
||||
Kanako
|
||||
Kanna
|
||||
Kanoko
|
||||
Kaori
|
||||
Kaoruko
|
||||
Karin
|
||||
Kasumi
|
||||
Katsuko
|
||||
Kawai
|
||||
Kayoko
|
||||
Kazue
|
||||
Kazuha
|
||||
Kazuko
|
||||
Kazusa
|
||||
Kazuyo
|
||||
Keiki
|
||||
Keiko
|
||||
Kiko
|
||||
Kikue
|
||||
Kikuko
|
||||
Kimiko
|
||||
Kira
|
||||
Kiyoko
|
||||
Koharu
|
||||
Konomi
|
||||
Kotoe
|
||||
Kotomi
|
||||
Kotono
|
||||
Kotori
|
||||
Kozue
|
||||
Kumi
|
||||
Kumiko
|
||||
Kuniko
|
||||
Kurenai
|
||||
Kuriko
|
||||
Kyoko
|
||||
Maaya
|
||||
Machi
|
||||
Machiko
|
||||
Madoka
|
||||
Maho
|
||||
Mai
|
||||
Maiko
|
||||
Maki
|
||||
Makiko
|
||||
Mami
|
||||
Mamiko
|
||||
Mana
|
||||
Manaka
|
||||
Manami
|
||||
Mao
|
||||
Mari
|
||||
Maria
|
||||
Marie
|
||||
Mariko
|
||||
Masae
|
||||
Masako
|
||||
Masayo
|
||||
Matsuko
|
||||
Mayako
|
||||
Mayu
|
||||
Mayuko
|
||||
Mayumi
|
||||
Mayura
|
||||
Megu
|
||||
Megumi
|
||||
Mei
|
||||
Meiko
|
||||
Meisa
|
||||
Michiko
|
||||
Mie
|
||||
Mieko
|
||||
Miho
|
||||
Mihoko
|
||||
Miiko
|
||||
Mika
|
||||
Mikako
|
||||
Miki
|
||||
Mikiko
|
||||
Miku
|
||||
Mikuru
|
||||
Mimori
|
||||
Mina
|
||||
Minae
|
||||
Minako
|
||||
Minami
|
||||
Mineko
|
||||
Mioko
|
||||
Miori
|
||||
Misa
|
||||
Misaki
|
||||
Misako
|
||||
Misato
|
||||
Misumi
|
||||
Mitsuki
|
||||
Mitsuko
|
||||
Mitsuyo
|
||||
Miu
|
||||
Miwa
|
||||
Miwako
|
||||
Miyabi
|
||||
Miyako
|
||||
Miyoko
|
||||
Miyoshi
|
||||
Miyu
|
||||
Miyuki
|
||||
Miyumi
|
||||
Miyū
|
||||
Mizue
|
||||
Mizuki
|
||||
Mizuko
|
||||
Moeko
|
||||
Momo
|
||||
Momoe
|
||||
Momoka
|
||||
Momoko
|
||||
Motoko
|
||||
Mutsuko
|
||||
Mutsumi
|
||||
Nagako
|
||||
Nami
|
||||
Nana
|
||||
Nanae
|
||||
Nanako
|
||||
Nanami
|
||||
Nanase
|
||||
Nao
|
||||
Naoko
|
||||
Narumi
|
||||
Natsue
|
||||
Natsuko
|
||||
Natsume
|
||||
Natsumi
|
||||
Noa
|
||||
Nobuko
|
||||
Nodoka
|
||||
Nonoka
|
||||
Noriko
|
||||
Noriyo
|
||||
Nozomi
|
||||
Omi
|
||||
Otoha
|
||||
Otome
|
||||
Ran
|
||||
Rei
|
||||
Reika
|
||||
Reiko
|
||||
Reina
|
||||
Rena
|
||||
Rie
|
||||
Rieko
|
||||
Riho
|
||||
Rika
|
||||
Rikako
|
||||
Riko
|
||||
Rina
|
||||
Rio
|
||||
Risa
|
||||
Risako
|
||||
Ritsuko
|
||||
Rui
|
||||
Rumi
|
||||
Rumiko
|
||||
Runa
|
||||
Ruri
|
||||
Ruriko
|
||||
Ryōka
|
||||
Ryoko
|
||||
Sachie
|
||||
Sachiko
|
||||
Sadako
|
||||
Saeko
|
||||
Saki
|
||||
Sakie
|
||||
Sakiko
|
||||
Saku
|
||||
Sakura
|
||||
Sakurako
|
||||
Sanae
|
||||
Saori
|
||||
Sari
|
||||
Satoko
|
||||
Satomi
|
||||
Sawa
|
||||
Sawako
|
||||
Saya
|
||||
Sayaka
|
||||
Sayako
|
||||
Sayo
|
||||
Sayoko
|
||||
Sayumi
|
||||
Sayuri
|
||||
Seiko
|
||||
Setsuko
|
||||
Shigeko
|
||||
Shiho
|
||||
Shiina
|
||||
Shimako
|
||||
Shinako
|
||||
Shino
|
||||
Shiori
|
||||
Shizue
|
||||
Shizuko
|
||||
Shōko
|
||||
Shuko
|
||||
Sugako
|
||||
Sumie
|
||||
Sumika
|
||||
Sumiko
|
||||
Sumire
|
||||
Suzue
|
||||
Suzuka
|
||||
Suzuko
|
||||
Taeko
|
||||
Takako
|
||||
Takeko
|
||||
Tamami
|
||||
Tamao
|
||||
Tamiko
|
||||
Tatsuko
|
||||
Teiko
|
||||
Teruko
|
||||
Terumi
|
||||
Tokiko
|
||||
Tokuko
|
||||
Tomiko
|
||||
Tomoka
|
||||
Tomoko
|
||||
Tomoyo
|
||||
Toshiko
|
||||
Toyoko
|
||||
Tsukiko
|
||||
Tsuneko
|
||||
Tsuru
|
||||
Umeko
|
||||
Waka
|
||||
Wakako
|
||||
Yae
|
||||
Yaeko
|
||||
Yasue
|
||||
Yasuko
|
||||
Yayoi
|
||||
Yoko
|
||||
Yoriko
|
||||
Yoshiko
|
||||
Yoshino
|
||||
Yui
|
||||
Yuka
|
||||
Yukari
|
||||
Yukie
|
||||
Yukiko
|
||||
Yukina
|
||||
Yūko
|
||||
Yumeko
|
||||
Yumi
|
||||
Yumie
|
||||
Yumika
|
||||
Yumiko
|
||||
Yuri
|
||||
Yurie
|
||||
Yurika
|
||||
Yuriko
|
||||
Yurina
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
Loaded 100 of 972 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user