Skip to content

Commit

Permalink
1.16.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadron67 committed Jun 24, 2021
1 parent d60b4e8 commit bf63c5e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
# or better: https://modmuss50.me/fabric.html
minecraft_version=1.16.2
yarn_mappings=1.16.2+build.47
loader_version=0.11.1
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.10
loader_version=0.11.6

# Mod Properties
mod_version = 0.3.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.regex.Matcher;

import static net.minecraft.server.command.CommandManager.argument;
import static net.minecraft.server.command.CommandSource.suggestMatching;
import static net.minecraft.command.CommandSource.suggestMatching;
import static com.hadroncfy.sreplay.recording.Photographer.MCPR;
import static com.hadroncfy.sreplay.config.TextRenderer.render;
import static com.hadroncfy.sreplay.SReplayMod.getConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private MixinIntegratedServer(Thread thread, Impl impl, Session session, SavePro
minecraftSessionService, gameProfileRepository, userCache, worldGenerationProgressListenerFactory);
}

@Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/DisableableProfiler;pop()V"))
@Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;pop()V"))
public void onPause(CallbackInfo ci) {
Photographer.listFakes(this).forEach(Photographer::onSoftPause);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public abstract class MixinThreadedAnvilChunkStorage {
return getRealViewDistance(player, watchDistance);
}

@Redirect(method = "updateCameraPosition", at = @At(
@Redirect(method = "updatePosition", at = @At(
value = "FIELD",
target = "Lnet/minecraft/server/world/ThreadedAnvilChunkStorage;watchDistance:I"
))
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/hadroncfy/sreplay/recording/Photographer.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static Photographer create(String name, MinecraftServer server, RegistryK
ServerWorld world = server.getWorld(dim);
ServerPlayerInteractionManager im = new ServerPlayerInteractionManager(world);
Photographer ret = new Photographer(server, world, profile, im, outputDir, param);
ret.updatePosition(pos.x, pos.y, pos.z);
ret.setPosition(pos.x, pos.y, pos.z);
((PlayerManagerAccessor) server.getPlayerManager()).getSaveHandler().savePlayerData(ret);
return ret;
}
Expand Down Expand Up @@ -144,7 +144,7 @@ private static int getChebyshevDistance(ChunkPos pos, int x, int z) {
private void reloadChunks(int oldDistance, int newDistance) {
ServerChunkManager chunkManager = getServerWorld().getChunkManager();
ThreadedAnvilChunkStorageAccessor acc = (ThreadedAnvilChunkStorageAccessor) chunkManager.threadedAnvilChunkStorage;
ChunkSectionPos pos = this.getCameraPosition();
ChunkSectionPos pos = this.getWatchedSection();
int x0 = pos.getSectionX();
int z0 = pos.getSectionZ();
int r = oldDistance > newDistance ? oldDistance : newDistance;
Expand Down Expand Up @@ -183,8 +183,8 @@ private void connect() throws IOException {
trackedPlayers.clear();
server.getPlayerManager().onPlayerConnect(connection, this);
syncParams();
interactionManager.method_30118(MODE);// XXX: is this correct?
getServerWorld().getChunkManager().updateCameraPosition(this);
interactionManager.setGameMode(MODE);// XXX: is this correct?
getServerWorld().getChunkManager().updatePosition(this);

int d = this.server.getPlayerManager().getViewDistance();
if (d != this.rparam.watchDistance) {
Expand Down Expand Up @@ -214,7 +214,7 @@ public void connect(String saveName) throws IOException {
public void tick() {
if (getServer().getTicks() % 10 == 0) {
networkHandler.syncWithPlayerPosition();
getServerWorld().getChunkManager().updateCameraPosition(this);
getServerWorld().getChunkManager().updatePosition(this);
}
super.tick();
super.playerTick();
Expand Down Expand Up @@ -320,7 +320,7 @@ public void tp(RegistryKey<World> dim, double x, double y, double z) {
setWorld(nouveau);
server.getPlayerManager().sendWorldInfo(this, nouveau);
interactionManager.setWorld(nouveau);
networkHandler.sendPacket(new PlayerRespawnS2CPacket(nouveau.getDimension(), dim, BiomeAccess.hashSeed(nouveau.getSeed()), this.interactionManager.getGameMode(), this.interactionManager.method_30119(), nouveau.isDebugWorld(), nouveau.isFlat(), true));
networkHandler.sendPacket(new PlayerRespawnS2CPacket(nouveau.getDimension(), dim, BiomeAccess.hashSeed(nouveau.getSeed()), this.interactionManager.getGameMode(), this.interactionManager.getPreviousGameMode(), nouveau.isDebugWorld(), nouveau.isFlat(), true));
nouveau.onPlayerChangeDimension(this);
}
requestTeleport(x, y, z);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.mojang.brigadier.suggestion.Suggestions;
import com.mojang.brigadier.suggestion.SuggestionsBuilder;

import static net.minecraft.server.command.CommandSource.suggestMatching;
import static net.minecraft.command.CommandSource.suggestMatching;

public class EnumArgumentType<T extends Enum<T>> implements ArgumentType<T> {
private final Class<T> clazz;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import static net.minecraft.server.command.CommandManager.literal;
import static net.minecraft.server.command.CommandManager.argument;
import static net.minecraft.server.command.CommandSource.suggestMatching;
import static net.minecraft.command.CommandSource.suggestMatching;

import static com.hadroncfy.sreplay.SReplayMod.getFormats;

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

"depends": {
"fabricloader": ">=0.7.4",
"minecraft": "1.16.2"
"minecraft": "1.16.5"
},
"suggests": {
"flamingo": "*"
Expand Down

0 comments on commit bf63c5e

Please sign in to comment.