fixed unneccesary error
This commit is contained in:
parent
c8becf865a
commit
dcceb09186
2 changed files with 7 additions and 7 deletions
|
@ -3,4 +3,4 @@ org.gradle.jvmargs=-Xmx2g
|
||||||
baseGroup = com.github.stachelbeere1248.zombiesutils
|
baseGroup = com.github.stachelbeere1248.zombiesutils
|
||||||
mcVersion = 1.8.9
|
mcVersion = 1.8.9
|
||||||
modid = zombiesutils
|
modid = zombiesutils
|
||||||
version = 1.1.3
|
version = 1.1.4
|
|
@ -29,7 +29,7 @@ public class MixinNetHandlerPlayClient {
|
||||||
@Unique
|
@Unique
|
||||||
private void zombies_utils$handleSound(@NotNull S29PacketSoundEffect packet) {
|
private void zombies_utils$handleSound(@NotNull S29PacketSoundEffect packet) {
|
||||||
if (Scoreboard.isZombies()) return;
|
if (Scoreboard.isZombies()) return;
|
||||||
String soundEffect = packet.getSoundName();
|
final String soundEffect = packet.getSoundName();
|
||||||
if (!(
|
if (!(
|
||||||
soundEffect.equals("mob.wither.spawn")
|
soundEffect.equals("mob.wither.spawn")
|
||||||
|| (soundEffect.equals("mob.guardian.curse") && !zombies_utils$alienUfoOpened)
|
|| (soundEffect.equals("mob.guardian.curse") && !zombies_utils$alienUfoOpened)
|
||||||
|
@ -37,24 +37,24 @@ public class MixinNetHandlerPlayClient {
|
||||||
zombies_utils$alienUfoOpened = soundEffect.equals("mob.guardian.curse");
|
zombies_utils$alienUfoOpened = soundEffect.equals("mob.guardian.curse");
|
||||||
|
|
||||||
if (!Timer.getInstance().isPresent()) {
|
if (!Timer.getInstance().isPresent()) {
|
||||||
ZombiesUtils.getInstance().getLogger().info("Attempting creation of new timer");
|
|
||||||
new Timer(
|
new Timer(
|
||||||
Scoreboard.getServerNumber().orElseThrow(() -> new RuntimeException("cannot figure out servernumber")),
|
Scoreboard.getServerNumber().orElseThrow(() -> new RuntimeException("cannot figure out servernumber")),
|
||||||
Scoreboard.getMap().orElseThrow(() -> new RuntimeException("cannot figure out map")).map
|
Scoreboard.getMap().orElseThrow(() -> new RuntimeException("cannot figure out map")).map
|
||||||
);
|
);
|
||||||
} else { Timer timer = Timer.getInstance().get();
|
} else { Timer timer = Timer.getInstance().get();
|
||||||
|
|
||||||
Scoreboard.MapContainer map = Scoreboard.getMap().orElseThrow(() -> new RuntimeException("Scoreboard Error"));
|
final Scoreboard.MapContainer map = Scoreboard.getMap().orElse(new Scoreboard.MapContainer(
|
||||||
|
GameMode.getCurrentGameMode().getMap(),
|
||||||
|
false
|
||||||
|
));
|
||||||
|
|
||||||
if (map.pregame) {
|
if (map.pregame) {
|
||||||
ZombiesUtils.getInstance().getLogger().info("Attempting creation of new timer");
|
|
||||||
new Timer(
|
new Timer(
|
||||||
Scoreboard.getServerNumber().orElseThrow(() -> new RuntimeException("cannot figure out servernumber")),
|
Scoreboard.getServerNumber().orElseThrow(() -> new RuntimeException("cannot figure out servernumber")),
|
||||||
map.map
|
map.map
|
||||||
);
|
);
|
||||||
} else if (timer.equalsServerOrNull(Scoreboard.getServerNumber().orElse(null))) timer.split(Scoreboard.getRound());
|
} else if (timer.equalsServerOrNull(Scoreboard.getServerNumber().orElse(null))) timer.split(Scoreboard.getRound());
|
||||||
else {
|
else {
|
||||||
ZombiesUtils.getInstance().getLogger().info("Attempting creation of new timer");
|
|
||||||
//also kills the previous timer using the garbage collector
|
|
||||||
new Timer(
|
new Timer(
|
||||||
Scoreboard.getServerNumber().orElseThrow(() -> new RuntimeException("cannot figure out servernumber")),
|
Scoreboard.getServerNumber().orElseThrow(() -> new RuntimeException("cannot figure out servernumber")),
|
||||||
map.map
|
map.map
|
||||||
|
|
Loading…
Add table
Reference in a new issue