mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 09:37:29 +00:00
Changed the functionality of the new variable that allows for larger angles.
This commit is contained in:
1 parent
5c81f3dd2e
commit
2588f14105
5 files changed
+12
-12
No files matched your search
@@ -42,8 +42,8 @@ public class GuiNpcPuppet extends GuiModelInterface implements ISliderListener,
|
||||
addLabel(new GuiNpcLabel(31, "puppet.walking", guiLeft + 30, y + 5, 0xFFFFFF));
|
||||
addButton(new GuiNpcButton(32, guiLeft + 120, y += 22, 60, 20, new String[]{"gui.yes", "gui.no"}, job.whileAttacking?0:1));
|
||||
addLabel(new GuiNpcLabel(32, "puppet.attacking", guiLeft + 30, y + 5, 0xFFFFFF));
|
||||
addButton(new GuiNpcButton(33, guiLeft + 120, y += 22, 60, 20, new String[]{"gui.yes", "gui.no"}, job.limitAngles?0:1));
|
||||
addLabel(new GuiNpcLabel(33, "puppet.limitAngles", guiLeft + 30, y + 5, 0xFFFFFF));
|
||||
addButton(new GuiNpcButton(33, guiLeft + 120, y += 22, 60, 20, new String[]{"gui.yes", "gui.no"}, job.fullAngles ?0:1));
|
||||
addLabel(new GuiNpcLabel(33, "puppet.fullAngles", guiLeft + 30, y + 5, 0xFFFFFF));
|
||||
|
||||
addButton(new GuiNpcButton(35, guiLeft + 120, y += 22, 60, 20, new String[]{"gui.yes", "gui.no"}, job.animate ? 0 : 1));
|
||||
addLabel(new GuiNpcLabel(35, "puppet.animate", guiLeft + 30, y + 5, 0xFFFFFF));
|
||||
@@ -179,7 +179,7 @@ public class GuiNpcPuppet extends GuiModelInterface implements ISliderListener,
|
||||
job.whileAttacking = button.getValue() == 0;
|
||||
}
|
||||
if(btn.id == 33){
|
||||
job.limitAngles = button.getValue() == 0;
|
||||
job.fullAngles = button.getValue() == 0;
|
||||
}
|
||||
if(btn.id == 35){
|
||||
job.animate = button.getValue() == 0;
|
||||
|
||||
@@ -628,7 +628,7 @@ public class ModelMPM extends ModelNPCMale{
|
||||
}
|
||||
|
||||
public void setInterpolatedAngles(JobPuppet job, ModelRenderer modelPart, JobPuppet.PartConfig puppetPart) {
|
||||
float pi = (float) Math.PI * (job.limitAngles ? 1 : 2);
|
||||
float pi = (float) Math.PI * (job.fullAngles ? 2 : 1);
|
||||
if (!job.animate) {
|
||||
modelPart.rotateAngleX = puppetPart.rotationX * pi;
|
||||
modelPart.rotateAngleY = puppetPart.rotationY * pi;
|
||||
|
||||
@@ -15,7 +15,7 @@ public class JobPuppet extends JobInterface{
|
||||
public boolean whileStanding = true;
|
||||
public boolean whileAttacking = false;
|
||||
public boolean whileMoving = false;
|
||||
public boolean limitAngles = true;
|
||||
public boolean fullAngles = false;
|
||||
|
||||
public boolean animate = false;
|
||||
public float animRate = 1.0F;
|
||||
@@ -44,7 +44,7 @@ public class JobPuppet extends JobInterface{
|
||||
compound.setBoolean("PuppetStanding", whileStanding);
|
||||
compound.setBoolean("PuppetAttacking", whileAttacking);
|
||||
compound.setBoolean("PuppetMoving", whileMoving);
|
||||
compound.setBoolean("PuppetLimitAngles", limitAngles);
|
||||
compound.setBoolean("PuppetFullAngles", fullAngles);
|
||||
|
||||
compound.setBoolean("PuppetAnimate", animate);
|
||||
compound.setFloat("PuppetAnimSpeed", animRate);
|
||||
@@ -63,7 +63,7 @@ public class JobPuppet extends JobInterface{
|
||||
whileStanding = compound.getBoolean("PuppetStanding");
|
||||
whileAttacking = compound.getBoolean("PuppetAttacking");
|
||||
whileMoving = compound.getBoolean("PuppetMoving");
|
||||
limitAngles = compound.getBoolean("PuppetLimitAngles");
|
||||
fullAngles = compound.getBoolean("PuppetFullAngles");
|
||||
|
||||
animate = compound.getBoolean("PuppetAnimate");
|
||||
animRate = compound.getFloat("PuppetAnimSpeed");
|
||||
|
||||
@@ -16,12 +16,12 @@ public class ScriptJobPuppet extends ScriptJobInterface implements IJobPuppet {
|
||||
this.job.animate = animated;
|
||||
}
|
||||
|
||||
public boolean anglesLimited() {
|
||||
return job.limitAngles;
|
||||
public boolean fullAngles() {
|
||||
return job.fullAngles;
|
||||
}
|
||||
|
||||
public void setAnglesLimited(boolean limit) {
|
||||
job.limitAngles = limit;
|
||||
public void setFullAngles(boolean limit) {
|
||||
job.fullAngles = limit;
|
||||
}
|
||||
|
||||
public boolean isAnimated() {
|
||||
|
||||
Reference in new issue
Block a user