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

+1 -1
View File
@@ -625,7 +625,7 @@ It returns a `map` with a report indicating how many chunks were affected, and h
Adds a chunk ticket at a position, which makes the game to keep the designated area centered around
`pos` with radius of `radius` loaded for a predefined amount of ticks, defined by `type`. Allowed types
are `portal`: 300 ticks, `teleport`: 5 ticks, and `unknown`: 1 tick. Radius can be from 1 to 32 ticks.
are `portal`: 300 ticks, `teleport`: 40 ticks, and `unknown`: 1 tick. Radius can be from 1 to 32 ticks.
This function is tentative - will likely change when chunk ticket API is properly fleshed out.
+2 -2
View File
@@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check https://fabricmc.net/develop/
minecraft_version=1.21.2
minecraft_version=24w44a
loader_version=0.16.7
jsr305_version=3.0.2
fabric_version=0.106.0+1.21.2
@@ -17,7 +17,7 @@ org.gradle.jvmargs=-Xmx1G
# The Curseforge versions "names" or ids for the main branch (comma separated: 1.16.4,1.16.5)
# This is needed because CF uses too vague names for prereleases and release candidates
# Can also be the version ID directly coming from https://minecraft.curseforge.com/api/game/versions?token=[API_TOKEN]
release-curse-versions = Minecraft 1.21:1.21.2
release-curse-versions = Minecraft 1.22:1.22.0-Snapshot
# Whether or not to build another branch on release
release-extra-branch = false
# The name of the second branch to release
@@ -18,7 +18,7 @@ public class ParticleDisplay
if (accentParticle != null) player.serverLevel().sendParticles(
player,
accentParticle,
true,
true, true,
to.x, to.y, to.z, count,
spread, spread, spread, 0.0);
@@ -33,7 +33,7 @@ public class ParticleDisplay
player.serverLevel().sendParticles(
player,
mainParticle,
true,
true, true,
delta.x+from.x, delta.y+from.y, delta.z+from.z, 1,
0.0, 0.0, 0.0, 0.0);
}
@@ -86,12 +86,12 @@ public abstract class Explosion_optimizedTntMixin
}
@Redirect(method = "hurtEntities",
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/Entity;setDeltaMovement(Lnet/minecraft/world/phys/Vec3;)V"))
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/Entity;push(Lnet/minecraft/world/phys/Vec3;)V"))
private void setVelocityAndUpdateLogging(Entity entity, Vec3 velocity)
{
if (eLogger != null) {
eLogger.onEntityImpacted(entity, velocity.subtract(entity.getDeltaMovement()));
}
entity.setDeltaMovement(velocity);
entity.push(velocity);
}
}
@@ -32,7 +32,7 @@ public class LevelRenderer_scarpetRenderMixin
}
@Inject(method = "addParticlesPass", at = @At("RETURN"))
private void renderScarpetThingsLate(FrameGraphBuilder frameGraphBuilder, Camera camera, LightTexture lightTexture, float f, FogParameters fogParameters, CallbackInfo ci)
private void renderScarpetThingsLate(FrameGraphBuilder frameGraphBuilder, Camera camera, float f, FogParameters fogParameters, CallbackInfo ci)
{
// in normal circumstances we want to render shapes at the very end so it appears correctly behind stuff.
// we might actually not need to play with render hooks here.
@@ -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++;