Fixed the cock sucking ender dragon and patched SoundManager a fourth time

This commit is contained in:
LAX1DUDE 2022-02-16 15:21:39 -08:00
parent 925638241b
commit ae5f2f4e7a
3 changed files with 10 additions and 6 deletions

View File

@ -4,7 +4,7 @@ public class ConfigConstants {
public static boolean profanity = false; 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 mainMenuString = "eaglercraft " + version;
public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft"; public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft";

View File

@ -3,6 +3,8 @@ package net.minecraft.src;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import net.minecraft.client.Minecraft;
public class EntityDragon extends EntityLiving implements IBossDisplayData, IEntityMultiPart { 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); return this.dataWatcher.getWatchableObjectInt(16);
} }
// eaglercraft is client only so this is ok
public World func_82194_d() { public World func_82194_d() {
return this.worldObj; return this.worldObj == null ? Minecraft.getMinecraft().theWorld : this.worldObj;
} }
/** /**

View File

@ -7,7 +7,6 @@ import java.util.Iterator;
import java.util.Random; import java.util.Random;
import net.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.minecraft.client.Minecraft;
public class SoundManager { public class SoundManager {
@ -107,11 +106,12 @@ public class SoundManager {
double pitch = par1EntityLiving.prevRotationPitch + (par1EntityLiving.rotationPitch - par1EntityLiving.prevRotationPitch) * par2; double pitch = par1EntityLiving.prevRotationPitch + (par1EntityLiving.rotationPitch - par1EntityLiving.prevRotationPitch) * par2;
double yaw = par1EntityLiving.prevRotationYaw + (par1EntityLiving.rotationYaw - par1EntityLiving.prevRotationYaw) * 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)) try {
&& (!Double.isNaN(pitch) && Double.isFinite(pitch)) && (!Double.isNaN(yaw) && Double.isFinite(yaw))) {
EaglerAdapter.setListenerPos((float)x, (float)y, (float)z, (float)par1EntityLiving.motionX, (float)par1EntityLiving.motionY, (float)par1EntityLiving.motionZ, (float)pitch, (float)yaw); 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");
} }
} }
} }