./gradlew :1.16.2:setCoreVersion

This commit is contained in:
Jonas Herzig
2020-08-28 14:54:53 +02:00
parent 9001fdc9de
commit c2f51d41fa
36 changed files with 233 additions and 233 deletions

View File

@@ -56,7 +56,7 @@ public class GuiRecordingOverlay extends EventRegistrations {
String text = guiControls.isPaused() ? I18n.translate("replaymod.gui.paused") : I18n.translate("replaymod.gui.recording");
fontRenderer.draw(
//#if MC>=11600
//$$ stack,
stack,
//#endif
text.toUpperCase(), 30, 18 - (fontRenderer.fontHeight / 2), 0xffffffff);
bindTexture(TEXTURE);

View File

@@ -19,14 +19,14 @@ import net.minecraft.network.ClientConnection;
import org.apache.logging.log4j.Logger;
//#if MC>=11600
//$$ import net.minecraft.world.World;
import net.minecraft.world.World;
//#else
//#if MC>=11400
import net.minecraft.world.dimension.DimensionType;
//$$ import net.minecraft.world.dimension.DimensionType;
//#endif
//$$
//#if MC>=10800
import net.minecraft.world.level.LevelGeneratorType;
//$$ import net.minecraft.world.level.LevelGeneratorType;
//#endif
//#endif
@@ -65,10 +65,10 @@ public class ConnectionEventHandler {
if (local) {
//#if MC>=10800
//#if MC>=11600
//$$ if (mc.getServer().getWorld(World.OVERWORLD).isDebugWorld()) {
if (mc.getServer().getWorld(World.OVERWORLD).isDebugWorld()) {
//#else
//#if MC>=11400
if (mc.getServer().getWorld(DimensionType.OVERWORLD).getGeneratorType() == LevelGeneratorType.DEBUG_ALL_BLOCK_STATES) {
//$$ if (mc.getServer().getWorld(DimensionType.OVERWORLD).getGeneratorType() == LevelGeneratorType.DEBUG_ALL_BLOCK_STATES) {
//#else
//$$ if (mc.getIntegratedServer().getEntityWorld().getWorldType() == WorldType.DEBUG_ALL_BLOCK_STATES) {
//#endif
@@ -91,9 +91,9 @@ public class ConnectionEventHandler {
String worldName;
if (local) {
//#if MC>=11600
//$$ worldName = mc.getServer().getSaveProperties().getLevelName();
worldName = mc.getServer().getSaveProperties().getLevelName();
//#else
worldName = mc.getServer().getLevelName();
//$$ worldName = mc.getServer().getLevelName();
//#endif
} else if (mc.getCurrentServerEntry() != null) {
worldName = mc.getCurrentServerEntry().address;

View File

@@ -32,8 +32,8 @@ import de.johni0702.minecraft.gui.versions.callbacks.PreTickCallback;
//#endif
//#if MC>=11600
//$$ import com.mojang.datafixers.util.Pair;
//$$ import java.util.Collections;
import com.mojang.datafixers.util.Pair;
import java.util.Collections;
//#endif
//#if MC>=11400
@@ -210,10 +210,10 @@ public class RecordingEventHandler extends EventRegistrations {
//#endif
newYaw, newPitch
//#if MC>=11600
//$$ , player.isOnGround()
, player.isOnGround()
//#else
//#if MC>=10800
, player.onGround
//$$ , player.onGround
//#endif
//#endif
);
@@ -239,7 +239,7 @@ public class RecordingEventHandler extends EventRegistrations {
//Animation Packets
//Swing Animation
if (player.isHandSwinging && player.handSwingTicks == 0) {
if (player.handSwinging && player.handSwingTicks == 0) {
packetListener.save(new EntityAnimationS2CPacket(
player,
//#if MC>=10904
@@ -277,9 +277,9 @@ public class RecordingEventHandler extends EventRegistrations {
if (playerItems[slot.ordinal()] != stack) {
playerItems[slot.ordinal()] = stack;
//#if MC>=11600
//$$ packetListener.save(new EntityEquipmentUpdateS2CPacket(player.getEntityId(), Collections.singletonList(Pair.of(slot, stack))));
packetListener.save(new EntityEquipmentUpdateS2CPacket(player.getEntityId(), Collections.singletonList(Pair.of(slot, stack))));
//#else
packetListener.save(new EntityEquipmentUpdateS2CPacket(player.getEntityId(), slot, stack));
//$$ packetListener.save(new EntityEquipmentUpdateS2CPacket(player.getEntityId(), slot, stack));
//#endif
}
}

View File

@@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.At;
import java.io.File;
//#if MC>=11600
//$$ import net.minecraft.resource.ResourcePackSource;
import net.minecraft.resource.ResourcePackSource;
//#endif
//#if MC>=10800
@@ -37,7 +37,7 @@ public abstract class MixinDownloadingPackFinder implements ResourcePackRecorder
private void recordDownloadedPack(
File file,
//#if MC>=11600
//$$ ResourcePackSource arg,
ResourcePackSource arg,
//#endif
CallbackInfoReturnable ci
) {

View File

@@ -14,13 +14,13 @@ import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
@Mixin(Mouse.class)
public abstract class MixinMouseHelper {
@Shadow
private boolean isCursorLocked;
private boolean cursorLocked;
@Inject(method = "lockCursor", at = @At("HEAD"), cancellable = true)
private void noGrab(CallbackInfo ci) {
// Used to be provided by Forge for 1.12.2 and below
if (Boolean.valueOf(System.getProperty("fml.noGrab", "false"))) {
this.isCursorLocked = true;
this.cursorLocked = true;
ci.cancel();
}
}

View File

@@ -17,7 +17,7 @@ import com.replaymod.replaystudio.protocol.PacketType;
import com.replaymod.replaystudio.protocol.packets.PacketPlayerListEntry;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import net.minecraft.util.PacketByteBuf;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.network.packet.s2c.play.PlayerListS2CPacket;
import net.minecraft.client.network.PlayerListEntry;

View File

@@ -17,17 +17,17 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
//#if MC>=11600
//$$ import net.minecraft.util.registry.RegistryKey;
//$$ import net.minecraft.world.MutableWorldProperties;
//$$ import java.util.function.Supplier;
import net.minecraft.util.registry.RegistryKey;
import net.minecraft.world.MutableWorldProperties;
import java.util.function.Supplier;
//#else
import net.minecraft.world.level.LevelProperties;
//$$ import net.minecraft.world.level.LevelProperties;
//#endif
//#if MC>=11400
import net.minecraft.world.chunk.ChunkManager;
//#if MC<11600
import net.minecraft.world.dimension.Dimension;
//$$ import net.minecraft.world.dimension.Dimension;
//#endif
import net.minecraft.world.dimension.DimensionType;
import java.util.function.BiFunction;
@@ -48,22 +48,22 @@ public abstract class MixinWorldClient extends World implements RecordingEventHa
private MinecraftClient client;
//#if MC>=11600
//$$ protected MixinWorldClient(MutableWorldProperties mutableWorldProperties, RegistryKey<World> registryKey,
protected MixinWorldClient(MutableWorldProperties mutableWorldProperties, RegistryKey<World> registryKey,
//#if MC<11602
//$$ RegistryKey<DimensionType> registryKey2,
//#endif
//$$ DimensionType dimensionType, Supplier<Profiler> profiler, boolean bl, boolean bl2, long l) {
//$$ super(mutableWorldProperties, registryKey,
DimensionType dimensionType, Supplier<Profiler> profiler, boolean bl, boolean bl2, long l) {
super(mutableWorldProperties, registryKey,
//#if MC<11602
//$$ registryKey2,
//#endif
//$$ dimensionType, profiler, bl, bl2, l);
//$$ }
dimensionType, profiler, bl, bl2, l);
}
//#else
//#if MC>=11400
protected MixinWorldClient(LevelProperties levelProperties_1, DimensionType dimensionType_1, BiFunction<World, Dimension, ChunkManager> biFunction_1, Profiler profiler_1, boolean boolean_1) {
super(levelProperties_1, dimensionType_1, biFunction_1, profiler_1, boolean_1);
}
//$$ protected MixinWorldClient(LevelProperties levelProperties_1, DimensionType dimensionType_1, BiFunction<World, Dimension, ChunkManager> biFunction_1, Profiler profiler_1, boolean boolean_1) {
//$$ super(levelProperties_1, dimensionType_1, biFunction_1, profiler_1, boolean_1);
//$$ }
//#else
//$$ protected MixinWorldClient(ISaveHandler saveHandlerIn,
//#if MC>=11400
@@ -118,9 +118,9 @@ public abstract class MixinWorldClient extends World implements RecordingEventHa
// Same goes for level events (also called effects). E.g. door open, block break, etc.
//#if MC>=11400
//#if MC>=11600
//$$ @Inject(method = "syncWorldEvent", at = @At("HEAD"))
@Inject(method = "syncWorldEvent", at = @At("HEAD"))
//#else
@Inject(method = "playLevelEvent", at = @At("HEAD"))
//$$ @Inject(method = "playLevelEvent", at = @At("HEAD"))
//#endif
private void playLevelEvent (PlayerEntity player, int type, BlockPos pos, int data, CallbackInfo ci) {
//#else

View File

@@ -36,7 +36,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.data.DataTracker;
import net.minecraft.network.NetworkState;
import net.minecraft.network.Packet;
import net.minecraft.util.PacketByteBuf;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.text.LiteralText;
import net.minecraft.util.crash.CrashReport;
import org.apache.logging.log4j.LogManager;