Fixes for 1.17.1

This commit is contained in:
Frank Bauer 2021-07-07 13:49:27 +02:00
parent 885a72486d
commit 18bc3a9664
2 changed files with 17 additions and 15 deletions

View file

@ -46,8 +46,8 @@ public class EndStoneSmelterScreen extends AbstractContainerScreen<EndStoneSmelt
}
@Override
public void tick() {
super.tick();
public void containerTick() {
super.containerTick();
recipeBook.tick();
}

View file

@ -1,20 +1,15 @@
package ru.betterend.mixin.common;
import java.util.*;
import org.apache.logging.log4j.Logger;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.UUID;
import com.mojang.authlib.GameProfile;
import com.mojang.serialization.DataResult;
import com.mojang.serialization.Dynamic;
import io.netty.buffer.Unpooled;
import net.minecraft.ChatFormatting;
import net.minecraft.Util;
@ -53,6 +48,13 @@ import net.minecraft.world.level.Level;
import net.minecraft.world.level.biome.BiomeManager;
import net.minecraft.world.level.dimension.DimensionType;
import net.minecraft.world.level.storage.LevelData;
import org.apache.logging.log4j.Logger;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import ru.betterend.world.generator.GeneratorOptions;
@Mixin(PlayerList.class)
@ -85,8 +87,8 @@ public class PlayerListMixin {
if (GeneratorOptions.swapOverworldToEnd()) {
GameProfile gameProfile = serverPlayer.getGameProfile();
GameProfileCache userCache = this.server.getProfileCache();
GameProfile gameProfile2 = userCache.get(gameProfile.getId());
String string = gameProfile2 == null ? gameProfile.getName() : gameProfile2.getName();
Optional<GameProfile> gameProfile2 = userCache.get(gameProfile.getId());
String string = gameProfile2.isPresent() ? gameProfile2.get().getName() : gameProfile.getName();
userCache.add(gameProfile);
CompoundTag compoundTag = this.load(serverPlayer);
ResourceKey<Level> var23;