From ae5f2f4e7ad3408e9730eb2ec04f387a34532471 Mon Sep 17 00:00:00 2001 From: LAX1DUDE Date: Wed, 16 Feb 2022 15:21:39 -0800 Subject: [PATCH] Fixed the cock sucking ender dragon and patched SoundManager a fourth time --- .../java/net/lax1dude/eaglercraft/ConfigConstants.java | 2 +- src/main/java/net/minecraft/src/EntityDragon.java | 6 +++++- src/main/java/net/minecraft/src/SoundManager.java | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java b/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java index 0fa418b..8612a93 100644 --- a/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java +++ b/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java @@ -4,7 +4,7 @@ public class ConfigConstants { public static boolean profanity = false; - public static final String version = "22w04b"; + public static final String version = "22w07a"; public static final String mainMenuString = "eaglercraft " + version; public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft"; diff --git a/src/main/java/net/minecraft/src/EntityDragon.java b/src/main/java/net/minecraft/src/EntityDragon.java index 2535b2f..291a9de 100644 --- a/src/main/java/net/minecraft/src/EntityDragon.java +++ b/src/main/java/net/minecraft/src/EntityDragon.java @@ -3,6 +3,8 @@ package net.minecraft.src; import java.util.Iterator; import java.util.List; +import net.minecraft.client.Minecraft; + public class EntityDragon extends EntityLiving implements IBossDisplayData, IEntityMultiPart { @@ -634,8 +636,10 @@ public class EntityDragon extends EntityLiving implements IBossDisplayData, IEnt return this.dataWatcher.getWatchableObjectInt(16); } + // eaglercraft is client only so this is ok + public World func_82194_d() { - return this.worldObj; + return this.worldObj == null ? Minecraft.getMinecraft().theWorld : this.worldObj; } /** diff --git a/src/main/java/net/minecraft/src/SoundManager.java b/src/main/java/net/minecraft/src/SoundManager.java index 9e197cb..ad56282 100644 --- a/src/main/java/net/minecraft/src/SoundManager.java +++ b/src/main/java/net/minecraft/src/SoundManager.java @@ -7,7 +7,6 @@ import java.util.Iterator; import java.util.Random; import net.lax1dude.eaglercraft.EaglerAdapter; -import net.minecraft.client.Minecraft; public class SoundManager { @@ -107,11 +106,12 @@ public class SoundManager { double pitch = par1EntityLiving.prevRotationPitch + (par1EntityLiving.rotationPitch - par1EntityLiving.prevRotationPitch) * par2; double yaw = par1EntityLiving.prevRotationYaw + (par1EntityLiving.rotationYaw - par1EntityLiving.prevRotationYaw) * par2; - // I don't want to talk about this lol + // suck my cock - if((!Double.isNaN(x) && Double.isFinite(x)) && (!Double.isNaN(y) && Double.isFinite(y)) && (!Double.isNaN(z) && Double.isFinite(z)) - && (!Double.isNaN(pitch) && Double.isFinite(pitch)) && (!Double.isNaN(yaw) && Double.isFinite(yaw))) { + try { EaglerAdapter.setListenerPos((float)x, (float)y, (float)z, (float)par1EntityLiving.motionX, (float)par1EntityLiving.motionY, (float)par1EntityLiving.motionZ, (float)pitch, (float)yaw); + }catch(Throwable t) { + System.err.println("AudioListener fucked up again"); } } }