添加贴图和部分逻辑

This commit is contained in:
17146 2025-05-10 17:42:07 +08:00 committed by Light_Quanta
parent 022cddaa40
commit f3d84c58cc
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
5 changed files with 3 additions and 2 deletions

View file

@ -198,13 +198,14 @@ public class DPSGeneratorEntity extends LivingEntity implements GeoEntity {
if (getLastDamageSource() != null) { if (getLastDamageSource() != null) {
var attacker = getLastDamageSource().getEntity(); var attacker = getLastDamageSource().getEntity();
if (attacker instanceof Player player) { if (attacker instanceof Player player) {
player.displayClientMessage(Component.translatable("tips.superbwarfare.dps_generator.dps", FormatTool.format1D(damage * Math.pow(2, getGeneratorLevel()))), true); player.displayClientMessage(Component.translatable("tips.superbwarfare.dps_generator.dps",
FormatTool.format1D(damage * Math.pow(2, getGeneratorLevel()))), true);
} }
} }
// 发电 // 发电
((SyncedEntityEnergyStorage) entityCap).setMaxReceive(entityCap.getMaxEnergyStored()); ((SyncedEntityEnergyStorage) entityCap).setMaxReceive(entityCap.getMaxEnergyStored());
entityCap.receiveEnergy((int) Math.round(128 * Math.max(getGeneratorLevel(), 1) * Math.pow(2, getGeneratorLevel()) * damage), false); entityCap.receiveEnergy((int) Math.round(128D * Math.max(getGeneratorLevel(), 1) * Math.pow(2, getGeneratorLevel()) * damage), false);
((SyncedEntityEnergyStorage) entityCap).setMaxReceive(0); ((SyncedEntityEnergyStorage) entityCap).setMaxReceive(0);
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B