Update WinconditionRelativeRedstonePercent
Dieser Commit ist enthalten in:
Ursprung
a3c073e04d
Commit
2e7228835b
@ -31,7 +31,8 @@ public class WinconditionRelativeRedstonePercent extends PercentWincondition imp
|
|||||||
public void enable() {
|
public void enable() {
|
||||||
super.enable();
|
super.enable();
|
||||||
teamMap.forEach((team, percent) -> {
|
teamMap.forEach((team, percent) -> {
|
||||||
percent.currentBlocks = 0;
|
percent.totalBlocks = 0;
|
||||||
|
percent.currentBlocks = 1;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -56,14 +57,23 @@ public class WinconditionRelativeRedstonePercent extends PercentWincondition imp
|
|||||||
return Config.Blocks.contains(block.getType());
|
return Config.Blocks.contains(block.getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TeamPercent extends PercentWincondition.TeamPercent {
|
public class TeamPercent extends StateDependentTeamPercent {
|
||||||
|
|
||||||
public TeamPercent(FightTeam team) {
|
public TeamPercent(FightTeam team) {
|
||||||
super(team);
|
super(team, Winconditions.RELATIVE_REDSTONE_PERCENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void enable() {
|
||||||
totalBlocks = currentBlocks();
|
totalBlocks = currentBlocks();
|
||||||
currentBlocks = totalBlocks;
|
currentBlocks = totalBlocks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void disable() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void check(EntityExplodeEvent event) {
|
private void check(EntityExplodeEvent event) {
|
||||||
if (!team.getExtendRegion().inRegion(event.getEntity().getLocation())) {
|
if (!team.getExtendRegion().inRegion(event.getEntity().getLocation())) {
|
||||||
return;
|
return;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren