-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
a lot of bug fixes and addition of freatures from the old CT module
added: bonzo mask timer spirit mask timer pheonix pet timer Custom gui to edit hud elements positions player spin announce draft resets announce spirit leaps Custom spirit leap menu f7 phase start timers Ghost pick party finder overlay better f7 terminal tittles Custom terminals gui terminal numbers chat emojis gyro circle spring boots display wither shield timer Clock display fps display fixes: some commands not working properly ability keybinds auto i4 auto ult blood ready HighlightMimicChest IHATEDIORITE chat coords to waypoint Left Click Etherwarp salvage overlay
- Loading branch information
Showing
92 changed files
with
4,424 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,3 +203,5 @@ servers.dat | |
servers.essential.dat | ||
/.vscode | ||
ops.json | ||
whitelist.json | ||
whitelist.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package NoammAddons | ||
|
||
import NoammAddons.NoammAddons.Companion.config | ||
import NoammAddons.NoammAddons.Companion.hudData | ||
import NoammAddons.config.EditGui.HudElement | ||
import NoammAddons.utils.ChatUtils.removeFormatting | ||
import NoammAddons.utils.ChatUtils.toFixed | ||
import net.minecraftforge.client.event.ClientChatReceivedEvent | ||
import net.minecraftforge.client.event.RenderGameOverlayEvent | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent | ||
|
||
|
||
object BonzoMask { | ||
private val BonzoMaskElement = HudElement("&9Bonzo Mask: &aREADY", dataObj = hudData.getData().BonzoMask) | ||
private var timer = 0L | ||
private var draw = false | ||
private val maskCooldown = 183_000 | ||
|
||
@SubscribeEvent | ||
fun onChat(event: ClientChatReceivedEvent) { | ||
if (!config.BonzoMaskDisplay) return | ||
if (event.type.toInt() != 0) return | ||
|
||
if (!event.message.unformattedText.removeFormatting().matches(Regex("^Your (?:. )?Bonzo's Mask saved your life!$"))) return | ||
timer = System.currentTimeMillis() | ||
draw = true | ||
} | ||
|
||
@SubscribeEvent | ||
fun onRender(event: RenderGameOverlayEvent.Pre) { | ||
if (!config.BonzoMaskDisplay) return | ||
if (event.type != RenderGameOverlayEvent.ElementType.HOTBAR) return | ||
if (!draw) return | ||
|
||
val cooldown = ((maskCooldown + (timer - System.currentTimeMillis())).toDouble()/1000).toFixed(1).toDouble() | ||
|
||
BonzoMaskElement.setText( | ||
when { | ||
cooldown > 0.0 -> "&9Bonzo Mask: &a$cooldown" | ||
(cooldown == 0.0 || cooldown > -30.0) -> "&9Bonzo Mask: &aREADY" | ||
else -> return | ||
} | ||
).draw() | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/NoammAddons/mixins/AccessorGuiContainer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package NoammAddons.mixins; | ||
|
||
import net.minecraft.client.gui.inventory.GuiContainer; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(GuiContainer.class) | ||
public interface AccessorGuiContainer { | ||
@Accessor("guiTop") | ||
int getGuiTop(); | ||
|
||
@Accessor("guiLeft") | ||
int getGuiLeft(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package NoammAddons.mixins; | ||
|
||
import net.minecraft.entity.Entity; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(Entity.class) | ||
public interface EntityAccessor { | ||
@Accessor | ||
void setInPortal(boolean newValue); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package NoammAddons.mixins; | ||
|
||
import net.minecraft.entity.Entity; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(Entity.class) | ||
public class MixinEntity implements EntityAccessor { | ||
@Shadow | ||
protected boolean inPortal; | ||
|
||
@Override | ||
public void setInPortal(boolean newValue) { | ||
this.inPortal = newValue; | ||
} | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/NoammAddons/mixins/MixinGuiDisplayTitle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package NoammAddons.mixins; | ||
|
||
import net.minecraftforge.client.GuiIngameForge; | ||
import net.minecraftforge.common.MinecraftForge; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
import NoammAddons.events.RenderTitleEvent; | ||
|
||
|
||
@Mixin(GuiIngameForge.class) | ||
public class MixinGuiDisplayTitle { | ||
@Inject(method = "renderTitle", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/GlStateManager;pushMatrix()V", ordinal = 0), cancellable = true) | ||
private void onRenderTitle(int width, int height, float partialTicks, CallbackInfo ci) { | ||
if (MinecraftForge.EVENT_BUS.post(new RenderTitleEvent())) { | ||
ci.cancel(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package NoammAddons.mixins; | ||
|
||
import NoammAddons.events.GuiContainerEvent; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.gui.GuiScreen; | ||
import net.minecraftforge.common.MinecraftForge; | ||
import org.lwjgl.input.Mouse; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(GuiScreen.class) | ||
public abstract class MixinGuiScreen { | ||
|
||
@Shadow public int height; | ||
@Shadow public int width; | ||
@Shadow public Minecraft mc; | ||
|
||
@Inject( | ||
method = "handleMouseInput", | ||
at = @At(value = "INVOKE", | ||
target = "Lnet/minecraft/client/gui/GuiScreen;mouseClicked(III)V" | ||
), cancellable = true) | ||
private void injectMouseClick(CallbackInfo ci) { | ||
int mouseX = Mouse.getEventX() * this.width / this.mc.displayWidth; | ||
int mouseY = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1; | ||
int mouseButton = Mouse.getEventButton(); | ||
|
||
GuiContainerEvent.GuiMouseClickEvent event = new GuiContainerEvent.GuiMouseClickEvent(mouseX, mouseY, mouseButton); | ||
MinecraftForge.EVENT_BUS.post(event); | ||
|
||
if (event.isCanceled()) { | ||
ci.cancel(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package NoammAddons.mixins; | ||
|
||
import NoammAddons.events.MessageSentEvent; | ||
import net.minecraftforge.common.MinecraftForge; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import net.minecraft.client.entity.EntityPlayerSP; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
|
||
@Mixin(EntityPlayerSP.class) | ||
public class MixinThePlayer { | ||
@Inject(method = "sendChatMessage", at = @At("HEAD"), cancellable = true) | ||
public void sendChatMessage(String message, CallbackInfo ci) { | ||
if (MinecraftForge.EVENT_BUS.post(new MessageSentEvent(message))) { | ||
ci.cancel(); | ||
} | ||
} | ||
} |
Oops, something went wrong.