Skip to content

Commit

Permalink
2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Seosean committed Jul 27, 2024
1 parent 08aeb40 commit 9f65a8a
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ plugins {
id "net.minecraftforge.gradle.forge" version "2.0.2"
}
*/
version = "2.0.9"
version = "2.1.1"
group= "com.seosean.showspawntime" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "ShowSpawnTime"

Expand Down
Binary file removed lib/Orange's Simple Mods-1.2-deobf.jar
Binary file not shown.
Binary file removed lib/ZombiesAutoSplits-1.2.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/com/seosean/showspawntime/ShowSpawnTime.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
public class ShowSpawnTime
{
public static final String MODID = "showspawntime";
public static final String VERSION = "2.0.9";
public static final String VERSION = "2.1.1";
public static final String EMOJI_REGEX = "(?:[\uD83C\uDF00-\uD83D\uDDFF]|[\uD83E\uDD00-\uD83E\uDDFF]|[\uD83D\uDE00-\uD83D\uDE4F]|[\uD83D\uDE80-\uD83D\uDEFF]|[\u2600-\u26FF]\uFE0F?|[\u2700-\u27BF]\uFE0F?|\u24C2\uFE0F?|[\uD83C\uDDE6-\uD83C\uDDFF]{1,2}|[\uD83C\uDD70\uD83C\uDD71\uD83C\uDD7E\uD83C\uDD7F\uD83C\uDD8E\uD83C\uDD91-\uD83C\uDD9A]\uFE0F?|[\u0023\u002A\u0030-\u0039]\uFE0F?\u20E3|[\u2194-\u2199\u21A9-\u21AA]\uFE0F?|[\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55]\uFE0F?|[\u2934\u2935]\uFE0F?|[\u3030\u303D]\uFE0F?|[\u3297\u3299]\uFE0F?|[\uD83C\uDE01\uD83C\uDE02\uD83C\uDE1A\uD83C\uDE2F\uD83C\uDE32-\uD83C\uDE3A\uD83C\uDE50\uD83C\uDE51]\uFE0F?|[\u203C\u2049]\uFE0F?|[\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE]\uFE0F?|[\u00A9\u00AE]\uFE0F?|[\u2122\u2139]\uFE0F?|\uD83C\uDC04\uFE0F?|\uD83C\uDCCF\uFE0F?|[\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA]\uFE0F?)";
public static final String COLOR_REGEX = "§[a-zA-Z0-9]";
public static boolean isAutoSplitsLoaded;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.seosean.showspawntime.events;

import net.minecraftforge.fml.common.eventhandler.Event;

public class ZombiesTickEvent extends Event {

private int tick;

public ZombiesTickEvent(int tick) {
this.tick = tick;
}

public int getTick() {
return tick;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ public void run() {
}
}.runTaskLater(3 * 20);

new DelayedTask() {
@Override
public void run() {
DebugUtils.sendMessage(EnumChatFormatting.RED.toString() + EnumChatFormatting.BOLD + "ShowSpawnTime" + EnumChatFormatting.WHITE + ": " + EnumChatFormatting.RED + EnumChatFormatting.OBFUSCATED + "aa" + EnumChatFormatting.RESET + EnumChatFormatting.RED + "2.0.9 is a fast-patch version, I will release a version of 2.1.0 for new map the Prison as soon as possible." + EnumChatFormatting.OBFUSCATED + "aa");
}
}.runTaskLater(1 * 20);
// new DelayedTask() {
// @Override
// public void run() {
// DebugUtils.sendMessage(EnumChatFormatting.RED.toString() + EnumChatFormatting.BOLD + "ShowSpawnTime" + EnumChatFormatting.WHITE + ": " + EnumChatFormatting.RED + EnumChatFormatting.OBFUSCATED + "aa" + EnumChatFormatting.RESET + EnumChatFormatting.RED + "2.0.9 is a fast-patch version, I will release a version of 2.1.0 for new map the Prison as soon as possible." + EnumChatFormatting.OBFUSCATED + "aa");
// }
// }.runTaskLater(1 * 20);

MinecraftForge.EVENT_BUS.unregister(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void lrCountDown(TickEvent.ClientTickEvent event) {
}

if (lrOffsetCountDown > 0) {
lrOffsetCountDown -=1 ;
lrOffsetCountDown -= 1 ;
} else {
lrUsings = 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public PowerupDetect(){
public static Integer[] r2MaxRoundsTL = {2, 8, 12, 16, 21, 26, 31, 36};
public static Integer[] r3MaxRoundsTL = {3, 6, 9, 13, 17, 22, 27, 32, 37};

public static Integer[] r2MaxRoundsPR = {2, 5, 8, 12, 16, 21, 26};
public static Integer[] r3MaxRoundsPR = {3, 6, 9, 13, 17, 22, 27};

public static Integer[] r2MaxRoundsAA = {2, 5, 8, 12, 16, 21, 26, 31, 36, 41, 46, 51, 61, 66, 71, 76, 81, 86, 91, 96};
public static Integer[] r3MaxRoundsAA = {3, 6, 9, 13, 17, 22, 27, 32, 37, 42, 47, 52, 62, 67, 72, 77, 82, 87, 92, 97};

Expand All @@ -43,9 +46,12 @@ public PowerupDetect(){
public static Integer[] r2InsRoundsAA = {2, 5, 8, 11, 14, 17, 20, 23};
public static Integer[] r3InsRoundsAA = {3, 6, 9, 12, 15, 18, 21};

public static Integer[] r2InsRoundsTL = {2, 8, 11, 14, 17, 20, 23};
public static Integer[] r2InsRoundsTL = {2, 8, 11, 14, 17, 23};
public static Integer[] r3InsRoundsTL = {3, 6, 9, 12, 18, 21, 24};

public static Integer[] r2InsRoundsPR = {2, 5, 8, 11, 14, 17, 23};
public static Integer[] r3InsRoundsPR = {3, 6, 9, 12, 15, 18, 21, 24};

public static Integer[] r5SSRoundsAA = {5, 15, 45, 55, 65, 75, 85, 95, 105};
public static Integer[] r6SSRoundsAA = {6, 16, 26, 36, 46, 66, 76, 86, 96};
public static Integer[] r7SSRoundsAA = {7, 17, 27, 37, 47, 67, 77, 87, 97};
Expand Down Expand Up @@ -250,6 +256,9 @@ public void setInstaRound(int round) {
case ALIEN_ARCADIUM:
insRounds = Arrays.asList(round == 2 ? r2InsRoundsAA : r3InsRoundsAA);
break;
case PRISON:
insRounds = Arrays.asList(round == 2 ? r2InsRoundsPR : r3InsRoundsPR);
break;
}
}

Expand All @@ -268,6 +277,9 @@ public void setMaxRound(int round) {
case ALIEN_ARCADIUM:
maxRounds = Arrays.asList(round == 2 ? r2MaxRoundsAA : r3MaxRoundsAA);
break;
case PRISON:
maxRounds = Arrays.asList(round == 2 ? r2MaxRoundsPR : r3MaxRoundsPR);
break;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static void onSpawn(int tick) {

int finalWaveTime = currentRoundTimes[currentRoundTimes.length - 1];

if ((MainConfiguration.PlayDEBBSound && (LanguageUtils.getMap().equals(LanguageUtils.ZombiesMap.DEAD_END) || LanguageUtils.getMap().equals(LanguageUtils.ZombiesMap.BAD_BLOOD) || LanguageUtils.getMap().equals(LanguageUtils.ZombiesMap.THE_LAB))) || (MainConfiguration.PlayAASound && LanguageUtils.getMap().equals(LanguageUtils.ZombiesMap.ALIEN_ARCADIUM))) {
if ((MainConfiguration.PlayDEBBSound && (LanguageUtils.getMap().equals(LanguageUtils.ZombiesMap.DEAD_END) || LanguageUtils.getMap().equals(LanguageUtils.ZombiesMap.BAD_BLOOD) || LanguageUtils.getMap().equals(LanguageUtils.ZombiesMap.THE_LAB) || LanguageUtils.getMap().equals(LanguageUtils.ZombiesMap.PRISON))) || (MainConfiguration.PlayAASound && LanguageUtils.getMap().equals(LanguageUtils.ZombiesMap.ALIEN_ARCADIUM))) {
for (int time : currentRoundTimes) {
if (time * 1000 == tick) {
if (finalWaveTime * 1000 == tick) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,21 @@ public void onRender(RenderGameOverlayEvent.Post event) {

for (int i = 0; i < waveAmount; i++) {
int wave = i + 1;
fontRenderer.drawStringWithShadow("W" + wave + " " + "00:" + spawnTimes.getWaveTime(wave), absoluteX + widthW, absoluteY + this.fontRenderer.FONT_HEIGHT * (5 - waveAmount + wave), spawnTimes.getColor(wave));
fontRenderer.drawStringWithShadow("W" + wave + " " + this.getTime(spawnTimes.getWaveTime(wave)), absoluteX + widthW, absoluteY + this.fontRenderer.FONT_HEIGHT * (5 - waveAmount + wave), spawnTimes.getColor(wave));
}
}

private String getTime(int time) {
if (time <= 0) {
return "00:00";
}

int seconds = time % 60;
int minutes = time / 60;

String strSeconds = seconds < 10 ? "0" + seconds : String.valueOf(seconds);
String strMinutes = minutes < 10 ? "0" + minutes : String.valueOf(minutes);

return strMinutes.concat(":").concat(strSeconds);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ public int getCurrentWave() {
.getGameTick());
}

public String getWaveTime(int wave) {
public int getWaveTime(int wave) {
LanguageUtils.ZombiesMap map = LanguageUtils.getMap();
if (map == null || !JavaUtils.isValidIndex(roundTimes, wave - 1)) {
return "00";
return 0;
}
int time = roundTimes [wave - 1];
return String.valueOf(time < 10 ? ("0" + time) : time);
return time;
}

public int getNextWave() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.seosean.showspawntime.handler;

import com.seosean.showspawntime.ShowSpawnTime;
import com.seosean.showspawntime.events.ZombiesTickEvent;
import com.seosean.showspawntime.features.frcooldown.FastReviveCoolDown;
import com.seosean.showspawntime.features.spawntimes.SpawnNotice;
import com.seosean.showspawntime.utils.DelayedTask;
Expand All @@ -9,6 +10,8 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.Entity;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

Expand Down Expand Up @@ -83,6 +86,7 @@ public void startOrSplit() {
lock.lock();
try {
zGameTick += 10;
MinecraftForge.EVENT_BUS.post(new ZombiesTickEvent(zGameTick));
if (zGameTick != 0 && zGameTick % 1000 == 0) {
if (zGameStarted && PlayerUtils.isInZombies()) {
SpawnNotice.onSpawn(zGameTick);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public static int[] getBossRounds() {
case DEAD_END: return new int[]{5, 10, 15, 20, 25, 30};
case BAD_BLOOD: return new int[]{10, 15, 20, 25, 30};
case THE_LAB: return new int[]{5, 10, 15, 20, 25, 30, 35, 40};
case PRISON: return new int[]{10, 20, 30};
}
return new int[]{};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ public static ZombiesMap getMap() {
return ZombiesMap.BAD_BLOOD;
case "tile.cloth":
return ZombiesMap.DEAD_END;
case "tile.clayHardenStained":
return ZombiesMap.NULL;
case "tile.clayHardenedStained":
return ZombiesMap.PRISON;
}
return ZombiesMap.NULL;
}
Expand Down Expand Up @@ -191,7 +191,7 @@ public static boolean contains(String string, String i18nKey) {

public enum ZombiesMap {
NULL(new int[][]{}, 0),
PRISON(new int[][]{}, 0),
PRISON(new int[][]{{10,20},{10,20,30},{10,17,24,31},{10,17,24,31},{10,20,30},{10,20,30},{10,20,30},{10,25,40},{10,25,35},{10,25,45},{10,25,40},{10,25,37},{10,22,34},{10,25,37},{10,25,40},{10,22,37},{10,22,42},{10,25,45},{10,25,45},{10,25,40},{10,20,35,55,75},{10,25,40},{10,30,50},{10,30,50},{10,25,45},{10,30,50},{10,25,45},{10,30,50},{10,30,55},{10}}, 30),
THE_LAB(new int[][]{{10,22},{10,22},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34}}, 40),
DEAD_END(new int[][]{{10,20},{10,20},{10,20,35},{10,20,35},{10,22,37},{10,22,44},{10,25,47},{10,25,50},{10,22,38},{10,24,45},{10,25,48},{10,25,50},{10,25,50},{10,25,45},{10,25,46},{10,24,47},{10,24,47},{10,24,47},{10,24,47},{10,24,49},{10,23,44},{10,23,45},{10,23,42},{10,23,43},{10,23,43},{10,23,36},{10,24,44},{10,24,42},{10,24,42},{10,24,45}}, 30),
BAD_BLOOD(new int[][]{{10,22},{10,22},{10,22},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,22,34},{10,24,38},{10,24,38},{10,22,34},{10,24,38},{10,22,34}}, 30),
Expand Down

0 comments on commit 9f65a8a

Please sign in to comment.