Skip to content

Commit

Permalink
Merge pull request #10 from W-OVERFLOW/sumo
Browse files Browse the repository at this point in the history
  • Loading branch information
MicrocontrollersDev committed Apr 13, 2022
2 parents 72c4b96 + 493e1f8 commit 154bfcd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/main/java/cc/woverflow/hytils/HytilsReborn.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private void registerHandlers() {
eventBus.register(new HousingMusic());
eventBus.register(new GameStartingTitles());
eventBus.register(new GoalArmorStands());
// eventBus.register(new SumoRenderDistance());
eventBus.register(new SumoRenderDistance());
eventBus.register(new MiddleBeaconMiniWalls());
eventBus.register(new MiddleWaypointUHC());

Expand Down
4 changes: 1 addition & 3 deletions src/main/java/cc/woverflow/hytils/config/HytilsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,6 @@ public class HytilsConfig extends Vigilant {
)
public static String uhcMiddleWaypointText = "0,0";

/*
@Property(
type = PropertyType.SWITCH, name = "Lower Render Distance in Sumo",
description = "Lowers render distance to your desired value in sumo duels.",
Expand All @@ -743,7 +742,6 @@ public class HytilsConfig extends Vigilant {
min = 1, max = 5
)
public static int sumoRenderDistanceAmount = 2;
*/

@Property(
type = PropertyType.SWITCH, name = "Hide Armor",
Expand Down Expand Up @@ -996,7 +994,7 @@ public HytilsConfig() {

addDependency("uhcMiddleWaypointText", "uhcMiddleWaypoint");

// addDependency("sumoRenderDistanceAmount", "sumoRenderDistance");
addDependency("sumoRenderDistanceAmount", "sumoRenderDistance");

addDependency("overlayAmount", "heightOverlay");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,36 @@
import gg.essential.api.EssentialAPI;
import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.GameSettings;
import net.minecraftforge.client.event.RenderWorldEvent;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.event.world.WorldEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

public class SumoRenderDistance {
/*
final GameSettings gs = Minecraft.getMinecraft().gameSettings;
final int oldRd = gs.renderDistanceChunks;
int resetRd = gs.renderDistanceChunks;
boolean wasSumo = false;
boolean isFirstRender = true;

@SubscribeEvent
public void onRenderWorld(RenderWorldLastEvent event) {
public void onWorldLoad(RenderWorldLastEvent event) {
LocrawInformation locraw = HytilsReborn.INSTANCE.getLocrawUtil().getLocrawInformation();
if (HytilsConfig.sumoRenderDistance && EssentialAPI.getMinecraftUtil().isHypixel() && (locraw != null && locraw.getGameMode().contains("SUMO"))) {
gs.renderDistanceChunks = HytilsConfig.sumoRenderDistanceAmount;
if (isFirstRender) {
final int oldRd = gs.renderDistanceChunks;
wasSumo = true;
gs.renderDistanceChunks = HytilsConfig.sumoRenderDistanceAmount;
resetRd = oldRd;
}
isFirstRender = false;
}
else {
gs.renderDistanceChunks = oldRd;
if (wasSumo) {
wasSumo = false;
isFirstRender = true;
gs.renderDistanceChunks = resetRd;

}
}
}
*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class LanguageData {
public String chatCleanerReplyRecorded = "This game has been recorded. Click here to watch the Replay!";
private String chatCleanerTip = "(?:You tipped \\d+ (?:player|players) in \\d+ (?:game|different games)!|You already tipped everyone that has boosters active, so there isn't anybody to be tipped right now!)";
private String chatCleanerOnlineStatus = "REMINDER: Your Online Status is currently set to (?:Appear Offline|Busy|Away)";
private String chatCleanerGameTips = "^(?:If you get disconnected use /rejoin to join back in the game.|You may use /mmreport <skin name> to chat report in this mode!|Teaming with the *.+ is not allowed!|Teaming is not allowed *.+|Cross Teaming / Teaming with other teams is not allowed!|Cross-teaming is not allowed! Report cross-teamers using /report.|Cages opened! FIGHT!)";
private String chatCleanerGameTips = "^(?:If you get disconnected use /rejoin to join back in the game.|You may use /mmreport <skin name> to chat report in this mode!|Teaming with the *.+ is not allowed!|Teaming is not allowed *.+|Cross Teaming / Teaming with other teams is not allowed!|Cross-teaming is not allowed! Report cross-teamers using /report.|Cages opened! FIGHT!|Queued! Use the bed to return to lobby!|Queued! Use the bed to cancel!)";
private String chatCleanerStats = "Click to view the stats of your \\S+ game!";

private String connectedServerConnectMessage = "^(You are currently connected to server \\S+)|(Sending you to \\S+.{3}!)|(Sending to server \\S+.{3})|(Warping you to your Skyblock island...)|(Warping...)|(Sending a visit request...)|(Finding player...)$";
Expand Down

0 comments on commit 154bfcd

Please sign in to comment.