This commit is contained in:
gnembon committed 2024-10-30 23:16:29 +01:00
1 parent aea914430a
commit 0bf2b5b862
9 files changed
+28 -28

No files matched your search

@@ -208,14 +208,14 @@ public class Auxiliary
{
for (ServerPlayer p : (world.players()))
{
world.sendParticles(p, particle, true, vec.x, vec.y, vec.z, count,
world.sendParticles(p, particle, true, true, vec.x, vec.y, vec.z, count,
spread, spread, spread, speed);
}
}
else
{
world.sendParticles(player,
particle, true, vec.x, vec.y, vec.z, count,
particle, true, true, vec.x, vec.y, vec.z, count,
spread, spread, spread, speed);
}
@@ -151,7 +151,7 @@ public class WorldAccess
private static final Map<String, TicketType<?>> ticketTypes = Map.of(
"portal", TicketType.PORTAL,
"teleport", TicketType.POST_TELEPORT,
"teleport", TicketType.ENDER_PEARL,
"unknown", TicketType.UNKNOWN
);
// dummy entity for dummy requirements in the loot tables (see snowball)
@@ -1694,9 +1694,9 @@ public class WorldAccess
{
cc.level().getChunkSource().addRegionTicket(TicketType.PORTAL, target, radius, pos);
}
else if (ticket == TicketType.POST_TELEPORT) // post teleport
else if (ticket == TicketType.ENDER_PEARL) // post teleport
{
cc.level().getChunkSource().addRegionTicket(TicketType.POST_TELEPORT, target, radius, 1);
cc.level().getChunkSource().addRegionTicket(TicketType.ENDER_PEARL, target, radius, target);
}
else
{
@@ -261,7 +261,7 @@ public class FeatureGenerator
}
else
{
StructureStart filledStructure = structure.generate(
StructureStart filledStructure = structure.generate(Holder.direct(structure), world.dimension(),
world.registryAccess(), generator, generator.getBiomeSource(), seed, world.getStructureManager(),
world.getSeed(), chunkPos, 0, world, structureBiomes::contains);
if (filledStructure != null && filledStructure.isValid())
@@ -418,7 +418,7 @@ public class FeatureGenerator
checks.set(true);
try
{
StructureStart start = structure.generate(world.registryAccess(), generator, generator.getBiomeSource(), world.getChunkSource().randomState(), world.getStructureManager(), world.getSeed(), new ChunkPos(pos), 0, world, b -> true);
StructureStart start = structure.generate(Holder.direct(structure), world.dimension(), world.registryAccess(), generator, generator.getBiomeSource(), world.getChunkSource().randomState(), world.getStructureManager(), world.getSeed(), new ChunkPos(pos), 0, world, b -> true);
if (start == StructureStart.INVALID_START)
{
return false;
@@ -775,7 +775,7 @@ public class ShapeDispatcher
}
Vec3 v = relativiseRender(p.level(), this.pos, 0);
p.serverLevel().sendParticles(p, particle, true, v.x, v.y, v.z, 1, 0.0, 0.0, 0.0, 0.0);
p.serverLevel().sendParticles(p, particle, true, true, v.x, v.y, v.z, 1, 0.0, 0.0, 0.0, 0.0);
};
}
@@ -1070,7 +1070,7 @@ public class ShapeDispatcher
ParticleOptions locparticledata = getParticleData(String.format(Locale.ROOT, "dust %.1f %.1f %.1f %.1f", fr, fg, fb, fa), p.level().registryAccess());
for (Vec3 v : getAlterPoint(p))
{
p.serverLevel().sendParticles(p, locparticledata, true,
p.serverLevel().sendParticles(p, locparticledata, true, true,
v.x, v.y, v.z, 1,
0.0, 0.0, 0.0, 0.0);
}
@@ -1297,7 +1297,7 @@ public class ShapeDispatcher
double x = radius * Mth.cos(theta) * Mth.cos(phi);
double y = radius * Mth.cos(theta) * Mth.sin(phi);
double z = radius * Mth.sin(theta);
world.sendParticles(p, particle, true,
world.sendParticles(p, particle, true, true,
x + ccx, y + ccy, z + ccz, 1,
0.0, 0.0, 0.0, 0.0);
}
@@ -1395,7 +1395,7 @@ public class ShapeDispatcher
double x = radius * Mth.cos(phi);
double y = d;
double z = radius * Mth.sin(phi);
world.sendParticles(p, particle, true, x + ccx, y + ccy, z + ccz, 1, 0.0, 0.0, 0.0, 0.0);
world.sendParticles(p, particle, true, true,x + ccx, y + ccy, z + ccz, 1, 0.0, 0.0, 0.0, 0.0);
}
}
else if (axis == Direction.Axis.X)
@@ -1407,7 +1407,7 @@ public class ShapeDispatcher
double x = d;
double y = radius * Mth.cos(phi);
double z = radius * Mth.sin(phi);
world.sendParticles(p, particle, true, x + ccx, y + ccy, z + ccz, 1, 0.0, 0.0, 0.0, 0.0);
world.sendParticles(p, particle, true, true, x + ccx, y + ccy, z + ccz, 1, 0.0, 0.0, 0.0, 0.0);
}
}
else // Z
@@ -1419,7 +1419,7 @@ public class ShapeDispatcher
double x = radius * Mth.sin(phi);
double y = radius * Mth.cos(phi);
double z = d;
world.sendParticles(p, particle, true, x + ccx, y + ccy, z + ccz, 1, 0.0, 0.0, 0.0, 0.0);
world.sendParticles(p, particle, true, true, x + ccx, y + ccy, z + ccz, 1, 0.0, 0.0, 0.0, 0.0);
}
}
};
@@ -2184,12 +2184,12 @@ public class ShapeDispatcher
for (ServerPlayer player : playerList)
{
ServerLevel world = player.serverLevel();
world.sendParticles(player, particle, true,
world.sendParticles(player, particle, true, true,
(towards.x) / 2 + from.x, (towards.y) / 2 + from.y, (towards.z) / 2 + from.z, particles / 3,
towards.x / 6, towards.y / 6, towards.z / 6, 0.0);
world.sendParticles(player, particle, true,
world.sendParticles(player, particle, true, true,
from.x, from.y, from.z, 1, 0.0, 0.0, 0.0, 0.0);
world.sendParticles(player, particle, true,
world.sendParticles(player, particle, true, true,
to.x, to.y, to.z, 1, 0.0, 0.0, 0.0, 0.0);
parts += particles / 3 + 2;
}
@@ -2201,10 +2201,10 @@ public class ShapeDispatcher
for (ServerPlayer player : playerList)
{
ServerLevel world = player.serverLevel();
world.sendParticles(player, particle, true,
world.sendParticles(player, particle, true, true,
(towards.x) / center + from.x, (towards.y) / center + from.y, (towards.z) / center + from.z, particles / divider,
towards.x / dev, towards.y / dev, towards.z / dev, 0.0);
world.sendParticles(player, particle, true,
world.sendParticles(player, particle, true, true,
(towards.x) * (1.0 - 1.0 / center) + from.x, (towards.y) * (1.0 - 1.0 / center) + from.y, (towards.z) * (1.0 - 1.0 / center) + from.z, particles / divider,
towards.x / dev, towards.y / dev, towards.z / dev, 0.0);
}
@@ -2232,7 +2232,7 @@ public class ShapeDispatcher
Vec3 at = from.add(towards.scale(rand.nextDouble()));
for (ServerPlayer player : players)
{
player.serverLevel().sendParticles(player, particle, true,
player.serverLevel().sendParticles(player, particle, true, true,
at.x, at.y, at.z, 1,
0.0, 0.0, 0.0, 0.0);
pcount++;
@@ -2253,7 +2253,7 @@ public class ShapeDispatcher
{
for (ServerPlayer player : players)
{
player.serverLevel().sendParticles(player, particle, true,
player.serverLevel().sendParticles(player, particle, true, true,
delta.x + from.x, delta.y + from.y, delta.z + from.z, 1,
0.0, 0.0, 0.0, 0.0);
pcount++;