Aug 23, 2015 01:33 AM
(This post was last modified: Aug 23, 2015 09:56 AM by Leonhard08kl.)
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:33 AM
(This post was last modified: Aug 23, 2015 11:35 AM by rederpz.)
(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.
DO NOT DEAL WITH THIS MEMBER
(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.
|