mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 22:27:32 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
21f6353188
7 files changed
+94
-8
No files matched your search
@@ -124,19 +124,23 @@ public class AbilityController implements IAbilityHandler {
|
||||
|
||||
private void registerBuiltinTypes() {
|
||||
registerType("cnpc:slam", AbilitySlam::new);
|
||||
registerType("cnpc:charge", AbilityCharge::new);
|
||||
|
||||
registerType("cnpc:heavy_hit", AbilityHeavyHit::new);
|
||||
registerType("cnpc:cutter", AbilityCutter::new);
|
||||
|
||||
// registerType("cnpc:projectile", AbilityProjectile::new);
|
||||
|
||||
registerType("cnpc:sweeper", AbilitySweeper::new);
|
||||
registerType("cnpc:projectile", AbilityProjectile::new);
|
||||
registerType("cnpc:orb", AbilityOrb::new);
|
||||
registerType("cnpc:disc", AbilityDisc::new);
|
||||
registerType("cnpc:laser_shot", AbilityLaserShot::new);
|
||||
registerType("cnpc:beam", AbilityBeam::new);
|
||||
// registerType("cnpc:slicer", AbilitySlicer::new);
|
||||
|
||||
registerType("cnpc:charge", AbilityCharge::new);
|
||||
registerType("cnpc:dash", AbilityDash::new);
|
||||
registerType("cnpc:teleport", AbilityTeleport::new);
|
||||
|
||||
registerType("cnpc:vortex", AbilityVortex::new);
|
||||
registerType("cnpc:shockwave", AbilityShockwave::new);
|
||||
|
||||
@@ -149,7 +153,6 @@ public class AbilityController implements IAbilityHandler {
|
||||
registerType("cnpc:dome", AbilityDome::new);
|
||||
registerType("cnpc:wall", AbilityWall::new);
|
||||
registerType("cnpc:shield", AbilityShield::new);
|
||||
registerType("cnpc:slicer", AbilitySlicer::new);
|
||||
}
|
||||
|
||||
private void registerBuiltinConditionTypes() {
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ public class ConditionHasEffect extends AbilityCondition {
|
||||
|
||||
@Override
|
||||
public String getConditionSummary() {
|
||||
String filterLabel = StatCollector.translateToLocal("condition.filter." + getFilter().name().toLowerCase());
|
||||
String filterLabel = StatCollector.translateToLocal(getFilter().toString());
|
||||
String effectName = "None";
|
||||
if (effectId >= 0) {
|
||||
CustomEffect effect = getEffect();
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public class ConditionHitCount extends AbilityCondition {
|
||||
|
||||
@Override
|
||||
public String getConditionSummary() {
|
||||
String filterLabel = StatCollector.translateToLocal("condition.filter." + getFilter().name().toLowerCase());
|
||||
String filterLabel = StatCollector.translateToLocal(getFilter().toString());
|
||||
return "[" + filterLabel + "] Hit " + requiredHits + " times in " + withinTicks + " ticks";
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ public class ConditionItem extends AbilityCondition {
|
||||
|
||||
@Override
|
||||
public String getConditionSummary() {
|
||||
String filterLabel = StatCollector.translateToLocal("condition.filter." + getFilter().name().toLowerCase());
|
||||
String filterLabel = StatCollector.translateToLocal(getFilter().toString());
|
||||
String usage = usageType.name();
|
||||
String item = itemName.isEmpty() ? "None" : itemName;
|
||||
return "[" + filterLabel + "] " + usage + ": " + item;
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class ConditionQuestCompleted extends AbilityCondition {
|
||||
|
||||
@Override
|
||||
public String getConditionSummary() {
|
||||
String filterLabel = StatCollector.translateToLocal("condition.filter." + getFilter().name().toLowerCase());
|
||||
String filterLabel = StatCollector.translateToLocal(getFilter().toString());
|
||||
String questName = "None";
|
||||
if (questId >= 0) {
|
||||
Quest q = QuestController.Instance.quests.get(questId);
|
||||
|
||||
+1
-1
@@ -124,7 +124,7 @@ public abstract class ConditionThreshold extends AbilityCondition {
|
||||
|
||||
@Override
|
||||
public String getConditionSummary() {
|
||||
String filterLabel = StatCollector.translateToLocal("condition.filter." + getFilter().name().toLowerCase());
|
||||
String filterLabel = StatCollector.translateToLocal(getFilter().toString());
|
||||
String typeName = getStatName();
|
||||
String typeLabel = StatCollector.translateToLocal(thresholdType.toString());
|
||||
String value = percent
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package kamkeel.npcs.controllers.data.ability.data;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class EnergyChargingData {
|
||||
|
||||
public int chargeDuration = 60;
|
||||
public int chargeDelay = 0;
|
||||
public int maxCharge = 100;
|
||||
public boolean hasCharge = true;
|
||||
public boolean chargeWindUpSync = true;
|
||||
|
||||
public EnergyChargingData() {
|
||||
}
|
||||
|
||||
public EnergyChargingData(int chargeDuration, int chargeDelay, int maxCharge, boolean hasCharge, boolean chargeWindUpSync) {
|
||||
this.chargeDuration = chargeDuration;
|
||||
this.chargeDelay = chargeDelay;
|
||||
this.maxCharge = maxCharge;
|
||||
this.hasCharge = hasCharge;
|
||||
this.chargeWindUpSync = chargeWindUpSync;
|
||||
}
|
||||
|
||||
public boolean hasCharge() {
|
||||
return hasCharge;
|
||||
}
|
||||
|
||||
public void setHasCharge(boolean hasCharge) {
|
||||
this.hasCharge = hasCharge;
|
||||
}
|
||||
|
||||
public boolean isChargeWindUpSync() {
|
||||
return chargeWindUpSync;
|
||||
}
|
||||
|
||||
public void setChargeWindUpSync(boolean chargeWindUpSync) {
|
||||
this.chargeWindUpSync = chargeWindUpSync;
|
||||
}
|
||||
|
||||
public int getChargeDuration() {
|
||||
return chargeDuration;
|
||||
}
|
||||
|
||||
public void setChargeDuration(int chargeDuration) {
|
||||
this.chargeDuration = chargeDuration;
|
||||
}
|
||||
|
||||
public int getChargeDelay() {
|
||||
return chargeDelay;
|
||||
}
|
||||
|
||||
public void setChargeDelay(int chargeDelay) {
|
||||
this.chargeDelay = chargeDelay;
|
||||
}
|
||||
|
||||
public int getMaxCharge() {
|
||||
return maxCharge;
|
||||
}
|
||||
|
||||
public void setMaxCharge(int maxCharge) {
|
||||
this.maxCharge = Math.max(0, maxCharge);
|
||||
}
|
||||
|
||||
public void writeNBT(NBTTagCompound nbt) {
|
||||
nbt.setInteger("chargeDuration", chargeDuration);
|
||||
nbt.setInteger("chargeDelay", chargeDelay);
|
||||
nbt.setInteger("maxCharge", maxCharge);
|
||||
nbt.setBoolean("hasCharge", hasCharge);
|
||||
nbt.setBoolean("chargeWindUpSync", chargeWindUpSync);
|
||||
}
|
||||
|
||||
public void readNBT(NBTTagCompound nbt) {
|
||||
chargeDuration = nbt.hasKey("chargeDuration") ? nbt.getInteger("chargeDuration") : 60;
|
||||
chargeDelay = nbt.hasKey("chargeDelay") ? nbt.getInteger("chargeDelay") : 0;
|
||||
maxCharge = nbt.hasKey("maxCharge") ? nbt.getInteger("maxCharge") : 100;
|
||||
hasCharge = !nbt.hasKey("hasCharge") || nbt.getBoolean("hasCharge");
|
||||
chargeWindUpSync = !nbt.hasKey("chargeWindUpSync") || nbt.getBoolean("chargeWindUpSync");
|
||||
}
|
||||
|
||||
public EnergyChargingData copy() {
|
||||
return new EnergyChargingData(chargeDuration, chargeDelay, maxCharge, hasCharge, chargeWindUpSync);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user