mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Dust of Revealing Pt.3 💀
This commit is contained in:
parent
a63a6f751f
commit
4c48f812d5
@ -36,12 +36,11 @@ public class BlockSignal {
|
|||||||
|
|
||||||
public BlockSignal(Block block, int ticks) {
|
public BlockSignal(Block block, int ticks) {
|
||||||
active.incrementAndGet();
|
active.incrementAndGet();
|
||||||
Location tg = block.getLocation().clone().add(0.5, 0, 0.5).clone();
|
Location tg = block.getLocation().clone().add(0.5, 0, 0.5);
|
||||||
FallingBlock e = block.getWorld().spawnFallingBlock(tg.clone(), block.getBlockData());
|
FallingBlock e = block.getWorld().spawnFallingBlock(tg, block.getBlockData());
|
||||||
e.setGravity(false);
|
e.setGravity(false);
|
||||||
e.setInvulnerable(true);
|
e.setInvulnerable(true);
|
||||||
e.setGlowing(true);
|
e.setGlowing(true);
|
||||||
e.teleport(tg.clone());
|
|
||||||
e.setDropItem(false);
|
e.setDropItem(false);
|
||||||
e.setHurtEntities(false);
|
e.setHurtEntities(false);
|
||||||
e.setSilent(true);
|
e.setSilent(true);
|
||||||
|
@ -49,7 +49,7 @@ public class DustRevealer {
|
|||||||
this.hits = hits;
|
this.hits = hits;
|
||||||
|
|
||||||
J.s(() -> {
|
J.s(() -> {
|
||||||
new BlockSignal(world.getBlockAt(block.getX(), block.getY(), block.getZ()), 7);
|
new BlockSignal(world.getBlockAt(block.getX(), block.getY(), block.getZ()), 10);
|
||||||
if(M.r(0.25)) {
|
if(M.r(0.25)) {
|
||||||
world.playSound(block.toBlock(world).getLocation(), Sound.BLOCK_AMETHYST_BLOCK_CHIME, 1f, RNG.r.f(0.2f, 2f));
|
world.playSound(block.toBlock(world).getLocation(), Sound.BLOCK_AMETHYST_BLOCK_CHIME, 1f, RNG.r.f(0.2f, 2f));
|
||||||
}
|
}
|
||||||
@ -111,7 +111,8 @@ public class DustRevealer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean is(BlockPosition a) {
|
private boolean is(BlockPosition a) {
|
||||||
if(isValidTry(a) && engine.getObjectPlacementKey(a.getX(), a.getY(), a.getZ()) != null && engine.getObjectPlacementKey(a.getX(), a.getY(), a.getZ()).equals(key)) {
|
int betterY = a.getY() - world.getMinHeight();
|
||||||
|
if(isValidTry(a) && engine.getObjectPlacementKey(a.getX(), betterY, a.getZ()) != null && engine.getObjectPlacementKey(a.getX(), betterY, a.getZ()).equals(key)) {
|
||||||
hits.add(a);
|
hits.add(a);
|
||||||
new DustRevealer(engine, world, a, key, hits);
|
new DustRevealer(engine, world, a, key, hits);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user