Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Scaffold Walk [Need Help]

Ok, so this code only works in SinglePlayer, can you help me make it work in Muiltiplayer
Code
    public void onEvent(Event event) {
        if (!this.getState()) {
            return;
        }
        if(event instanceof EventPreUpdate) {
        BlockPos bp = new BlockPos(this.mc.thePlayer.posX, this.mc.thePlayer.posY, this.mc.thePlayer.posZ);
        if(this.mc.theWorld.getBlockState(bp).getBlock().getMaterial() == Material.air) {
        this.mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(bp, EnumFacing.DOWN.getIndex(), this.mc.thePlayer.inventory.getCurrentItem(), bp.getX(),bp.getY(),bp.getZ()));

        }
        }
    }
The reason it doesn't work is because you are placing blocks in air.
Make it so you place blocks on the side of other blocks or something.
(Aug 23, 2015 03:44 AM)4QW9n Wrote:  The reason it doesn't work is because you are placing blocks in air.
Make it so you place blocks on the side of other blocks or something.

Thats whats scaffold walk is for. To place block underneath you in the air. Or I didn't understand what you said (if so sorry)
(Aug 23, 2015 11:21 AM)CactusOwnage Wrote:  Thats whats scaffold walk is for. To place block underneath you in the air. Or I didn't understand what you said (if so sorry)

-----u
[ ] [ ] air air

u place block like this
-----u
[ ] [ ] [v] air v = EnumFacing.DOWN

you need to place block on block

-----u
[ ] [ ] [<] air v = EnumFacing. oppopsite of player direction (or complex formula by lord pankake)

so u gotta place a bock on the side of the block that u were on that you're walking off
(Aug 23, 2015 11:33 AM)rederpz Wrote:  -----u
[ ] [ ] air air

u place block like this
-----u
[ ] [ ] [v] air v = EnumFacing.DOWN

you need to place block on block

-----u
[ ] [ ] [<] air v = EnumFacing. oppopsite of player direction (or complex formula by lord pankake)

so u gotta place a bock on the side of the block that u were on that you're walking off

Vouch complex algorithm method is best method by rederpz best coder and pancakes
Just got it thanks :) It's not that hard to code
(Aug 23, 2015 11:21 AM)CactusOwnage Wrote:  Thats whats scaffold walk is for. To place block underneath you in the air. Or I didn't understand what you said (if so sorry)

What he means is place the blocks on the side of the blocks you already place. So if you walk of a cliff or something you dont place the blocks in the air below you, but rather on the side of the blocks you walk off.
What do you mean by "-----u"
(Aug 26, 2015 02:30 AM)BennyHax Wrote:  What do you mean by "-----u"

----- is nothing. u = you. Meaning you stand on the edge of a block.
Can anyone send a code of this?
(May 7, 2016 03:53 AM)DieEnte Wrote:  Can anyone send a code of this?

u grave digger uuu
(Aug 23, 2015 01:33 AM)Leonhard08kl Wrote:  Ok, so this code only works in SinglePlayer, can you help me make it work in Muiltiplayer
Code
    public void onEvent(Event event) {
        if (!this.getState()) {
            return;
        }
        if(event instanceof EventPreUpdate) {
        BlockPos bp = new BlockPos(this.mc.thePlayer.posX, this.mc.thePlayer.posY, this.mc.thePlayer.posZ);
        if(this.mc.theWorld.getBlockState(bp).getBlock().getMaterial() == Material.air) {
        this.mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(bp, EnumFacing.DOWN.getIndex(), this.mc.thePlayer.inventory.getCurrentItem(), bp.getX(),bp.getY(),bp.getZ()));

        }
        }
    }

Can you make it place blocks in water? I saw the scaffold on Serenity b51 and it you couldn't scaffold in water
(May 7, 2016 05:20 AM)eZStrafe_ Wrote:  Can you make it place blocks in water? I saw the scaffold on Serenity b51 and it you couldn't scaffold in water
Yes, you can definitely do that.
(May 7, 2016 05:20 AM)eZStrafe_ Wrote:  Can you make it place blocks in water? I saw the scaffold on Serenity b51 and it you couldn't scaffold in water

Replace Material.Air with Material.Water. Is that so hard?
(May 17, 2016 06:32 AM)Ninja Wrote:  Replace Material.Air with Material.Water. Is that so hard?
Yeah, it's really that easy. You can also do some pretty cool stuff with the BlockLiquid class as well.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Pokemon Go] by Unionmason2Aug 30, 2019 10:35 PM 3 173 Aug 30, 2019 10:35 PM
Last Post: McgowansToTheMax
by tentenJun 23, 2019 01:11 PM 1 109 Jun 23, 2019 01:11 PM
Last Post: Flowtype
by WaterWhippinNov 11, 2017 05:01 PM 1 96 Nov 11, 2017 05:01 PM
Last Post: tw19tw