Update to 1.15.2

This commit is contained in:
Reno 2020-07-22 05:30:03 +00:00
parent afda272458
commit 5e2a724cda
2288 changed files with 53312 additions and 52791 deletions

13427
client.txt

File diff suppressed because it is too large Load Diff

View File

@ -88,8 +88,8 @@ public class Channel {
return this.getState() == 4116;
}
public void setSelfPosition(final Vec3 cvi) {
AL10.alSourcefv(this.source, 4100, new float[] { (float)cvi.x, (float)cvi.y, (float)cvi.z });
public void setSelfPosition(final Vec3 cvl) {
AL10.alSourcefv(this.source, 4100, new float[] { (float)cvl.x, (float)cvl.y, (float)cvl.z });
}
public void setPitch(final float float1) {
@ -119,13 +119,13 @@ public class Channel {
AL10.alSourcei(this.source, 514, (int)(boolean1 ? 1 : 0));
}
public void attachStaticBuffer(final SoundBuffer cwu) {
cwu.getAlBuffer().ifPresent(integer -> AL10.alSourcei(this.source, 4105, integer));
public void attachStaticBuffer(final SoundBuffer cwx) {
cwx.getAlBuffer().ifPresent(integer -> AL10.alSourcei(this.source, 4105, integer));
}
public void attachBufferStream(final AudioStream edp) {
this.stream = edp;
final AudioFormat audioFormat3 = edp.getFormat();
public void attachBufferStream(final AudioStream eds) {
this.stream = eds;
final AudioFormat audioFormat3 = eds.getFormat();
this.streamingBufferSize = calculateBufferSize(audioFormat3, 1);
this.pumpBuffers(4);
}

View File

@ -113,8 +113,8 @@ public class Library {
return ((c == Pool.STREAMING) ? this.streamingChannels : this.staticChannels).acquire();
}
public void releaseChannel(final Channel cwp) {
if (!this.staticChannels.release(cwp) && !this.streamingChannels.release(cwp)) {
public void releaseChannel(final Channel cws) {
if (!this.staticChannels.release(cws) && !this.streamingChannels.release(cws)) {
throw new IllegalStateException("Tried to release unknown channel");
}
}
@ -133,7 +133,7 @@ public class Library {
}
@Override
public boolean release(final Channel cwp) {
public boolean release(final Channel cws) {
return false;
}
@ -173,19 +173,19 @@ public class Library {
if (this.activeChannels.size() >= this.limit) {
return null;
}
final Channel cwp2 = Channel.create();
if (cwp2 != null) {
this.activeChannels.add(cwp2);
final Channel cws2 = Channel.create();
if (cws2 != null) {
this.activeChannels.add(cws2);
}
return cwp2;
return cws2;
}
@Override
public boolean release(final Channel cwp) {
if (!this.activeChannels.remove(cwp)) {
public boolean release(final Channel cws) {
if (!this.activeChannels.remove(cws)) {
return false;
}
cwp.destroy();
cws.destroy();
return true;
}
@ -210,7 +210,7 @@ public class Library {
@Nullable
Channel acquire();
boolean release(final Channel cwp);
boolean release(final Channel cws);
void cleanup();

View File

@ -11,8 +11,8 @@ public class Listener {
this.gain = 1.0f;
}
public void setListenerPosition(final Vec3 cvi) {
AL10.alListener3f(4100, (float)cvi.x, (float)cvi.y, (float)cvi.z);
public void setListenerPosition(final Vec3 cvl) {
AL10.alListener3f(4100, (float)cvl.x, (float)cvl.y, (float)cvl.z);
}
public void setListenerOrientation(final Vector3f e1, final Vector3f e2) {

View File

@ -1,9 +1,8 @@
package com.mojang.blaze3d.font;
import com.mojang.blaze3d.platform.NativeImage;
import org.apache.logging.log4j.LogManager;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.Buffer;
import org.lwjgl.system.MemoryUtil;
import javax.annotation.Nullable;
import java.nio.IntBuffer;
import org.lwjgl.system.MemoryStack;
@ -11,10 +10,10 @@ import org.lwjgl.stb.STBTruetype;
import it.unimi.dsi.fastutil.chars.CharArraySet;
import it.unimi.dsi.fastutil.chars.CharSet;
import org.lwjgl.stb.STBTTFontinfo;
import org.apache.logging.log4j.Logger;
import java.nio.ByteBuffer;
public class TrueTypeGlyphProvider implements GlyphProvider {
private static final Logger LOGGER;
private final ByteBuffer fontMemory;
private final STBTTFontinfo font;
private final float oversample;
private final CharSet skip;
@ -23,20 +22,21 @@ public class TrueTypeGlyphProvider implements GlyphProvider {
private final float pointScale;
private final float ascent;
public TrueTypeGlyphProvider(final STBTTFontinfo sTBTTFontinfo, final float float2, final float float3, final float float4, final float float5, final String string) {
public TrueTypeGlyphProvider(final ByteBuffer byteBuffer, final STBTTFontinfo sTBTTFontinfo, final float float3, final float float4, final float float5, final float float6, final String string) {
this.skip = (CharSet)new CharArraySet();
this.fontMemory = byteBuffer;
this.font = sTBTTFontinfo;
this.oversample = float3;
this.oversample = float4;
string.chars().forEach(integer -> this.skip.add((char)(integer & 0xFFFF)));
this.shiftX = float4 * float3;
this.shiftY = float5 * float3;
this.pointScale = STBTruetype.stbtt_ScaleForPixelHeight(sTBTTFontinfo, float2 * float3);
try (final MemoryStack memoryStack8 = MemoryStack.stackPush()) {
final IntBuffer intBuffer10 = memoryStack8.mallocInt(1);
final IntBuffer intBuffer11 = memoryStack8.mallocInt(1);
final IntBuffer intBuffer12 = memoryStack8.mallocInt(1);
STBTruetype.stbtt_GetFontVMetrics(sTBTTFontinfo, intBuffer10, intBuffer11, intBuffer12);
this.ascent = intBuffer10.get(0) * this.pointScale;
this.shiftX = float5 * float4;
this.shiftY = float6 * float4;
this.pointScale = STBTruetype.stbtt_ScaleForPixelHeight(sTBTTFontinfo, float3 * float4);
try (final MemoryStack memoryStack9 = MemoryStack.stackPush()) {
final IntBuffer intBuffer11 = memoryStack9.mallocInt(1);
final IntBuffer intBuffer12 = memoryStack9.mallocInt(1);
final IntBuffer intBuffer13 = memoryStack9.mallocInt(1);
STBTruetype.stbtt_GetFontVMetrics(sTBTTFontinfo, intBuffer11, intBuffer12, intBuffer13);
this.ascent = intBuffer11.get(0) * this.pointScale;
}
}
@ -68,16 +68,10 @@ public class TrueTypeGlyphProvider implements GlyphProvider {
}
}
public static STBTTFontinfo getStbttFontinfo(final ByteBuffer byteBuffer) throws IOException {
final STBTTFontinfo sTBTTFontinfo2 = STBTTFontinfo.create();
if (!STBTruetype.stbtt_InitFont(sTBTTFontinfo2, byteBuffer)) {
throw new IOException("Invalid ttf");
}
return sTBTTFontinfo2;
}
static {
LOGGER = LogManager.getLogger();
@Override
public void close() {
this.font.free();
MemoryUtil.memFree((Buffer)this.fontMemory);
}
class Glyph implements RawGlyph {
@ -129,9 +123,9 @@ public class TrueTypeGlyphProvider implements GlyphProvider {
@Override
public void upload(final int integer1, final int integer2) {
final NativeImage cxo4 = new NativeImage(NativeImage.Format.LUMINANCE, this.width, this.height, false);
cxo4.copyFromFont(TrueTypeGlyphProvider.this.font, this.index, this.width, this.height, TrueTypeGlyphProvider.this.pointScale, TrueTypeGlyphProvider.this.pointScale, TrueTypeGlyphProvider.this.shiftX, TrueTypeGlyphProvider.this.shiftY, 0, 0);
cxo4.upload(0, integer1, integer2, 0, 0, this.width, this.height, false, true);
final NativeImage cxr4 = new NativeImage(NativeImage.Format.LUMINANCE, this.width, this.height, false);
cxr4.copyFromFont(TrueTypeGlyphProvider.this.font, this.index, this.width, this.height, TrueTypeGlyphProvider.this.pointScale, TrueTypeGlyphProvider.this.pointScale, TrueTypeGlyphProvider.this.shiftX, TrueTypeGlyphProvider.this.shiftY, 0, 0);
cxr4.upload(0, integer1, integer2, 0, 0, this.width, this.height, false, true);
}
@Override

View File

@ -212,14 +212,14 @@ public class RenderTarget {
final float float6 = (float)integer2;
final float float7 = this.viewWidth / (float)this.width;
final float float8 = this.viewHeight / (float)this.height;
final Tesselator cyj9 = RenderSystem.renderThreadTesselator();
final BufferBuilder cyd10 = cyj9.getBuilder();
cyd10.begin(7, DefaultVertexFormat.POSITION_TEX_COLOR);
cyd10.vertex(0.0, float6, 0.0).uv(0.0f, 0.0f).color(255, 255, 255, 255).endVertex();
cyd10.vertex(float5, float6, 0.0).uv(float7, 0.0f).color(255, 255, 255, 255).endVertex();
cyd10.vertex(float5, 0.0, 0.0).uv(float7, float8).color(255, 255, 255, 255).endVertex();
cyd10.vertex(0.0, 0.0, 0.0).uv(0.0f, float8).color(255, 255, 255, 255).endVertex();
cyj9.end();
final Tesselator cym9 = RenderSystem.renderThreadTesselator();
final BufferBuilder cyg10 = cym9.getBuilder();
cyg10.begin(7, DefaultVertexFormat.POSITION_TEX_COLOR);
cyg10.vertex(0.0, float6, 0.0).uv(0.0f, 0.0f).color(255, 255, 255, 255).endVertex();
cyg10.vertex(float5, float6, 0.0).uv(float7, 0.0f).color(255, 255, 255, 255).endVertex();
cyg10.vertex(float5, 0.0, 0.0).uv(float7, float8).color(255, 255, 255, 255).endVertex();
cyg10.vertex(0.0, 0.0, 0.0).uv(0.0f, float8).color(255, 255, 255, 255).endVertex();
cym9.end();
this.unbindRead();
GlStateManager._depthMask(true);
GlStateManager._colorMask(true, true, true, true);

View File

@ -1,17 +1,20 @@
package com.mojang.blaze3d.platform;
import java.nio.Buffer;
import org.lwjgl.system.MemoryUtil;
import com.google.common.base.Charsets;
import org.lwjgl.glfw.GLFWErrorCallback;
import net.minecraft.SharedConstants;
import org.lwjgl.glfw.GLFW;
import org.lwjgl.glfw.GLFWErrorCallbackI;
import org.lwjgl.BufferUtils;
import java.nio.ByteBuffer;
public class ClipboardManager {
private final ByteBuffer clipboardScratchBuffer;
public ClipboardManager() {
this.clipboardScratchBuffer = ByteBuffer.allocateDirect(1024);
this.clipboardScratchBuffer = BufferUtils.createByteBuffer(8192);
}
public String getClipboard(final long long1, final GLFWErrorCallbackI gLFWErrorCallbackI) {
@ -25,20 +28,28 @@ public class ClipboardManager {
return string6;
}
private void setClipboard(final long long1, final ByteBuffer byteBuffer, final String string) {
MemoryUtil.memUTF8((CharSequence)string, true, byteBuffer);
private static void pushClipboard(final long long1, final ByteBuffer byteBuffer, final byte[] arr) {
byteBuffer.clear();
byteBuffer.put(arr);
byteBuffer.put((byte)0);
byteBuffer.flip();
GLFW.glfwSetClipboardString(long1, byteBuffer);
}
public void setClipboard(final long long1, final String string) {
final int integer5 = MemoryUtil.memLengthUTF8((CharSequence)string, true);
if (integer5 < this.clipboardScratchBuffer.capacity()) {
this.setClipboard(long1, this.clipboardScratchBuffer, string);
this.clipboardScratchBuffer.clear();
final byte[] arr5 = string.getBytes(Charsets.UTF_8);
final int integer6 = arr5.length + 1;
if (integer6 < this.clipboardScratchBuffer.capacity()) {
pushClipboard(long1, this.clipboardScratchBuffer, arr5);
}
else {
final ByteBuffer byteBuffer6 = ByteBuffer.allocateDirect(integer5);
this.setClipboard(long1, byteBuffer6, string);
final ByteBuffer byteBuffer7 = MemoryUtil.memAlloc(integer6);
try {
pushClipboard(long1, byteBuffer7, arr5);
}
finally {
MemoryUtil.memFree((Buffer)byteBuffer7);
}
}
}
}

View File

@ -41,9 +41,9 @@ public class GLX {
return GlStateManager._getString(7937) + " GL version " + GlStateManager._getString(7938) + ", " + GlStateManager._getString(7936);
}
public static int _getRefreshRate(final Window cxu) {
public static int _getRefreshRate(final Window cxx) {
RenderSystem.assertThread(RenderSystem::isOnRenderThread);
long long2 = GLFW.glfwGetWindowMonitor(cxu.getWindow());
long long2 = GLFW.glfwGetWindowMonitor(cxx.getWindow());
if (long2 == 0L) {
long2 = GLFW.glfwGetPrimaryMonitor();
}
@ -84,8 +84,8 @@ public class GLX {
}
}
public static boolean _shouldClose(final Window cxu) {
return GLFW.glfwWindowShouldClose(cxu.getWindow());
public static boolean _shouldClose(final Window cxx) {
return GLFW.glfwWindowShouldClose(cxx.getWindow());
}
public static void _setupNvFogDistance() {
@ -119,38 +119,38 @@ public class GLX {
RenderSystem.assertThread(RenderSystem::isOnRenderThread);
GlStateManager._disableTexture();
GlStateManager._depthMask(false);
final Tesselator cyj5 = RenderSystem.renderThreadTesselator();
final BufferBuilder cyd6 = cyj5.getBuilder();
final Tesselator cym5 = RenderSystem.renderThreadTesselator();
final BufferBuilder cyg6 = cym5.getBuilder();
GL11.glLineWidth(4.0f);
cyd6.begin(1, DefaultVertexFormat.POSITION_COLOR);
cyg6.begin(1, DefaultVertexFormat.POSITION_COLOR);
if (boolean2) {
cyd6.vertex(0.0, 0.0, 0.0).color(0, 0, 0, 255).endVertex();
cyd6.vertex(integer, 0.0, 0.0).color(0, 0, 0, 255).endVertex();
cyg6.vertex(0.0, 0.0, 0.0).color(0, 0, 0, 255).endVertex();
cyg6.vertex(integer, 0.0, 0.0).color(0, 0, 0, 255).endVertex();
}
if (boolean3) {
cyd6.vertex(0.0, 0.0, 0.0).color(0, 0, 0, 255).endVertex();
cyd6.vertex(0.0, integer, 0.0).color(0, 0, 0, 255).endVertex();
cyg6.vertex(0.0, 0.0, 0.0).color(0, 0, 0, 255).endVertex();
cyg6.vertex(0.0, integer, 0.0).color(0, 0, 0, 255).endVertex();
}
if (boolean4) {
cyd6.vertex(0.0, 0.0, 0.0).color(0, 0, 0, 255).endVertex();
cyd6.vertex(0.0, 0.0, integer).color(0, 0, 0, 255).endVertex();
cyg6.vertex(0.0, 0.0, 0.0).color(0, 0, 0, 255).endVertex();
cyg6.vertex(0.0, 0.0, integer).color(0, 0, 0, 255).endVertex();
}
cyj5.end();
cym5.end();
GL11.glLineWidth(2.0f);
cyd6.begin(1, DefaultVertexFormat.POSITION_COLOR);
cyg6.begin(1, DefaultVertexFormat.POSITION_COLOR);
if (boolean2) {
cyd6.vertex(0.0, 0.0, 0.0).color(255, 0, 0, 255).endVertex();
cyd6.vertex(integer, 0.0, 0.0).color(255, 0, 0, 255).endVertex();
cyg6.vertex(0.0, 0.0, 0.0).color(255, 0, 0, 255).endVertex();
cyg6.vertex(integer, 0.0, 0.0).color(255, 0, 0, 255).endVertex();
}
if (boolean3) {
cyd6.vertex(0.0, 0.0, 0.0).color(0, 255, 0, 255).endVertex();
cyd6.vertex(0.0, integer, 0.0).color(0, 255, 0, 255).endVertex();
cyg6.vertex(0.0, 0.0, 0.0).color(0, 255, 0, 255).endVertex();
cyg6.vertex(0.0, integer, 0.0).color(0, 255, 0, 255).endVertex();
}
if (boolean4) {
cyd6.vertex(0.0, 0.0, 0.0).color(127, 127, 255, 255).endVertex();
cyd6.vertex(0.0, 0.0, integer).color(127, 127, 255, 255).endVertex();
cyg6.vertex(0.0, 0.0, 0.0).color(127, 127, 255, 255).endVertex();
cyg6.vertex(0.0, 0.0, integer).color(127, 127, 255, 255).endVertex();
}
cyj5.end();
cym5.end();
GL11.glLineWidth(1.0f);
GlStateManager._depthMask(true);
GlStateManager._enableTexture();

View File

@ -27,9 +27,9 @@ public final class Monitor {
final GLFWVidMode.Buffer buffer2 = GLFW.glfwGetVideoModes(this.monitor);
for (int integer3 = buffer2.limit() - 1; integer3 >= 0; --integer3) {
buffer2.position(integer3);
final VideoMode cxt4 = new VideoMode(buffer2);
if (cxt4.getRedBits() >= 8 && cxt4.getGreenBits() >= 8 && cxt4.getBlueBits() >= 8) {
this.videoModes.add(cxt4);
final VideoMode cxw4 = new VideoMode(buffer2);
if (cxw4.getRedBits() >= 8 && cxw4.getGreenBits() >= 8 && cxw4.getBlueBits() >= 8) {
this.videoModes.add(cxw4);
}
}
final int[] arr3 = { 0 };
@ -44,19 +44,19 @@ public final class Monitor {
public VideoMode getPreferredVidMode(final Optional<VideoMode> optional) {
RenderSystem.assertThread(RenderSystem::isInInitPhase);
if (optional.isPresent()) {
final VideoMode cxt3 = optional.get();
for (final VideoMode cxt4 : this.videoModes) {
if (cxt4.equals(cxt3)) {
return cxt4;
final VideoMode cxw3 = optional.get();
for (final VideoMode cxw4 : this.videoModes) {
if (cxw4.equals(cxw3)) {
return cxw4;
}
}
}
return this.getCurrentMode();
}
public int getVideoModeIndex(final VideoMode cxt) {
public int getVideoModeIndex(final VideoMode cxw) {
RenderSystem.assertThread(RenderSystem::isInInitPhase);
return this.videoModes.indexOf(cxt);
return this.videoModes.indexOf(cxw);
}
public VideoMode getCurrentMode() {

View File

@ -3,6 +3,7 @@ package com.mojang.blaze3d.platform;
import org.lwjgl.stb.STBIWriteCallback;
import java.util.EnumSet;
import org.apache.logging.log4j.LogManager;
import com.google.common.base.Charsets;
import java.util.Base64;
import org.lwjgl.stb.STBImageResize;
import org.lwjgl.stb.STBImageWrite;
@ -368,22 +369,22 @@ public final class NativeImage implements AutoCloseable {
}
}
public void copyFrom(final NativeImage cxo) {
if (cxo.format() != this.format) {
public void copyFrom(final NativeImage cxr) {
if (cxr.format() != this.format) {
throw new UnsupportedOperationException("Image formats don't match.");
}
final int integer3 = this.format.components();
this.checkAllocated();
cxo.checkAllocated();
if (this.width == cxo.width) {
MemoryUtil.memCopy(cxo.pixels, this.pixels, Math.min(this.size, cxo.size));
cxr.checkAllocated();
if (this.width == cxr.width) {
MemoryUtil.memCopy(cxr.pixels, this.pixels, Math.min(this.size, cxr.size));
}
else {
final int integer4 = Math.min(this.getWidth(), cxo.getWidth());
for (int integer5 = Math.min(this.getHeight(), cxo.getHeight()), integer6 = 0; integer6 < integer5; ++integer6) {
final int integer7 = integer6 * cxo.getWidth() * integer3;
final int integer4 = Math.min(this.getWidth(), cxr.getWidth());
for (int integer5 = Math.min(this.getHeight(), cxr.getHeight()), integer6 = 0; integer6 < integer5; ++integer6) {
final int integer7 = integer6 * cxr.getWidth() * integer3;
final int integer8 = integer6 * this.getWidth() * integer3;
MemoryUtil.memCopy(cxo.pixels + integer7, this.pixels + integer8, (long)integer4);
MemoryUtil.memCopy(cxr.pixels + integer7, this.pixels + integer8, (long)integer4);
}
}
}
@ -423,13 +424,13 @@ public final class NativeImage implements AutoCloseable {
}
}
public void resizeSubRectTo(final int integer1, final int integer2, final int integer3, final int integer4, final NativeImage cxo) {
public void resizeSubRectTo(final int integer1, final int integer2, final int integer3, final int integer4, final NativeImage cxr) {
this.checkAllocated();
if (cxo.format() != this.format) {
if (cxr.format() != this.format) {
throw new UnsupportedOperationException("resizeSubRectTo only works for images of the same format.");
}
final int integer5 = this.format.components();
STBImageResize.nstbir_resize_uint8(this.pixels + (integer1 + integer2 * this.getWidth()) * integer5, integer3, integer4, this.getWidth() * integer5, cxo.pixels, cxo.getWidth(), cxo.getHeight(), 0, integer5);
STBImageResize.nstbir_resize_uint8(this.pixels + (integer1 + integer2 * this.getWidth()) * integer5, integer3, integer4, this.getWidth() * integer5, cxr.pixels, cxr.getWidth(), cxr.getHeight(), 0, integer5);
}
public void untrack() {
@ -437,13 +438,12 @@ public final class NativeImage implements AutoCloseable {
}
public static NativeImage fromBase64(final String string) throws IOException {
try (final MemoryStack memoryStack2 = MemoryStack.stackPush()) {
final ByteBuffer byteBuffer4 = memoryStack2.UTF8((CharSequence)string.replaceAll("\n", ""), false);
final ByteBuffer byteBuffer5 = Base64.getDecoder().decode(byteBuffer4);
final ByteBuffer byteBuffer6 = memoryStack2.malloc(byteBuffer5.remaining());
byteBuffer6.put(byteBuffer5);
byteBuffer6.rewind();
return read(byteBuffer6);
final byte[] arr2 = Base64.getDecoder().decode(string.replaceAll("\n", "").getBytes(Charsets.UTF_8));
try (final MemoryStack memoryStack3 = MemoryStack.stackPush()) {
final ByteBuffer byteBuffer5 = memoryStack3.malloc(arr2.length);
byteBuffer5.put(arr2);
byteBuffer5.rewind();
return read(byteBuffer5);
}
}

View File

@ -14,16 +14,16 @@ public class ScreenManager {
private final Long2ObjectMap<Monitor> monitors;
private final MonitorCreator monitorCreator;
public ScreenManager(final MonitorCreator cxn) {
public ScreenManager(final MonitorCreator cxq) {
this.monitors = (Long2ObjectMap<Monitor>)new Long2ObjectOpenHashMap();
RenderSystem.assertThread(RenderSystem::isInInitPhase);
this.monitorCreator = cxn;
this.monitorCreator = cxq;
GLFW.glfwSetMonitorCallback(this::onMonitorChange);
final PointerBuffer pointerBuffer3 = GLFW.glfwGetMonitors();
if (pointerBuffer3 != null) {
for (int integer4 = 0; integer4 < pointerBuffer3.limit(); ++integer4) {
final long long5 = pointerBuffer3.get(integer4);
this.monitors.put(long5, cxn.createMonitor(long5));
this.monitors.put(long5, cxq.createMonitor(long5));
}
}
}
@ -45,22 +45,22 @@ public class ScreenManager {
}
@Nullable
public Monitor findBestMonitor(final Window cxu) {
final long long3 = GLFW.glfwGetWindowMonitor(cxu.getWindow());
public Monitor findBestMonitor(final Window cxx) {
final long long3 = GLFW.glfwGetWindowMonitor(cxx.getWindow());
if (long3 != 0L) {
return this.getMonitor(long3);
}
final int integer5 = cxu.getX();
final int integer6 = integer5 + cxu.getScreenWidth();
final int integer7 = cxu.getY();
final int integer8 = integer7 + cxu.getScreenHeight();
final int integer5 = cxx.getX();
final int integer6 = integer5 + cxx.getScreenWidth();
final int integer7 = cxx.getY();
final int integer8 = integer7 + cxx.getScreenHeight();
int integer9 = -1;
Monitor cxm10 = null;
for (final Monitor cxm11 : this.monitors.values()) {
final int integer10 = cxm11.getX();
final int integer11 = integer10 + cxm11.getCurrentMode().getWidth();
final int integer12 = cxm11.getY();
final int integer13 = integer12 + cxm11.getCurrentMode().getHeight();
Monitor cxp10 = null;
for (final Monitor cxp11 : this.monitors.values()) {
final int integer10 = cxp11.getX();
final int integer11 = integer10 + cxp11.getCurrentMode().getWidth();
final int integer12 = cxp11.getY();
final int integer13 = integer12 + cxp11.getCurrentMode().getHeight();
final int integer14 = clamp(integer5, integer10, integer11);
final int integer15 = clamp(integer6, integer10, integer11);
final int integer16 = clamp(integer7, integer12, integer13);
@ -69,11 +69,11 @@ public class ScreenManager {
final int integer19 = Math.max(0, integer17 - integer16);
final int integer20 = integer18 * integer19;
if (integer20 > integer9) {
cxm10 = cxm11;
cxp10 = cxp11;
integer9 = integer20;
}
}
return cxm10;
return cxp10;
}
public static int clamp(final int integer1, final int integer2, final int integer3) {

View File

@ -75,8 +75,8 @@ public final class VideoMode {
if (object == null || this.getClass() != object.getClass()) {
return false;
}
final VideoMode cxt3 = (VideoMode)object;
return this.width == cxt3.width && this.height == cxt3.height && this.redBits == cxt3.redBits && this.greenBits == cxt3.greenBits && this.blueBits == cxt3.blueBits && this.refreshRate == cxt3.refreshRate;
final VideoMode cxw3 = (VideoMode)object;
return this.width == cxw3.width && this.height == cxw3.height && this.redBits == cxw3.redBits && this.greenBits == cxw3.greenBits && this.blueBits == cxw3.blueBits && this.refreshRate == cxw3.refreshRate;
}
@Override

View File

@ -52,32 +52,32 @@ public final class Window implements AutoCloseable {
private int framerateLimit;
private boolean vsync;
public Window(final WindowEventHandler cxv, final ScreenManager cxq, final DisplayData cxe, @Nullable final String string4, final String string5) {
public Window(final WindowEventHandler cxy, final ScreenManager cxt, final DisplayData cxh, @Nullable final String string4, final String string5) {
this.defaultErrorCallback = GLFWErrorCallback.create(this::defaultErrorCallback);
this.errorSection = "";
RenderSystem.assertThread(RenderSystem::isInInitPhase);
this.screenManager = cxq;
this.screenManager = cxt;
this.setBootErrorCallback();
this.setErrorSection("Pre startup");
this.eventHandler = cxv;
this.eventHandler = cxy;
final Optional<VideoMode> optional7 = VideoMode.read(string4);
if (optional7.isPresent()) {
this.preferredFullscreenVideoMode = optional7;
}
else if (cxe.fullscreenWidth.isPresent() && cxe.fullscreenHeight.isPresent()) {
this.preferredFullscreenVideoMode = Optional.<VideoMode>of(new VideoMode(cxe.fullscreenWidth.getAsInt(), cxe.fullscreenHeight.getAsInt(), 8, 8, 8, 60));
else if (cxh.fullscreenWidth.isPresent() && cxh.fullscreenHeight.isPresent()) {
this.preferredFullscreenVideoMode = Optional.<VideoMode>of(new VideoMode(cxh.fullscreenWidth.getAsInt(), cxh.fullscreenHeight.getAsInt(), 8, 8, 8, 60));
}
else {
this.preferredFullscreenVideoMode = Optional.<VideoMode>empty();
}
final boolean isFullscreen = cxe.isFullscreen;
final boolean isFullscreen = cxh.isFullscreen;
this.fullscreen = isFullscreen;
this.actuallyFullscreen = isFullscreen;
final Monitor cxm8 = cxq.getMonitor(GLFW.glfwGetPrimaryMonitor());
final int n = (cxe.width > 0) ? cxe.width : 1;
final Monitor cxp8 = cxt.getMonitor(GLFW.glfwGetPrimaryMonitor());
final int n = (cxh.width > 0) ? cxh.width : 1;
this.width = n;
this.windowedWidth = n;
final int n2 = (cxe.height > 0) ? cxe.height : 1;
final int n2 = (cxh.height > 0) ? cxh.height : 1;
this.height = n2;
this.windowedHeight = n2;
GLFW.glfwDefaultWindowHints();
@ -86,13 +86,13 @@ public final class Window implements AutoCloseable {
GLFW.glfwWindowHint(139266, 2);
GLFW.glfwWindowHint(139267, 0);
GLFW.glfwWindowHint(139272, 0);
this.window = GLFW.glfwCreateWindow(this.width, this.height, (CharSequence)string5, (this.fullscreen && cxm8 != null) ? cxm8.getMonitor() : 0L, 0L);
if (cxm8 != null) {
final VideoMode cxt9 = cxm8.getPreferredVidMode(this.fullscreen ? this.preferredFullscreenVideoMode : Optional.<VideoMode>empty());
final int n3 = cxm8.getX() + cxt9.getWidth() / 2 - this.width / 2;
this.window = GLFW.glfwCreateWindow(this.width, this.height, (CharSequence)string5, (this.fullscreen && cxp8 != null) ? cxp8.getMonitor() : 0L, 0L);
if (cxp8 != null) {
final VideoMode cxw9 = cxp8.getPreferredVidMode(this.fullscreen ? this.preferredFullscreenVideoMode : Optional.<VideoMode>empty());
final int n3 = cxp8.getX() + cxw9.getWidth() / 2 - this.width / 2;
this.x = n3;
this.windowedX = n3;
final int n4 = cxm8.getY() + cxt9.getHeight() / 2 - this.height / 2;
final int n4 = cxp8.getY() + cxw9.getHeight() / 2 - this.height / 2;
this.y = n4;
this.windowedY = n4;
}
@ -320,13 +320,13 @@ public final class Window implements AutoCloseable {
RenderSystem.assertThread(RenderSystem::isInInitPhase);
final boolean boolean2 = GLFW.glfwGetWindowMonitor(this.window) != 0L;
if (this.fullscreen) {
final Monitor cxm3 = this.screenManager.findBestMonitor(this);
if (cxm3 == null) {
final Monitor cxp3 = this.screenManager.findBestMonitor(this);
if (cxp3 == null) {
Window.LOGGER.warn("Failed to find suitable monitor for fullscreen mode");
this.fullscreen = false;
}
else {
final VideoMode cxt4 = cxm3.getPreferredVidMode(this.preferredFullscreenVideoMode);
final VideoMode cxw4 = cxp3.getPreferredVidMode(this.preferredFullscreenVideoMode);
if (!boolean2) {
this.windowedX = this.x;
this.windowedY = this.y;
@ -335,9 +335,9 @@ public final class Window implements AutoCloseable {
}
this.x = 0;
this.y = 0;
this.width = cxt4.getWidth();
this.height = cxt4.getHeight();
GLFW.glfwSetWindowMonitor(this.window, cxm3.getMonitor(), this.x, this.y, this.width, this.height, cxt4.getRefreshRate());
this.width = cxw4.getWidth();
this.height = cxw4.getHeight();
GLFW.glfwSetWindowMonitor(this.window, cxp3.getMonitor(), this.x, this.y, this.width, this.height, cxw4.getRefreshRate());
}
}
else {
@ -383,6 +383,10 @@ public final class Window implements AutoCloseable {
this.guiScaledHeight = ((this.framebufferHeight / double1 > integer5) ? (integer5 + 1) : integer5);
}
public void setTitle(final String string) {
GLFW.glfwSetWindowTitle(this.window, (CharSequence)string);
}
public long getWindow() {
return this.window;
}

View File

@ -64,8 +64,8 @@ public class BlendMode {
if (!(object instanceof BlendMode)) {
return false;
}
final BlendMode cxx3 = (BlendMode)object;
return this.blendFunc == cxx3.blendFunc && this.dstAlphaFactor == cxx3.dstAlphaFactor && this.dstColorFactor == cxx3.dstColorFactor && this.opaque == cxx3.opaque && this.separateBlend == cxx3.separateBlend && this.srcAlphaFactor == cxx3.srcAlphaFactor && this.srcColorFactor == cxx3.srcColorFactor;
final BlendMode cya3 = (BlendMode)object;
return this.blendFunc == cya3.blendFunc && this.dstAlphaFactor == cya3.dstAlphaFactor && this.dstColorFactor == cya3.dstColorFactor && this.opaque == cya3.opaque && this.separateBlend == cya3.separateBlend && this.srcAlphaFactor == cya3.srcAlphaFactor && this.srcColorFactor == cya3.srcColorFactor;
}
@Override

View File

@ -21,10 +21,10 @@ public class Program {
this.name = string;
}
public void attachToEffect(final Effect cxy) {
public void attachToEffect(final Effect cyb) {
RenderSystem.assertThread(RenderSystem::isOnRenderThread);
++this.references;
GlStateManager.glAttachShader(cxy.getId(), this.id);
GlStateManager.glAttachShader(cyb.getId(), this.id);
}
public void close() {
@ -53,9 +53,9 @@ public class Program {
final String string3 = StringUtils.trim(GlStateManager.glGetShaderInfoLog(integer5, 32768));
throw new IOException("Couldn't compile " + a.getName() + " program: " + string3);
}
final Program cxz6 = new Program(a, integer5, string);
a.getPrograms().put(string, cxz6);
return cxz6;
final Program cyc6 = new Program(a, integer5, string);
a.getPrograms().put(string, cyc6);
return cyc6;
}
public enum Type {

View File

@ -14,11 +14,11 @@ public class ProgramManager {
GlStateManager._glUseProgram(integer);
}
public static void releaseProgram(final Effect cxy) {
public static void releaseProgram(final Effect cyb) {
RenderSystem.assertThread(RenderSystem::isOnRenderThread);
cxy.getFragmentProgram().close();
cxy.getVertexProgram().close();
GlStateManager.glDeleteProgram(cxy.getId());
cyb.getFragmentProgram().close();
cyb.getVertexProgram().close();
GlStateManager.glDeleteProgram(cyb.getId());
}
public static int createProgram() throws IOException {
@ -30,15 +30,15 @@ public class ProgramManager {
return integer1;
}
public static void linkProgram(final Effect cxy) throws IOException {
public static void linkProgram(final Effect cyb) throws IOException {
RenderSystem.assertThread(RenderSystem::isOnRenderThread);
cxy.getFragmentProgram().attachToEffect(cxy);
cxy.getVertexProgram().attachToEffect(cxy);
GlStateManager.glLinkProgram(cxy.getId());
final int integer2 = GlStateManager.glGetProgrami(cxy.getId(), 35714);
cyb.getFragmentProgram().attachToEffect(cyb);
cyb.getVertexProgram().attachToEffect(cyb);
GlStateManager.glLinkProgram(cyb.getId());
final int integer2 = GlStateManager.glGetProgrami(cyb.getId(), 35714);
if (integer2 == 0) {
ProgramManager.LOGGER.warn("Error encountered when linking program containing VS {} and FS {}. Log output:", cxy.getVertexProgram().getName(), cxy.getFragmentProgram().getName());
ProgramManager.LOGGER.warn(GlStateManager.glGetProgramInfoLog(cxy.getId(), 32768));
ProgramManager.LOGGER.warn("Error encountered when linking program containing VS {} and FS {}. Log output:", cyb.getVertexProgram().getName(), cyb.getFragmentProgram().getName());
ProgramManager.LOGGER.warn(GlStateManager.glGetProgramInfoLog(cyb.getId(), 32768));
}
}

View File

@ -21,11 +21,11 @@ public class Uniform extends AbstractUniform implements AutoCloseable {
private boolean dirty;
private final Effect parent;
public Uniform(final String string, final int integer2, final int integer3, final Effect cxy) {
public Uniform(final String string, final int integer2, final int integer3, final Effect cyb) {
this.name = string;
this.count = integer3;
this.type = integer2;
this.parent = cxy;
this.parent = cyb;
if (integer2 <= 3) {
this.intValues = MemoryUtil.memAllocInt(integer3);
this.floatValues = null;

View File

@ -73,8 +73,8 @@ public class RenderSystem {
return true;
}
public static void recordRenderCall(final RenderCall cwz) {
RenderSystem.recordingQueue.add(cwz);
public static void recordRenderCall(final RenderCall cxc) {
RenderSystem.recordingQueue.add(cxc);
}
public static void flipFrame(final long long1) {
@ -88,8 +88,8 @@ public class RenderSystem {
public static void replayQueue() {
RenderSystem.isReplayingQueue = true;
while (!RenderSystem.recordingQueue.isEmpty()) {
final RenderCall cwz1 = RenderSystem.recordingQueue.poll();
cwz1.execute();
final RenderCall cxc1 = RenderSystem.recordingQueue.poll();
cxc1.execute();
}
RenderSystem.isReplayingQueue = false;
}

View File

@ -20,8 +20,8 @@ public class BreakingTextureGenerator extends DefaultedVertexConsumer {
private float ny;
private float nz;
public BreakingTextureGenerator(final VertexConsumer cyl, final PoseStack.Pose a) {
this.delegate = cyl;
public BreakingTextureGenerator(final VertexConsumer cyo, final PoseStack.Pose a) {
this.delegate = cyo;
(this.cameraInversePose = a.pose().copy()).invert();
(this.normalPose = a.normal().copy()).invert();
this.resetState();

View File

@ -152,31 +152,31 @@ public class BufferBuilder extends DefaultedVertexConsumer implements BufferVert
this.buffer.position(this.totalRenderedBytes);
this.buffer.put(b.data);
this.buffer.clear();
final VertexFormat cym4 = b.format;
this.switchFormat(cym4);
this.vertices = integer3 / cym4.getVertexSize();
this.nextElementByte = this.totalRenderedBytes + this.vertices * cym4.getVertexSize();
final VertexFormat cyp4 = b.format;
this.switchFormat(cyp4);
this.vertices = integer3 / cyp4.getVertexSize();
this.nextElementByte = this.totalRenderedBytes + this.vertices * cyp4.getVertexSize();
}
public void begin(final int integer, final VertexFormat cym) {
public void begin(final int integer, final VertexFormat cyp) {
if (this.building) {
throw new IllegalStateException("Already building!");
}
this.building = true;
this.mode = integer;
this.switchFormat(cym);
this.currentElement = cym.getElements().get(0);
this.switchFormat(cyp);
this.currentElement = cyp.getElements().get(0);
this.elementIndex = 0;
this.buffer.clear();
}
private void switchFormat(final VertexFormat cym) {
if (this.format == cym) {
private void switchFormat(final VertexFormat cyp) {
if (this.format == cyp) {
return;
}
this.format = cym;
final boolean boolean3 = cym == DefaultVertexFormat.NEW_ENTITY;
final boolean boolean4 = cym == DefaultVertexFormat.BLOCK;
this.format = cyp;
final boolean boolean3 = cyp == DefaultVertexFormat.NEW_ENTITY;
final boolean boolean4 = cyp == DefaultVertexFormat.BLOCK;
this.fastFormat = (boolean3 || boolean4);
this.fullFormat = boolean3;
}
@ -222,9 +222,9 @@ public class BufferBuilder extends DefaultedVertexConsumer implements BufferVert
final ImmutableList<VertexFormatElement> immutableList2 = this.format.getElements();
this.elementIndex = (this.elementIndex + 1) % immutableList2.size();
this.nextElementByte += this.currentElement.getByteSize();
final VertexFormatElement cyn3 = immutableList2.get(this.elementIndex);
this.currentElement = cyn3;
if (cyn3.getUsage() == VertexFormatElement.Usage.PADDING) {
final VertexFormatElement cyq3 = immutableList2.get(this.elementIndex);
this.currentElement = cyq3;
if (cyq3.getUsage() == VertexFormatElement.Usage.PADDING) {
this.nextElement();
}
if (this.defaultColorSet && this.currentElement.getUsage() == VertexFormatElement.Usage.COLOR) {
@ -324,9 +324,9 @@ public class BufferBuilder extends DefaultedVertexConsumer implements BufferVert
private final ByteBuffer data;
private final VertexFormat format;
private State(final ByteBuffer byteBuffer, final VertexFormat cym) {
private State(final ByteBuffer byteBuffer, final VertexFormat cyp) {
this.data = byteBuffer;
this.format = cym;
this.format = cyp;
}
}
@ -335,8 +335,8 @@ public class BufferBuilder extends DefaultedVertexConsumer implements BufferVert
private final int vertexCount;
private final int mode;
private DrawState(final VertexFormat cym, final int integer2, final int integer3) {
this.format = cym;
private DrawState(final VertexFormat cyp, final int integer2, final int integer3) {
this.format = cyp;
this.vertexCount = integer2;
this.mode = integer3;
}

View File

@ -7,31 +7,31 @@ import java.nio.ByteBuffer;
import com.mojang.blaze3d.systems.RenderSystem;
public class BufferUploader {
public static void end(final BufferBuilder cyd) {
public static void end(final BufferBuilder cyg) {
if (!RenderSystem.isOnRenderThread()) {
final Pair<BufferBuilder.DrawState, ByteBuffer> pair2;
final BufferBuilder.DrawState a3;
RenderSystem.recordRenderCall(() -> {
pair2 = cyd.popNextBuffer();
pair2 = cyg.popNextBuffer();
a3 = (BufferBuilder.DrawState)pair2.getFirst();
_end((ByteBuffer)pair2.getSecond(), a3.mode(), a3.format(), a3.vertexCount());
});
}
else {
final Pair<BufferBuilder.DrawState, ByteBuffer> pair3 = cyd.popNextBuffer();
final Pair<BufferBuilder.DrawState, ByteBuffer> pair3 = cyg.popNextBuffer();
final BufferBuilder.DrawState a4 = (BufferBuilder.DrawState)pair3.getFirst();
_end((ByteBuffer)pair3.getSecond(), a4.mode(), a4.format(), a4.vertexCount());
}
}
private static void _end(final ByteBuffer byteBuffer, final int integer2, final VertexFormat cym, final int integer4) {
private static void _end(final ByteBuffer byteBuffer, final int integer2, final VertexFormat cyp, final int integer4) {
RenderSystem.assertThread(RenderSystem::isOnRenderThread);
byteBuffer.clear();
if (integer4 <= 0) {
return;
}
cym.setupBufferState(MemoryUtil.memAddress(byteBuffer));
cyp.setupBufferState(MemoryUtil.memAddress(byteBuffer));
GlStateManager._drawArrays(integer2, 0, integer4);
cym.clearBufferState();
cyp.clearBufferState();
}
}

View File

@ -25,11 +25,11 @@ public interface BufferVertexConsumer extends VertexConsumer {
}
default VertexConsumer color(final int integer1, final int integer2, final int integer3, final int integer4) {
final VertexFormatElement cyn6 = this.currentElement();
if (cyn6.getUsage() != VertexFormatElement.Usage.COLOR) {
final VertexFormatElement cyq6 = this.currentElement();
if (cyq6.getUsage() != VertexFormatElement.Usage.COLOR) {
return this;
}
if (cyn6.getType() != VertexFormatElement.Type.UBYTE) {
if (cyq6.getType() != VertexFormatElement.Type.UBYTE) {
throw new IllegalStateException();
}
this.putByte(0, (byte)integer1);
@ -41,11 +41,11 @@ public interface BufferVertexConsumer extends VertexConsumer {
}
default VertexConsumer uv(final float float1, final float float2) {
final VertexFormatElement cyn4 = this.currentElement();
if (cyn4.getUsage() != VertexFormatElement.Usage.UV || cyn4.getIndex() != 0) {
final VertexFormatElement cyq4 = this.currentElement();
if (cyq4.getUsage() != VertexFormatElement.Usage.UV || cyq4.getIndex() != 0) {
return this;
}
if (cyn4.getType() != VertexFormatElement.Type.FLOAT) {
if (cyq4.getType() != VertexFormatElement.Type.FLOAT) {
throw new IllegalStateException();
}
this.putFloat(0, float1);
@ -63,11 +63,11 @@ public interface BufferVertexConsumer extends VertexConsumer {
}
default VertexConsumer uvShort(final short short1, final short short2, final int integer) {
final VertexFormatElement cyn5 = this.currentElement();
if (cyn5.getUsage() != VertexFormatElement.Usage.UV || cyn5.getIndex() != integer) {
final VertexFormatElement cyq5 = this.currentElement();
if (cyq5.getUsage() != VertexFormatElement.Usage.UV || cyq5.getIndex() != integer) {
return this;
}
if (cyn5.getType() != VertexFormatElement.Type.SHORT) {
if (cyq5.getType() != VertexFormatElement.Type.SHORT) {
throw new IllegalStateException();
}
this.putShort(0, short1);
@ -77,11 +77,11 @@ public interface BufferVertexConsumer extends VertexConsumer {
}
default VertexConsumer normal(final float float1, final float float2, final float float3) {
final VertexFormatElement cyn5 = this.currentElement();
if (cyn5.getUsage() != VertexFormatElement.Usage.NORMAL) {
final VertexFormatElement cyq5 = this.currentElement();
if (cyq5.getUsage() != VertexFormatElement.Usage.NORMAL) {
return this;
}
if (cyn5.getType() != VertexFormatElement.Type.BYTE) {
if (cyq5.getType() != VertexFormatElement.Type.BYTE) {
throw new IllegalStateException();
}
this.putByte(0, normalIntValue(float1));

View File

@ -33,7 +33,10 @@ public class PoseStack {
final Pose a5 = this.poseStack.getLast();
a5.pose.multiply(Matrix4f.createScaleMatrix(float1, float2, float3));
if (float1 == float2 && float2 == float3) {
return;
if (float1 > 0.0f) {
return;
}
a5.normal.mul(-1.0f);
}
final float float4 = 1.0f / float1;
final float float5 = 1.0f / float2;

View File

@ -11,8 +11,8 @@ public class VertexBuffer implements AutoCloseable {
private final VertexFormat format;
private int vertexCount;
public VertexBuffer(final VertexFormat cym) {
this.format = cym;
public VertexBuffer(final VertexFormat cyp) {
this.format = cyp;
RenderSystem.glGenBuffers(integer -> this.id = integer);
}
@ -20,25 +20,25 @@ public class VertexBuffer implements AutoCloseable {
RenderSystem.glBindBuffer(34962, () -> this.id);
}
public void upload(final BufferBuilder cyd) {
public void upload(final BufferBuilder cyg) {
if (!RenderSystem.isOnRenderThread()) {
RenderSystem.recordRenderCall(() -> this.upload_(cyd));
RenderSystem.recordRenderCall(() -> this.upload_(cyg));
}
else {
this.upload_(cyd);
this.upload_(cyg);
}
}
public CompletableFuture<Void> uploadLater(final BufferBuilder cyd) {
public CompletableFuture<Void> uploadLater(final BufferBuilder cyg) {
if (!RenderSystem.isOnRenderThread()) {
return CompletableFuture.runAsync(() -> this.upload_(cyd), runnable -> RenderSystem.recordRenderCall(runnable::run));
return CompletableFuture.runAsync(() -> this.upload_(cyg), runnable -> RenderSystem.recordRenderCall(runnable::run));
}
this.upload_(cyd);
this.upload_(cyg);
return CompletableFuture.<Void>completedFuture((Void)null);
}
private void upload_(final BufferBuilder cyd) {
final Pair<BufferBuilder.DrawState, ByteBuffer> pair3 = cyd.popNextBuffer();
private void upload_(final BufferBuilder cyg) {
final Pair<BufferBuilder.DrawState, ByteBuffer> pair3 = cyg.popNextBuffer();
if (this.id == -1) {
return;
}

View File

@ -51,13 +51,13 @@ public interface VertexConsumer {
return this.overlayCoords(integer & 0xFFFF, integer >> 16 & 0xFFFF);
}
default void putBulkData(final PoseStack.Pose a, final BakedQuad drk, final float float3, final float float4, final float float5, final int integer6, final int integer7) {
this.putBulkData(a, drk, new float[] { 1.0f, 1.0f, 1.0f, 1.0f }, float3, float4, float5, new int[] { integer6, integer6, integer6, integer6 }, integer7, false);
default void putBulkData(final PoseStack.Pose a, final BakedQuad drn, final float float3, final float float4, final float float5, final int integer6, final int integer7) {
this.putBulkData(a, drn, new float[] { 1.0f, 1.0f, 1.0f, 1.0f }, float3, float4, float5, new int[] { integer6, integer6, integer6, integer6 }, integer7, false);
}
default void putBulkData(final PoseStack.Pose a, final BakedQuad drk, final float[] arr, final float float4, final float float5, final float float6, final int[] arr, final int integer, final boolean boolean9) {
final int[] arr2 = drk.getVertices();
final Vec3i gg12 = drk.getDirection().getNormal();
default void putBulkData(final PoseStack.Pose a, final BakedQuad drn, final float[] arr, final float float4, final float float5, final float float6, final int[] arr, final int integer, final boolean boolean9) {
final int[] arr2 = drn.getVertices();
final Vec3i gg12 = drn.getDirection().getNormal();
final Vector3f e13 = new Vector3f((float)gg12.getX(), (float)gg12.getY(), (float)gg12.getZ());
final Matrix4f b14 = a.pose();
e13.transform(a.normal());

View File

@ -19,9 +19,9 @@ public class VertexFormat {
this.offsets = (IntList)new IntArrayList();
this.elements = immutableList;
int integer3 = 0;
for (final VertexFormatElement cyn5 : immutableList) {
for (final VertexFormatElement cyq5 : immutableList) {
this.offsets.add(integer3);
integer3 += cyn5.getByteSize();
integer3 += cyq5.getByteSize();
}
this.vertexSize = integer3;
}
@ -51,8 +51,8 @@ public class VertexFormat {
if (object == null || this.getClass() != object.getClass()) {
return false;
}
final VertexFormat cym3 = (VertexFormat)object;
return this.vertexSize == cym3.vertexSize && this.elements.equals(cym3.elements);
final VertexFormat cyp3 = (VertexFormat)object;
return this.vertexSize == cyp3.vertexSize && this.elements.equals(cyp3.elements);
}
@Override
@ -77,8 +77,8 @@ public class VertexFormat {
RenderSystem.recordRenderCall(this::clearBufferState);
return;
}
for (final VertexFormatElement cyn3 : this.getElements()) {
cyn3.clearBufferState();
for (final VertexFormatElement cyq3 : this.getElements()) {
cyq3.clearBufferState();
}
}
}

View File

@ -68,8 +68,8 @@ public class VertexFormatElement {
if (object == null || this.getClass() != object.getClass()) {
return false;
}
final VertexFormatElement cyn3 = (VertexFormatElement)object;
return this.count == cyn3.count && this.index == cyn3.index && this.type == cyn3.type && this.usage == cyn3.usage;
final VertexFormatElement cyq3 = (VertexFormatElement)object;
return this.count == cyq3.count && this.index == cyq3.index && this.type == cyq3.type && this.usage == cyq3.usage;
}
@Override

View File

@ -1,20 +1,20 @@
package com.mojang.blaze3d.vertex;
public class VertexMultiConsumer {
public static VertexConsumer create(final VertexConsumer cyl1, final VertexConsumer cyl2) {
return new Double(cyl1, cyl2);
public static VertexConsumer create(final VertexConsumer cyo1, final VertexConsumer cyo2) {
return new Double(cyo1, cyo2);
}
static class Double implements VertexConsumer {
private final VertexConsumer first;
private final VertexConsumer second;
public Double(final VertexConsumer cyl1, final VertexConsumer cyl2) {
if (cyl1 == cyl2) {
public Double(final VertexConsumer cyo1, final VertexConsumer cyo2) {
if (cyo1 == cyo2) {
throw new IllegalArgumentException("Duplicate delegates");
}
this.first = cyl1;
this.second = cyl2;
this.first = cyo1;
this.second = cyo2;
}
@Override

View File

@ -86,7 +86,7 @@ public final class Transformation {
if (e1 != null) {
b5.m03 = e1.x();
b5.m13 = e1.y();
b5.m32 = e1.z();
b5.m23 = e1.z();
}
return b5;
}

View File

@ -24,8 +24,8 @@ public final class Vector3f {
this.z = float3;
}
public Vector3f(final Vec3 cvi) {
this((float)cvi.x, (float)cvi.y, (float)cvi.z);
public Vector3f(final Vec3 cvl) {
this((float)cvl.x, (float)cvl.y, (float)cvl.z);
}
@Override

View File

@ -30,7 +30,6 @@ import java.io.IOException;
import com.mojang.realmsclient.exception.RealmsServiceException;
import com.mojang.realmsclient.gui.screens.RealmsGenericErrorScreen;
import com.mojang.realmsclient.gui.screens.RealmsClientOutdatedScreen;
import com.mojang.realmsclient.gui.screens.RealmsCreateTrialScreen;
import com.mojang.realmsclient.dto.RegionPingResult;
import com.mojang.realmsclient.dto.PingResult;
import com.mojang.realmsclient.client.Ping;
@ -364,16 +363,16 @@ public class RealmsMainScreen extends RealmsScreen {
private void pingRegions() {
final List<RegionPingResult> list2;
final RealmsClient cyv3;
final RealmsClient cyy3;
final PingResult pingResult4;
new Thread(() -> {
list2 = Ping.pingAllRegions();
cyv3 = RealmsClient.createRealmsClient();
cyy3 = RealmsClient.createRealmsClient();
pingResult4 = new PingResult();
pingResult4.pingResults = list2;
pingResult4.worldIds = this.getOwnedNonExpiredWorldIds();
try {
cyv3.sendPingResults(pingResult4);
cyy3.sendPingResults(pingResult4);
}
catch (Throwable throwable5) {
RealmsMainScreen.LOGGER.warn("Could not send ping result to Realms: ", throwable5);
@ -397,10 +396,6 @@ public class RealmsMainScreen extends RealmsScreen {
this.stopRealmsFetcher();
}
public void setCreatedTrial(final boolean boolean1) {
this.createdTrial = boolean1;
}
private void onPlay() {
final RealmsServer realmsServer2 = this.findServer(this.selectedServerId);
if (realmsServer2 == null) {
@ -422,7 +417,8 @@ public class RealmsMainScreen extends RealmsScreen {
if (!this.trialsAvailable || this.createdTrial) {
return;
}
Realms.setScreen(new RealmsCreateTrialScreen(this));
RealmsUtil.browseTo("https://aka.ms/startjavarealmstrial");
Realms.setScreen(this.lastScreen);
}
private void checkClientCompatability() {
@ -431,9 +427,9 @@ public class RealmsMainScreen extends RealmsScreen {
new Thread("MCO Compatability Checker #1") {
@Override
public void run() {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
try {
final RealmsClient.CompatibleVersionResponse a3 = cyv2.clientCompatible();
final RealmsClient.CompatibleVersionResponse a3 = cyy2.clientCompatible();
if (a3.equals(RealmsClient.CompatibleVersionResponse.OUTDATED)) {
RealmsMainScreen.realmsGenericErrorScreen = new RealmsClientOutdatedScreen(RealmsMainScreen.this.lastScreen, true);
Realms.setScreen(RealmsMainScreen.realmsGenericErrorScreen);
@ -446,15 +442,15 @@ public class RealmsMainScreen extends RealmsScreen {
}
RealmsMainScreen.this.checkParentalConsent();
}
catch (RealmsServiceException czd3) {
catch (RealmsServiceException czg3) {
RealmsMainScreen.checkedClientCompatability = false;
RealmsMainScreen.LOGGER.error("Couldn't connect to realms: ", czd3.toString());
if (czd3.httpResultCode == 401) {
RealmsMainScreen.LOGGER.error("Couldn't connect to realms: ", czg3.toString());
if (czg3.httpResultCode == 401) {
RealmsMainScreen.realmsGenericErrorScreen = new RealmsGenericErrorScreen(RealmsScreen.getLocalizedString("mco.error.invalid.session.title"), RealmsScreen.getLocalizedString("mco.error.invalid.session.message"), RealmsMainScreen.this.lastScreen);
Realms.setScreen(RealmsMainScreen.realmsGenericErrorScreen);
return;
}
Realms.setScreen(new RealmsGenericErrorScreen(czd3, RealmsMainScreen.this.lastScreen));
Realms.setScreen(new RealmsGenericErrorScreen(czg3, RealmsMainScreen.this.lastScreen));
}
catch (IOException iOException3) {
RealmsMainScreen.checkedClientCompatability = false;
@ -473,9 +469,9 @@ public class RealmsMainScreen extends RealmsScreen {
new Thread("MCO Compatability Checker #1") {
@Override
public void run() {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
try {
final Boolean boolean3 = cyv2.mcoEnabled();
final Boolean boolean3 = cyy2.mcoEnabled();
if (boolean3) {
RealmsMainScreen.LOGGER.info("Realms is available for this user");
RealmsMainScreen.hasParentalConsent = true;
@ -487,9 +483,9 @@ public class RealmsMainScreen extends RealmsScreen {
}
RealmsMainScreen.checkedParentalConsent = true;
}
catch (RealmsServiceException czd3) {
RealmsMainScreen.LOGGER.error("Couldn't connect to realms: ", czd3.toString());
Realms.setScreen(new RealmsGenericErrorScreen(czd3, RealmsMainScreen.this.lastScreen));
catch (RealmsServiceException czg3) {
RealmsMainScreen.LOGGER.error("Couldn't connect to realms: ", czg3.toString());
Realms.setScreen(new RealmsGenericErrorScreen(czg3, RealmsMainScreen.this.lastScreen));
}
catch (IOException iOException3) {
RealmsMainScreen.LOGGER.error("Couldn't connect to realms: ", iOException3.getMessage());
@ -504,17 +500,17 @@ public class RealmsMainScreen extends RealmsScreen {
new Thread("MCO Stage Availability Checker #1") {
@Override
public void run() {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
try {
final Boolean boolean3 = cyv2.stageAvailable();
final Boolean boolean3 = cyy2.stageAvailable();
if (boolean3) {
RealmsClient.switchToStage();
RealmsMainScreen.LOGGER.info("Switched to stage");
RealmsMainScreen.realmsDataFetcher.forceUpdate();
}
}
catch (RealmsServiceException czd3) {
RealmsMainScreen.LOGGER.error("Couldn't connect to Realms: " + czd3);
catch (RealmsServiceException czg3) {
RealmsMainScreen.LOGGER.error("Couldn't connect to Realms: " + czg3);
}
catch (IOException iOException3) {
RealmsMainScreen.LOGGER.error("Couldn't parse response connecting to Realms: " + iOException3.getMessage());
@ -529,17 +525,17 @@ public class RealmsMainScreen extends RealmsScreen {
new Thread("MCO Local Availability Checker #1") {
@Override
public void run() {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
try {
final Boolean boolean3 = cyv2.stageAvailable();
final Boolean boolean3 = cyy2.stageAvailable();
if (boolean3) {
RealmsClient.switchToLocal();
RealmsMainScreen.LOGGER.info("Switched to local");
RealmsMainScreen.realmsDataFetcher.forceUpdate();
}
}
catch (RealmsServiceException czd3) {
RealmsMainScreen.LOGGER.error("Couldn't connect to Realms: " + czd3);
catch (RealmsServiceException czg3) {
RealmsMainScreen.LOGGER.error("Couldn't connect to Realms: " + czg3);
}
catch (IOException iOException3) {
RealmsMainScreen.LOGGER.error("Couldn't parse response connecting to Realms: " + iOException3.getMessage());
@ -561,8 +557,8 @@ public class RealmsMainScreen extends RealmsScreen {
private void configureClicked(final RealmsServer realmsServer) {
if (Realms.getUUID().equals(realmsServer.ownerUUID) || RealmsMainScreen.overrideConfigure) {
this.saveListScrollPosition();
final Minecraft dbl3 = Minecraft.getInstance();
dbl3.execute(() -> dbl3.setScreen(new RealmsConfigureWorldScreen(this, realmsServer.id).getProxy()));
final Minecraft dbn3 = Minecraft.getInstance();
dbn3.execute(() -> dbn3.setScreen(new RealmsConfigureWorldScreen(this, realmsServer.id).getProxy()));
}
}
@ -598,8 +594,8 @@ public class RealmsMainScreen extends RealmsScreen {
try {
final RealmsServer realmsServer2 = RealmsMainScreen.this.findServer(RealmsMainScreen.this.selectedServerId);
if (realmsServer2 != null) {
final RealmsClient cyv3 = RealmsClient.createRealmsClient();
cyv3.uninviteMyselfFrom(realmsServer2.id);
final RealmsClient cyy3 = RealmsClient.createRealmsClient();
cyy3.uninviteMyselfFrom(realmsServer2.id);
RealmsMainScreen.realmsDataFetcher.removeItem(realmsServer2);
RealmsMainScreen.this.realmsServers.remove(realmsServer2);
RealmsMainScreen.this.realmSelectionList.children().removeIf(realmListEntry -> realmListEntry instanceof RealmSelectionListEntry && realmListEntry.mServerData.id == RealmsMainScreen.this.selectedServerId);
@ -609,9 +605,9 @@ public class RealmsMainScreen extends RealmsScreen {
RealmsMainScreen.this.playButton.active(false);
}
}
catch (RealmsServiceException czd2) {
catch (RealmsServiceException czg2) {
RealmsMainScreen.LOGGER.error("Couldn't configure world");
Realms.setScreen(new RealmsGenericErrorScreen(czd2, RealmsMainScreen.this));
Realms.setScreen(new RealmsGenericErrorScreen(czg2, RealmsMainScreen.this));
}
}
}.start();
@ -649,7 +645,7 @@ public class RealmsMainScreen extends RealmsScreen {
@Override
public boolean charTyped(final char character, final int integer) {
this.keyCombos.forEach(cyq -> cyq.keyPressed(character));
this.keyCombos.forEach(cyt -> cyt.keyPressed(character));
return true;
}
@ -859,9 +855,9 @@ public class RealmsMainScreen extends RealmsScreen {
}
private void connectToServer(final RealmsServer realmsServer, final RealmsScreen realmsScreen) {
final RealmsLongRunningMcoTaskScreen czx4 = new RealmsLongRunningMcoTaskScreen(realmsScreen, new RealmsTasks.RealmsGetServerDetailsTask(this, realmsScreen, realmsServer, this.connectLock));
czx4.start();
Realms.setScreen(czx4);
final RealmsLongRunningMcoTaskScreen czz4 = new RealmsLongRunningMcoTaskScreen(realmsScreen, new RealmsTasks.RealmsGetServerDetailsTask(this, realmsScreen, realmsServer, this.connectLock));
czz4.start();
Realms.setScreen(czz4);
}
private boolean isSelfOwnedServer(final RealmsServer realmsServer) {
@ -1053,12 +1049,6 @@ public class RealmsMainScreen extends RealmsScreen {
return new RealmsMainScreen(this.lastScreen);
}
public void closePopup() {
if (this.shouldShowPopup() && this.popupOpenedByUser) {
this.popupOpenedByUser = false;
}
}
public static void updateTeaserImages(final ResourceManager zb) {
final Collection<ResourceLocation> collection2 = zb.listResources("textures/gui/images", string -> string.endsWith(".png"));
RealmsMainScreen.teaserImages = collection2.stream().filter(sm -> sm.getNamespace().equals("realms")).collect(ImmutableList.toImmutableList());
@ -1377,8 +1367,8 @@ public class RealmsMainScreen extends RealmsScreen {
@Override
public void onPress() {
final RealmsPendingInvitesScreen daa2 = new RealmsPendingInvitesScreen(RealmsMainScreen.this.lastScreen);
Realms.setScreen(daa2);
final RealmsPendingInvitesScreen dac2 = new RealmsPendingInvitesScreen(RealmsMainScreen.this.lastScreen);
Realms.setScreen(dac2);
}
@Override

View File

@ -45,7 +45,7 @@ public class FileUpload {
private CompletableFuture<UploadResult> uploadTask;
private final RequestConfig requestConfig;
public FileUpload(final File file, final long long2, final int integer, final UploadInfo uploadInfo, final String string5, final String string6, final String string7, final UploadStatus cyz) {
public FileUpload(final File file, final long long2, final int integer, final UploadInfo uploadInfo, final String string5, final String string6, final String string7, final UploadStatus czc) {
this.cancelled = new AtomicBoolean(false);
this.requestConfig = RequestConfig.custom().setSocketTimeout((int)TimeUnit.MINUTES.toMillis(10L)).setConnectTimeout((int)TimeUnit.SECONDS.toMillis(15L)).build();
this.file = file;
@ -55,7 +55,7 @@ public class FileUpload {
this.sessionId = string5;
this.username = string6;
this.clientVersion = string7;
this.uploadStatus = cyz;
this.uploadStatus = czc;
}
public void upload(final Consumer<UploadResult> consumer) {
@ -166,11 +166,11 @@ public class FileUpload {
private final InputStream content;
private final UploadStatus uploadStatus;
public CustomInputStreamEntity(final InputStream inputStream, final long long2, final UploadStatus cyz) {
public CustomInputStreamEntity(final InputStream inputStream, final long long2, final UploadStatus czc) {
super(inputStream);
this.content = inputStream;
this.length = long2;
this.uploadStatus = cyz;
this.uploadStatus = czc;
}
public void writeTo(final OutputStream outputStream) throws IOException {

View File

@ -303,14 +303,6 @@ public class RealmsClient {
return Boolean.valueOf(string3);
}
public RealmsServer createTrial(final String string1, final String string2) throws RealmsServiceException, IOException {
final RealmsDescriptionDto realmsDescriptionDto4 = new RealmsDescriptionDto(string1, string2);
final String string3 = RealmsClient.gson.toJson(realmsDescriptionDto4);
final String string4 = this.url("trial");
final String string5 = this.execute(Request.post(string4, string3, 5000, 10000));
return RealmsServer.parse(string5);
}
public void deleteWorld(final long long1) throws RealmsServiceException, IOException {
final String string4 = this.url("worlds" + "/$WORLD_ID".replace("$WORLD_ID", String.valueOf(long1)));
this.execute(Request.delete(string4));
@ -331,22 +323,22 @@ public class RealmsClient {
}
}
private String execute(final Request<?> cyy) throws RealmsServiceException {
cyy.cookie("sid", this.sessionId);
cyy.cookie("user", this.username);
cyy.cookie("version", Realms.getMinecraftVersionString());
private String execute(final Request<?> czb) throws RealmsServiceException {
czb.cookie("sid", this.sessionId);
czb.cookie("user", this.username);
czb.cookie("version", Realms.getMinecraftVersionString());
try {
final int integer3 = cyy.responseCode();
final int integer3 = czb.responseCode();
if (integer3 == 503) {
final int integer4 = cyy.getRetryAfterHeader();
final int integer4 = czb.getRetryAfterHeader();
throw new RetryCallException(integer4);
}
final String string4 = cyy.text();
final String string4 = czb.text();
if (integer3 >= 200 && integer3 < 300) {
return string4;
}
if (integer3 == 401) {
final String string5 = cyy.getHeader("WWW-Authenticate");
final String string5 = czb.getHeader("WWW-Authenticate");
RealmsClient.LOGGER.info("Could not authorize you against Realms server: " + string5);
throw new RealmsServiceException(integer3, string5, -1, string5);
}
@ -354,12 +346,12 @@ public class RealmsClient {
RealmsClient.LOGGER.error("Realms error code: " + integer3 + " message: " + string4);
throw new RealmsServiceException(integer3, string4, integer3, "");
}
final RealmsError cyx5 = new RealmsError(string4);
RealmsClient.LOGGER.error("Realms http code: " + integer3 + " - error code: " + cyx5.getErrorCode() + " - message: " + cyx5.getErrorMessage() + " - raw body: " + string4);
throw new RealmsServiceException(integer3, string4, cyx5);
final RealmsError cza5 = new RealmsError(string4);
RealmsClient.LOGGER.error("Realms http code: " + integer3 + " - error code: " + cza5.getErrorCode() + " - message: " + cza5.getErrorMessage() + " - raw body: " + string4);
throw new RealmsServiceException(integer3, string4, cza5);
}
catch (RealmsHttpException czc3) {
throw new RealmsServiceException(500, "Could not connect to Realms: " + czc3.getMessage(), -1, "");
catch (RealmsHttpException czf3) {
throw new RealmsServiceException(500, "Could not connect to Realms: " + czf3.getMessage(), -1, "");
}
}

View File

@ -136,9 +136,9 @@ public abstract class Request<T extends Request<T>> {
if (this.connected) {
return (T)this;
}
final T cyy2 = this.doConnect();
final T czb2 = this.doConnect();
this.connected = true;
return cyy2;
return czb2;
}
protected abstract T doConnect();

View File

@ -9,12 +9,12 @@ public class RealmsServiceException extends Exception {
public final int errorCode;
public final String errorMsg;
public RealmsServiceException(final int integer, final String string, final RealmsError cyx) {
public RealmsServiceException(final int integer, final String string, final RealmsError cza) {
super(string);
this.httpResultCode = integer;
this.httpResponseContent = string;
this.errorCode = cyx.getErrorCode();
this.errorMsg = cyx.getErrorMessage();
this.errorCode = cza.getErrorCode();
this.errorMsg = cza.getErrorMessage();
}
public RealmsServiceException(final int integer1, final String string2, final int integer3, final String string4) {

View File

@ -62,8 +62,8 @@ public enum ChatFormatting {
}
static {
FORMATTING_BY_CHAR = Arrays.<ChatFormatting>stream(values()).collect(Collectors.toMap(ChatFormatting::getChar, czf -> czf));
FORMATTING_BY_NAME = Arrays.<ChatFormatting>stream(values()).collect(Collectors.toMap(ChatFormatting::getName, czf -> czf));
FORMATTING_BY_CHAR = Arrays.<ChatFormatting>stream(values()).collect(Collectors.toMap(ChatFormatting::getChar, czi -> czi));
FORMATTING_BY_NAME = Arrays.<ChatFormatting>stream(values()).collect(Collectors.toMap(ChatFormatting::getName, czi -> czi));
STRIP_FORMATTING_PATTERN = Pattern.compile("(?i)§[0-9A-FK-OR]");
}
}

View File

@ -5,8 +5,8 @@ import com.mojang.realmsclient.gui.screens.RealmsLongRunningMcoTaskScreen;
public abstract class LongRunningTask implements Runnable {
protected RealmsLongRunningMcoTaskScreen longRunningMcoTaskScreen;
public void setScreen(final RealmsLongRunningMcoTaskScreen czx) {
this.longRunningMcoTaskScreen = czx;
public void setScreen(final RealmsLongRunningMcoTaskScreen czz) {
this.longRunningMcoTaskScreen = czz;
}
public void error(final String string) {

View File

@ -223,9 +223,9 @@ public class RealmsDataFetcher {
private void updateServersList() {
try {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
if (cyv2 != null) {
final List<RealmsServer> list3 = cyv2.listWorlds().servers;
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
if (cyy2 != null) {
final List<RealmsServer> list3 = cyy2.listWorlds().servers;
if (list3 != null) {
RealmsDataFetcher.this.sort(list3);
RealmsDataFetcher.this.setServers(list3);
@ -256,9 +256,9 @@ public class RealmsDataFetcher {
private void updatePendingInvites() {
try {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
if (cyv2 != null) {
RealmsDataFetcher.this.pendingInvitesCount = cyv2.pendingInvitesCount();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
if (cyy2 != null) {
RealmsDataFetcher.this.pendingInvitesCount = cyy2.pendingInvitesCount();
RealmsDataFetcher.this.fetchStatus.put(Task.PENDING_INVITE, true);
}
}
@ -281,9 +281,9 @@ public class RealmsDataFetcher {
private void getTrialAvailable() {
try {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
if (cyv2 != null) {
RealmsDataFetcher.this.trialAvailable = cyv2.trialAvailable();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
if (cyy2 != null) {
RealmsDataFetcher.this.trialAvailable = cyy2.trialAvailable();
RealmsDataFetcher.this.fetchStatus.put(Task.TRIAL_AVAILABLE, true);
}
}
@ -306,9 +306,9 @@ public class RealmsDataFetcher {
private void getLiveStats() {
try {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
if (cyv2 != null) {
RealmsDataFetcher.this.livestats = cyv2.getLiveStats();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
if (cyy2 != null) {
RealmsDataFetcher.this.livestats = cyy2.getLiveStats();
RealmsDataFetcher.this.fetchStatus.put(Task.LIVE_STATS, true);
}
}
@ -331,11 +331,11 @@ public class RealmsDataFetcher {
private void getUnreadNews() {
try {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
if (cyv2 != null) {
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
if (cyy2 != null) {
RealmsNews realmsNews3 = null;
try {
realmsNews3 = cyv2.getNews();
realmsNews3 = cyy2.getNews();
}
catch (Exception ex) {}
final RealmsPersistence.RealmsPersistenceData a4 = RealmsPersistence.readFile();

View File

@ -41,9 +41,9 @@ public abstract class RowButton {
public abstract void onClick(final int integer);
public static void drawButtonsInRow(final List<RowButton> list, final RealmsObjectSelectionList realmsObjectSelectionList, final int integer3, final int integer4, final int integer5, final int integer6) {
for (final RowButton czk8 : list) {
if (realmsObjectSelectionList.getRowWidth() > czk8.getRight()) {
czk8.drawForRowAt(integer3, integer4, integer5, integer6);
for (final RowButton czn8 : list) {
if (realmsObjectSelectionList.getRowWidth() > czn8.getRight()) {
czn8.drawForRowAt(integer3, integer4, integer5, integer6);
}
}
}
@ -57,9 +57,9 @@ public abstract class RowButton {
final int integer4 = realmsObjectSelectionList.getRowTop(integer2);
final int integer5 = (int)(double5 - integer3);
final int integer6 = (int)(double6 - integer4);
for (final RowButton czk15 : list) {
if (integer5 >= czk15.xOffset && integer5 <= czk15.getRight() && integer6 >= czk15.yOffset && integer6 <= czk15.getBottom()) {
czk15.onClick(integer2);
for (final RowButton czn15 : list) {
if (integer5 >= czn15.xOffset && integer5 <= czn15.getRight() && integer6 >= czn15.yOffset && integer6 <= czn15.getBottom()) {
czn15.onClick(integer2);
}
}
}

View File

@ -43,11 +43,11 @@ public class RealmsBackupScreen extends RealmsScreen {
private final RealmsServer serverData;
private RealmsLabel titleLabel;
public RealmsBackupScreen(final RealmsConfigureWorldScreen czp, final RealmsServer realmsServer, final int integer) {
public RealmsBackupScreen(final RealmsConfigureWorldScreen czs, final RealmsServer realmsServer, final int integer) {
this.backups = Collections.<Backup>emptyList();
this.selectedBackup = -1;
this.noBackups = false;
this.lastScreen = czp;
this.lastScreen = czs;
this.serverData = realmsServer;
this.slotId = integer;
}
@ -62,9 +62,9 @@ public class RealmsBackupScreen extends RealmsScreen {
new Thread("Realms-fetch-backups") {
@Override
public void run() {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
try {
final List<Backup> list3 = cyv2.backupsFor(RealmsBackupScreen.this.serverData.id).backups;
final List<Backup> list3 = cyy2.backupsFor(RealmsBackupScreen.this.serverData.id).backups;
final Iterator<Backup> iterator;
Backup backup4;
Realms.execute(() -> {
@ -79,8 +79,8 @@ public class RealmsBackupScreen extends RealmsScreen {
RealmsBackupScreen.this.generateChangeList();
});
}
catch (RealmsServiceException czd3) {
RealmsBackupScreen.LOGGER.error("Couldn't request backups", (Throwable)czd3);
catch (RealmsServiceException czg3) {
RealmsBackupScreen.LOGGER.error("Couldn't request backups", (Throwable)czg3);
}
}
}.start();
@ -203,9 +203,9 @@ public class RealmsBackupScreen extends RealmsScreen {
private void downloadWorldData() {
final RealmsTasks.DownloadTask b2 = new RealmsTasks.DownloadTask(this.serverData.id, this.slotId, this.serverData.name + " (" + this.serverData.slots.get(this.serverData.activeSlot).getSlotName(this.serverData.activeSlot) + ")", this);
final RealmsLongRunningMcoTaskScreen czx3 = new RealmsLongRunningMcoTaskScreen(this.lastScreen.getNewScreen(), b2);
czx3.start();
Realms.setScreen(czx3);
final RealmsLongRunningMcoTaskScreen czz3 = new RealmsLongRunningMcoTaskScreen(this.lastScreen.getNewScreen(), b2);
czz3.start();
Realms.setScreen(czz3);
}
@Override
@ -229,9 +229,9 @@ public class RealmsBackupScreen extends RealmsScreen {
final Backup backup2 = this.backups.get(this.selectedBackup);
this.selectedBackup = -1;
final RealmsTasks.RestoreTask g3 = new RealmsTasks.RestoreTask(backup2, this.serverData.id, this.lastScreen);
final RealmsLongRunningMcoTaskScreen czx4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen.getNewScreen(), g3);
czx4.start();
Realms.setScreen(czx4);
final RealmsLongRunningMcoTaskScreen czz4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen.getNewScreen(), g3);
czz4.start();
Realms.setScreen(czz4);
}
@Override

View File

@ -45,12 +45,12 @@ public class RealmsBrokenWorldScreen extends RealmsScreen {
private final List<Integer> slotsThatHasBeenDownloaded;
private int animTick;
public RealmsBrokenWorldScreen(final RealmsScreen realmsScreen, final RealmsMainScreen cyr, final long long3) {
public RealmsBrokenWorldScreen(final RealmsScreen realmsScreen, final RealmsMainScreen cyu, final long long3) {
this.title = RealmsScreen.getLocalizedString("mco.brokenworld.title");
this.message = RealmsScreen.getLocalizedString("mco.brokenworld.message.line1") + "\\n" + RealmsScreen.getLocalizedString("mco.brokenworld.message.line2");
this.slotsThatHasBeenDownloaded = Lists.newArrayList();
this.lastScreen = realmsScreen;
this.mainScreen = cyr;
this.mainScreen = cyu;
this.serverId = long3;
}
@ -97,12 +97,12 @@ public class RealmsBrokenWorldScreen extends RealmsScreen {
@Override
public void onPress() {
final int integer2 = RealmsBrokenWorldScreen.resetButtonIds.indexOf(this.id()) + 1;
final RealmsResetWorldScreen dad3 = new RealmsResetWorldScreen(RealmsBrokenWorldScreen.this, RealmsBrokenWorldScreen.this.serverData, RealmsBrokenWorldScreen.this);
final RealmsResetWorldScreen daf3 = new RealmsResetWorldScreen(RealmsBrokenWorldScreen.this, RealmsBrokenWorldScreen.this.serverData, RealmsBrokenWorldScreen.this);
if (integer2 != RealmsBrokenWorldScreen.this.serverData.activeSlot || RealmsBrokenWorldScreen.this.serverData.worldType.equals(RealmsServer.WorldType.MINIGAME)) {
dad3.setSlot(integer2);
daf3.setSlot(integer2);
}
dad3.setConfirmationId(14);
Realms.setScreen(dad3);
daf3.setConfirmationId(14);
Realms.setScreen(daf3);
}
});
}
@ -158,16 +158,16 @@ public class RealmsBrokenWorldScreen extends RealmsScreen {
}
private void fetchServerData(final long long1) {
final RealmsClient cyv4;
final RealmsClient cyy4;
new Thread(() -> {
cyv4 = RealmsClient.createRealmsClient();
cyy4 = RealmsClient.createRealmsClient();
try {
this.serverData = cyv4.getOwnWorld(long1);
this.serverData = cyy4.getOwnWorld(long1);
this.addButtons();
}
catch (RealmsServiceException czd5) {
catch (RealmsServiceException czg5) {
RealmsBrokenWorldScreen.LOGGER.error("Couldn't get own world");
Realms.setScreen(new RealmsGenericErrorScreen(czd5.getMessage(), this.lastScreen));
Realms.setScreen(new RealmsGenericErrorScreen(czg5.getMessage(), this.lastScreen));
}
catch (IOException iOException5) {
RealmsBrokenWorldScreen.LOGGER.error("Couldn't parse response getting own world");
@ -182,22 +182,22 @@ public class RealmsBrokenWorldScreen extends RealmsScreen {
return;
}
if (integer == 13 || integer == 14) {
final RealmsClient cyv2;
final RealmsClient cyy2;
RealmsTasks.OpenServerTask c3;
RealmsLongRunningMcoTaskScreen czx4;
RealmsLongRunningMcoTaskScreen czz4;
new Thread(() -> {
cyv2 = RealmsClient.createRealmsClient();
cyy2 = RealmsClient.createRealmsClient();
if (this.serverData.state.equals(RealmsServer.State.CLOSED)) {
c3 = new RealmsTasks.OpenServerTask(this.serverData, this, this.lastScreen, true);
czx4 = new RealmsLongRunningMcoTaskScreen(this, c3);
czx4.start();
Realms.setScreen(czx4);
czz4 = new RealmsLongRunningMcoTaskScreen(this, c3);
czz4.start();
Realms.setScreen(czz4);
}
else {
try {
this.mainScreen.newScreen().play(cyv2.getOwnWorld(this.serverId), this);
this.mainScreen.newScreen().play(cyy2.getOwnWorld(this.serverId), this);
}
catch (RealmsServiceException czd3) {
catch (RealmsServiceException czg3) {
RealmsBrokenWorldScreen.LOGGER.error("Couldn't get own world");
Realms.setScreen(this.lastScreen);
}
@ -219,16 +219,16 @@ public class RealmsBrokenWorldScreen extends RealmsScreen {
}
private void downloadWorld(final int integer) {
final RealmsClient cyv3 = RealmsClient.createRealmsClient();
final RealmsClient cyy3 = RealmsClient.createRealmsClient();
try {
final WorldDownload worldDownload4 = cyv3.download(this.serverData.id, integer);
final RealmsDownloadLatestWorldScreen czt5 = new RealmsDownloadLatestWorldScreen(this, worldDownload4, this.serverData.name + " (" + this.serverData.slots.get(integer).getSlotName(integer) + ")");
czt5.setConfirmationId(RealmsBrokenWorldScreen.downloadConfirmationIds.get(integer - 1));
Realms.setScreen(czt5);
final WorldDownload worldDownload4 = cyy3.download(this.serverData.id, integer);
final RealmsDownloadLatestWorldScreen czv5 = new RealmsDownloadLatestWorldScreen(this, worldDownload4, this.serverData.name + " (" + this.serverData.slots.get(integer).getSlotName(integer) + ")");
czv5.setConfirmationId(RealmsBrokenWorldScreen.downloadConfirmationIds.get(integer - 1));
Realms.setScreen(czv5);
}
catch (RealmsServiceException czd4) {
catch (RealmsServiceException czg4) {
RealmsBrokenWorldScreen.LOGGER.error("Couldn't download world data");
Realms.setScreen(new RealmsGenericErrorScreen(czd4, this));
Realms.setScreen(new RealmsGenericErrorScreen(czg4, this));
}
}
@ -276,9 +276,9 @@ public class RealmsBrokenWorldScreen extends RealmsScreen {
private void switchSlot(final int integer) {
final RealmsTasks.SwitchSlotTask i3 = new RealmsTasks.SwitchSlotTask(this.serverData.id, integer, this, 13);
final RealmsLongRunningMcoTaskScreen czx4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, i3);
czx4.start();
Realms.setScreen(czx4);
final RealmsLongRunningMcoTaskScreen czz4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, i3);
czz4.start();
Realms.setScreen(czz4);
}
static {
@ -298,11 +298,11 @@ public class RealmsBrokenWorldScreen extends RealmsScreen {
public void onPress() {
final int integer2 = RealmsBrokenWorldScreen.playButtonIds.indexOf(this.id()) + 1;
if (RealmsBrokenWorldScreen.this.serverData.slots.get(integer2).empty) {
final RealmsResetWorldScreen dad3 = new RealmsResetWorldScreen(RealmsBrokenWorldScreen.this, RealmsBrokenWorldScreen.this.serverData, RealmsBrokenWorldScreen.this, RealmsScreen.getLocalizedString("mco.configure.world.switch.slot"), RealmsScreen.getLocalizedString("mco.configure.world.switch.slot.subtitle"), 10526880, RealmsScreen.getLocalizedString("gui.cancel"));
dad3.setSlot(integer2);
dad3.setResetTitle(RealmsScreen.getLocalizedString("mco.create.world.reset.title"));
dad3.setConfirmationId(14);
Realms.setScreen(dad3);
final RealmsResetWorldScreen daf3 = new RealmsResetWorldScreen(RealmsBrokenWorldScreen.this, RealmsBrokenWorldScreen.this.serverData, RealmsBrokenWorldScreen.this, RealmsScreen.getLocalizedString("mco.configure.world.switch.slot"), RealmsScreen.getLocalizedString("mco.configure.world.switch.slot.subtitle"), 10526880, RealmsScreen.getLocalizedString("gui.cancel"));
daf3.setSlot(integer2);
daf3.setResetTitle(RealmsScreen.getLocalizedString("mco.create.world.reset.title"));
daf3.setConfirmationId(14);
Realms.setScreen(daf3);
}
else {
RealmsBrokenWorldScreen.this.switchSlot(integer2);

View File

@ -43,8 +43,8 @@ public class RealmsConfigureWorldScreen extends RealmsScreenWithCallback<WorldTe
private int animTick;
private int clicks;
public RealmsConfigureWorldScreen(final RealmsMainScreen cyr, final long long2) {
this.lastScreen = cyr;
public RealmsConfigureWorldScreen(final RealmsMainScreen cyu, final long long2) {
this.lastScreen = cyu;
this.serverId = long2;
}
@ -80,9 +80,9 @@ public class RealmsConfigureWorldScreen extends RealmsScreenWithCallback<WorldTe
this.buttonsAdd(this.switchMinigameButton = new RealmsButton(8, this.leftButton(0), RealmsConstants.row(13) - 5, 100, 20, RealmsScreen.getLocalizedString("mco.configure.world.buttons.switchminigame")) {
@Override
public void onPress() {
final RealmsSelectWorldTemplateScreen dah2 = new RealmsSelectWorldTemplateScreen(RealmsConfigureWorldScreen.this, RealmsServer.WorldType.MINIGAME);
dah2.setTitle(RealmsScreen.getLocalizedString("mco.template.title.minigame"));
Realms.setScreen(dah2);
final RealmsSelectWorldTemplateScreen daj2 = new RealmsSelectWorldTemplateScreen(RealmsConfigureWorldScreen.this, RealmsServer.WorldType.MINIGAME);
daj2.setTitle(RealmsScreen.getLocalizedString("mco.template.title.minigame"));
Realms.setScreen(daj2);
}
});
this.buttonsAdd(this.optionsButton = new RealmsButton(5, this.leftButton(0), RealmsConstants.row(13) - 5, 90, 20, RealmsScreen.getLocalizedString("mco.configure.world.buttons.options")) {
@ -132,8 +132,8 @@ public class RealmsConfigureWorldScreen extends RealmsScreenWithCallback<WorldTe
final int integer2 = this.frame(integer);
final int integer3 = RealmsConstants.row(5) + 5;
final int integer4 = 100 + integer;
final RealmsWorldSlotButton czj6 = new RealmsWorldSlotButton(integer2, integer3, 80, 80, () -> this.serverData, string -> this.toolTip = string, integer4, integer, this);
this.getProxy().buttonsAdd(czj6);
final RealmsWorldSlotButton czm6 = new RealmsWorldSlotButton(integer2, integer3, 80, 80, () -> this.serverData, string -> this.toolTip = string, integer4, integer, this);
this.getProxy().buttonsAdd(czm6);
}
private int leftButton(final int integer) {
@ -206,11 +206,11 @@ public class RealmsConfigureWorldScreen extends RealmsScreenWithCallback<WorldTe
}
private void fetchServerData(final long long1) {
final RealmsClient cyv4;
final RealmsClient cyy4;
new Thread(() -> {
cyv4 = RealmsClient.createRealmsClient();
cyy4 = RealmsClient.createRealmsClient();
try {
this.serverData = cyv4.getOwnWorld(long1);
this.serverData = cyy4.getOwnWorld(long1);
this.disableButtons();
if (this.isMinigame()) {
this.showMinigameButtons();
@ -219,9 +219,9 @@ public class RealmsConfigureWorldScreen extends RealmsScreenWithCallback<WorldTe
this.showRegularButtons();
}
}
catch (RealmsServiceException czd5) {
catch (RealmsServiceException czg5) {
RealmsConfigureWorldScreen.LOGGER.error("Couldn't get own world");
Realms.setScreen(new RealmsGenericErrorScreen(czd5.getMessage(), this.lastScreen));
Realms.setScreen(new RealmsGenericErrorScreen(czg5.getMessage(), this.lastScreen));
}
catch (IOException iOException5) {
RealmsConfigureWorldScreen.LOGGER.error("Couldn't parse response getting own world");
@ -281,10 +281,10 @@ public class RealmsConfigureWorldScreen extends RealmsScreenWithCallback<WorldTe
}
private void switchToMinigame() {
final RealmsSelectWorldTemplateScreen dah2 = new RealmsSelectWorldTemplateScreen(this, RealmsServer.WorldType.MINIGAME);
dah2.setTitle(RealmsScreen.getLocalizedString("mco.template.title.minigame"));
dah2.setWarning(RealmsScreen.getLocalizedString("mco.minigame.world.info.line1") + "\\n" + RealmsScreen.getLocalizedString("mco.minigame.world.info.line2"));
Realms.setScreen(dah2);
final RealmsSelectWorldTemplateScreen daj2 = new RealmsSelectWorldTemplateScreen(this, RealmsServer.WorldType.MINIGAME);
daj2.setTitle(RealmsScreen.getLocalizedString("mco.template.title.minigame"));
daj2.setWarning(RealmsScreen.getLocalizedString("mco.minigame.world.info.line1") + "\\n" + RealmsScreen.getLocalizedString("mco.minigame.world.info.line2"));
Realms.setScreen(daj2);
}
private void switchToFullSlot(final int integer, final RealmsServer realmsServer) {
@ -303,13 +303,13 @@ public class RealmsConfigureWorldScreen extends RealmsScreenWithCallback<WorldTe
private void switchToEmptySlot(final int integer, final RealmsServer realmsServer) {
final String string4 = RealmsScreen.getLocalizedString("mco.configure.world.slot.switch.question.line1");
final String string5 = RealmsScreen.getLocalizedString("mco.configure.world.slot.switch.question.line2");
RealmsResetWorldScreen dad6;
RealmsResetWorldScreen daf6;
Realms.setScreen(new RealmsLongConfirmationScreen((boolean3, integer4) -> {
if (boolean3) {
dad6 = new RealmsResetWorldScreen(this, realmsServer, this.getNewScreen(), RealmsScreen.getLocalizedString("mco.configure.world.switch.slot"), RealmsScreen.getLocalizedString("mco.configure.world.switch.slot.subtitle"), 10526880, RealmsScreen.getLocalizedString("gui.cancel"));
dad6.setSlot(integer);
dad6.setResetTitle(RealmsScreen.getLocalizedString("mco.create.world.reset.title"));
Realms.setScreen(dad6);
daf6 = new RealmsResetWorldScreen(this, realmsServer, this.getNewScreen(), RealmsScreen.getLocalizedString("mco.configure.world.switch.slot"), RealmsScreen.getLocalizedString("mco.configure.world.switch.slot.subtitle"), 10526880, RealmsScreen.getLocalizedString("gui.cancel"));
daf6.setSlot(integer);
daf6.setResetTitle(RealmsScreen.getLocalizedString("mco.create.world.reset.title"));
Realms.setScreen(daf6);
}
else {
Realms.setScreen(this);
@ -443,14 +443,14 @@ public class RealmsConfigureWorldScreen extends RealmsScreenWithCallback<WorldTe
final RealmsWorldOptions realmsWorldOptions2 = this.serverData.slots.get(this.serverData.activeSlot);
realmsWorldOptions.templateId = realmsWorldOptions2.templateId;
realmsWorldOptions.templateImage = realmsWorldOptions2.templateImage;
final RealmsClient cyv4 = RealmsClient.createRealmsClient();
final RealmsClient cyy4 = RealmsClient.createRealmsClient();
try {
cyv4.updateSlot(this.serverData.id, this.serverData.activeSlot, realmsWorldOptions);
cyy4.updateSlot(this.serverData.id, this.serverData.activeSlot, realmsWorldOptions);
this.serverData.slots.put(this.serverData.activeSlot, realmsWorldOptions);
}
catch (RealmsServiceException czd5) {
catch (RealmsServiceException czg5) {
RealmsConfigureWorldScreen.LOGGER.error("Couldn't save slot settings");
Realms.setScreen(new RealmsGenericErrorScreen(czd5, this));
Realms.setScreen(new RealmsGenericErrorScreen(czg5, this));
return;
}
catch (UnsupportedEncodingException unsupportedEncodingException5) {
@ -461,15 +461,15 @@ public class RealmsConfigureWorldScreen extends RealmsScreenWithCallback<WorldTe
public void saveSettings(final String string1, final String string2) {
final String string3 = (string2 == null || string2.trim().isEmpty()) ? null : string2;
final RealmsClient cyv5 = RealmsClient.createRealmsClient();
final RealmsClient cyy5 = RealmsClient.createRealmsClient();
try {
cyv5.update(this.serverData.id, string1, string3);
cyy5.update(this.serverData.id, string1, string3);
this.serverData.setName(string1);
this.serverData.setDescription(string3);
}
catch (RealmsServiceException czd6) {
catch (RealmsServiceException czg6) {
RealmsConfigureWorldScreen.LOGGER.error("Couldn't save settings");
Realms.setScreen(new RealmsGenericErrorScreen(czd6, this));
Realms.setScreen(new RealmsGenericErrorScreen(czg6, this));
return;
}
catch (UnsupportedEncodingException unsupportedEncodingException6) {
@ -480,16 +480,16 @@ public class RealmsConfigureWorldScreen extends RealmsScreenWithCallback<WorldTe
public void openTheWorld(final boolean boolean1, final RealmsScreen realmsScreen) {
final RealmsTasks.OpenServerTask c4 = new RealmsTasks.OpenServerTask(this.serverData, this, this.lastScreen, boolean1);
final RealmsLongRunningMcoTaskScreen czx5 = new RealmsLongRunningMcoTaskScreen(realmsScreen, c4);
czx5.start();
Realms.setScreen(czx5);
final RealmsLongRunningMcoTaskScreen czz5 = new RealmsLongRunningMcoTaskScreen(realmsScreen, c4);
czz5.start();
Realms.setScreen(czz5);
}
public void closeTheWorld(final RealmsScreen realmsScreen) {
final RealmsTasks.CloseServerTask a3 = new RealmsTasks.CloseServerTask(this.serverData, this);
final RealmsLongRunningMcoTaskScreen czx4 = new RealmsLongRunningMcoTaskScreen(realmsScreen, a3);
czx4.start();
Realms.setScreen(czx4);
final RealmsLongRunningMcoTaskScreen czz4 = new RealmsLongRunningMcoTaskScreen(realmsScreen, a3);
czz4.start();
Realms.setScreen(czz4);
}
public void stateChanged() {
@ -507,18 +507,18 @@ public class RealmsConfigureWorldScreen extends RealmsScreenWithCallback<WorldTe
}
private void switchSlot(final long long1, final int integer) {
final RealmsConfigureWorldScreen czp5 = this.getNewScreen();
final RealmsTasks.SwitchSlotTask i6 = new RealmsTasks.SwitchSlotTask(long1, integer, (boolean2, integer) -> Realms.setScreen(czp5), 11);
final RealmsLongRunningMcoTaskScreen czx7 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, i6);
czx7.start();
Realms.setScreen(czx7);
final RealmsConfigureWorldScreen czs5 = this.getNewScreen();
final RealmsTasks.SwitchSlotTask i6 = new RealmsTasks.SwitchSlotTask(long1, integer, (boolean2, integer) -> Realms.setScreen(czs5), 11);
final RealmsLongRunningMcoTaskScreen czz7 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, i6);
czz7.start();
Realms.setScreen(czz7);
}
private void switchMinigame(final WorldTemplate worldTemplate) {
final RealmsTasks.SwitchMinigameTask h3 = new RealmsTasks.SwitchMinigameTask(this.serverData.id, worldTemplate, this.getNewScreen());
final RealmsLongRunningMcoTaskScreen czx4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, h3);
czx4.start();
Realms.setScreen(czx4);
final RealmsLongRunningMcoTaskScreen czz4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, h3);
czz4.start();
Realms.setScreen(czz4);
}
public RealmsConfigureWorldScreen getNewScreen() {

View File

@ -20,9 +20,9 @@ public class RealmsCreateRealmScreen extends RealmsScreen {
private RealmsButton createButton;
private RealmsLabel createRealmLabel;
public RealmsCreateRealmScreen(final RealmsServer realmsServer, final RealmsMainScreen cyr) {
public RealmsCreateRealmScreen(final RealmsServer realmsServer, final RealmsMainScreen cyu) {
this.server = realmsServer;
this.lastScreen = cyr;
this.lastScreen = cyu;
}
@Override
@ -85,12 +85,12 @@ public class RealmsCreateRealmScreen extends RealmsScreen {
private void createWorld() {
if (this.valid()) {
final RealmsResetWorldScreen dad2 = new RealmsResetWorldScreen(this.lastScreen, this.server, this.lastScreen.newScreen(), RealmsScreen.getLocalizedString("mco.selectServer.create"), RealmsScreen.getLocalizedString("mco.create.world.subtitle"), 10526880, RealmsScreen.getLocalizedString("mco.create.world.skip"));
dad2.setResetTitle(RealmsScreen.getLocalizedString("mco.create.world.reset.title"));
final RealmsTasks.WorldCreationTask k3 = new RealmsTasks.WorldCreationTask(this.server.id, this.nameBox.getValue(), this.descriptionBox.getValue(), dad2);
final RealmsLongRunningMcoTaskScreen czx4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, k3);
czx4.start();
Realms.setScreen(czx4);
final RealmsResetWorldScreen daf2 = new RealmsResetWorldScreen(this.lastScreen, this.server, this.lastScreen.newScreen(), RealmsScreen.getLocalizedString("mco.selectServer.create"), RealmsScreen.getLocalizedString("mco.create.world.subtitle"), 10526880, RealmsScreen.getLocalizedString("mco.create.world.skip"));
daf2.setResetTitle(RealmsScreen.getLocalizedString("mco.create.world.reset.title"));
final RealmsTasks.WorldCreationTask j3 = new RealmsTasks.WorldCreationTask(this.server.id, this.nameBox.getValue(), this.descriptionBox.getValue(), daf2);
final RealmsLongRunningMcoTaskScreen czz4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, j3);
czz4.start();
Realms.setScreen(czz4);
}
}

View File

@ -1,112 +0,0 @@
package com.mojang.realmsclient.gui.screens;
import com.mojang.realmsclient.gui.LongRunningTask;
import com.mojang.realmsclient.util.RealmsTasks;
import net.minecraft.realms.Realms;
import net.minecraft.realms.AbstractRealmsButton;
import net.minecraft.realms.RealmsGuiEventListener;
import net.minecraft.realms.RealmsButton;
import net.minecraft.realms.RealmsEditBox;
import com.mojang.realmsclient.RealmsMainScreen;
import net.minecraft.realms.RealmsScreen;
public class RealmsCreateTrialScreen extends RealmsScreen {
private final RealmsMainScreen lastScreen;
private RealmsEditBox nameBox;
private RealmsEditBox descriptionBox;
private boolean initialized;
private RealmsButton createButton;
public RealmsCreateTrialScreen(final RealmsMainScreen cyr) {
this.lastScreen = cyr;
}
@Override
public void tick() {
if (this.nameBox != null) {
this.nameBox.tick();
this.createButton.active(this.valid());
}
if (this.descriptionBox != null) {
this.descriptionBox.tick();
}
}
@Override
public void init() {
this.setKeyboardHandlerSendRepeatsToGui(true);
if (!this.initialized) {
this.initialized = true;
this.focusOn(this.nameBox = this.newEditBox(3, this.width() / 2 - 100, 65, 200, 20, RealmsScreen.getLocalizedString("mco.configure.world.name")));
this.descriptionBox = this.newEditBox(4, this.width() / 2 - 100, 115, 200, 20, RealmsScreen.getLocalizedString("mco.configure.world.description"));
}
this.buttonsAdd(this.createButton = new RealmsButton(0, this.width() / 2 - 100, this.height() / 4 + 120 + 17, 97, 20, RealmsScreen.getLocalizedString("mco.create.world")) {
@Override
public void onPress() {
RealmsCreateTrialScreen.this.createWorld();
}
});
this.buttonsAdd(new RealmsButton(1, this.width() / 2 + 5, this.height() / 4 + 120 + 17, 95, 20, RealmsScreen.getLocalizedString("gui.cancel")) {
@Override
public void onPress() {
Realms.setScreen(RealmsCreateTrialScreen.this.lastScreen);
}
});
this.createButton.active(this.valid());
this.addWidget(this.nameBox);
this.addWidget(this.descriptionBox);
}
@Override
public void removed() {
this.setKeyboardHandlerSendRepeatsToGui(false);
}
@Override
public boolean charTyped(final char character, final int integer) {
this.createButton.active(this.valid());
return false;
}
@Override
public boolean keyPressed(final int integer1, final int integer2, final int integer3) {
switch (integer1) {
case 256: {
Realms.setScreen(this.lastScreen);
return true;
}
default: {
this.createButton.active(this.valid());
return false;
}
}
}
private void createWorld() {
if (this.valid()) {
final RealmsTasks.TrialCreationTask j2 = new RealmsTasks.TrialCreationTask(this.nameBox.getValue(), this.descriptionBox.getValue(), this.lastScreen);
final RealmsLongRunningMcoTaskScreen czx3 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, j2);
czx3.start();
Realms.setScreen(czx3);
}
}
private boolean valid() {
return this.nameBox != null && this.nameBox.getValue() != null && !this.nameBox.getValue().trim().isEmpty();
}
@Override
public void render(final int integer1, final int integer2, final float float3) {
this.renderBackground();
this.drawCenteredString(RealmsScreen.getLocalizedString("mco.trial.title"), this.width() / 2, 11, 16777215);
this.drawString(RealmsScreen.getLocalizedString("mco.configure.world.name"), this.width() / 2 - 100, 52, 10526880);
this.drawString(RealmsScreen.getLocalizedString("mco.configure.world.description"), this.width() / 2 - 100, 102, 10526880);
if (this.nameBox != null) {
this.nameBox.render(integer1, integer2, float3);
}
if (this.descriptionBox != null) {
this.descriptionBox.render(integer1, integer2, float3);
}
super.render(integer1, integer2, float3);
}
}

View File

@ -96,8 +96,8 @@ public class RealmsDownloadLatestWorldScreen extends RealmsScreen {
}
private long getContentLength(final String string) {
final FileDownload cys3 = new FileDownload();
return cys3.contentLength(string);
final FileDownload cyv3 = new FileDownload();
return cyv3.contentLength(string);
}
@Override
@ -234,7 +234,7 @@ public class RealmsDownloadLatestWorldScreen extends RealmsScreen {
}
private void downloadSave() {
FileDownload cys2;
FileDownload cyv2;
new Thread(() -> {
try {
if (!(!RealmsDownloadLatestWorldScreen.downloadLock.tryLock(1L, TimeUnit.SECONDS))) {
@ -244,22 +244,22 @@ public class RealmsDownloadLatestWorldScreen extends RealmsScreen {
}
else {
this.status = RealmsScreen.getLocalizedString("mco.download.downloading", this.worldName);
cys2 = new FileDownload();
cys2.contentLength(this.worldDownload.downloadLink);
cys2.download(this.worldDownload, this.worldName, this.downloadStatus, this.getLevelStorageSource());
while (!cys2.isFinished()) {
if (cys2.isError()) {
cys2.cancel();
cyv2 = new FileDownload();
cyv2.contentLength(this.worldDownload.downloadLink);
cyv2.download(this.worldDownload, this.worldName, this.downloadStatus, this.getLevelStorageSource());
while (!cyv2.isFinished()) {
if (cyv2.isError()) {
cyv2.cancel();
this.errorMessage = RealmsScreen.getLocalizedString("mco.download.failed");
this.cancelButton.setMessage(RealmsScreen.getLocalizedString("gui.done"));
return;
}
else {
if (cys2.isExtracting()) {
if (cyv2.isExtracting()) {
this.extracting = true;
}
if (this.cancelled) {
cys2.cancel();
cyv2.cancel();
this.downloadCancelled();
return;
}

View File

@ -11,9 +11,9 @@ public class RealmsGenericErrorScreen extends RealmsScreen {
private String line1;
private String line2;
public RealmsGenericErrorScreen(final RealmsServiceException czd, final RealmsScreen realmsScreen) {
public RealmsGenericErrorScreen(final RealmsServiceException czg, final RealmsScreen realmsScreen) {
this.nextScreen = realmsScreen;
this.errorMessage(czd);
this.errorMessage(czg);
}
public RealmsGenericErrorScreen(final String string, final RealmsScreen realmsScreen) {
@ -26,16 +26,16 @@ public class RealmsGenericErrorScreen extends RealmsScreen {
this.errorMessage(string1, string2);
}
private void errorMessage(final RealmsServiceException czd) {
if (czd.errorCode == -1) {
this.line1 = "An error occurred (" + czd.httpResultCode + "):";
this.line2 = czd.httpResponseContent;
private void errorMessage(final RealmsServiceException czg) {
if (czg.errorCode == -1) {
this.line1 = "An error occurred (" + czg.httpResultCode + "):";
this.line2 = czg.httpResponseContent;
}
else {
this.line1 = "Realms (" + czd.errorCode + "):";
final String string3 = "mco.errorMessage." + czd.errorCode;
this.line1 = "Realms (" + czg.errorCode + "):";
final String string3 = "mco.errorMessage." + czg.errorCode;
final String string4 = RealmsScreen.getLocalizedString(string3);
this.line2 = (string4.equals(string3) ? czd.errorMsg : string4);
this.line2 = (string4.equals(string3) ? czg.errorMsg : string4);
}
}

View File

@ -25,8 +25,8 @@ public class RealmsInviteScreen extends RealmsScreen {
private String errorMsg;
private boolean showError;
public RealmsInviteScreen(final RealmsConfigureWorldScreen czp, final RealmsScreen realmsScreen, final RealmsServer realmsServer) {
this.configureScreen = czp;
public RealmsInviteScreen(final RealmsConfigureWorldScreen czs, final RealmsScreen realmsScreen, final RealmsServer realmsServer) {
this.configureScreen = czs;
this.lastScreen = realmsScreen;
this.serverData = realmsServer;
}
@ -61,13 +61,13 @@ public class RealmsInviteScreen extends RealmsScreen {
}
private void onInvite() {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
if (this.profileName.getValue() == null || this.profileName.getValue().isEmpty()) {
this.showError(RealmsScreen.getLocalizedString("mco.configure.world.players.error"));
return;
}
try {
final RealmsServer realmsServer3 = cyv2.invite(this.serverData.id, this.profileName.getValue().trim());
final RealmsServer realmsServer3 = cyy2.invite(this.serverData.id, this.profileName.getValue().trim());
if (realmsServer3 != null) {
this.serverData.players = realmsServer3.players;
Realms.setScreen(new RealmsPlayerScreen(this.configureScreen, this.serverData));

View File

@ -25,11 +25,11 @@ public class RealmsLongRunningMcoTaskScreen extends RealmsScreen {
private final int buttonLength = 212;
public static final String[] symbols;
public RealmsLongRunningMcoTaskScreen(final RealmsScreen realmsScreen, final LongRunningTask czg) {
public RealmsLongRunningMcoTaskScreen(final RealmsScreen realmsScreen, final LongRunningTask czj) {
this.title = "";
this.lastScreen = realmsScreen;
(this.task = czg).setScreen(this);
this.taskThread = czg;
(this.task = czj).setScreen(this);
this.taskThread = czj;
}
public void start() {

View File

@ -55,15 +55,15 @@ public class RealmsNotificationsScreen extends RealmsScreen {
new Thread("Realms Notification Availability checker #1") {
@Override
public void run() {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
try {
final RealmsClient.CompatibleVersionResponse a3 = cyv2.clientCompatible();
final RealmsClient.CompatibleVersionResponse a3 = cyy2.clientCompatible();
if (!a3.equals(RealmsClient.CompatibleVersionResponse.COMPATIBLE)) {
return;
}
}
catch (RealmsServiceException czd3) {
if (czd3.httpResultCode != 401) {
catch (RealmsServiceException czg3) {
if (czg3.httpResultCode != 401) {
RealmsNotificationsScreen.checkedMcoAvailability = false;
}
return;

View File

@ -47,13 +47,13 @@ public class RealmsPendingInvitesScreen extends RealmsScreen {
new Thread("Realms-pending-invitations-fetcher") {
@Override
public void run() {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
try {
final List<PendingInvite> list3 = cyv2.pendingInvites().pendingInvites;
final List<PendingInvite> list3 = cyy2.pendingInvites().pendingInvites;
final List<PendingInvitationSelectionListEntry> list4 = list3.stream().map(pendingInvite -> new PendingInvitationSelectionListEntry(pendingInvite)).collect(Collectors.toList());
Realms.execute(() -> RealmsPendingInvitesScreen.this.pendingInvitationSelectionList.replaceEntries(list4));
}
catch (RealmsServiceException czd3) {
catch (RealmsServiceException czg3) {
RealmsPendingInvitesScreen.LOGGER.error("Couldn't list invites");
}
finally {
@ -113,11 +113,11 @@ public class RealmsPendingInvitesScreen extends RealmsScreen {
@Override
public void run() {
try {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
cyv2.rejectInvitation(RealmsPendingInvitesScreen.this.pendingInvitationSelectionList.children().get(integer).pendingInvite.invitationId);
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
cyy2.rejectInvitation(RealmsPendingInvitesScreen.this.pendingInvitationSelectionList.children().get(integer).pendingInvite.invitationId);
Realms.execute(() -> RealmsPendingInvitesScreen.this.updateList(integer));
}
catch (RealmsServiceException czd2) {
catch (RealmsServiceException czg2) {
RealmsPendingInvitesScreen.LOGGER.error("Couldn't reject invite");
}
}
@ -131,11 +131,11 @@ public class RealmsPendingInvitesScreen extends RealmsScreen {
@Override
public void run() {
try {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
cyv2.acceptInvitation(RealmsPendingInvitesScreen.this.pendingInvitationSelectionList.children().get(integer).pendingInvite.invitationId);
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
cyy2.acceptInvitation(RealmsPendingInvitesScreen.this.pendingInvitationSelectionList.children().get(integer).pendingInvite.invitationId);
Realms.execute(() -> RealmsPendingInvitesScreen.this.updateList(integer));
}
catch (RealmsServiceException czd2) {
catch (RealmsServiceException czg2) {
RealmsPendingInvitesScreen.LOGGER.error("Couldn't accept invite");
}
}

View File

@ -39,10 +39,10 @@ public class RealmsPlayerScreen extends RealmsScreen {
private boolean stateChanged;
private RealmsLabel titleLabel;
public RealmsPlayerScreen(final RealmsConfigureWorldScreen czp, final RealmsServer realmsServer) {
public RealmsPlayerScreen(final RealmsConfigureWorldScreen czs, final RealmsServer realmsServer) {
this.selectedInvitedIndex = -1;
this.player = -1;
this.lastScreen = czp;
this.lastScreen = czs;
this.serverData = realmsServer;
}
@ -130,24 +130,24 @@ public class RealmsPlayerScreen extends RealmsScreen {
private void op(final int integer) {
this.updateButtonStates();
final RealmsClient cyv3 = RealmsClient.createRealmsClient();
final RealmsClient cyy3 = RealmsClient.createRealmsClient();
final String string4 = this.serverData.players.get(integer).getUuid();
try {
this.updateOps(cyv3.op(this.serverData.id, string4));
this.updateOps(cyy3.op(this.serverData.id, string4));
}
catch (RealmsServiceException czd5) {
catch (RealmsServiceException czg5) {
RealmsPlayerScreen.LOGGER.error("Couldn't op the user");
}
}
private void deop(final int integer) {
this.updateButtonStates();
final RealmsClient cyv3 = RealmsClient.createRealmsClient();
final RealmsClient cyy3 = RealmsClient.createRealmsClient();
final String string4 = this.serverData.players.get(integer).getUuid();
try {
this.updateOps(cyv3.deop(this.serverData.id, string4));
this.updateOps(cyy3.deop(this.serverData.id, string4));
}
catch (RealmsServiceException czd5) {
catch (RealmsServiceException czg5) {
RealmsPlayerScreen.LOGGER.error("Couldn't deop the user");
}
}
@ -164,8 +164,8 @@ public class RealmsPlayerScreen extends RealmsScreen {
final PlayerInfo playerInfo3 = this.serverData.players.get(integer);
this.selectedInvited = playerInfo3.getUuid();
this.selectedInvitedIndex = integer;
final RealmsConfirmScreen czq4 = new RealmsConfirmScreen(this, "Question", RealmsScreen.getLocalizedString("mco.configure.world.uninvite.question") + " '" + playerInfo3.getName() + "' ?", 2);
Realms.setScreen(czq4);
final RealmsConfirmScreen czt4 = new RealmsConfirmScreen(this, "Question", RealmsScreen.getLocalizedString("mco.configure.world.uninvite.question") + " '" + playerInfo3.getName() + "' ?", 2);
Realms.setScreen(czt4);
}
}
@ -173,11 +173,11 @@ public class RealmsPlayerScreen extends RealmsScreen {
public void confirmResult(final boolean boolean1, final int integer) {
if (integer == 2) {
if (boolean1) {
final RealmsClient cyv4 = RealmsClient.createRealmsClient();
final RealmsClient cyy4 = RealmsClient.createRealmsClient();
try {
cyv4.uninvite(this.serverData.id, this.selectedInvited);
cyy4.uninvite(this.serverData.id, this.selectedInvited);
}
catch (RealmsServiceException czd5) {
catch (RealmsServiceException czg5) {
RealmsPlayerScreen.LOGGER.error("Couldn't uninvite user");
}
this.deleteFromInvitedList(this.selectedInvitedIndex);

View File

@ -24,15 +24,15 @@ public class RealmsResetNormalWorldScreen extends RealmsScreen {
private RealmsButton generateStructuresButton;
private String buttonTitle;
public RealmsResetNormalWorldScreen(final RealmsResetWorldScreen dad) {
public RealmsResetNormalWorldScreen(final RealmsResetWorldScreen daf) {
this.generateStructures = true;
this.levelTypeIndex = 0;
this.buttonTitle = RealmsScreen.getLocalizedString("mco.backup.button.reset");
this.lastScreen = dad;
this.lastScreen = daf;
}
public RealmsResetNormalWorldScreen(final RealmsResetWorldScreen dad, final String string) {
this(dad);
public RealmsResetNormalWorldScreen(final RealmsResetWorldScreen daf, final String string) {
this(daf);
this.buttonTitle = string;
}

View File

@ -88,12 +88,12 @@ public class RealmsResetWorldScreen extends RealmsScreenWithCallback<WorldTempla
new Thread("Realms-reset-world-fetcher") {
@Override
public void run() {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
try {
final WorldTemplatePaginatedList worldTemplatePaginatedList3 = cyv2.fetchWorldTemplates(1, 10, RealmsServer.WorldType.NORMAL);
final WorldTemplatePaginatedList worldTemplatePaginatedList4 = cyv2.fetchWorldTemplates(1, 10, RealmsServer.WorldType.ADVENTUREMAP);
final WorldTemplatePaginatedList worldTemplatePaginatedList5 = cyv2.fetchWorldTemplates(1, 10, RealmsServer.WorldType.EXPERIENCE);
final WorldTemplatePaginatedList worldTemplatePaginatedList6 = cyv2.fetchWorldTemplates(1, 10, RealmsServer.WorldType.INSPIRATION);
final WorldTemplatePaginatedList worldTemplatePaginatedList3 = cyy2.fetchWorldTemplates(1, 10, RealmsServer.WorldType.NORMAL);
final WorldTemplatePaginatedList worldTemplatePaginatedList4 = cyy2.fetchWorldTemplates(1, 10, RealmsServer.WorldType.ADVENTUREMAP);
final WorldTemplatePaginatedList worldTemplatePaginatedList5 = cyy2.fetchWorldTemplates(1, 10, RealmsServer.WorldType.EXPERIENCE);
final WorldTemplatePaginatedList worldTemplatePaginatedList6 = cyy2.fetchWorldTemplates(1, 10, RealmsServer.WorldType.INSPIRATION);
final WorldTemplatePaginatedList worldTemplatePaginatedList7;
final WorldTemplatePaginatedList worldTemplatePaginatedList8;
final WorldTemplatePaginatedList worldTemplatePaginatedList9;
@ -105,8 +105,8 @@ public class RealmsResetWorldScreen extends RealmsScreenWithCallback<WorldTempla
RealmsResetWorldScreen.this.inspirations = worldTemplatePaginatedList10;
});
}
catch (RealmsServiceException czd3) {
RealmsResetWorldScreen.LOGGER.error("Couldn't fetch templates in reset world", (Throwable)czd3);
catch (RealmsServiceException czg3) {
RealmsResetWorldScreen.LOGGER.error("Couldn't fetch templates in reset world", (Throwable)czg3);
}
}
}.start();
@ -127,33 +127,33 @@ public class RealmsResetWorldScreen extends RealmsScreenWithCallback<WorldTempla
this.buttonsAdd(new FrameButton(this.frame(3), RealmsConstants.row(0) + 10, RealmsScreen.getLocalizedString("mco.reset.world.template"), -1L, "realms:textures/gui/realms/survival_spawn.png", ResetType.SURVIVAL_SPAWN) {
@Override
public void onPress() {
final RealmsSelectWorldTemplateScreen dah2 = new RealmsSelectWorldTemplateScreen(RealmsResetWorldScreen.this, RealmsServer.WorldType.NORMAL, RealmsResetWorldScreen.this.templates);
dah2.setTitle(RealmsScreen.getLocalizedString("mco.reset.world.template"));
Realms.setScreen(dah2);
final RealmsSelectWorldTemplateScreen daj2 = new RealmsSelectWorldTemplateScreen(RealmsResetWorldScreen.this, RealmsServer.WorldType.NORMAL, RealmsResetWorldScreen.this.templates);
daj2.setTitle(RealmsScreen.getLocalizedString("mco.reset.world.template"));
Realms.setScreen(daj2);
}
});
this.buttonsAdd(new FrameButton(this.frame(1), RealmsConstants.row(6) + 20, RealmsScreen.getLocalizedString("mco.reset.world.adventure"), -1L, "realms:textures/gui/realms/adventure.png", ResetType.ADVENTURE) {
@Override
public void onPress() {
final RealmsSelectWorldTemplateScreen dah2 = new RealmsSelectWorldTemplateScreen(RealmsResetWorldScreen.this, RealmsServer.WorldType.ADVENTUREMAP, RealmsResetWorldScreen.this.adventuremaps);
dah2.setTitle(RealmsScreen.getLocalizedString("mco.reset.world.adventure"));
Realms.setScreen(dah2);
final RealmsSelectWorldTemplateScreen daj2 = new RealmsSelectWorldTemplateScreen(RealmsResetWorldScreen.this, RealmsServer.WorldType.ADVENTUREMAP, RealmsResetWorldScreen.this.adventuremaps);
daj2.setTitle(RealmsScreen.getLocalizedString("mco.reset.world.adventure"));
Realms.setScreen(daj2);
}
});
this.buttonsAdd(new FrameButton(this.frame(2), RealmsConstants.row(6) + 20, RealmsScreen.getLocalizedString("mco.reset.world.experience"), -1L, "realms:textures/gui/realms/experience.png", ResetType.EXPERIENCE) {
@Override
public void onPress() {
final RealmsSelectWorldTemplateScreen dah2 = new RealmsSelectWorldTemplateScreen(RealmsResetWorldScreen.this, RealmsServer.WorldType.EXPERIENCE, RealmsResetWorldScreen.this.experiences);
dah2.setTitle(RealmsScreen.getLocalizedString("mco.reset.world.experience"));
Realms.setScreen(dah2);
final RealmsSelectWorldTemplateScreen daj2 = new RealmsSelectWorldTemplateScreen(RealmsResetWorldScreen.this, RealmsServer.WorldType.EXPERIENCE, RealmsResetWorldScreen.this.experiences);
daj2.setTitle(RealmsScreen.getLocalizedString("mco.reset.world.experience"));
Realms.setScreen(daj2);
}
});
this.buttonsAdd(new FrameButton(this.frame(3), RealmsConstants.row(6) + 20, RealmsScreen.getLocalizedString("mco.reset.world.inspiration"), -1L, "realms:textures/gui/realms/inspiration.png", ResetType.INSPIRATION) {
@Override
public void onPress() {
final RealmsSelectWorldTemplateScreen dah2 = new RealmsSelectWorldTemplateScreen(RealmsResetWorldScreen.this, RealmsServer.WorldType.INSPIRATION, RealmsResetWorldScreen.this.inspirations);
dah2.setTitle(RealmsScreen.getLocalizedString("mco.reset.world.inspiration"));
Realms.setScreen(dah2);
final RealmsSelectWorldTemplateScreen daj2 = new RealmsSelectWorldTemplateScreen(RealmsResetWorldScreen.this, RealmsServer.WorldType.INSPIRATION, RealmsResetWorldScreen.this.inspirations);
daj2.setTitle(RealmsScreen.getLocalizedString("mco.reset.world.inspiration"));
Realms.setScreen(daj2);
}
});
this.narrateLabels();
@ -252,9 +252,9 @@ public class RealmsResetWorldScreen extends RealmsScreenWithCallback<WorldTempla
public void switchSlot(final RealmsScreen realmsScreen) {
final RealmsTasks.SwitchSlotTask i3 = new RealmsTasks.SwitchSlotTask(this.serverData.id, this.slot, realmsScreen, 100);
final RealmsLongRunningMcoTaskScreen czx4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, i3);
czx4.start();
Realms.setScreen(czx4);
final RealmsLongRunningMcoTaskScreen czz4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, i3);
czz4.start();
Realms.setScreen(czz4);
}
@Override
@ -298,9 +298,9 @@ public class RealmsResetWorldScreen extends RealmsScreenWithCallback<WorldTempla
if (this.confirmationId != -1) {
f3.setConfirmationId(this.confirmationId);
}
final RealmsLongRunningMcoTaskScreen czx4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, f3);
czx4.start();
Realms.setScreen(czx4);
final RealmsLongRunningMcoTaskScreen czz4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, f3);
czz4.start();
Realms.setScreen(czz4);
}
public void resetWorld(final ResetWorldInfo c) {
@ -322,9 +322,9 @@ public class RealmsResetWorldScreen extends RealmsScreenWithCallback<WorldTempla
if (this.confirmationId != -1) {
f3.setConfirmationId(this.confirmationId);
}
final RealmsLongRunningMcoTaskScreen czx4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, f3);
czx4.start();
Realms.setScreen(czx4);
final RealmsLongRunningMcoTaskScreen czz4 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, f3);
czz4.start();
Realms.setScreen(czz4);
}
static {

View File

@ -30,12 +30,12 @@ public class RealmsResourcePackScreen extends RealmsScreen {
else {
try {
final RealmsLongRunningMcoTaskScreen realmsLongRunningMcoTaskScreen;
final RealmsLongRunningMcoTaskScreen czx2;
final RealmsLongRunningMcoTaskScreen czz2;
Realms.downloadResourcePack(this.serverAddress.resourcePackUrl, this.serverAddress.resourcePackHash).thenRun(() -> {
new RealmsLongRunningMcoTaskScreen(this.lastScreen, new RealmsTasks.RealmsConnectTask(this.lastScreen, this.serverAddress));
czx2 = realmsLongRunningMcoTaskScreen;
czx2.start();
Realms.setScreen(czx2);
czz2 = realmsLongRunningMcoTaskScreen;
czz2.start();
Realms.setScreen(czz2);
}).exceptionally(throwable -> {
Realms.clearResourcePack();
RealmsResourcePackScreen.LOGGER.error(throwable);

View File

@ -41,12 +41,12 @@ public class RealmsSelectFileToUploadScreen extends RealmsScreen {
private RealmsLabel subtitleLabel;
private RealmsLabel noWorldsLabel;
public RealmsSelectFileToUploadScreen(final long long1, final int integer, final RealmsResetWorldScreen dad) {
public RealmsSelectFileToUploadScreen(final long long1, final int integer, final RealmsResetWorldScreen daf) {
this.DATE_FORMAT = new SimpleDateFormat();
this.levelList = Lists.newArrayList();
this.selectedWorld = -1;
this.gameModesLang = new String[4];
this.lastScreen = dad;
this.lastScreen = daf;
this.worldId = long1;
this.slotId = integer;
}

View File

@ -52,13 +52,13 @@ public class RealmsSelectWorldTemplateScreen extends RealmsScreen {
private boolean hoverWarning;
private List<TextRenderingUtils.Line> noTemplatesMessage;
public RealmsSelectWorldTemplateScreen(final RealmsScreenWithCallback<WorldTemplate> daf, final RealmsServer.WorldType c) {
this(daf, c, null);
public RealmsSelectWorldTemplateScreen(final RealmsScreenWithCallback<WorldTemplate> dah, final RealmsServer.WorldType c) {
this(dah, c, null);
}
public RealmsSelectWorldTemplateScreen(final RealmsScreenWithCallback<WorldTemplate> daf, final RealmsServer.WorldType c, @Nullable final WorldTemplatePaginatedList worldTemplatePaginatedList) {
public RealmsSelectWorldTemplateScreen(final RealmsScreenWithCallback<WorldTemplate> dah, final RealmsServer.WorldType c, @Nullable final WorldTemplatePaginatedList worldTemplatePaginatedList) {
this.selectedTemplate = -1;
this.lastScreen = daf;
this.lastScreen = dah;
this.worldType = c;
if (worldTemplatePaginatedList == null) {
this.worldTemplateObjectSelectionList = new WorldTemplateObjectSelectionList();
@ -206,9 +206,9 @@ public class RealmsSelectWorldTemplateScreen extends RealmsScreen {
@Override
public void run() {
WorldTemplatePaginatedList worldTemplatePaginatedList2 = worldTemplatePaginatedList;
final RealmsClient cyv3 = RealmsClient.createRealmsClient();
final RealmsClient cyy3 = RealmsClient.createRealmsClient();
while (worldTemplatePaginatedList2 != null) {
final Either<WorldTemplatePaginatedList, String> either4 = RealmsSelectWorldTemplateScreen.this.fetchTemplates(worldTemplatePaginatedList2, cyv3);
final Either<WorldTemplatePaginatedList, String> either4 = RealmsSelectWorldTemplateScreen.this.fetchTemplates(worldTemplatePaginatedList2, cyy3);
final Either either5;
WorldTemplatePaginatedList worldTemplatePaginatedList3;
final Iterator<WorldTemplate> iterator;
@ -251,12 +251,12 @@ public class RealmsSelectWorldTemplateScreen extends RealmsScreen {
}.start();
}
private Either<WorldTemplatePaginatedList, String> fetchTemplates(final WorldTemplatePaginatedList worldTemplatePaginatedList, final RealmsClient cyv) {
private Either<WorldTemplatePaginatedList, String> fetchTemplates(final WorldTemplatePaginatedList worldTemplatePaginatedList, final RealmsClient cyy) {
try {
return (Either<WorldTemplatePaginatedList, String>)Either.left(cyv.fetchWorldTemplates(worldTemplatePaginatedList.page + 1, worldTemplatePaginatedList.size, this.worldType));
return (Either<WorldTemplatePaginatedList, String>)Either.left(cyy.fetchWorldTemplates(worldTemplatePaginatedList.page + 1, worldTemplatePaginatedList.size, this.worldType));
}
catch (RealmsServiceException czd4) {
return (Either<WorldTemplatePaginatedList, String>)Either.right(czd4.getMessage());
catch (RealmsServiceException czg4) {
return (Either<WorldTemplatePaginatedList, String>)Either.right(czg4.getMessage());
}
}
@ -336,8 +336,8 @@ public class RealmsSelectWorldTemplateScreen extends RealmsScreen {
}
class WorldTemplateObjectSelectionList extends RealmsObjectSelectionList<WorldTemplateObjectSelectionListEntry> {
public WorldTemplateObjectSelectionList(final RealmsSelectWorldTemplateScreen dah) {
this(dah, Collections.emptyList());
public WorldTemplateObjectSelectionList(final RealmsSelectWorldTemplateScreen daj) {
this(daj, Collections.emptyList());
}
public WorldTemplateObjectSelectionList(final Iterable<WorldTemplate> iterable) {

View File

@ -20,8 +20,8 @@ public class RealmsSettingsScreen extends RealmsScreen {
private RealmsEditBox nameEdit;
private RealmsLabel titleLabel;
public RealmsSettingsScreen(final RealmsConfigureWorldScreen czp, final RealmsServer realmsServer) {
this.configureWorldScreen = czp;
public RealmsSettingsScreen(final RealmsConfigureWorldScreen czs, final RealmsServer realmsServer) {
this.configureWorldScreen = czs;
this.serverData = realmsServer;
}

View File

@ -43,8 +43,8 @@ public class RealmsSlotOptionsScreen extends RealmsScreen {
private RealmsLabel titleLabel;
private RealmsLabel warningLabel;
public RealmsSlotOptionsScreen(final RealmsConfigureWorldScreen czp, final RealmsWorldOptions realmsWorldOptions, final RealmsServer.WorldType c, final int integer) {
this.parent = czp;
public RealmsSlotOptionsScreen(final RealmsConfigureWorldScreen czs, final RealmsWorldOptions realmsWorldOptions, final RealmsServer.WorldType c, final int integer) {
this.parent = czs;
this.options = realmsWorldOptions;
this.worldType = c;
this.activeSlot = integer;

View File

@ -79,16 +79,16 @@ public class RealmsSubscriptionInfoScreen extends RealmsScreen {
}
private void getSubscription(final long long1) {
final RealmsClient cyv4 = RealmsClient.createRealmsClient();
final RealmsClient cyy4 = RealmsClient.createRealmsClient();
try {
final Subscription subscription5 = cyv4.subscriptionFor(long1);
final Subscription subscription5 = cyy4.subscriptionFor(long1);
this.daysLeft = subscription5.daysLeft;
this.startDate = this.localPresentation(subscription5.startDate);
this.type = subscription5.type;
}
catch (RealmsServiceException czd5) {
catch (RealmsServiceException czg5) {
RealmsSubscriptionInfoScreen.LOGGER.error("Couldn't get subscription");
Realms.setScreen(new RealmsGenericErrorScreen(czd5, this.lastScreen));
Realms.setScreen(new RealmsGenericErrorScreen(czg5, this.lastScreen));
}
catch (IOException iOException5) {
RealmsSubscriptionInfoScreen.LOGGER.error("Couldn't parse response subscribing");
@ -102,12 +102,12 @@ public class RealmsSubscriptionInfoScreen extends RealmsScreen {
@Override
public void run() {
try {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
cyv2.deleteWorld(RealmsSubscriptionInfoScreen.this.serverData.id);
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
cyy2.deleteWorld(RealmsSubscriptionInfoScreen.this.serverData.id);
}
catch (RealmsServiceException czd2) {
catch (RealmsServiceException czg2) {
RealmsSubscriptionInfoScreen.LOGGER.error("Couldn't delete world");
RealmsSubscriptionInfoScreen.LOGGER.error(czd2);
RealmsSubscriptionInfoScreen.LOGGER.error(czg2);
}
catch (IOException iOException2) {
RealmsSubscriptionInfoScreen.LOGGER.error("Couldn't delete world");

View File

@ -25,9 +25,9 @@ public class RealmsTermsScreen extends RealmsScreen {
private boolean onLink;
private final String realmsToSUrl = "https://minecraft.net/realms/terms";
public RealmsTermsScreen(final RealmsScreen realmsScreen, final RealmsMainScreen cyr, final RealmsServer realmsServer) {
public RealmsTermsScreen(final RealmsScreen realmsScreen, final RealmsMainScreen cyu, final RealmsServer realmsServer) {
this.lastScreen = realmsScreen;
this.mainScreen = cyr;
this.mainScreen = cyu;
this.realmsServer = realmsServer;
}
@ -66,14 +66,14 @@ public class RealmsTermsScreen extends RealmsScreen {
}
private void agreedToTos() {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
try {
cyv2.agreeToTos();
final RealmsLongRunningMcoTaskScreen czx3 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, new RealmsTasks.RealmsGetServerDetailsTask(this.mainScreen, this.lastScreen, this.realmsServer, new ReentrantLock()));
czx3.start();
Realms.setScreen(czx3);
cyy2.agreeToTos();
final RealmsLongRunningMcoTaskScreen czz3 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, new RealmsTasks.RealmsGetServerDetailsTask(this.mainScreen, this.lastScreen, this.realmsServer, new ReentrantLock()));
czz3.start();
Realms.setScreen(czz3);
}
catch (RealmsServiceException czd3) {
catch (RealmsServiceException czg3) {
RealmsTermsScreen.LOGGER.error("Couldn't agree to TOS");
}
}

View File

@ -60,11 +60,11 @@ public class RealmsUploadScreen extends RealmsScreen {
private long bytesPersSecond;
private static final ReentrantLock uploadLock;
public RealmsUploadScreen(final long long1, final int integer, final RealmsResetWorldScreen dad, final RealmsLevelSummary realmsLevelSummary) {
public RealmsUploadScreen(final long long1, final int integer, final RealmsResetWorldScreen daf, final RealmsLevelSummary realmsLevelSummary) {
this.showDots = true;
this.worldId = long1;
this.slotId = integer;
this.lastScreen = dad;
this.lastScreen = daf;
this.selectedLevel = realmsLevelSummary;
this.uploadStatus = new UploadStatus();
this.narrationRateLimiter = RateLimiter.create(0.10000000149011612);
@ -269,7 +269,7 @@ public class RealmsUploadScreen extends RealmsScreen {
private void upload() {
this.uploadStarted = true;
File file2;
final RealmsClient cyv3;
final RealmsClient cyy3;
final long long4;
UploadInfo uploadInfo6;
int integer7;
@ -278,11 +278,11 @@ public class RealmsUploadScreen extends RealmsScreen {
Unit a10;
Unit a11;
Unit a12;
FileUpload cyt8;
FileUpload cyw8;
final long long6;
new Thread(() -> {
file2 = null;
cyv3 = RealmsClient.createRealmsClient();
cyy3 = RealmsClient.createRealmsClient();
long4 = this.worldId;
try {
if (!(!RealmsUploadScreen.uploadLock.tryLock(1L, TimeUnit.SECONDS))) {
@ -296,11 +296,11 @@ public class RealmsUploadScreen extends RealmsScreen {
return;
}
else {
uploadInfo6 = cyv3.upload(long4, UploadTokenCache.get(long4));
uploadInfo6 = cyy3.upload(long4, UploadTokenCache.get(long4));
}
}
catch (RetryCallException cze8) {
Thread.sleep(cze8.delaySeconds * 1000);
catch (RetryCallException czh8) {
Thread.sleep(czh8.delaySeconds * 1000);
++integer7;
continue;
}
@ -337,25 +337,25 @@ public class RealmsUploadScreen extends RealmsScreen {
}
else {
this.status = RealmsScreen.getLocalizedString("mco.upload.uploading", this.selectedLevel.getLevelName());
cyt8 = new FileUpload(file2, this.worldId, this.slotId, uploadInfo6, Realms.getSessionId(), Realms.getName(), Realms.getMinecraftVersionString(), this.uploadStatus);
cyt8.upload(dan -> {
if (dan.statusCode >= 200 && dan.statusCode < 300) {
cyw8 = new FileUpload(file2, this.worldId, this.slotId, uploadInfo6, Realms.getSessionId(), Realms.getName(), Realms.getMinecraftVersionString(), this.uploadStatus);
cyw8.upload(dap -> {
if (dap.statusCode >= 200 && dap.statusCode < 300) {
this.uploadFinished = true;
this.status = RealmsScreen.getLocalizedString("mco.upload.done");
this.backButton.setMessage(RealmsScreen.getLocalizedString("gui.done"));
UploadTokenCache.invalidate(long6);
}
else if (dan.statusCode == 400 && dan.errorMessage != null) {
this.errorMessage = RealmsScreen.getLocalizedString("mco.upload.failed", dan.errorMessage);
else if (dap.statusCode == 400 && dap.errorMessage != null) {
this.errorMessage = RealmsScreen.getLocalizedString("mco.upload.failed", dap.errorMessage);
}
else {
this.errorMessage = RealmsScreen.getLocalizedString("mco.upload.failed", dan.statusCode);
this.errorMessage = RealmsScreen.getLocalizedString("mco.upload.failed", dap.statusCode);
}
return;
});
while (!cyt8.isFinished()) {
while (!cyw8.isFinished()) {
if (this.cancelled) {
cyt8.cancel();
cyw8.cancel();
this.uploadCancelled();
}
else {
@ -375,8 +375,8 @@ public class RealmsUploadScreen extends RealmsScreen {
catch (IOException iOException6) {
this.errorMessage = RealmsScreen.getLocalizedString("mco.upload.failed", iOException6.getMessage());
}
catch (RealmsServiceException czd6) {
this.errorMessage = RealmsScreen.getLocalizedString("mco.upload.failed", czd6.toString());
catch (RealmsServiceException czg6) {
this.errorMessage = RealmsScreen.getLocalizedString("mco.upload.failed", czg6.toString());
}
catch (InterruptedException interruptedException10) {
RealmsUploadScreen.LOGGER.error("Could not acquire upload lock");

View File

@ -3,7 +3,6 @@ package com.mojang.realmsclient.util;
import com.mojang.realmsclient.dto.WorldDownload;
import com.mojang.realmsclient.gui.screens.RealmsDownloadLatestWorldScreen;
import com.mojang.realmsclient.dto.Backup;
import com.mojang.realmsclient.gui.screens.RealmsResetWorldScreen;
import java.io.UnsupportedEncodingException;
import net.minecraft.realms.RealmsConnect;
import com.mojang.realmsclient.dto.RealmsServerAddress;
@ -61,13 +60,13 @@ public class RealmsTasks {
@Override
public void run() {
this.setTitle(RealmsScreen.getLocalizedString("mco.configure.world.opening"));
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
for (int integer3 = 0; integer3 < 25; ++integer3) {
if (this.aborted()) {
return;
}
try {
final boolean boolean4 = cyv2.open(this.serverData.id);
final boolean boolean4 = cyy2.open(this.serverData.id);
if (boolean4) {
if (this.returnScreen instanceof RealmsConfigureWorldScreen) {
((RealmsConfigureWorldScreen)this.returnScreen).stateChanged();
@ -81,11 +80,11 @@ public class RealmsTasks {
break;
}
}
catch (RetryCallException cze4) {
catch (RetryCallException czh4) {
if (this.aborted()) {
return;
}
pause(cze4.delaySeconds);
pause(czh4.delaySeconds);
}
catch (Exception exception4) {
if (this.aborted()) {
@ -102,21 +101,21 @@ public class RealmsTasks {
private final RealmsServer serverData;
private final RealmsConfigureWorldScreen configureScreen;
public CloseServerTask(final RealmsServer realmsServer, final RealmsConfigureWorldScreen czp) {
public CloseServerTask(final RealmsServer realmsServer, final RealmsConfigureWorldScreen czs) {
this.serverData = realmsServer;
this.configureScreen = czp;
this.configureScreen = czs;
}
@Override
public void run() {
this.setTitle(RealmsScreen.getLocalizedString("mco.configure.world.closing"));
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
for (int integer3 = 0; integer3 < 25; ++integer3) {
if (this.aborted()) {
return;
}
try {
final boolean boolean4 = cyv2.close(this.serverData.id);
final boolean boolean4 = cyy2.close(this.serverData.id);
if (boolean4) {
this.configureScreen.stateChanged();
this.serverData.state = RealmsServer.State.CLOSED;
@ -124,11 +123,11 @@ public class RealmsTasks {
break;
}
}
catch (RetryCallException cze4) {
catch (RetryCallException czh4) {
if (this.aborted()) {
return;
}
pause(cze4.delaySeconds);
pause(czh4.delaySeconds);
}
catch (Exception exception4) {
if (this.aborted()) {
@ -156,7 +155,7 @@ public class RealmsTasks {
@Override
public void run() {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
final String string3 = RealmsScreen.getLocalizedString("mco.minigame.world.slot.screen.title");
this.setTitle(string3);
for (int integer4 = 0; integer4 < 25; ++integer4) {
@ -164,16 +163,16 @@ public class RealmsTasks {
if (this.aborted()) {
return;
}
if (cyv2.switchSlot(this.worldId, this.slot)) {
if (cyy2.switchSlot(this.worldId, this.slot)) {
this.listener.confirmResult(true, this.confirmId);
break;
}
}
catch (RetryCallException cze5) {
catch (RetryCallException czh5) {
if (this.aborted()) {
return;
}
pause(cze5.delaySeconds);
pause(czh5.delaySeconds);
}
catch (Exception exception5) {
if (this.aborted()) {
@ -191,15 +190,15 @@ public class RealmsTasks {
private final WorldTemplate worldTemplate;
private final RealmsConfigureWorldScreen lastScreen;
public SwitchMinigameTask(final long long1, final WorldTemplate worldTemplate, final RealmsConfigureWorldScreen czp) {
public SwitchMinigameTask(final long long1, final WorldTemplate worldTemplate, final RealmsConfigureWorldScreen czs) {
this.worldId = long1;
this.worldTemplate = worldTemplate;
this.lastScreen = czp;
this.lastScreen = czs;
}
@Override
public void run() {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
final String string3 = RealmsScreen.getLocalizedString("mco.minigame.world.starting.screen.title");
this.setTitle(string3);
for (int integer4 = 0; integer4 < 25; ++integer4) {
@ -207,16 +206,16 @@ public class RealmsTasks {
if (this.aborted()) {
return;
}
if (cyv2.putIntoMinigameMode(this.worldId, this.worldTemplate.id)) {
if (cyy2.putIntoMinigameMode(this.worldId, this.worldTemplate.id)) {
Realms.setScreen(this.lastScreen);
break;
}
}
catch (RetryCallException cze5) {
catch (RetryCallException czh5) {
if (this.aborted()) {
return;
}
pause(cze5.delaySeconds);
pause(czh5.delaySeconds);
}
catch (Exception exception5) {
if (this.aborted()) {
@ -271,7 +270,7 @@ public class RealmsTasks {
@Override
public void run() {
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
this.setTitle(this.title);
for (int integer3 = 0; integer3 < 25; ++integer3) {
try {
@ -279,10 +278,10 @@ public class RealmsTasks {
return;
}
if (this.worldTemplate != null) {
cyv2.resetWorldWithTemplate(this.serverId, this.worldTemplate.id);
cyy2.resetWorldWithTemplate(this.serverId, this.worldTemplate.id);
}
else {
cyv2.resetWorldWithSeed(this.serverId, this.seed, this.levelType, this.generateStructures);
cyy2.resetWorldWithSeed(this.serverId, this.seed, this.levelType, this.generateStructures);
}
if (this.aborted()) {
return;
@ -295,11 +294,11 @@ public class RealmsTasks {
}
return;
}
catch (RetryCallException cze4) {
catch (RetryCallException czh4) {
if (this.aborted()) {
return;
}
pause(cze4.delaySeconds);
pause(czh4.delaySeconds);
}
catch (Exception exception4) {
if (this.aborted()) {
@ -319,9 +318,9 @@ public class RealmsTasks {
private final RealmsMainScreen mainScreen;
private final ReentrantLock connectLock;
public RealmsGetServerDetailsTask(final RealmsMainScreen cyr, final RealmsScreen realmsScreen, final RealmsServer realmsServer, final ReentrantLock reentrantLock) {
public RealmsGetServerDetailsTask(final RealmsMainScreen cyu, final RealmsScreen realmsScreen, final RealmsServer realmsServer, final ReentrantLock reentrantLock) {
this.lastScreen = realmsScreen;
this.mainScreen = cyr;
this.mainScreen = cyu;
this.server = realmsServer;
this.connectLock = reentrantLock;
}
@ -329,7 +328,7 @@ public class RealmsTasks {
@Override
public void run() {
this.setTitle(RealmsScreen.getLocalizedString("mco.connect.connecting"));
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
boolean boolean3 = false;
boolean boolean4 = false;
int integer5 = 5;
@ -341,24 +340,24 @@ public class RealmsTasks {
break;
}
try {
realmsServerAddress6 = cyv2.join(this.server.id);
realmsServerAddress6 = cyy2.join(this.server.id);
boolean3 = true;
}
catch (RetryCallException cze10) {
integer5 = cze10.delaySeconds;
catch (RetryCallException czh10) {
integer5 = czh10.delaySeconds;
}
catch (RealmsServiceException czd10) {
if (czd10.errorCode == 6002) {
catch (RealmsServiceException czg10) {
if (czg10.errorCode == 6002) {
boolean5 = true;
break;
}
if (czd10.errorCode == 6006) {
if (czg10.errorCode == 6006) {
boolean6 = true;
break;
}
boolean4 = true;
this.error(czd10.toString());
RealmsTasks.LOGGER.error("Couldn't connect to world", (Throwable)czd10);
this.error(czg10.toString());
RealmsTasks.LOGGER.error("Couldn't connect to world", (Throwable)czg10);
break;
}
catch (IOException iOException10) {
@ -380,11 +379,11 @@ public class RealmsTasks {
}
else if (boolean6) {
if (this.server.ownerUUID.equals(Realms.getUUID())) {
final RealmsBrokenWorldScreen czn9 = new RealmsBrokenWorldScreen(this.lastScreen, this.mainScreen, this.server.id);
final RealmsBrokenWorldScreen czq9 = new RealmsBrokenWorldScreen(this.lastScreen, this.mainScreen, this.server.id);
if (this.server.worldType.equals(RealmsServer.WorldType.MINIGAME)) {
czn9.setTitle(RealmsScreen.getLocalizedString("mco.brokenworld.minigame.title"));
czq9.setTitle(RealmsScreen.getLocalizedString("mco.brokenworld.minigame.title"));
}
Realms.setScreen(czn9);
Realms.setScreen(czq9);
}
else {
Realms.setScreen(new RealmsGenericErrorScreen(RealmsScreen.getLocalizedString("mco.brokenworld.nonowner.title"), RealmsScreen.getLocalizedString("mco.brokenworld.nonowner.error"), this.lastScreen));
@ -398,9 +397,9 @@ public class RealmsTasks {
Realms.setScreen(new RealmsLongConfirmationScreen(new RealmsResourcePackScreen(this.lastScreen, realmsServerAddress6, this.connectLock), RealmsLongConfirmationScreen.Type.Info, string9, string10, true, 100));
}
else {
final RealmsLongRunningMcoTaskScreen czx9 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, new RealmsConnectTask(this.lastScreen, realmsServerAddress6));
czx9.start();
Realms.setScreen(czx9);
final RealmsLongRunningMcoTaskScreen czz9 = new RealmsLongRunningMcoTaskScreen(this.lastScreen, new RealmsConnectTask(this.lastScreen, realmsServerAddress6));
czz9.start();
Realms.setScreen(czz9);
}
}
else {
@ -464,14 +463,14 @@ public class RealmsTasks {
public void run() {
final String string2 = RealmsScreen.getLocalizedString("mco.create.world.wait");
this.setTitle(string2);
final RealmsClient cyv3 = RealmsClient.createRealmsClient();
final RealmsClient cyy3 = RealmsClient.createRealmsClient();
try {
cyv3.initializeWorld(this.worldId, this.name, this.motd);
cyy3.initializeWorld(this.worldId, this.name, this.motd);
Realms.setScreen(this.lastScreen);
}
catch (RealmsServiceException czd4) {
catch (RealmsServiceException czg4) {
RealmsTasks.LOGGER.error("Couldn't create world");
this.error(czd4.toString());
this.error(czg4.toString());
}
catch (UnsupportedEncodingException unsupportedEncodingException4) {
RealmsTasks.LOGGER.error("Couldn't create world");
@ -488,75 +487,27 @@ public class RealmsTasks {
}
}
public static class TrialCreationTask extends LongRunningTask {
private final String name;
private final String motd;
private final RealmsMainScreen lastScreen;
public TrialCreationTask(final String string1, final String string2, final RealmsMainScreen cyr) {
this.name = string1;
this.motd = string2;
this.lastScreen = cyr;
}
@Override
public void run() {
final String string2 = RealmsScreen.getLocalizedString("mco.create.world.wait");
this.setTitle(string2);
final RealmsClient cyv3 = RealmsClient.createRealmsClient();
try {
final RealmsServer realmsServer4 = cyv3.createTrial(this.name, this.motd);
if (realmsServer4 != null) {
this.lastScreen.setCreatedTrial(true);
this.lastScreen.closePopup();
final RealmsResetWorldScreen dad5 = new RealmsResetWorldScreen(this.lastScreen, realmsServer4, this.lastScreen.newScreen(), RealmsScreen.getLocalizedString("mco.selectServer.create"), RealmsScreen.getLocalizedString("mco.create.world.subtitle"), 10526880, RealmsScreen.getLocalizedString("mco.create.world.skip"));
dad5.setResetTitle(RealmsScreen.getLocalizedString("mco.create.world.reset.title"));
Realms.setScreen(dad5);
}
else {
this.error(RealmsScreen.getLocalizedString("mco.trial.unavailable"));
}
}
catch (RealmsServiceException czd4) {
RealmsTasks.LOGGER.error("Couldn't create trial");
this.error(czd4.toString());
}
catch (UnsupportedEncodingException unsupportedEncodingException4) {
RealmsTasks.LOGGER.error("Couldn't create trial");
this.error(unsupportedEncodingException4.getLocalizedMessage());
}
catch (IOException iOException4) {
RealmsTasks.LOGGER.error("Could not parse response creating trial");
this.error(iOException4.getLocalizedMessage());
}
catch (Exception exception4) {
RealmsTasks.LOGGER.error("Could not create trial");
this.error(exception4.getLocalizedMessage());
}
}
}
public static class RestoreTask extends LongRunningTask {
private final Backup backup;
private final long worldId;
private final RealmsConfigureWorldScreen lastScreen;
public RestoreTask(final Backup backup, final long long2, final RealmsConfigureWorldScreen czp) {
public RestoreTask(final Backup backup, final long long2, final RealmsConfigureWorldScreen czs) {
this.backup = backup;
this.worldId = long2;
this.lastScreen = czp;
this.lastScreen = czs;
}
@Override
public void run() {
this.setTitle(RealmsScreen.getLocalizedString("mco.backup.restoring"));
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
for (int integer3 = 0; integer3 < 25; ++integer3) {
try {
if (this.aborted()) {
return;
}
cyv2.restoreWorld(this.worldId, this.backup.backupId);
cyy2.restoreWorld(this.worldId, this.backup.backupId);
pause(1);
if (this.aborted()) {
return;
@ -564,18 +515,18 @@ public class RealmsTasks {
Realms.setScreen(this.lastScreen.getNewScreen());
return;
}
catch (RetryCallException cze4) {
catch (RetryCallException czh4) {
if (this.aborted()) {
return;
}
pause(cze4.delaySeconds);
pause(czh4.delaySeconds);
}
catch (RealmsServiceException czd4) {
catch (RealmsServiceException czg4) {
if (this.aborted()) {
return;
}
RealmsTasks.LOGGER.error("Couldn't restore backup", (Throwable)czd4);
Realms.setScreen(new RealmsGenericErrorScreen(czd4, this.lastScreen));
RealmsTasks.LOGGER.error("Couldn't restore backup", (Throwable)czg4);
Realms.setScreen(new RealmsGenericErrorScreen(czg4, this.lastScreen));
return;
}
catch (Exception exception4) {
@ -606,13 +557,13 @@ public class RealmsTasks {
@Override
public void run() {
this.setTitle(RealmsScreen.getLocalizedString("mco.download.preparing"));
final RealmsClient cyv2 = RealmsClient.createRealmsClient();
final RealmsClient cyy2 = RealmsClient.createRealmsClient();
for (int integer3 = 0; integer3 < 25; ++integer3) {
try {
if (this.aborted()) {
return;
}
final WorldDownload worldDownload4 = cyv2.download(this.worldId, this.slot);
final WorldDownload worldDownload4 = cyy2.download(this.worldId, this.slot);
pause(1);
if (this.aborted()) {
return;
@ -620,18 +571,18 @@ public class RealmsTasks {
Realms.setScreen(new RealmsDownloadLatestWorldScreen(this.lastScreen, worldDownload4, this.downloadName));
return;
}
catch (RetryCallException cze4) {
catch (RetryCallException czh4) {
if (this.aborted()) {
return;
}
pause(cze4.delaySeconds);
pause(czh4.delaySeconds);
}
catch (RealmsServiceException czd4) {
catch (RealmsServiceException czg4) {
if (this.aborted()) {
return;
}
RealmsTasks.LOGGER.error("Couldn't download world data");
Realms.setScreen(new RealmsGenericErrorScreen(czd4, this.lastScreen));
Realms.setScreen(new RealmsGenericErrorScreen(czg4, this.lastScreen));
return;
}
catch (Exception exception4) {

View File

@ -9,10 +9,9 @@ import java.io.IOException;
import java.nio.ByteOrder;
import java.nio.ByteBuffer;
import java.io.ByteArrayInputStream;
import org.apache.commons.codec.binary.Base64;
import com.mojang.blaze3d.platform.GlStateManager;
import java.awt.image.BufferedImage;
import javax.xml.bind.DatatypeConverter;
import org.apache.commons.codec.binary.Base64;
import java.io.OutputStream;
import java.awt.image.RenderedImage;
import java.io.ByteArrayOutputStream;
@ -112,7 +111,7 @@ public class RealmsTextureManager {
bufferedImage6 = new SkinProcessor().process(bufferedImage6);
final ByteArrayOutputStream byteArrayOutputStream7 = new ByteArrayOutputStream();
ImageIO.write(bufferedImage6, "png", byteArrayOutputStream7);
RealmsTextureManager.fetchedSkins.put(string, DatatypeConverter.printBase64Binary(byteArrayOutputStream7.toByteArray()));
RealmsTextureManager.fetchedSkins.put(string, new Base64().encodeToString(byteArrayOutputStream7.toByteArray()));
RealmsTextureManager.skinFetchStatus.put(string, true);
}
catch (Exception exception6) {

View File

@ -243,6 +243,10 @@ public class CrashReport {
return h3;
}
public static void preload() {
new CrashReport("Don't panic!", new Throwable()).getFriendlyReport();
}
static {
LOGGER = LogManager.getLogger();
}

View File

@ -147,9 +147,9 @@ public class CrashReportCategory {
return this.stackTrace;
}
public static void populateBlockDetails(final CrashReportCategory i, final BlockPos fk, @Nullable final BlockState byg) {
if (byg != null) {
i.setDetail("Block", byg::toString);
public static void populateBlockDetails(final CrashReportCategory i, final BlockPos fk, @Nullable final BlockState byj) {
if (byj != null) {
i.setDetail("Block", byj::toString);
}
i.setDetail("Block location", () -> formatLocation(fk));
}

View File

@ -27,13 +27,13 @@ public class DetectedVersion implements GameVersion {
public DetectedVersion() {
this.id = UUID.randomUUID().toString().replaceAll("-", "");
this.name = "1.15.1";
this.name = "1.15.2";
this.stable = true;
this.worldVersion = 2227;
this.protocolVersion = 575;
this.worldVersion = 2230;
this.protocolVersion = 578;
this.packVersion = 5;
this.buildTime = new Date();
this.releaseTarget = "1.15.1";
this.releaseTarget = "1.15.2";
}
protected DetectedVersion(final JsonObject jsonObject) {

View File

@ -58,8 +58,8 @@ public class Util {
return Collectors.<Map.Entry<? extends K, ? extends V>, K, V>toMap(Map.Entry::getKey, Map.Entry::getValue);
}
public static <T extends Comparable<T>> String getPropertyName(final Property<T> bzj, final Object object) {
return bzj.getName((T)object);
public static <T extends Comparable<T>> String getPropertyName(final Property<T> bzm, final Object object) {
return bzm.getName((T)object);
}
public static String makeDescriptionId(final String string, @Nullable final ResourceLocation sm) {

View File

@ -169,12 +169,12 @@ public class Advancement {
return this;
}
public Builder display(final ItemStack bek, final Component lf2, final Component lf3, @Nullable final ResourceLocation sm, final FrameType ae, final boolean boolean6, final boolean boolean7, final boolean boolean8) {
return this.display(new DisplayInfo(bek, lf2, lf3, sm, ae, boolean6, boolean7, boolean8));
public Builder display(final ItemStack ben, final Component lf2, final Component lf3, @Nullable final ResourceLocation sm, final FrameType ae, final boolean boolean6, final boolean boolean7, final boolean boolean8) {
return this.display(new DisplayInfo(ben, lf2, lf3, sm, ae, boolean6, boolean7, boolean8));
}
public Builder display(final ItemLike bjs, final Component lf2, final Component lf3, @Nullable final ResourceLocation sm, final FrameType ae, final boolean boolean6, final boolean boolean7, final boolean boolean8) {
return this.display(new DisplayInfo(new ItemStack(bjs.asItem()), lf2, lf3, sm, ae, boolean6, boolean7, boolean8));
public Builder display(final ItemLike bjv, final Component lf2, final Component lf3, @Nullable final ResourceLocation sm, final FrameType ae, final boolean boolean6, final boolean boolean7, final boolean boolean8) {
return this.display(new DisplayInfo(new ItemStack(bjv.asItem()), lf2, lf3, sm, ae, boolean6, boolean7, boolean8));
}
public Builder display(final DisplayInfo ad) {

View File

@ -45,21 +45,21 @@ public class AdvancementRewards {
public void grant(final ServerPlayer xe) {
xe.giveExperiencePoints(this.experience);
final LootContext cru3 = new LootContext.Builder(xe.getLevel()).<Entity>withParameter(LootContextParams.THIS_ENTITY, xe).<BlockPos>withParameter(LootContextParams.BLOCK_POS, new BlockPos(xe)).withRandom(xe.getRandom()).create(LootContextParamSets.ADVANCEMENT_REWARD);
final LootContext crx3 = new LootContext.Builder(xe.getLevel()).<Entity>withParameter(LootContextParams.THIS_ENTITY, xe).<BlockPos>withParameter(LootContextParams.BLOCK_POS, new BlockPos(xe)).withRandom(xe.getRandom()).create(LootContextParamSets.ADVANCEMENT_REWARD);
boolean boolean4 = false;
for (final ResourceLocation sm8 : this.loot) {
for (final ItemStack bek10 : xe.server.getLootTables().get(sm8).getRandomItems(cru3)) {
if (xe.addItem(bek10)) {
for (final ItemStack ben10 : xe.server.getLootTables().get(sm8).getRandomItems(crx3)) {
if (xe.addItem(ben10)) {
xe.level.playSound(null, xe.getX(), xe.getY(), xe.getZ(), SoundEvents.ITEM_PICKUP, SoundSource.PLAYERS, 0.2f, ((xe.getRandom().nextFloat() - xe.getRandom().nextFloat()) * 0.7f + 1.0f) * 2.0f);
boolean4 = true;
}
else {
final ItemEntity avy11 = xe.drop(bek10, false);
if (avy11 == null) {
final ItemEntity awb11 = xe.drop(ben10, false);
if (awb11 == null) {
continue;
}
avy11.setNoPickUpDelay();
avy11.setOwner(xe.getUUID());
awb11.setNoPickUpDelay();
awb11.setOwner(xe.getUUID());
}
}
}

View File

@ -30,10 +30,10 @@ public class DisplayInfo {
private float x;
private float y;
public DisplayInfo(final ItemStack bek, final Component lf2, final Component lf3, @Nullable final ResourceLocation sm, final FrameType ae, final boolean boolean6, final boolean boolean7, final boolean boolean8) {
public DisplayInfo(final ItemStack ben, final Component lf2, final Component lf3, @Nullable final ResourceLocation sm, final FrameType ae, final boolean boolean6, final boolean boolean7, final boolean boolean8) {
this.title = lf2;
this.description = lf3;
this.icon = bek;
this.icon = ben;
this.background = sm;
this.frame = ae;
this.showToast = boolean6;
@ -93,34 +93,34 @@ public class DisplayInfo {
if (lf3 == null || lf4 == null) {
throw new JsonSyntaxException("Both title and description must be set");
}
final ItemStack bek5 = getIcon(GsonHelper.getAsJsonObject(jsonObject, "icon"));
final ItemStack ben5 = getIcon(GsonHelper.getAsJsonObject(jsonObject, "icon"));
final ResourceLocation sm6 = jsonObject.has("background") ? new ResourceLocation(GsonHelper.getAsString(jsonObject, "background")) : null;
final FrameType ae7 = jsonObject.has("frame") ? FrameType.byName(GsonHelper.getAsString(jsonObject, "frame")) : FrameType.TASK;
final boolean boolean8 = GsonHelper.getAsBoolean(jsonObject, "show_toast", true);
final boolean boolean9 = GsonHelper.getAsBoolean(jsonObject, "announce_to_chat", true);
final boolean boolean10 = GsonHelper.getAsBoolean(jsonObject, "hidden", false);
return new DisplayInfo(bek5, lf3, lf4, sm6, ae7, boolean8, boolean9, boolean10);
return new DisplayInfo(ben5, lf3, lf4, sm6, ae7, boolean8, boolean9, boolean10);
}
private static ItemStack getIcon(final JsonObject jsonObject) {
if (!jsonObject.has("item")) {
throw new JsonSyntaxException("Unsupported icon type, currently only items are supported (add 'item' key)");
}
final Item bef2 = GsonHelper.getAsItem(jsonObject, "item");
final Item bei2 = GsonHelper.getAsItem(jsonObject, "item");
if (jsonObject.has("data")) {
throw new JsonParseException("Disallowed data tag found");
}
final ItemStack bek3 = new ItemStack(bef2);
final ItemStack ben3 = new ItemStack(bei2);
if (jsonObject.has("nbt")) {
try {
final CompoundTag jt4 = TagParser.parseTag(GsonHelper.convertToString(jsonObject.get("nbt"), "nbt"));
bek3.setTag(jt4);
ben3.setTag(jt4);
}
catch (CommandSyntaxException commandSyntaxException4) {
throw new JsonSyntaxException("Invalid nbt tag: " + commandSyntaxException4.getMessage());
}
}
return bek3;
return ben3;
}
public void serializeToNetwork(final FriendlyByteBuf kv) {
@ -149,13 +149,13 @@ public class DisplayInfo {
public static DisplayInfo fromNetwork(final FriendlyByteBuf kv) {
final Component lf2 = kv.readComponent();
final Component lf3 = kv.readComponent();
final ItemStack bek4 = kv.readItem();
final ItemStack ben4 = kv.readItem();
final FrameType ae5 = kv.<FrameType>readEnum(FrameType.class);
final int integer6 = kv.readInt();
final ResourceLocation sm7 = ((integer6 & 0x1) != 0x0) ? kv.readResourceLocation() : null;
final boolean boolean8 = (integer6 & 0x2) != 0x0;
final boolean boolean9 = (integer6 & 0x4) != 0x0;
final DisplayInfo ad10 = new DisplayInfo(bek4, lf2, lf3, sm7, ae5, boolean8, false, boolean9);
final DisplayInfo ad10 = new DisplayInfo(ben4, lf2, lf3, sm7, ae5, boolean8, false, boolean9);
ad10.setLocation(kv.readFloat(), kv.readFloat());
return ad10;
}

View File

@ -23,10 +23,10 @@ public class BeeNestDestroyedTrigger extends SimpleCriterionTrigger<TriggerInsta
@Override
public TriggerInstance createInstance(final JsonObject jsonObject, final JsonDeserializationContext jsonDeserializationContext) {
final Block bpe4 = deserializeBlock(jsonObject);
final Block bph4 = deserializeBlock(jsonObject);
final ItemPredicate bj5 = ItemPredicate.fromJson(jsonObject.get("item"));
final MinMaxBounds.Ints d6 = MinMaxBounds.Ints.fromJson(jsonObject.get("num_bees_inside"));
return new TriggerInstance(bpe4, bj5, d6);
return new TriggerInstance(bph4, bj5, d6);
}
@Nullable
@ -43,8 +43,8 @@ public class BeeNestDestroyedTrigger extends SimpleCriterionTrigger<TriggerInsta
return null;
}
public void trigger(final ServerPlayer xe, final Block bpe, final ItemStack bek, final int integer) {
this.trigger(xe.getAdvancements(), a -> a.matches(bpe, bek, integer));
public void trigger(final ServerPlayer xe, final Block bph, final ItemStack ben, final int integer) {
this.trigger(xe.getAdvancements(), a -> a.matches(bph, ben, integer));
}
static {
@ -56,19 +56,19 @@ public class BeeNestDestroyedTrigger extends SimpleCriterionTrigger<TriggerInsta
private final ItemPredicate item;
private final MinMaxBounds.Ints numBees;
public TriggerInstance(final Block bpe, final ItemPredicate bj, final MinMaxBounds.Ints d) {
public TriggerInstance(final Block bph, final ItemPredicate bj, final MinMaxBounds.Ints d) {
super(BeeNestDestroyedTrigger.ID);
this.block = bpe;
this.block = bph;
this.item = bj;
this.numBees = d;
}
public static TriggerInstance destroyedBeeNest(final Block bpe, final ItemPredicate.Builder a, final MinMaxBounds.Ints d) {
return new TriggerInstance(bpe, a.build(), d);
public static TriggerInstance destroyedBeeNest(final Block bph, final ItemPredicate.Builder a, final MinMaxBounds.Ints d) {
return new TriggerInstance(bph, a.build(), d);
}
public boolean matches(final Block bpe, final ItemStack bek, final int integer) {
return (this.block == null || bpe == this.block) && this.item.matches(bek) && this.numBees.matches(integer);
public boolean matches(final Block bph, final ItemStack ben, final int integer) {
return (this.block == null || bph == this.block) && this.item.matches(ben) && this.numBees.matches(integer);
}
@Override

View File

@ -26,9 +26,9 @@ public class BlockPredicate {
private final StatePropertiesPredicate properties;
private final NbtPredicate nbt;
public BlockPredicate(@Nullable final Tag<Block> aaz, @Nullable final Block bpe, final StatePropertiesPredicate cc, final NbtPredicate bt) {
public BlockPredicate(@Nullable final Tag<Block> aaz, @Nullable final Block bph, final StatePropertiesPredicate cc, final NbtPredicate bt) {
this.tag = aaz;
this.block = bpe;
this.block = bph;
this.properties = cc;
this.nbt = bt;
}
@ -40,20 +40,20 @@ public class BlockPredicate {
if (!xd.isLoaded(fk)) {
return false;
}
final BlockState byg4 = xd.getBlockState(fk);
final Block bpe5 = byg4.getBlock();
if (this.tag != null && !this.tag.contains(bpe5)) {
final BlockState byj4 = xd.getBlockState(fk);
final Block bph5 = byj4.getBlock();
if (this.tag != null && !this.tag.contains(bph5)) {
return false;
}
if (this.block != null && bpe5 != this.block) {
if (this.block != null && bph5 != this.block) {
return false;
}
if (!this.properties.matches(byg4)) {
if (!this.properties.matches(byj4)) {
return false;
}
if (this.nbt != NbtPredicate.ANY) {
final BlockEntity bwi6 = xd.getBlockEntity(fk);
if (bwi6 == null || !this.nbt.matches(bwi6.save(new CompoundTag()))) {
final BlockEntity bwl6 = xd.getBlockEntity(fk);
if (bwl6 == null || !this.nbt.matches(bwl6.save(new CompoundTag()))) {
return false;
}
}
@ -66,10 +66,10 @@ public class BlockPredicate {
}
final JsonObject jsonObject2 = GsonHelper.convertToJsonObject(jsonElement, "block");
final NbtPredicate bt3 = NbtPredicate.fromJson(jsonObject2.get("nbt"));
Block bpe4 = null;
Block bph4 = null;
if (jsonObject2.has("block")) {
final ResourceLocation sm5 = new ResourceLocation(GsonHelper.getAsString(jsonObject2, "block"));
bpe4 = Registry.BLOCK.get(sm5);
bph4 = Registry.BLOCK.get(sm5);
}
Tag<Block> aaz5 = null;
if (jsonObject2.has("tag")) {
@ -80,7 +80,7 @@ public class BlockPredicate {
}
}
final StatePropertiesPredicate cc6 = StatePropertiesPredicate.fromJson(jsonObject2.get("state"));
return new BlockPredicate(aaz5, bpe4, cc6, bt3);
return new BlockPredicate(aaz5, bph4, cc6, bt3);
}
public JsonElement serializeToJson() {

View File

@ -27,8 +27,8 @@ public class BredAnimalsTrigger extends SimpleCriterionTrigger<TriggerInstance>
return new TriggerInstance(bb4, bb5, bb6);
}
public void trigger(final ServerPlayer xe, final Animal asz2, @Nullable final Animal asz3, @Nullable final AgableMob akl) {
this.trigger(xe.getAdvancements(), a -> a.matches(xe, asz2, asz3, akl));
public void trigger(final ServerPlayer xe, final Animal atc2, @Nullable final Animal atc3, @Nullable final AgableMob ako) {
this.trigger(xe.getAdvancements(), a -> a.matches(xe, atc2, atc3, ako));
}
static {
@ -55,8 +55,8 @@ public class BredAnimalsTrigger extends SimpleCriterionTrigger<TriggerInstance>
return new TriggerInstance(a.build(), EntityPredicate.ANY, EntityPredicate.ANY);
}
public boolean matches(final ServerPlayer xe, final Animal asz2, @Nullable final Animal asz3, @Nullable final AgableMob akl) {
return this.child.matches(xe, akl) && ((this.parent.matches(xe, asz2) && this.partner.matches(xe, asz3)) || (this.parent.matches(xe, asz3) && this.partner.matches(xe, asz2)));
public boolean matches(final ServerPlayer xe, final Animal atc2, @Nullable final Animal atc3, @Nullable final AgableMob ako) {
return this.child.matches(xe, ako) && ((this.parent.matches(xe, atc2) && this.partner.matches(xe, atc3)) || (this.parent.matches(xe, atc3) && this.partner.matches(xe, atc2)));
}
@Override

View File

@ -22,21 +22,21 @@ public class BrewedPotionTrigger extends SimpleCriterionTrigger<TriggerInstance>
@Override
public TriggerInstance createInstance(final JsonObject jsonObject, final JsonDeserializationContext jsonDeserializationContext) {
Potion bga4 = null;
Potion bgd4 = null;
if (jsonObject.has("potion")) {
final ResourceLocation sm5 = new ResourceLocation(GsonHelper.getAsString(jsonObject, "potion"));
final Object o;
final Object obj;
bga4 = Registry.POTION.getOptional(sm5).<Throwable>orElseThrow(() -> {
bgd4 = Registry.POTION.getOptional(sm5).<Throwable>orElseThrow(() -> {
new JsonSyntaxException("Unknown potion '" + obj + "'");
return o;
});
}
return new TriggerInstance(bga4);
return new TriggerInstance(bgd4);
}
public void trigger(final ServerPlayer xe, final Potion bga) {
this.trigger(xe.getAdvancements(), a -> a.matches(bga));
public void trigger(final ServerPlayer xe, final Potion bgd) {
this.trigger(xe.getAdvancements(), a -> a.matches(bgd));
}
static {
@ -46,17 +46,17 @@ public class BrewedPotionTrigger extends SimpleCriterionTrigger<TriggerInstance>
public static class TriggerInstance extends AbstractCriterionTriggerInstance {
private final Potion potion;
public TriggerInstance(@Nullable final Potion bga) {
public TriggerInstance(@Nullable final Potion bgd) {
super(BrewedPotionTrigger.ID);
this.potion = bga;
this.potion = bgd;
}
public static TriggerInstance brewedPotion() {
return new TriggerInstance((Potion)null);
}
public boolean matches(final Potion bga) {
return this.potion == null || this.potion == bga;
public boolean matches(final Potion bgd) {
return this.potion == null || this.potion == bgd;
}
@Override

View File

@ -20,13 +20,13 @@ public class ChangeDimensionTrigger extends SimpleCriterionTrigger<TriggerInstan
@Override
public TriggerInstance createInstance(final JsonObject jsonObject, final JsonDeserializationContext jsonDeserializationContext) {
final DimensionType cbf4 = jsonObject.has("from") ? DimensionType.getByName(new ResourceLocation(GsonHelper.getAsString(jsonObject, "from"))) : null;
final DimensionType cbf5 = jsonObject.has("to") ? DimensionType.getByName(new ResourceLocation(GsonHelper.getAsString(jsonObject, "to"))) : null;
return new TriggerInstance(cbf4, cbf5);
final DimensionType cbi4 = jsonObject.has("from") ? DimensionType.getByName(new ResourceLocation(GsonHelper.getAsString(jsonObject, "from"))) : null;
final DimensionType cbi5 = jsonObject.has("to") ? DimensionType.getByName(new ResourceLocation(GsonHelper.getAsString(jsonObject, "to"))) : null;
return new TriggerInstance(cbi4, cbi5);
}
public void trigger(final ServerPlayer xe, final DimensionType cbf2, final DimensionType cbf3) {
this.trigger(xe.getAdvancements(), a -> a.matches(cbf2, cbf3));
public void trigger(final ServerPlayer xe, final DimensionType cbi2, final DimensionType cbi3) {
this.trigger(xe.getAdvancements(), a -> a.matches(cbi2, cbi3));
}
static {
@ -39,18 +39,18 @@ public class ChangeDimensionTrigger extends SimpleCriterionTrigger<TriggerInstan
@Nullable
private final DimensionType to;
public TriggerInstance(@Nullable final DimensionType cbf1, @Nullable final DimensionType cbf2) {
public TriggerInstance(@Nullable final DimensionType cbi1, @Nullable final DimensionType cbi2) {
super(ChangeDimensionTrigger.ID);
this.from = cbf1;
this.to = cbf2;
this.from = cbi1;
this.to = cbi2;
}
public static TriggerInstance changedDimensionTo(final DimensionType cbf) {
return new TriggerInstance(null, cbf);
public static TriggerInstance changedDimensionTo(final DimensionType cbi) {
return new TriggerInstance(null, cbi);
}
public boolean matches(final DimensionType cbf1, final DimensionType cbf2) {
return (this.from == null || this.from == cbf1) && (this.to == null || this.to == cbf2);
public boolean matches(final DimensionType cbi1, final DimensionType cbi2) {
return (this.from == null || this.from == cbi1) && (this.to == null || this.to == cbi2);
}
@Override

View File

@ -47,8 +47,8 @@ public class ChanneledLightningTrigger extends SimpleCriterionTrigger<TriggerIns
public boolean matches(final ServerPlayer xe, final Collection<? extends Entity> collection) {
for (final EntityPredicate bb7 : this.victims) {
boolean boolean8 = false;
for (final Entity akn10 : collection) {
if (bb7.matches(xe, akn10)) {
for (final Entity akq10 : collection) {
if (bb7.matches(xe, akq10)) {
boolean8 = true;
break;
}

View File

@ -22,8 +22,8 @@ public class ConstructBeaconTrigger extends SimpleCriterionTrigger<TriggerInstan
return new TriggerInstance(d4);
}
public void trigger(final ServerPlayer xe, final BeaconBlockEntity bwd) {
this.trigger(xe.getAdvancements(), a -> a.matches(bwd));
public void trigger(final ServerPlayer xe, final BeaconBlockEntity bwg) {
this.trigger(xe.getAdvancements(), a -> a.matches(bwg));
}
static {
@ -42,8 +42,8 @@ public class ConstructBeaconTrigger extends SimpleCriterionTrigger<TriggerInstan
return new TriggerInstance(d);
}
public boolean matches(final BeaconBlockEntity bwd) {
return this.level.matches(bwd.getLevels());
public boolean matches(final BeaconBlockEntity bwg) {
return this.level.matches(bwg.getLevels());
}
@Override

View File

@ -25,8 +25,8 @@ public class ConsumeItemTrigger extends SimpleCriterionTrigger<TriggerInstance>
return new TriggerInstance(ItemPredicate.fromJson(jsonObject.get("item")));
}
public void trigger(final ServerPlayer xe, final ItemStack bek) {
this.trigger(xe.getAdvancements(), a -> a.matches(bek));
public void trigger(final ServerPlayer xe, final ItemStack ben) {
this.trigger(xe.getAdvancements(), a -> a.matches(ben));
}
static {
@ -45,12 +45,12 @@ public class ConsumeItemTrigger extends SimpleCriterionTrigger<TriggerInstance>
return new TriggerInstance(ItemPredicate.ANY);
}
public static TriggerInstance usedItem(final ItemLike bjs) {
return new TriggerInstance(new ItemPredicate(null, bjs.asItem(), MinMaxBounds.Ints.ANY, MinMaxBounds.Ints.ANY, EnchantmentPredicate.NONE, EnchantmentPredicate.NONE, null, NbtPredicate.ANY));
public static TriggerInstance usedItem(final ItemLike bjv) {
return new TriggerInstance(new ItemPredicate(null, bjv.asItem(), MinMaxBounds.Ints.ANY, MinMaxBounds.Ints.ANY, EnchantmentPredicate.NONE, EnchantmentPredicate.NONE, null, NbtPredicate.ANY));
}
public boolean matches(final ItemStack bek) {
return this.item.matches(bek);
public boolean matches(final ItemStack ben) {
return this.item.matches(ben);
}
@Override

View File

@ -25,8 +25,8 @@ public class CuredZombieVillagerTrigger extends SimpleCriterionTrigger<TriggerIn
return new TriggerInstance(bb4, bb5);
}
public void trigger(final ServerPlayer xe, final Zombie axm, final Villager axt) {
this.trigger(xe.getAdvancements(), a -> a.matches(xe, axm, axt));
public void trigger(final ServerPlayer xe, final Zombie axp, final Villager axw) {
this.trigger(xe.getAdvancements(), a -> a.matches(xe, axp, axw));
}
static {
@ -47,8 +47,8 @@ public class CuredZombieVillagerTrigger extends SimpleCriterionTrigger<TriggerIn
return new TriggerInstance(EntityPredicate.ANY, EntityPredicate.ANY);
}
public boolean matches(final ServerPlayer xe, final Zombie axm, final Villager axt) {
return this.zombie.matches(xe, axm) && this.villager.matches(xe, axt);
public boolean matches(final ServerPlayer xe, final Zombie axp, final Villager axw) {
return this.zombie.matches(xe, axp) && this.villager.matches(xe, axw);
}
@Override

View File

@ -32,8 +32,8 @@ public class DamagePredicate {
this.type = as;
}
public boolean matches(final ServerPlayer xe, final DamageSource ajw, final float float3, final float float4, final boolean boolean5) {
return this == DamagePredicate.ANY || (this.dealtDamage.matches(float3) && this.takenDamage.matches(float4) && this.sourceEntity.matches(xe, ajw.getEntity()) && (this.blocked == null || this.blocked == boolean5) && this.type.matches(xe, ajw));
public boolean matches(final ServerPlayer xe, final DamageSource ajz, final float float3, final float float4, final boolean boolean5) {
return this == DamagePredicate.ANY || (this.dealtDamage.matches(float3) && this.takenDamage.matches(float4) && this.sourceEntity.matches(xe, ajz.getEntity()) && (this.blocked == null || this.blocked == boolean5) && this.type.matches(xe, ajz));
}
public static DamagePredicate fromJson(@Nullable final JsonElement jsonElement) {

View File

@ -36,12 +36,12 @@ public class DamageSourcePredicate {
this.sourceEntity = bb10;
}
public boolean matches(final ServerPlayer xe, final DamageSource ajw) {
return this.matches(xe.getLevel(), xe.position(), ajw);
public boolean matches(final ServerPlayer xe, final DamageSource ajz) {
return this.matches(xe.getLevel(), xe.position(), ajz);
}
public boolean matches(final ServerLevel xd, final Vec3 cvi, final DamageSource ajw) {
return this == DamageSourcePredicate.ANY || ((this.isProjectile == null || this.isProjectile == ajw.isProjectile()) && (this.isExplosion == null || this.isExplosion == ajw.isExplosion()) && (this.bypassesArmor == null || this.bypassesArmor == ajw.isBypassArmor()) && (this.bypassesInvulnerability == null || this.bypassesInvulnerability == ajw.isBypassInvul()) && (this.bypassesMagic == null || this.bypassesMagic == ajw.isBypassMagic()) && (this.isFire == null || this.isFire == ajw.isFire()) && (this.isMagic == null || this.isMagic == ajw.isMagic()) && (this.isLightning == null || this.isLightning == (ajw == DamageSource.LIGHTNING_BOLT)) && this.directEntity.matches(xd, cvi, ajw.getDirectEntity()) && this.sourceEntity.matches(xd, cvi, ajw.getEntity()));
public boolean matches(final ServerLevel xd, final Vec3 cvl, final DamageSource ajz) {
return this == DamageSourcePredicate.ANY || ((this.isProjectile == null || this.isProjectile == ajz.isProjectile()) && (this.isExplosion == null || this.isExplosion == ajz.isExplosion()) && (this.bypassesArmor == null || this.bypassesArmor == ajz.isBypassArmor()) && (this.bypassesInvulnerability == null || this.bypassesInvulnerability == ajz.isBypassInvul()) && (this.bypassesMagic == null || this.bypassesMagic == ajz.isBypassMagic()) && (this.isFire == null || this.isFire == ajz.isFire()) && (this.isMagic == null || this.isMagic == ajz.isMagic()) && (this.isLightning == null || this.isLightning == (ajz == DamageSource.LIGHTNING_BOLT)) && this.directEntity.matches(xd, cvl, ajz.getDirectEntity()) && this.sourceEntity.matches(xd, cvl, ajz.getEntity()));
}
public static DamageSourcePredicate fromJson(@Nullable final JsonElement jsonElement) {

View File

@ -23,8 +23,8 @@ public class EnchantedItemTrigger extends SimpleCriterionTrigger<TriggerInstance
return new TriggerInstance(bj4, d5);
}
public void trigger(final ServerPlayer xe, final ItemStack bek, final int integer) {
this.trigger(xe.getAdvancements(), a -> a.matches(bek, integer));
public void trigger(final ServerPlayer xe, final ItemStack ben, final int integer) {
this.trigger(xe.getAdvancements(), a -> a.matches(ben, integer));
}
static {
@ -45,8 +45,8 @@ public class EnchantedItemTrigger extends SimpleCriterionTrigger<TriggerInstance
return new TriggerInstance(ItemPredicate.ANY, MinMaxBounds.Ints.ANY);
}
public boolean matches(final ItemStack bek, final int integer) {
return this.item.matches(bek) && this.levels.matches(integer);
public boolean matches(final ItemStack ben, final int integer) {
return this.item.matches(ben) && this.levels.matches(integer);
}
@Override

View File

@ -24,8 +24,8 @@ public class EnchantmentPredicate {
this.level = MinMaxBounds.Ints.ANY;
}
public EnchantmentPredicate(@Nullable final Enchantment bhu, final MinMaxBounds.Ints d) {
this.enchantment = bhu;
public EnchantmentPredicate(@Nullable final Enchantment bhx, final MinMaxBounds.Ints d) {
this.enchantment = bhx;
this.level = d;
}
@ -67,18 +67,18 @@ public class EnchantmentPredicate {
return EnchantmentPredicate.ANY;
}
final JsonObject jsonObject2 = GsonHelper.convertToJsonObject(jsonElement, "enchantment");
Enchantment bhu3 = null;
Enchantment bhx3 = null;
if (jsonObject2.has("enchantment")) {
final ResourceLocation sm4 = new ResourceLocation(GsonHelper.getAsString(jsonObject2, "enchantment"));
final Object o;
final Object obj;
bhu3 = Registry.ENCHANTMENT.getOptional(sm4).<Throwable>orElseThrow(() -> {
bhx3 = Registry.ENCHANTMENT.getOptional(sm4).<Throwable>orElseThrow(() -> {
new JsonSyntaxException("Unknown enchantment '" + obj + "'");
return o;
});
}
final MinMaxBounds.Ints d4 = MinMaxBounds.Ints.fromJson(jsonObject2.get("levels"));
return new EnchantmentPredicate(bhu3, d4);
return new EnchantmentPredicate(bhx3, d4);
}
public static EnchantmentPredicate[] fromJsonArray(@Nullable final JsonElement jsonElement) {

View File

@ -24,17 +24,17 @@ public class EnterBlockTrigger extends SimpleCriterionTrigger<TriggerInstance> {
@Override
public TriggerInstance createInstance(final JsonObject jsonObject, final JsonDeserializationContext jsonDeserializationContext) {
final Block bpe4 = deserializeBlock(jsonObject);
final Block bph4 = deserializeBlock(jsonObject);
final StatePropertiesPredicate cc5 = StatePropertiesPredicate.fromJson(jsonObject.get("state"));
if (bpe4 != null) {
if (bph4 != null) {
final JsonSyntaxException ex;
final Object obj;
cc5.checkState(bpe4.getStateDefinition(), string -> {
cc5.checkState(bph4.getStateDefinition(), string -> {
new JsonSyntaxException("Block " + obj + " has no property " + string);
throw ex;
});
}
return new TriggerInstance(bpe4, cc5);
return new TriggerInstance(bph4, cc5);
}
@Nullable
@ -51,8 +51,8 @@ public class EnterBlockTrigger extends SimpleCriterionTrigger<TriggerInstance> {
return null;
}
public void trigger(final ServerPlayer xe, final BlockState byg) {
this.trigger(xe.getAdvancements(), a -> a.matches(byg));
public void trigger(final ServerPlayer xe, final BlockState byj) {
this.trigger(xe.getAdvancements(), a -> a.matches(byj));
}
static {
@ -63,14 +63,14 @@ public class EnterBlockTrigger extends SimpleCriterionTrigger<TriggerInstance> {
private final Block block;
private final StatePropertiesPredicate state;
public TriggerInstance(@Nullable final Block bpe, final StatePropertiesPredicate cc) {
public TriggerInstance(@Nullable final Block bph, final StatePropertiesPredicate cc) {
super(EnterBlockTrigger.ID);
this.block = bpe;
this.block = bph;
this.state = cc;
}
public static TriggerInstance entersBlock(final Block bpe) {
return new TriggerInstance(bpe, StatePropertiesPredicate.ANY);
public static TriggerInstance entersBlock(final Block bph) {
return new TriggerInstance(bph, StatePropertiesPredicate.ANY);
}
@Override
@ -83,8 +83,8 @@ public class EnterBlockTrigger extends SimpleCriterionTrigger<TriggerInstance> {
return jsonObject2;
}
public boolean matches(final BlockState byg) {
return (this.block == null || byg.getBlock() == this.block) && this.state.matches(byg);
public boolean matches(final BlockState byj) {
return (this.block == null || byj.getBlock() == this.block) && this.state.matches(byj);
}
}
}

View File

@ -31,15 +31,15 @@ public class EntityEquipmentPredicate {
this.offhand = bj6;
}
public boolean matches(@Nullable final Entity akn) {
public boolean matches(@Nullable final Entity akq) {
if (this == EntityEquipmentPredicate.ANY) {
return true;
}
if (!(akn instanceof LivingEntity)) {
if (!(akq instanceof LivingEntity)) {
return false;
}
final LivingEntity akw3 = (LivingEntity)akn;
return this.head.matches(akw3.getItemBySlot(EquipmentSlot.HEAD)) && this.chest.matches(akw3.getItemBySlot(EquipmentSlot.CHEST)) && this.legs.matches(akw3.getItemBySlot(EquipmentSlot.LEGS)) && this.feet.matches(akw3.getItemBySlot(EquipmentSlot.FEET)) && this.mainhand.matches(akw3.getItemBySlot(EquipmentSlot.MAINHAND)) && this.offhand.matches(akw3.getItemBySlot(EquipmentSlot.OFFHAND));
final LivingEntity akz3 = (LivingEntity)akq;
return this.head.matches(akz3.getItemBySlot(EquipmentSlot.HEAD)) && this.chest.matches(akz3.getItemBySlot(EquipmentSlot.CHEST)) && this.legs.matches(akz3.getItemBySlot(EquipmentSlot.LEGS)) && this.feet.matches(akz3.getItemBySlot(EquipmentSlot.FEET)) && this.mainhand.matches(akz3.getItemBySlot(EquipmentSlot.MAINHAND)) && this.offhand.matches(akz3.getItemBySlot(EquipmentSlot.OFFHAND));
}
public static EntityEquipmentPredicate fromJson(@Nullable final JsonElement jsonElement) {

View File

@ -29,8 +29,8 @@ public class EntityFlagsPredicate {
this.isBaby = boolean5;
}
public boolean matches(final Entity akn) {
return (this.isOnFire == null || akn.isOnFire() == this.isOnFire) && (this.isCrouching == null || akn.isCrouching() == this.isCrouching) && (this.isSprinting == null || akn.isSprinting() == this.isSprinting) && (this.isSwimming == null || akn.isSwimming() == this.isSwimming) && (this.isBaby == null || !(akn instanceof LivingEntity) || ((LivingEntity)akn).isBaby() == this.isBaby);
public boolean matches(final Entity akq) {
return (this.isOnFire == null || akq.isOnFire() == this.isOnFire) && (this.isCrouching == null || akq.isCrouching() == this.isCrouching) && (this.isSprinting == null || akq.isSprinting() == this.isSprinting) && (this.isSwimming == null || akq.isSwimming() == this.isSwimming) && (this.isBaby == null || !(akq instanceof LivingEntity) || ((LivingEntity)akq).isBaby() == this.isBaby);
}
@Nullable

View File

@ -22,8 +22,8 @@ public class EntityHurtPlayerTrigger extends SimpleCriterionTrigger<TriggerInsta
return new TriggerInstance(ar4);
}
public void trigger(final ServerPlayer xe, final DamageSource ajw, final float float3, final float float4, final boolean boolean5) {
this.trigger(xe.getAdvancements(), a -> a.matches(xe, ajw, float3, float4, boolean5));
public void trigger(final ServerPlayer xe, final DamageSource ajz, final float float3, final float float4, final boolean boolean5) {
this.trigger(xe.getAdvancements(), a -> a.matches(xe, ajz, float3, float4, boolean5));
}
static {
@ -42,8 +42,8 @@ public class EntityHurtPlayerTrigger extends SimpleCriterionTrigger<TriggerInsta
return new TriggerInstance(a.build());
}
public boolean matches(final ServerPlayer xe, final DamageSource ajw, final float float3, final float float4, final boolean boolean5) {
return this.damage.matches(xe, ajw, float3, float4, boolean5);
public boolean matches(final ServerPlayer xe, final DamageSource ajz, final float float3, final float float4, final boolean boolean5) {
return this.damage.matches(xe, ajz, float3, float4, boolean5);
}
@Override

View File

@ -45,53 +45,53 @@ public class EntityPredicate {
this.catType = sm;
}
public boolean matches(final ServerPlayer xe, @Nullable final Entity akn) {
return this.matches(xe.getLevel(), xe.position(), akn);
public boolean matches(final ServerPlayer xe, @Nullable final Entity akq) {
return this.matches(xe.getLevel(), xe.position(), akq);
}
public boolean matches(final ServerLevel xd, @Nullable final Vec3 cvi, @Nullable final Entity akn) {
public boolean matches(final ServerLevel xd, @Nullable final Vec3 cvl, @Nullable final Entity akq) {
if (this == EntityPredicate.ANY) {
return true;
}
if (akn == null) {
if (akq == null) {
return false;
}
if (!this.entityType.matches(akn.getType())) {
if (!this.entityType.matches(akq.getType())) {
return false;
}
if (cvi == null) {
if (cvl == null) {
if (this.distanceToPlayer != DistancePredicate.ANY) {
return false;
}
}
else if (!this.distanceToPlayer.matches(cvi.x, cvi.y, cvi.z, akn.getX(), akn.getY(), akn.getZ())) {
else if (!this.distanceToPlayer.matches(cvl.x, cvl.y, cvl.z, akq.getX(), akq.getY(), akq.getZ())) {
return false;
}
if (!this.location.matches(xd, akn.getX(), akn.getY(), akn.getZ())) {
if (!this.location.matches(xd, akq.getX(), akq.getY(), akq.getZ())) {
return false;
}
if (!this.effects.matches(akn)) {
if (!this.effects.matches(akq)) {
return false;
}
if (!this.nbt.matches(akn)) {
if (!this.nbt.matches(akq)) {
return false;
}
if (!this.flags.matches(akn)) {
if (!this.flags.matches(akq)) {
return false;
}
if (!this.equipment.matches(akn)) {
if (!this.equipment.matches(akq)) {
return false;
}
if (!this.player.matches(akn)) {
if (!this.player.matches(akq)) {
return false;
}
if (this.team != null) {
final Team cwk5 = akn.getTeam();
if (cwk5 == null || !this.team.equals(cwk5.getName())) {
final Team cwn5 = akq.getTeam();
if (cwn5 == null || !this.team.equals(cwn5.getName())) {
return false;
}
}
return this.catType == null || (akn instanceof Cat && ((Cat)akn).getResourceLocation().equals(this.catType));
return this.catType == null || (akq instanceof Cat && ((Cat)akq).getResourceLocation().equals(this.catType));
}
public static EntityPredicate fromJson(@Nullable final JsonElement jsonElement) {
@ -190,8 +190,8 @@ public class EntityPredicate {
return new Builder();
}
public Builder of(final EntityType<?> akr) {
this.entityType = EntityTypePredicate.of(akr);
public Builder of(final EntityType<?> aku) {
this.entityType = EntityTypePredicate.of(aku);
return this;
}

View File

@ -17,7 +17,7 @@ public abstract class EntityTypePredicate {
public static final EntityTypePredicate ANY;
private static final Joiner COMMA_JOINER;
public abstract boolean matches(final EntityType<?> akr);
public abstract boolean matches(final EntityType<?> aku);
public abstract JsonElement serializeToJson();
@ -34,15 +34,15 @@ public abstract class EntityTypePredicate {
final ResourceLocation sm3 = new ResourceLocation(string2);
final Object o;
final Object obj;
final EntityType<?> akr4 = Registry.ENTITY_TYPE.getOptional(sm3).<Throwable>orElseThrow(() -> {
final EntityType<?> aku4 = Registry.ENTITY_TYPE.getOptional(sm3).<Throwable>orElseThrow(() -> {
new JsonSyntaxException("Unknown entity type '" + obj + "', valid types are: " + EntityTypePredicate.COMMA_JOINER.join(Registry.ENTITY_TYPE.keySet()));
return o;
});
return new TypePredicate(akr4);
return new TypePredicate(aku4);
}
public static EntityTypePredicate of(final EntityType<?> akr) {
return new TypePredicate(akr);
public static EntityTypePredicate of(final EntityType<?> aku) {
return new TypePredicate(aku);
}
public static EntityTypePredicate of(final Tag<EntityType<?>> aaz) {
@ -52,7 +52,7 @@ public abstract class EntityTypePredicate {
static {
ANY = new EntityTypePredicate() {
@Override
public boolean matches(final EntityType<?> akr) {
public boolean matches(final EntityType<?> aku) {
return true;
}
@ -67,13 +67,13 @@ public abstract class EntityTypePredicate {
static class TypePredicate extends EntityTypePredicate {
private final EntityType<?> type;
public TypePredicate(final EntityType<?> akr) {
this.type = akr;
public TypePredicate(final EntityType<?> aku) {
this.type = aku;
}
@Override
public boolean matches(final EntityType<?> akr) {
return this.type == akr;
public boolean matches(final EntityType<?> aku) {
return this.type == aku;
}
@Override
@ -90,8 +90,8 @@ public abstract class EntityTypePredicate {
}
@Override
public boolean matches(final EntityType<?> akr) {
return this.tag.contains(akr);
public boolean matches(final EntityType<?> aku) {
return this.tag.contains(aku);
}
@Override

View File

@ -22,8 +22,8 @@ public class FilledBucketTrigger extends SimpleCriterionTrigger<TriggerInstance>
return new TriggerInstance(bj4);
}
public void trigger(final ServerPlayer xe, final ItemStack bek) {
this.trigger(xe.getAdvancements(), a -> a.matches(bek));
public void trigger(final ServerPlayer xe, final ItemStack ben) {
this.trigger(xe.getAdvancements(), a -> a.matches(ben));
}
static {
@ -42,8 +42,8 @@ public class FilledBucketTrigger extends SimpleCriterionTrigger<TriggerInstance>
return new TriggerInstance(bj);
}
public boolean matches(final ItemStack bek) {
return this.item.matches(bek);
public boolean matches(final ItemStack ben) {
return this.item.matches(ben);
}
@Override

View File

@ -28,8 +28,8 @@ public class FishingRodHookedTrigger extends SimpleCriterionTrigger<TriggerInsta
return new TriggerInstance(bj4, bb5, bj5);
}
public void trigger(final ServerPlayer xe, final ItemStack bek, final FishingHook avt, final Collection<ItemStack> collection) {
this.trigger(xe.getAdvancements(), a -> a.matches(xe, bek, avt, collection));
public void trigger(final ServerPlayer xe, final ItemStack ben, final FishingHook avw, final Collection<ItemStack> collection) {
this.trigger(xe.getAdvancements(), a -> a.matches(xe, ben, avw, collection));
}
static {
@ -52,23 +52,23 @@ public class FishingRodHookedTrigger extends SimpleCriterionTrigger<TriggerInsta
return new TriggerInstance(bj1, bb, bj3);
}
public boolean matches(final ServerPlayer xe, final ItemStack bek, final FishingHook avt, final Collection<ItemStack> collection) {
if (!this.rod.matches(bek)) {
public boolean matches(final ServerPlayer xe, final ItemStack ben, final FishingHook avw, final Collection<ItemStack> collection) {
if (!this.rod.matches(ben)) {
return false;
}
if (!this.entity.matches(xe, avt.hookedIn)) {
if (!this.entity.matches(xe, avw.hookedIn)) {
return false;
}
if (this.item != ItemPredicate.ANY) {
boolean boolean6 = false;
if (avt.hookedIn instanceof ItemEntity) {
final ItemEntity avy7 = (ItemEntity)avt.hookedIn;
if (this.item.matches(avy7.getItem())) {
if (avw.hookedIn instanceof ItemEntity) {
final ItemEntity awb7 = (ItemEntity)avw.hookedIn;
if (this.item.matches(awb7.getItem())) {
boolean6 = true;
}
}
for (final ItemStack bek2 : collection) {
if (this.item.matches(bek2)) {
for (final ItemStack ben2 : collection) {
if (this.item.matches(ben2)) {
boolean6 = true;
break;
}

View File

@ -23,9 +23,9 @@ public class FluidPredicate {
private final Fluid fluid;
private final StatePropertiesPredicate properties;
public FluidPredicate(@Nullable final Tag<Fluid> aaz, @Nullable final Fluid cof, final StatePropertiesPredicate cc) {
public FluidPredicate(@Nullable final Tag<Fluid> aaz, @Nullable final Fluid coi, final StatePropertiesPredicate cc) {
this.tag = aaz;
this.fluid = cof;
this.fluid = coi;
this.properties = cc;
}
@ -36,9 +36,9 @@ public class FluidPredicate {
if (!xd.isLoaded(fk)) {
return false;
}
final FluidState cog4 = xd.getFluidState(fk);
final Fluid cof5 = cog4.getType();
return (this.tag == null || this.tag.contains(cof5)) && (this.fluid == null || cof5 == this.fluid) && this.properties.matches(cog4);
final FluidState coj4 = xd.getFluidState(fk);
final Fluid coi5 = coj4.getType();
return (this.tag == null || this.tag.contains(coi5)) && (this.fluid == null || coi5 == this.fluid) && this.properties.matches(coj4);
}
public static FluidPredicate fromJson(@Nullable final JsonElement jsonElement) {
@ -46,10 +46,10 @@ public class FluidPredicate {
return FluidPredicate.ANY;
}
final JsonObject jsonObject2 = GsonHelper.convertToJsonObject(jsonElement, "fluid");
Fluid cof3 = null;
Fluid coi3 = null;
if (jsonObject2.has("fluid")) {
final ResourceLocation sm4 = new ResourceLocation(GsonHelper.getAsString(jsonObject2, "fluid"));
cof3 = Registry.FLUID.get(sm4);
coi3 = Registry.FLUID.get(sm4);
}
Tag<Fluid> aaz4 = null;
if (jsonObject2.has("tag")) {
@ -60,7 +60,7 @@ public class FluidPredicate {
}
}
final StatePropertiesPredicate cc5 = StatePropertiesPredicate.fromJson(jsonObject2.get("state"));
return new FluidPredicate(aaz4, cof3, cc5);
return new FluidPredicate(aaz4, coi3, cc5);
}
public JsonElement serializeToJson() {

View File

@ -36,8 +36,8 @@ public class InventoryChangeTrigger extends SimpleCriterionTrigger<TriggerInstan
return new TriggerInstance(d5, d6, d7, arr8);
}
public void trigger(final ServerPlayer xe, final Inventory ayf) {
this.trigger(xe.getAdvancements(), a -> a.matches(ayf));
public void trigger(final ServerPlayer xe, final Inventory ayi) {
this.trigger(xe.getAdvancements(), a -> a.matches(ayi));
}
static {
@ -90,25 +90,25 @@ public class InventoryChangeTrigger extends SimpleCriterionTrigger<TriggerInstan
return jsonObject2;
}
public boolean matches(final Inventory ayf) {
public boolean matches(final Inventory ayi) {
int integer3 = 0;
int integer4 = 0;
int integer5 = 0;
final List<ItemPredicate> list6 = Lists.<ItemPredicate>newArrayList(this.predicates);
for (int integer6 = 0; integer6 < ayf.getContainerSize(); ++integer6) {
final ItemStack bek8 = ayf.getItem(integer6);
if (bek8.isEmpty()) {
for (int integer6 = 0; integer6 < ayi.getContainerSize(); ++integer6) {
final ItemStack ben8 = ayi.getItem(integer6);
if (ben8.isEmpty()) {
++integer4;
}
else {
++integer5;
if (bek8.getCount() >= bek8.getMaxStackSize()) {
if (ben8.getCount() >= ben8.getMaxStackSize()) {
++integer3;
}
final Iterator<ItemPredicate> iterator9 = list6.iterator();
while (iterator9.hasNext()) {
final ItemPredicate bj10 = iterator9.next();
if (bj10.matches(bek8)) {
if (bj10.matches(ben8)) {
iterator9.remove();
}
}

View File

@ -24,8 +24,8 @@ public class ItemDurabilityTrigger extends SimpleCriterionTrigger<TriggerInstanc
return new TriggerInstance(bj4, d5, d6);
}
public void trigger(final ServerPlayer xe, final ItemStack bek, final int integer) {
this.trigger(xe.getAdvancements(), a -> a.matches(bek, integer));
public void trigger(final ServerPlayer xe, final ItemStack ben, final int integer) {
this.trigger(xe.getAdvancements(), a -> a.matches(ben, integer));
}
static {
@ -48,8 +48,8 @@ public class ItemDurabilityTrigger extends SimpleCriterionTrigger<TriggerInstanc
return new TriggerInstance(bj, d, MinMaxBounds.Ints.ANY);
}
public boolean matches(final ItemStack bek, final int integer) {
return this.item.matches(bek) && this.durability.matches(bek.getMaxDamage() - integer) && this.delta.matches(bek.getDamageValue() - integer);
public boolean matches(final ItemStack ben, final int integer) {
return this.item.matches(ben) && this.durability.matches(ben.getMaxDamage() - integer) && this.delta.matches(ben.getDamageValue() - integer);
}
@Override

View File

@ -50,41 +50,41 @@ public class ItemPredicate {
this.nbt = NbtPredicate.ANY;
}
public ItemPredicate(@Nullable final Tag<Item> aaz, @Nullable final Item bef, final MinMaxBounds.Ints d3, final MinMaxBounds.Ints d4, final EnchantmentPredicate[] arr5, final EnchantmentPredicate[] arr6, @Nullable final Potion bga, final NbtPredicate bt) {
public ItemPredicate(@Nullable final Tag<Item> aaz, @Nullable final Item bei, final MinMaxBounds.Ints d3, final MinMaxBounds.Ints d4, final EnchantmentPredicate[] arr5, final EnchantmentPredicate[] arr6, @Nullable final Potion bgd, final NbtPredicate bt) {
this.tag = aaz;
this.item = bef;
this.item = bei;
this.count = d3;
this.durability = d4;
this.enchantments = arr5;
this.storedEnchantments = arr6;
this.potion = bga;
this.potion = bgd;
this.nbt = bt;
}
public boolean matches(final ItemStack bek) {
public boolean matches(final ItemStack ben) {
if (this == ItemPredicate.ANY) {
return true;
}
if (this.tag != null && !this.tag.contains(bek.getItem())) {
if (this.tag != null && !this.tag.contains(ben.getItem())) {
return false;
}
if (this.item != null && bek.getItem() != this.item) {
if (this.item != null && ben.getItem() != this.item) {
return false;
}
if (!this.count.matches(bek.getCount())) {
if (!this.count.matches(ben.getCount())) {
return false;
}
if (!this.durability.isAny() && !bek.isDamageableItem()) {
if (!this.durability.isAny() && !ben.isDamageableItem()) {
return false;
}
if (!this.durability.matches(bek.getMaxDamage() - bek.getDamageValue())) {
if (!this.durability.matches(ben.getMaxDamage() - ben.getDamageValue())) {
return false;
}
if (!this.nbt.matches(bek)) {
if (!this.nbt.matches(ben)) {
return false;
}
if (this.enchantments.length > 0) {
final Map<Enchantment, Integer> map3 = EnchantmentHelper.deserializeEnchantments(bek.getEnchantmentTags());
final Map<Enchantment, Integer> map3 = EnchantmentHelper.deserializeEnchantments(ben.getEnchantmentTags());
for (final EnchantmentPredicate aw7 : this.enchantments) {
if (!aw7.containedIn(map3)) {
return false;
@ -92,15 +92,15 @@ public class ItemPredicate {
}
}
if (this.storedEnchantments.length > 0) {
final Map<Enchantment, Integer> map3 = EnchantmentHelper.deserializeEnchantments(EnchantedBookItem.getEnchantments(bek));
final Map<Enchantment, Integer> map3 = EnchantmentHelper.deserializeEnchantments(EnchantedBookItem.getEnchantments(ben));
for (final EnchantmentPredicate aw7 : this.storedEnchantments) {
if (!aw7.containedIn(map3)) {
return false;
}
}
}
final Potion bga3 = PotionUtils.getPotion(bek);
return this.potion == null || this.potion == bga3;
final Potion bgd3 = PotionUtils.getPotion(ben);
return this.potion == null || this.potion == bgd3;
}
public static ItemPredicate fromJson(@Nullable final JsonElement jsonElement) {
@ -114,12 +114,12 @@ public class ItemPredicate {
throw new JsonParseException("Disallowed data tag found");
}
final NbtPredicate bt5 = NbtPredicate.fromJson(jsonObject2.get("nbt"));
Item bef6 = null;
Item bei6 = null;
if (jsonObject2.has("item")) {
final ResourceLocation sm7 = new ResourceLocation(GsonHelper.getAsString(jsonObject2, "item"));
final Object o;
final Object obj;
bef6 = Registry.ITEM.getOptional(sm7).<Throwable>orElseThrow(() -> {
bei6 = Registry.ITEM.getOptional(sm7).<Throwable>orElseThrow(() -> {
new JsonSyntaxException("Unknown item id '" + obj + "'");
return o;
});
@ -132,19 +132,19 @@ public class ItemPredicate {
throw new JsonSyntaxException("Unknown item tag '" + sm8 + "'");
}
}
Potion bga8 = null;
Potion bgd8 = null;
if (jsonObject2.has("potion")) {
final ResourceLocation sm9 = new ResourceLocation(GsonHelper.getAsString(jsonObject2, "potion"));
final Object o2;
final Object obj2;
bga8 = Registry.POTION.getOptional(sm9).<Throwable>orElseThrow(() -> {
bgd8 = Registry.POTION.getOptional(sm9).<Throwable>orElseThrow(() -> {
new JsonSyntaxException("Unknown potion '" + obj2 + "'");
return o2;
});
}
final EnchantmentPredicate[] arr9 = EnchantmentPredicate.fromJsonArray(jsonObject2.get("enchantments"));
final EnchantmentPredicate[] arr10 = EnchantmentPredicate.fromJsonArray(jsonObject2.get("stored_enchantments"));
return new ItemPredicate(aaz7, bef6, d3, d4, arr9, arr10, bga8, bt5);
return new ItemPredicate(aaz7, bei6, d3, d4, arr9, arr10, bgd8, bt5);
}
public JsonElement serializeToJson() {
@ -222,8 +222,8 @@ public class ItemPredicate {
return new Builder();
}
public Builder of(final ItemLike bjs) {
this.item = bjs.asItem();
public Builder of(final ItemLike bjv) {
this.item = bjv.asItem();
return this;
}

View File

@ -32,9 +32,9 @@ public class ItemUsedOnBlockTrigger extends SimpleCriterionTrigger<TriggerInstan
return new TriggerInstance(this.id, aj4, cc5, bj6);
}
public void trigger(final ServerPlayer xe, final BlockPos fk, final ItemStack bek) {
final BlockState byg5 = xe.getLevel().getBlockState(fk);
this.trigger(xe.getAdvancements(), a -> a.matches(byg5, xe.getLevel(), fk, bek));
public void trigger(final ServerPlayer xe, final BlockPos fk, final ItemStack ben) {
final BlockState byj5 = xe.getLevel().getBlockState(fk);
this.trigger(xe.getAdvancements(), a -> a.matches(byj5, xe.getLevel(), fk, ben));
}
public static class TriggerInstance extends AbstractCriterionTriggerInstance {
@ -53,8 +53,8 @@ public class ItemUsedOnBlockTrigger extends SimpleCriterionTrigger<TriggerInstan
return new TriggerInstance(CriteriaTriggers.SAFELY_HARVEST_HONEY.id, a.build(), StatePropertiesPredicate.ANY, a.build());
}
public boolean matches(final BlockState byg, final ServerLevel xd, final BlockPos fk, final ItemStack bek) {
return this.block.matches(xd, fk) && this.state.matches(byg) && this.item.matches(bek);
public boolean matches(final BlockState byj, final ServerLevel xd, final BlockPos fk, final ItemStack ben) {
return this.block.matches(xd, fk) && this.state.matches(byj) && this.item.matches(ben);
}
@Override

View File

@ -69,8 +69,8 @@ public class KilledByCrossbowTrigger extends SimpleCriterionTrigger<TriggerInsta
boolean boolean10 = false;
final Iterator<Entity> iterator11 = list5.iterator();
while (iterator11.hasNext()) {
final Entity akn12 = iterator11.next();
if (bb9.matches(xe, akn12)) {
final Entity akq12 = iterator11.next();
if (bb9.matches(xe, akq12)) {
iterator11.remove();
boolean10 = true;
break;
@ -83,8 +83,8 @@ public class KilledByCrossbowTrigger extends SimpleCriterionTrigger<TriggerInsta
}
if (this.uniqueEntityTypes != MinMaxBounds.Ints.ANY) {
final Set<EntityType<?>> set5 = Sets.newHashSet();
for (final Entity akn13 : collection) {
set5.add(akn13.getType());
for (final Entity akq13 : collection) {
set5.add(akq13.getType());
}
return this.uniqueEntityTypes.matches(set5.size()) && this.uniqueEntityTypes.matches(integer);
}

View File

@ -27,8 +27,8 @@ public class KilledTrigger extends SimpleCriterionTrigger<TriggerInstance> {
return new TriggerInstance(this.id, EntityPredicate.fromJson(jsonObject.get("entity")), DamageSourcePredicate.fromJson(jsonObject.get("killing_blow")));
}
public void trigger(final ServerPlayer xe, final Entity akn, final DamageSource ajw) {
this.trigger(xe.getAdvancements(), a -> a.matches(xe, akn, ajw));
public void trigger(final ServerPlayer xe, final Entity akq, final DamageSource ajz) {
this.trigger(xe.getAdvancements(), a -> a.matches(xe, akq, ajz));
}
public static class TriggerInstance extends AbstractCriterionTriggerInstance {
@ -57,8 +57,8 @@ public class KilledTrigger extends SimpleCriterionTrigger<TriggerInstance> {
return new TriggerInstance(CriteriaTriggers.ENTITY_KILLED_PLAYER.id, EntityPredicate.ANY, DamageSourcePredicate.ANY);
}
public boolean matches(final ServerPlayer xe, final Entity akn, final DamageSource ajw) {
return this.killingBlow.matches(xe, ajw) && this.entityPredicate.matches(xe, akn);
public boolean matches(final ServerPlayer xe, final Entity akq, final DamageSource ajz) {
return this.killingBlow.matches(xe, ajz) && this.entityPredicate.matches(xe, akq);
}
@Override

View File

@ -23,8 +23,8 @@ public class LevitationTrigger extends SimpleCriterionTrigger<TriggerInstance> {
return new TriggerInstance(at4, d5);
}
public void trigger(final ServerPlayer xe, final Vec3 cvi, final int integer) {
this.trigger(xe.getAdvancements(), a -> a.matches(xe, cvi, integer));
public void trigger(final ServerPlayer xe, final Vec3 cvl, final int integer) {
this.trigger(xe.getAdvancements(), a -> a.matches(xe, cvl, integer));
}
static {
@ -45,8 +45,8 @@ public class LevitationTrigger extends SimpleCriterionTrigger<TriggerInstance> {
return new TriggerInstance(at, MinMaxBounds.Ints.ANY);
}
public boolean matches(final ServerPlayer xe, final Vec3 cvi, final int integer) {
return this.distance.matches(cvi.x, cvi.y, cvi.z, xe.getX(), xe.getY(), xe.getZ()) && this.duration.matches(integer);
public boolean matches(final ServerPlayer xe, final Vec3 cvl, final int integer) {
return this.distance.matches(cvl.x, cvl.y, cvl.z, xe.getX(), xe.getY(), xe.getZ()) && this.duration.matches(integer);
}
@Override

View File

@ -31,28 +31,28 @@ public class LocationPredicate {
private final BlockPredicate block;
private final FluidPredicate fluid;
public LocationPredicate(final MinMaxBounds.Floats c1, final MinMaxBounds.Floats c2, final MinMaxBounds.Floats c3, @Nullable final Biome bkq, @Nullable final StructureFeature<?> cfi, @Nullable final DimensionType cbf, final LightPredicate bo, final BlockPredicate aj, final FluidPredicate bf) {
public LocationPredicate(final MinMaxBounds.Floats c1, final MinMaxBounds.Floats c2, final MinMaxBounds.Floats c3, @Nullable final Biome bkt, @Nullable final StructureFeature<?> cfl, @Nullable final DimensionType cbi, final LightPredicate bo, final BlockPredicate aj, final FluidPredicate bf) {
this.x = c1;
this.y = c2;
this.z = c3;
this.biome = bkq;
this.feature = cfi;
this.dimension = cbf;
this.biome = bkt;
this.feature = cfl;
this.dimension = cbi;
this.light = bo;
this.block = aj;
this.fluid = bf;
}
public static LocationPredicate inBiome(final Biome bkq) {
return new LocationPredicate(MinMaxBounds.Floats.ANY, MinMaxBounds.Floats.ANY, MinMaxBounds.Floats.ANY, bkq, null, null, LightPredicate.ANY, BlockPredicate.ANY, FluidPredicate.ANY);
public static LocationPredicate inBiome(final Biome bkt) {
return new LocationPredicate(MinMaxBounds.Floats.ANY, MinMaxBounds.Floats.ANY, MinMaxBounds.Floats.ANY, bkt, null, null, LightPredicate.ANY, BlockPredicate.ANY, FluidPredicate.ANY);
}
public static LocationPredicate inDimension(final DimensionType cbf) {
return new LocationPredicate(MinMaxBounds.Floats.ANY, MinMaxBounds.Floats.ANY, MinMaxBounds.Floats.ANY, null, null, cbf, LightPredicate.ANY, BlockPredicate.ANY, FluidPredicate.ANY);
public static LocationPredicate inDimension(final DimensionType cbi) {
return new LocationPredicate(MinMaxBounds.Floats.ANY, MinMaxBounds.Floats.ANY, MinMaxBounds.Floats.ANY, null, null, cbi, LightPredicate.ANY, BlockPredicate.ANY, FluidPredicate.ANY);
}
public static LocationPredicate inFeature(final StructureFeature<?> cfi) {
return new LocationPredicate(MinMaxBounds.Floats.ANY, MinMaxBounds.Floats.ANY, MinMaxBounds.Floats.ANY, null, cfi, null, LightPredicate.ANY, BlockPredicate.ANY, FluidPredicate.ANY);
public static LocationPredicate inFeature(final StructureFeature<?> cfl) {
return new LocationPredicate(MinMaxBounds.Floats.ANY, MinMaxBounds.Floats.ANY, MinMaxBounds.Floats.ANY, null, cfl, null, LightPredicate.ANY, BlockPredicate.ANY, FluidPredicate.ANY);
}
public boolean matches(final ServerLevel xd, final double double2, final double double3, final double double4) {
@ -113,14 +113,14 @@ public class LocationPredicate {
final MinMaxBounds.Floats c4 = MinMaxBounds.Floats.fromJson(jsonObject3.get("x"));
final MinMaxBounds.Floats c5 = MinMaxBounds.Floats.fromJson(jsonObject3.get("y"));
final MinMaxBounds.Floats c6 = MinMaxBounds.Floats.fromJson(jsonObject3.get("z"));
final DimensionType cbf7 = jsonObject2.has("dimension") ? DimensionType.getByName(new ResourceLocation(GsonHelper.getAsString(jsonObject2, "dimension"))) : null;
final StructureFeature<?> cfi8 = jsonObject2.has("feature") ? Feature.STRUCTURES_REGISTRY.get(GsonHelper.getAsString(jsonObject2, "feature")) : null;
Biome bkq9 = null;
final DimensionType cbi7 = jsonObject2.has("dimension") ? DimensionType.getByName(new ResourceLocation(GsonHelper.getAsString(jsonObject2, "dimension"))) : null;
final StructureFeature<?> cfl8 = jsonObject2.has("feature") ? Feature.STRUCTURES_REGISTRY.get(GsonHelper.getAsString(jsonObject2, "feature")) : null;
Biome bkt9 = null;
if (jsonObject2.has("biome")) {
final ResourceLocation sm10 = new ResourceLocation(GsonHelper.getAsString(jsonObject2, "biome"));
final Object o;
final Object obj;
bkq9 = Registry.BIOME.getOptional(sm10).<Throwable>orElseThrow(() -> {
bkt9 = Registry.BIOME.getOptional(sm10).<Throwable>orElseThrow(() -> {
new JsonSyntaxException("Unknown biome '" + obj + "'");
return o;
});
@ -128,7 +128,7 @@ public class LocationPredicate {
final LightPredicate bo10 = LightPredicate.fromJson(jsonObject2.get("light"));
final BlockPredicate aj11 = BlockPredicate.fromJson(jsonObject2.get("block"));
final FluidPredicate bf12 = FluidPredicate.fromJson(jsonObject2.get("fluid"));
return new LocationPredicate(c4, c5, c6, bkq9, cfi8, cbf7, bo10, aj11, bf12);
return new LocationPredicate(c4, c5, c6, bkt9, cfl8, cbi7, bo10, aj11, bf12);
}
static {
@ -162,8 +162,8 @@ public class LocationPredicate {
return new Builder();
}
public Builder setBiome(@Nullable final Biome bkq) {
this.biome = bkq;
public Builder setBiome(@Nullable final Biome bkt) {
this.biome = bkt;
return this;
}

Some files were not shown because too many files have changed in this diff Show More