1.17-pre1
This commit is contained in:
1 parent
e2dfbc5bdd
commit
f64cf67e41
8 files changed
+21
-15
No files matched your search
+3
-3
@@ -4,10 +4,10 @@ org.gradle.jvmargs=-Xmx1G
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
# or better: https://modmuss50.me/fabric.html
|
||||
minecraft_version=21w20a
|
||||
yarn_mappings=21w20a+build.10
|
||||
minecraft_version=1.17-pre1
|
||||
yarn_mappings=1.17-pre1+build.1
|
||||
loader_version=0.11.3
|
||||
fabric_version=0.34.5+1.17
|
||||
fabric_version=0.34.7+1.17
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.4.37
|
||||
|
||||
@@ -134,14 +134,14 @@ public class OptimizedExplosion
|
||||
}
|
||||
|
||||
if (!entity.isImmuneToExplosion()) {
|
||||
double d12 = MathHelper.sqrt(entity.squaredDistanceTo(eAccess.getX(), eAccess.getY(), eAccess.getZ())) / (double) f3;
|
||||
double d12 = Math.sqrt(entity.squaredDistanceTo(eAccess.getX(), eAccess.getY(), eAccess.getZ())) / (double) f3;
|
||||
|
||||
if (d12 <= 1.0D) {
|
||||
double d5 = entity.getX() - eAccess.getX();
|
||||
// Change in 1.16 snapshots to fix a bug with TNT jumping
|
||||
double d7 = (entity instanceof TntEntity ? entity.getY() : entity.getEyeY()) - eAccess.getY();
|
||||
double d9 = entity.getZ() - eAccess.getZ();
|
||||
double d13 = (double) MathHelper.sqrt(d5 * d5 + d7 * d7 + d9 * d9);
|
||||
double d13 = (double) Math.sqrt(d5 * d5 + d7 * d7 + d9 * d9);
|
||||
|
||||
if (d13 != 0.0D) {
|
||||
d5 = d5 / d13;
|
||||
|
||||
@@ -46,7 +46,9 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
|
||||
@Shadow private volatile boolean loading;
|
||||
|
||||
@Shadow protected abstract void startMonitor(TickDurationMonitor monitor);
|
||||
//@Shadow protected abstract void startMonitor(TickDurationMonitor monitor);
|
||||
|
||||
@Shadow protected abstract void startMonitor();
|
||||
|
||||
@Shadow private long lastTimeReference;
|
||||
|
||||
@@ -116,8 +118,9 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
}
|
||||
|
||||
this.timeReference += msThisTick;//50L;
|
||||
TickDurationMonitor tickDurationMonitor = TickDurationMonitor.create("Server");
|
||||
this.startMonitor(tickDurationMonitor);
|
||||
//TickDurationMonitor tickDurationMonitor = TickDurationMonitor.create("Server");
|
||||
//this.startMonitor(tickDurationMonitor);
|
||||
this.startMonitor();
|
||||
this.profiler.startTick();
|
||||
this.profiler.push("tick");
|
||||
this.tick(TickSpeed.time_warp_start_time != 0 ? ()->true : this::shouldKeepTicking);
|
||||
|
||||
@@ -17,7 +17,6 @@ import net.minecraft.text.TranslatableText;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.ServerTask;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.server.network.ServerPlayerInteractionManager;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.UserCache;
|
||||
import net.minecraft.util.registry.RegistryKey;
|
||||
@@ -26,6 +25,8 @@ import net.minecraft.world.World;
|
||||
import carpet.fakes.ServerPlayerEntityInterface;
|
||||
import carpet.utils.Messenger;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
@SuppressWarnings("EntityConstructor")
|
||||
public class EntityPlayerMPFake extends ServerPlayerEntity
|
||||
{
|
||||
@@ -55,7 +56,9 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
|
||||
}
|
||||
if (gameprofile.getProperties().containsKey("textures"))
|
||||
{
|
||||
gameprofile = SkullBlockEntity.loadProperties(gameprofile);
|
||||
AtomicReference<GameProfile> result = new AtomicReference<>();
|
||||
SkullBlockEntity.loadProperties(gameprofile, result::set);
|
||||
gameprofile = result.get();
|
||||
}
|
||||
EntityPlayerMPFake instance = new EntityPlayerMPFake(server, worldIn, gameprofile, false);
|
||||
instance.fixStartingPosition = () -> instance.refreshPositionAndAngles(d0, d1, d2, (float) yaw, (float) pitch);
|
||||
|
||||
@@ -576,7 +576,7 @@ public class WorldAccess {
|
||||
{
|
||||
c.host.issueDeprecation("loaded_ep(...)");
|
||||
BlockPos pos = BlockArgument.findIn((CarpetContext)c, lv, 0).block.getPos();
|
||||
return BooleanValue.of(((CarpetContext)c).s.getWorld().getChunkManager().shouldTickChunk(new ChunkPos(pos)));
|
||||
return BooleanValue.of(((CarpetContext)c).s.getWorld().method_37118(pos));// 1.17pre1 getChunkManager().shouldTickChunk(new ChunkPos(pos)));
|
||||
});
|
||||
|
||||
expression.addContextFunction("loaded_status", -1, (c, t, lv) ->
|
||||
|
||||
@@ -1328,7 +1328,7 @@ public class ShapeDispatcher
|
||||
}
|
||||
|
||||
if (isStraight(from, to, density)) return drawOptimizedParticleLine(players, particle, from, to, density);
|
||||
Vec3d incvec = to.subtract(from).multiply(2*density/MathHelper.sqrt(distance));
|
||||
Vec3d incvec = to.subtract(from).multiply(2*density/Math.sqrt(distance));
|
||||
|
||||
for (Vec3d delta = new Vec3d(0.0,0.0,0.0);
|
||||
delta.lengthSquared()<distance;
|
||||
|
||||
@@ -165,7 +165,7 @@ public class SnoopyCommandSource extends ServerCommandSource
|
||||
double d = position.x - vec3d.x;
|
||||
double e = position.y - vec3d.y;
|
||||
double f = position.z - vec3d.z;
|
||||
double g = (double) MathHelper.sqrt(d * d + f * f);
|
||||
double g = (double) Math.sqrt(d * d + f * f);
|
||||
float h = MathHelper.wrapDegrees((float)(-(MathHelper.atan2(e, g) * 57.2957763671875D)));
|
||||
float i = MathHelper.wrapDegrees((float)(MathHelper.atan2(f, d) * 57.2957763671875D) - 90.0F);
|
||||
return this.withRotation(new Vec2f(h, i));
|
||||
|
||||
@@ -24,8 +24,8 @@ public class DistanceCalculator
|
||||
double dy = MathHelper.abs((float)pos1.y-(float)pos2.y);
|
||||
double dz = MathHelper.abs((float)pos1.z-(float)pos2.z);
|
||||
double manhattan = dx+dy+dz;
|
||||
double spherical = MathHelper.sqrt(dx*dx + dy*dy + dz*dz);
|
||||
double cylindrical = MathHelper.sqrt(dx*dx + dz*dz);
|
||||
double spherical = Math.sqrt(dx*dx + dy*dy + dz*dz);
|
||||
double cylindrical = Math.sqrt(dx*dx + dz*dz);
|
||||
List<BaseText> res = new ArrayList<>();
|
||||
res.add(Messenger.c("w Distance between ",
|
||||
Messenger.tp("c",pos1),"w and ",
|
||||
|
||||
Reference in new issue
Block a user