auto toteme
This commit is contained in:
		
							parent
							
								
									00e91b98aa
								
							
						
					
					
						commit
						a3e7e885ac
					
				
					 5 changed files with 41 additions and 4 deletions
				
			
		|  | @ -24,7 +24,7 @@ public class Moonlight implements ModInitializer | |||
| 	public static final Moonlight INSTANCE = new Moonlight(); | ||||
| 	public static final Logger LOGGER = LoggerFactory.getLogger("Moonlight"); | ||||
| 	public static final String clientTag = ColorUtils.aqua + "Moonlight Meadows"; | ||||
| 	public static final String versionTag = ColorUtils.magenta + "v0.2.1"; | ||||
| 	public static final String versionTag = ColorUtils.magenta + "v0.3.0"; | ||||
| 	public static Config CONFIG = new Config(); | ||||
| 	public static int uiColorA = 0xFF55FFFF; | ||||
| 	public static int uiColor = 0x55FFFF; | ||||
|  |  | |||
|  | @ -23,7 +23,8 @@ public class ModuleManager | |||
| 			new Rotation(), | ||||
| 			new AutoJump(), | ||||
| 			new Reach(), | ||||
| 			new AntiPowderSnow() | ||||
| 			new AntiPowderSnow(), | ||||
| 			new AutoTotem() | ||||
| 			/*new Timer()*/ | ||||
| 		); | ||||
|     } | ||||
|  |  | |||
|  | @ -0,0 +1,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.BooleanSetting; | ||||
| import net.minecraft.item.Items; | ||||
| import net.minecraft.screen.slot.SlotActionType; | ||||
| 
 | ||||
| public class AutoTotem extends Module  | ||||
| { | ||||
| 	public BooleanSetting overrideItems = new BooleanSetting("Override other items", false); | ||||
| 	 | ||||
|     public AutoTotem() | ||||
|     { | ||||
|         super("Auto Totem", "Automatically puts totems in offhand.", Category.COMBAT); | ||||
|         settings.add(overrideItems); | ||||
|     } | ||||
|      | ||||
|     @Override | ||||
|     public void tick() | ||||
|     { | ||||
|     	if (mc.player.getInventory().offHand.get(0).getItem() != Items.TOTEM_OF_UNDYING) | ||||
|     	{ | ||||
|     		if((!mc.player.getInventory().offHand.isEmpty()) && !overrideItems.value) return; | ||||
|     		for (int i = 0; i <= 35; i++) | ||||
|     		{ | ||||
|     			if (mc.player.getInventory().getStack(i).getItem() == Items.TOTEM_OF_UNDYING) | ||||
|     			{ | ||||
|     				mc.interactionManager.clickSlot(0, i, 8, SlotActionType.SWAP, mc.player); | ||||
|     				mc.interactionManager.clickSlot(0, 45, 8, SlotActionType.SWAP, mc.player); | ||||
|     				mc.interactionManager.clickSlot(0, i, 8, SlotActionType.SWAP, mc.player); | ||||
|     			} | ||||
|     		} | ||||
|     	} | ||||
|     } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 kawaiizenbo
						kawaiizenbo