mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 09:09:08 +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
@@ -6,83 +6,83 @@ import noppes.npcs.api.entity.data.IModelRotatePart;
|
||||
import noppes.npcs.util.ValueUtil;
|
||||
|
||||
public class ModelRotate implements IModelRotate {
|
||||
// Rotation
|
||||
public boolean whileStanding = true;
|
||||
public boolean whileAttacking = false;
|
||||
public boolean whileMoving = false;
|
||||
// Rotation
|
||||
public boolean whileStanding = true;
|
||||
public boolean whileAttacking = false;
|
||||
public boolean whileMoving = false;
|
||||
|
||||
public ModelRotatePart head = new ModelRotatePart();
|
||||
public ModelRotatePart body = new ModelRotatePart();
|
||||
public ModelRotatePart larm = new ModelRotatePart();
|
||||
public ModelRotatePart rarm = new ModelRotatePart();
|
||||
public ModelRotatePart lleg = new ModelRotatePart();
|
||||
public ModelRotatePart rleg = new ModelRotatePart();
|
||||
public ModelRotatePart head = new ModelRotatePart();
|
||||
public ModelRotatePart body = new ModelRotatePart();
|
||||
public ModelRotatePart larm = new ModelRotatePart();
|
||||
public ModelRotatePart rarm = new ModelRotatePart();
|
||||
public ModelRotatePart lleg = new ModelRotatePart();
|
||||
public ModelRotatePart rleg = new ModelRotatePart();
|
||||
|
||||
public NBTTagCompound writeToNBT(){
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setBoolean("PuppetStanding", whileStanding);
|
||||
compound.setBoolean("PuppetAttacking", whileAttacking);
|
||||
compound.setBoolean("PuppetMoving", whileMoving);
|
||||
compound.setTag("PuppetHead", head.writeToNBT());
|
||||
compound.setTag("PuppetBody", body.writeToNBT());
|
||||
compound.setTag("PuppetRArm", rarm.writeToNBT());
|
||||
compound.setTag("PuppetLArm", larm.writeToNBT());
|
||||
compound.setTag("PuppetRLeg", rleg.writeToNBT());
|
||||
compound.setTag("PuppetLLeg", lleg.writeToNBT());
|
||||
return compound;
|
||||
}
|
||||
|
||||
public void readFromNBT(NBTTagCompound compound){
|
||||
whileStanding = compound.getBoolean("PuppetStanding");
|
||||
whileAttacking = compound.getBoolean("PuppetAttacking");
|
||||
whileMoving = compound.getBoolean("PuppetMoving");
|
||||
head.readFromNBT(compound.getCompoundTag("PuppetHead"));
|
||||
body.readFromNBT(compound.getCompoundTag("PuppetBody"));
|
||||
rarm.readFromNBT(compound.getCompoundTag("PuppetRArm"));
|
||||
larm.readFromNBT(compound.getCompoundTag("PuppetLArm"));
|
||||
rleg.readFromNBT(compound.getCompoundTag("PuppetRLeg"));
|
||||
lleg.readFromNBT(compound.getCompoundTag("PuppetLLeg"));
|
||||
}
|
||||
public NBTTagCompound writeToNBT() {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setBoolean("PuppetStanding", whileStanding);
|
||||
compound.setBoolean("PuppetAttacking", whileAttacking);
|
||||
compound.setBoolean("PuppetMoving", whileMoving);
|
||||
compound.setTag("PuppetHead", head.writeToNBT());
|
||||
compound.setTag("PuppetBody", body.writeToNBT());
|
||||
compound.setTag("PuppetRArm", rarm.writeToNBT());
|
||||
compound.setTag("PuppetLArm", larm.writeToNBT());
|
||||
compound.setTag("PuppetRLeg", rleg.writeToNBT());
|
||||
compound.setTag("PuppetLLeg", lleg.writeToNBT());
|
||||
return compound;
|
||||
}
|
||||
|
||||
public boolean whileStanding() {
|
||||
return this.whileStanding;
|
||||
}
|
||||
public void readFromNBT(NBTTagCompound compound) {
|
||||
whileStanding = compound.getBoolean("PuppetStanding");
|
||||
whileAttacking = compound.getBoolean("PuppetAttacking");
|
||||
whileMoving = compound.getBoolean("PuppetMoving");
|
||||
head.readFromNBT(compound.getCompoundTag("PuppetHead"));
|
||||
body.readFromNBT(compound.getCompoundTag("PuppetBody"));
|
||||
rarm.readFromNBT(compound.getCompoundTag("PuppetRArm"));
|
||||
larm.readFromNBT(compound.getCompoundTag("PuppetLArm"));
|
||||
rleg.readFromNBT(compound.getCompoundTag("PuppetRLeg"));
|
||||
lleg.readFromNBT(compound.getCompoundTag("PuppetLLeg"));
|
||||
}
|
||||
|
||||
public void whileStanding(boolean whileStanding) {
|
||||
this.whileStanding = whileStanding;
|
||||
}
|
||||
public boolean whileStanding() {
|
||||
return this.whileStanding;
|
||||
}
|
||||
|
||||
public boolean whileAttacking() {
|
||||
return this.whileAttacking;
|
||||
}
|
||||
public void whileStanding(boolean whileStanding) {
|
||||
this.whileStanding = whileStanding;
|
||||
}
|
||||
|
||||
public void whileAttacking(boolean whileAttacking) {
|
||||
this.whileAttacking = whileAttacking;
|
||||
}
|
||||
public boolean whileAttacking() {
|
||||
return this.whileAttacking;
|
||||
}
|
||||
|
||||
public boolean whileMoving() {
|
||||
return this.whileMoving;
|
||||
}
|
||||
public void whileAttacking(boolean whileAttacking) {
|
||||
this.whileAttacking = whileAttacking;
|
||||
}
|
||||
|
||||
public void whileMoving(boolean whileMoving) {
|
||||
this.whileMoving = whileMoving;
|
||||
}
|
||||
public boolean whileMoving() {
|
||||
return this.whileMoving;
|
||||
}
|
||||
|
||||
public IModelRotatePart getPart(int part) {
|
||||
switch (ValueUtil.clamp(part,0,5)) {
|
||||
case 0:
|
||||
return head;
|
||||
case 1:
|
||||
return body;
|
||||
case 2:
|
||||
return larm;
|
||||
case 3:
|
||||
return rarm;
|
||||
case 4:
|
||||
return lleg;
|
||||
case 5:
|
||||
return rleg;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public void whileMoving(boolean whileMoving) {
|
||||
this.whileMoving = whileMoving;
|
||||
}
|
||||
|
||||
public IModelRotatePart getPart(int part) {
|
||||
switch (ValueUtil.clamp(part, 0, 5)) {
|
||||
case 0:
|
||||
return head;
|
||||
case 1:
|
||||
return body;
|
||||
case 2:
|
||||
return larm;
|
||||
case 3:
|
||||
return rarm;
|
||||
case 4:
|
||||
return lleg;
|
||||
case 5:
|
||||
return rleg;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user