#Bedrock Physic Addon

1 messages · Page 1 of 1 (latest)

elfin rampart
steel cedar
#

that's so cool

dry ember
#

nice obfuscation techniques too, took abt 5mins to unravel that.

#

-- this sounds sarcastic but I actually thought it was cool

pastel wave
hushed magnet
#

performance: ☠️

dapper oar
# dry ember nice obfuscation techniques too, took abt 5mins to unravel that.
import { world, Vector } from '@minecraft/server';
world.afterEvents.playerBreakBlock.subscribe(e => {
  const player = e.player;
  const block = e.brokenBlockPermutation.type.id;
  const entity = player.dimension.spawnEntity("mc:block", Vector.subtract(e.block.location, {
    'x': -0.5,
    'y': -0.66,
    'z': -0.5
  }));
  const coord = -0.3;
const i = [{
    'x': 0x0,
    'y': 0x0 + coord,
    'z': 0x0
  }, {
    'x': 0.33,
    'y': 0x0 + coord,
    'z': 0x0
  }, {
    'x': -0.33,
    'y': 0x0 + coord,
    'z': 0x0
  }, {
    'x': 0.33,
    'y': 0x0 + coord,
    'z': 0.33
  }, {
    'x': -0.33,
    'y': 0x0 + coord,
    'z': -0.33
  },
//And so on...
}]
  for (let a = 0x0; a < i.length; a++) {
    const entity2 = entity.dimension.spawnEntity("mc:block", Vector.subtract(entity.location, i[a]));
    entity2.runCommand("replaceitem entity @s slot.weapon.mainhand 0 " + block);
    entity2.triggerEvent("mc:block_physics");
    entity2.applyImpulse({
      'x': Math.random() * 0.6 - 0.3,
      'y': 0.2,
      'z': Math.random() * 0.6 - 0.3
    });
    entity2.triggerEvent('mc:block_baby');
  }
  entity.teleport(new Vector( 999999, 999999, 999999), {keepVelocity: false, dimension: world.getDimension(entity.dimension.id)});
  entity.kill();
});

updated here btw

pastel wave
hushed magnet
#

🗿

shut apex
pastel wave
pastel wave
shut apex
cerulean vessel
warm lion
#

Doesn’t work for me

elfin rampart
warm lion
#

Ok