Preparing AutoMLG

Avatar

By je5442804 11 August 2019 09:29

Member · 48 comments

I am going to make a AutoMLG script base on sigma script XD , it seem that need to import something like that:
var BlockPos = Java. type('net.minecraft.util.BlockPos')
could anybody give me other suggestions?

Avatar

By Qingfeng 11 August 2019 17:50

Member · 7 comments

Sorry, I won't, but I wish you success.

Avatar

By yorik100 11 August 2019 23:23

Member · 280 comments

You actually need to make the player look down server sided to do that, you can't use blockplace without looking down since water bucket is weird thing, the water will only appear client sided if you do that

Last edited by yorik100 (11 August 2019 23:23)

Avatar

By je5442804 14 August 2019 08:21

Member · 48 comments

mc.thePlayer.prveRotationPitch = -90 i am no sure how to do ??
I think Rotation is not difficlut,but C09PacketHeldItemChange ?
I do not know how to get Item Value like this:(java)

/*
     * Swaps to item slot and returns the previous one
     */
    private int swapToItem(int item){
        mc.rightClickDelayTimer = 2;
        int currentItem = mc.thePlayer.inventory.currentItem;
       
        mc.thePlayer.sendQueue.addToSendQueue(new C09PacketHeldItemChange(item - 36));
        mc.thePlayer.inventory.currentItem = item - 36;
       
        mc.playerController.updateController();
        return currentItem;
    }
   
    /*
     * Places the water
     */
    private void placeWater() {
        for (Entry<Integer, Item> item : getHotbarItems().entrySet()) {
            if (item.getValue().equals(Items.water_bucket)) {
                int currentItem = swapToItem(item.getKey());

                mc.playerController.netClientHandler.addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.inventory.getCurrentItem()));

                //Reset to current hand.
                mc.thePlayer.inventory.currentItem = currentItem;
                mc.playerController.updateController();
                break;
            }
        }
        nextPlaceWater = false;
    }

    /*
     * Gets the water back
     */
    private void getWaterBack(){
        for (Entry<Integer, Item> item : getHotbarItems().entrySet()) {
            if (item.getValue().equals(Items.bucket)) {
                int currentItem = swapToItem(item.getKey());
               
                mc.playerController.netClientHandler.addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.inventory.getCurrentItem()));

                //Reset to current hand.
                mc.thePlayer.inventory.currentItem = currentItem;
                mc.playerController.updateController();
                break;
            }
        }
        blockBelowData = null;
        nextRemoveWater = false;
    }
   
    /**
     * Return's a map with the current hotbar items
     *
     * @author Tomygames
     */
    private HashMap<Integer,Item> getHotbarItems(){
        HashMap<Integer,Item> items = new HashMap<Integer,Item>();
       
        for (int i = 36; i < 45; i++) {
            if (mc.thePlayer.inventoryContainer.getSlot(i).getHasStack()) {
                ItemStack itemStack = mc.thePlayer.inventoryContainer.getSlot(i).getStack();
                items.put(i, itemStack.getItem());
            }
        }
       
        return items;
    }

Avatar

By yorik100 14 August 2019 10:17

Member · 280 comments

I do not know neither, it's weird thing

Avatar

By soulplexis 14 August 2019 19:47

Donator · 404 comments
je5442804 wrote

mc.thePlayer.prveRotationPitch = -90 i am no sure how to do ??
I think Rotation is not difficlut,but C09PacketHeldItemChange ?
I do not know how to get Item Value like this:(java)

/*
     * Swaps to item slot and returns the previous one
     */
    private int swapToItem(int item){
        mc.rightClickDelayTimer = 2;
        int currentItem = mc.thePlayer.inventory.currentItem;
        
        mc.thePlayer.sendQueue.addToSendQueue(new C09PacketHeldItemChange(item - 36));
        mc.thePlayer.inventory.currentItem = item - 36;
        
        mc.playerController.updateController();
    	return currentItem;
    }
    
    /*
     * Places the water
     */
    private void placeWater() {
        for (Entry<Integer, Item> item : getHotbarItems().entrySet()) {
            if (item.getValue().equals(Items.water_bucket)) {
                int currentItem = swapToItem(item.getKey());

                mc.playerController.netClientHandler.addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.inventory.getCurrentItem()));

                //Reset to current hand.
                mc.thePlayer.inventory.currentItem = currentItem;
                mc.playerController.updateController();
                break;
            }
        }
        nextPlaceWater = false;
    }

    /*
     * Gets the water back
     */
    private void getWaterBack(){
        for (Entry<Integer, Item> item : getHotbarItems().entrySet()) {
            if (item.getValue().equals(Items.bucket)) {
                int currentItem = swapToItem(item.getKey());
                
                mc.playerController.netClientHandler.addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.inventory.getCurrentItem()));

                //Reset to current hand.
                mc.thePlayer.inventory.currentItem = currentItem;
                mc.playerController.updateController();
                break;
            }
        }
        blockBelowData = null;
        nextRemoveWater = false;
    }
    
    /**
     * Return's a map with the current hotbar items
     * 
     * @author Tomygames
     */
    private HashMap<Integer,Item> getHotbarItems(){
    	HashMap<Integer,Item> items = new HashMap<Integer,Item>();
    	
        for (int i = 36; i < 45; i++) {
            if (mc.thePlayer.inventoryContainer.getSlot(i).getHasStack()) {
                ItemStack itemStack = mc.thePlayer.inventoryContainer.getSlot(i).getStack();
                items.put(i, itemStack.getItem());
            }
        }
    	
		return items;
    }

that's java it won't work I tried it with Killaura script.


【ソルプレクサス】

Avatar

By Shiv3R 14 August 2019 21:33

Member · 178 comments

when kiddos on this forum can't even skid oof

Avatar

By je5442804 14 August 2019 22:50

Member · 48 comments

I know It is java code,i am trying to swap java to JavaScript