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 @Override
public void tick() { public void containerTick() {
super.tick(); super.containerTick();
recipeBook.tick(); recipeBook.tick();
} }

View file

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