mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-27 21:22:57 +00:00
Full Imports and Code Format Optimization
This commit is contained in:
1 parent
250edf099c
commit
6815f579a7
1192 files changed
+60344
-62167
No files matched your search
@@ -16,23 +16,40 @@ import java.util.List;
|
||||
|
||||
@Mixin(value = ModelRenderer.class)
|
||||
public abstract class MixinModelRenderer {
|
||||
@Shadow public float rotationPointX;
|
||||
@Shadow public float rotationPointY;
|
||||
@Shadow public float rotationPointZ;
|
||||
@Shadow public float rotateAngleX;
|
||||
@Shadow public float rotateAngleY;
|
||||
@Shadow public float rotateAngleZ;
|
||||
@Shadow public float offsetX;
|
||||
@Shadow public float offsetY;
|
||||
@Shadow public float offsetZ;
|
||||
@Shadow public boolean isHidden;
|
||||
@Shadow public boolean showModel;
|
||||
@Shadow public boolean compiled;
|
||||
@Shadow private int displayList;
|
||||
@Shadow public List childModels;
|
||||
@Shadow abstract void compileDisplayList(float p_78788_1_);
|
||||
@Shadow
|
||||
public float rotationPointX;
|
||||
@Shadow
|
||||
public float rotationPointY;
|
||||
@Shadow
|
||||
public float rotationPointZ;
|
||||
@Shadow
|
||||
public float rotateAngleX;
|
||||
@Shadow
|
||||
public float rotateAngleY;
|
||||
@Shadow
|
||||
public float rotateAngleZ;
|
||||
@Shadow
|
||||
public float offsetX;
|
||||
@Shadow
|
||||
public float offsetY;
|
||||
@Shadow
|
||||
public float offsetZ;
|
||||
@Shadow
|
||||
public boolean isHidden;
|
||||
@Shadow
|
||||
public boolean showModel;
|
||||
@Shadow
|
||||
public boolean compiled;
|
||||
@Shadow
|
||||
private int displayList;
|
||||
@Shadow
|
||||
public List childModels;
|
||||
|
||||
@Shadow public ModelBase baseModel;
|
||||
@Shadow
|
||||
abstract void compileDisplayList(float p_78788_1_);
|
||||
|
||||
@Shadow
|
||||
public ModelBase baseModel;
|
||||
|
||||
/**
|
||||
* @author Someone
|
||||
@@ -40,16 +57,15 @@ public abstract class MixinModelRenderer {
|
||||
*/
|
||||
@Overwrite
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void render(float p_78785_1_)
|
||||
{
|
||||
public void render(float p_78785_1_) {
|
||||
if (ClientEventHandler.partNames.isEmpty()) {
|
||||
String[] headNames = new String[]{"field_78116_c","bipedHead","bipedHeadwear","head","Head","headwear",
|
||||
"bipedHeadg","bipedHeadt","bipedHeadgh","bipedHeadv","bipedHeadb","bipedHeadt2"};
|
||||
String[] bodyNames = new String[]{"field_78115_e","bipedBody","B1","body","Body","UpperBody","Body1","BodyBase"};
|
||||
String[] larmNames = new String[]{"field_78113_g","bipedLeftArm","LA","leftarm","ArmL","Arm1L","ArmL1"};
|
||||
String[] rarmNames = new String[]{"field_78112_f","bipedRightArm","RA","rightarm","ArmR","Arm1R","ArmR1"};
|
||||
String[] llegNames = new String[]{"field_78124_i","bipedLeftLeg","LL","leftleg","LegL","Leg1L","LegL1"};
|
||||
String[] rlegNames = new String[]{"field_78123_h","bipedRightLeg","RL","rightleg","LegR","Leg1R","LegR1"};
|
||||
String[] headNames = new String[]{"field_78116_c", "bipedHead", "bipedHeadwear", "head", "Head", "headwear",
|
||||
"bipedHeadg", "bipedHeadt", "bipedHeadgh", "bipedHeadv", "bipedHeadb", "bipedHeadt2"};
|
||||
String[] bodyNames = new String[]{"field_78115_e", "bipedBody", "B1", "body", "Body", "UpperBody", "Body1", "BodyBase"};
|
||||
String[] larmNames = new String[]{"field_78113_g", "bipedLeftArm", "LA", "leftarm", "ArmL", "Arm1L", "ArmL1"};
|
||||
String[] rarmNames = new String[]{"field_78112_f", "bipedRightArm", "RA", "rightarm", "ArmR", "Arm1R", "ArmR1"};
|
||||
String[] llegNames = new String[]{"field_78124_i", "bipedLeftLeg", "LL", "leftleg", "LegL", "Leg1L", "LegL1"};
|
||||
String[] rlegNames = new String[]{"field_78123_h", "bipedRightLeg", "RL", "rightleg", "LegR", "Leg1R", "LegR1"};
|
||||
|
||||
ClientEventHandler.partNames.put(EnumAnimationPart.HEAD, headNames);
|
||||
ClientEventHandler.partNames.put(EnumAnimationPart.BODY, bodyNames);
|
||||
@@ -58,12 +74,9 @@ public abstract class MixinModelRenderer {
|
||||
ClientEventHandler.partNames.put(EnumAnimationPart.LEFT_LEG, llegNames);
|
||||
ClientEventHandler.partNames.put(EnumAnimationPart.RIGHT_LEG, rlegNames);
|
||||
}
|
||||
if (!this.isHidden)
|
||||
{
|
||||
if (this.showModel)
|
||||
{
|
||||
if (!this.compiled)
|
||||
{
|
||||
if (!this.isHidden) {
|
||||
if (this.showModel) {
|
||||
if (!this.compiled) {
|
||||
this.compileDisplayList(p_78785_1_);
|
||||
}
|
||||
|
||||
@@ -83,68 +96,53 @@ public abstract class MixinModelRenderer {
|
||||
GL11.glTranslatef(this.offsetX, this.offsetY, this.offsetZ);
|
||||
int i;
|
||||
|
||||
if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F)
|
||||
{
|
||||
if (this.rotationPointX == 0.0F && this.rotationPointY == 0.0F && this.rotationPointZ == 0.0F)
|
||||
{
|
||||
if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F) {
|
||||
if (this.rotationPointX == 0.0F && this.rotationPointY == 0.0F && this.rotationPointZ == 0.0F) {
|
||||
GL11.glCallList(this.displayList);
|
||||
|
||||
if (this.childModels != null)
|
||||
{
|
||||
for (i = 0; i < this.childModels.size(); ++i)
|
||||
{
|
||||
if(this.childModels.get(i) instanceof ModelRenderer){
|
||||
((ModelRenderer)this.childModels.get(i)).render(p_78785_1_);
|
||||
if (this.childModels != null) {
|
||||
for (i = 0; i < this.childModels.size(); ++i) {
|
||||
if (this.childModels.get(i) instanceof ModelRenderer) {
|
||||
((ModelRenderer) this.childModels.get(i)).render(p_78785_1_);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
GL11.glTranslatef(this.rotationPointX * p_78785_1_, this.rotationPointY * p_78785_1_, this.rotationPointZ * p_78785_1_);
|
||||
GL11.glCallList(this.displayList);
|
||||
|
||||
if (this.childModels != null)
|
||||
{
|
||||
for (i = 0; i < this.childModels.size(); ++i)
|
||||
{
|
||||
if(this.childModels.get(i) instanceof ModelRenderer){
|
||||
((ModelRenderer)this.childModels.get(i)).render(p_78785_1_);
|
||||
if (this.childModels != null) {
|
||||
for (i = 0; i < this.childModels.size(); ++i) {
|
||||
if (this.childModels.get(i) instanceof ModelRenderer) {
|
||||
((ModelRenderer) this.childModels.get(i)).render(p_78785_1_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glTranslatef(-this.rotationPointX * p_78785_1_, -this.rotationPointY * p_78785_1_, -this.rotationPointZ * p_78785_1_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(this.rotationPointX * p_78785_1_, this.rotationPointY * p_78785_1_, this.rotationPointZ * p_78785_1_);
|
||||
|
||||
if (this.rotateAngleZ != 0.0F)
|
||||
{
|
||||
GL11.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
||||
if (this.rotateAngleZ != 0.0F) {
|
||||
GL11.glRotatef(this.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleY != 0.0F)
|
||||
{
|
||||
GL11.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
if (this.rotateAngleY != 0.0F) {
|
||||
GL11.glRotatef(this.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleX != 0.0F)
|
||||
{
|
||||
GL11.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
if (this.rotateAngleX != 0.0F) {
|
||||
GL11.glRotatef(this.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
GL11.glCallList(this.displayList);
|
||||
|
||||
if (this.childModels != null)
|
||||
{
|
||||
for (i = 0; i < this.childModels.size(); ++i)
|
||||
{
|
||||
if(this.childModels.get(i) instanceof ModelRenderer){
|
||||
((ModelRenderer)this.childModels.get(i)).render(p_78785_1_);
|
||||
if (this.childModels != null) {
|
||||
for (i = 0; i < this.childModels.size(); ++i) {
|
||||
if (this.childModels.get(i) instanceof ModelRenderer) {
|
||||
((ModelRenderer) this.childModels.get(i)).render(p_78785_1_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user