1.21 update
update to 1.21, remove timer
This commit is contained in:
		
							parent
							
								
									c68631010d
								
							
						
					
					
						commit
						69b444c3c2
					
				
					 11 changed files with 36 additions and 31 deletions
				
			
		|  | @ -34,9 +34,9 @@ public class DeathPos extends Command | |||
|             } | ||||
|              | ||||
| 			ChatUtils.sendMsg(ColorUtils.reset + "You last died at: " +  | ||||
|             ColorUtils.aqua + " X: " + ColorUtils.gray + pos.getPos().getX() +  | ||||
|             ColorUtils.aqua + " Y: " + ColorUtils.gray + pos.getPos().getY() + | ||||
|             ColorUtils.aqua + " Z: " + ColorUtils.gray + pos.getPos().getZ() | ||||
|             ColorUtils.aqua + " X: " + ColorUtils.gray + pos.pos().getX() +  | ||||
|             ColorUtils.aqua + " Y: " + ColorUtils.gray + pos.pos().getY() + | ||||
|             ColorUtils.aqua + " Z: " + ColorUtils.gray + pos.pos().getZ() | ||||
|             ); | ||||
| 			return SINGLE_SUCCESS; | ||||
| 		});  | ||||
|  |  | |||
|  | @ -11,18 +11,16 @@ import me.kawaiizenbo.moonlight.ui.HUDOverlay; | |||
| import me.kawaiizenbo.moonlight.ui.ModulesListOverlay; | ||||
| import net.minecraft.client.gui.DrawContext; | ||||
| import net.minecraft.client.gui.hud.InGameHud; | ||||
| import net.minecraft.client.render.RenderTickCounter; | ||||
| 
 | ||||
| @Mixin(InGameHud.class) | ||||
| public class InGameHudMixin { | ||||
| 
 | ||||
| 	@Shadow private int scaledWidth; | ||||
|     @Shadow private int scaledHeight; | ||||
|      | ||||
| 	@Inject(at = @At("TAIL"), method = "render")  | ||||
| 	public void onRender (DrawContext drawContext, float tickDelta, CallbackInfo info)  | ||||
| 	public void onRender (DrawContext drawContext, RenderTickCounter tickCounter, CallbackInfo info)  | ||||
|     { | ||||
| 		if (ModuleManager.INSTANCE.getModuleByName("HUD").enabled) HUDOverlay.INSTANCE.render(drawContext, scaledWidth, scaledHeight); | ||||
| 		if (ModuleManager.INSTANCE.getModuleByName("ModulesList").enabled) ModulesListOverlay.INSTANCE.render(drawContext, scaledWidth, scaledHeight); | ||||
| 		if (ModuleManager.INSTANCE.getModuleByName("HUD").enabled) HUDOverlay.INSTANCE.render(drawContext, drawContext.getScaledWindowWidth(), drawContext.getScaledWindowHeight()); | ||||
| 		if (ModuleManager.INSTANCE.getModuleByName("ModulesList").enabled) ModulesListOverlay.INSTANCE.render(drawContext, drawContext.getScaledWindowWidth(), drawContext.getScaledWindowHeight()); | ||||
| 	} | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -21,8 +21,8 @@ public class ModuleManager | |||
| 			new ModulesList(), | ||||
| 			new ChatSpammer(), | ||||
| 			new Rotation(), | ||||
| 			new AutoJump(), | ||||
| 			new Timer() | ||||
| 			new AutoJump() | ||||
| 			/*new Timer()*/ | ||||
| 		); | ||||
|     } | ||||
| 	 | ||||
|  |  | |||
|  | @ -3,27 +3,36 @@ package me.kawaiizenbo.moonlight.module.modules; | |||
| import me.kawaiizenbo.moonlight.module.Category; | ||||
| import me.kawaiizenbo.moonlight.module.Module; | ||||
| import me.kawaiizenbo.moonlight.module.settings.DoubleSetting; | ||||
| import net.minecraft.entity.attribute.EntityAttributes; | ||||
| 
 | ||||
| public class Step extends Module | ||||
| { | ||||
|     DoubleSetting stepHeight = new DoubleSetting("Height", 1, 1, 10, 0); | ||||
|     double old = 0.6; | ||||
| 
 | ||||
|     public Step() | ||||
|     { | ||||
|         super("Step", "Allows you to step up full blocks.", Category.MOVEMENT); | ||||
|         settings.add(stepHeight); | ||||
|     } | ||||
|      | ||||
|     @Override | ||||
|     public void onEnable() | ||||
|     { | ||||
|     	super.onEnable(); | ||||
|     	old = mc.player.getAttributeInstance(EntityAttributes.GENERIC_STEP_HEIGHT).getBaseValue(); | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public void tick() | ||||
|     { | ||||
|         mc.player.setStepHeight((float)stepHeight.value); | ||||
|     {	 | ||||
|         mc.player.getAttributeInstance(EntityAttributes.GENERIC_STEP_HEIGHT).setBaseValue(stepHeight.value); | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public void onDisable() | ||||
|     { | ||||
|         super.onDisable(); | ||||
|         mc.player.setStepHeight(0.6f); | ||||
|         mc.player.getAttributeInstance(EntityAttributes.GENERIC_STEP_HEIGHT).setBaseValue(old); | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -19,7 +19,7 @@ public class Timer extends Module | |||
|     public void onEnable() | ||||
|     { | ||||
|         super.onEnable(); | ||||
|         mc.renderTickCounter = new RenderTickCounter((float)(20.0*speed.value), 0L, this::targetTickRate); | ||||
|         //mc.renderTickCounter = new RenderTickCounter((float)(20.0*speed.value), 0L, this::targetTickRate); | ||||
|         current = speed.value; | ||||
|     } | ||||
| 
 | ||||
|  | @ -33,7 +33,7 @@ public class Timer extends Module | |||
|     public void onDisable() | ||||
|     { | ||||
|         super.onDisable(); | ||||
|         mc.renderTickCounter = new RenderTickCounter(20.0f, 0L, this::targetTickRate); | ||||
|         //mc.renderTickCounter = new RenderTickCounter(20.0f, 0L, this::targetTickRate); | ||||
|     } | ||||
| 
 | ||||
|     public float targetTickRate(float millis) | ||||
|  |  | |||
|  | @ -26,7 +26,7 @@ public class CategoryPane | |||
|         this.y = initialY; | ||||
|         this.collapsed = collapsed; | ||||
|         moduleButtons = new ArrayList<ModuleButton>(); | ||||
|         icon = new Identifier("moonlight", category.name.toLowerCase()); | ||||
|         icon = Identifier.of("moonlight", category.name.toLowerCase()); | ||||
|         for (Module m : ModuleManager.INSTANCE.getModulesByCategory(category)) | ||||
|         { | ||||
|             moduleButtons.add(new ModuleButton(m)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 kawaiizenbo
						kawaiizenbo