Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Decompiled with CFR 0_118.
- *
- * Could not load the following classes:
- * com.google.common.collect.Lists
- * com.google.common.collect.Maps
- * com.google.common.collect.Sets
- * javax.vecmath.Matrix4f
- * javax.vecmath.Tuple4f
- * javax.vecmath.Vector3d
- * javax.vecmath.Vector3f
- * javax.vecmath.Vector4f
- * net.minecraft.client.renderer.DestroyBlockProgress
- * net.minecraft.client.renderer.RenderGlobal$SwitchEnumUsage
- * net.minecraft.client.renderer.chunk.VboChunkFactory
- * net.minecraftforge.client.IRenderHandler
- * net.minecraftforge.fml.relauncher.Side
- * net.minecraftforge.fml.relauncher.SideOnly
- * org.apache.logging.log4j.LogManager
- * org.apache.logging.log4j.Logger
- * org.lwjgl.opengl.GL11
- * org.spongepowered.asm.mixin.injection.callback.CallbackInfo
- * org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable
- * org.spongepowered.asm.mixin.transformer.meta.MixinMerged
- */
- package net.minecraft.client.renderer;
- import com.google.common.collect.Lists;
- import com.google.common.collect.Maps;
- import com.google.common.collect.Sets;
- import com.google.gson.JsonSyntaxException;
- import com.replaymod.compat.shaders.ShaderReflection;
- import com.replaymod.recording.handler.RecordingEventHandler;
- import com.replaymod.render.hooks.ChunkLoadingRenderGlobal;
- import java.io.IOException;
- import java.lang.reflect.Field;
- import java.nio.ByteBuffer;
- import java.util.Collection;
- import java.util.EnumSet;
- import java.util.Iterator;
- import java.util.LinkedList;
- import java.util.List;
- import java.util.Map;
- import java.util.Random;
- import java.util.Set;
- import java.util.concurrent.BlockingQueue;
- import java.util.concurrent.Callable;
- import javax.vecmath.Matrix4f;
- import javax.vecmath.Tuple4f;
- import javax.vecmath.Vector3d;
- import javax.vecmath.Vector3f;
- import javax.vecmath.Vector4f;
- import net.minecraft.block.Block;
- import net.minecraft.block.BlockChest;
- import net.minecraft.block.BlockEnderChest;
- import net.minecraft.block.BlockLeaves;
- import net.minecraft.block.BlockSign;
- import net.minecraft.block.BlockSkull;
- import net.minecraft.block.material.Material;
- import net.minecraft.block.state.IBlockState;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.audio.ISound;
- import net.minecraft.client.audio.PositionedSoundRecord;
- import net.minecraft.client.audio.SoundHandler;
- import net.minecraft.client.entity.EntityPlayerSP;
- import net.minecraft.client.gui.FontRenderer;
- import net.minecraft.client.gui.GuiIngame;
- import net.minecraft.client.multiplayer.WorldClient;
- import net.minecraft.client.particle.EffectRenderer;
- import net.minecraft.client.particle.EntityFX;
- import net.minecraft.client.renderer.BlockRendererDispatcher;
- import net.minecraft.client.renderer.ChunkRenderContainer;
- import net.minecraft.client.renderer.DestroyBlockProgress;
- import net.minecraft.client.renderer.EntityRenderer;
- import net.minecraft.client.renderer.GLAllocation;
- import net.minecraft.client.renderer.GlStateManager;
- import net.minecraft.client.renderer.OpenGlHelper;
- import net.minecraft.client.renderer.RenderGlobal;
- import net.minecraft.client.renderer.RenderHelper;
- import net.minecraft.client.renderer.RenderList;
- import net.minecraft.client.renderer.Tessellator;
- import net.minecraft.client.renderer.VboRenderList;
- import net.minecraft.client.renderer.ViewFrustum;
- import net.minecraft.client.renderer.WorldRenderer;
- import net.minecraft.client.renderer.chunk.ChunkCompileTaskGenerator;
- import net.minecraft.client.renderer.chunk.ChunkRenderDispatcher;
- import net.minecraft.client.renderer.chunk.CompiledChunk;
- import net.minecraft.client.renderer.chunk.IRenderChunkFactory;
- import net.minecraft.client.renderer.chunk.ListChunkFactory;
- import net.minecraft.client.renderer.chunk.RenderChunk;
- import net.minecraft.client.renderer.chunk.VboChunkFactory;
- import net.minecraft.client.renderer.chunk.VisGraph;
- import net.minecraft.client.renderer.culling.ClippingHelper;
- import net.minecraft.client.renderer.culling.ClippingHelperImpl;
- import net.minecraft.client.renderer.culling.Frustum;
- import net.minecraft.client.renderer.culling.ICamera;
- import net.minecraft.client.renderer.entity.RenderManager;
- import net.minecraft.client.renderer.texture.TextureAtlasSprite;
- import net.minecraft.client.renderer.texture.TextureManager;
- import net.minecraft.client.renderer.texture.TextureMap;
- import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
- import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
- import net.minecraft.client.renderer.vertex.VertexBuffer;
- import net.minecraft.client.renderer.vertex.VertexFormat;
- import net.minecraft.client.renderer.vertex.VertexFormatElement;
- import net.minecraft.client.resources.IResourceManager;
- import net.minecraft.client.resources.IResourceManagerReloadListener;
- import net.minecraft.client.settings.GameSettings;
- import net.minecraft.client.settings.KeyBinding;
- import net.minecraft.client.shader.Framebuffer;
- import net.minecraft.client.shader.ShaderGroup;
- import net.minecraft.client.shader.ShaderLinkHelper;
- import net.minecraft.crash.CrashReport;
- import net.minecraft.crash.CrashReportCategory;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.EntityLivingBase;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.projectile.EntityWitherSkull;
- import net.minecraft.init.Blocks;
- import net.minecraft.init.Items;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemDye;
- import net.minecraft.item.ItemPotion;
- import net.minecraft.item.ItemRecord;
- import net.minecraft.profiler.Profiler;
- import net.minecraft.tileentity.TileEntity;
- import net.minecraft.tileentity.TileEntityChest;
- import net.minecraft.util.AxisAlignedBB;
- import net.minecraft.util.BlockPos;
- import net.minecraft.util.BlockPos$MutableBlockPos;
- import net.minecraft.util.ClassInheritanceMultiMap;
- import net.minecraft.util.EnumFacing;
- import net.minecraft.util.EnumParticleTypes;
- import net.minecraft.util.EnumWorldBlockLayer;
- import net.minecraft.util.MathHelper;
- import net.minecraft.util.MovingObjectPosition;
- import net.minecraft.util.ReportedException;
- import net.minecraft.util.ResourceLocation;
- import net.minecraft.util.Vec3;
- import net.minecraft.world.IBlockAccess;
- import net.minecraft.world.IWorldAccess;
- import net.minecraft.world.World;
- import net.minecraft.world.WorldProvider;
- import net.minecraft.world.border.EnumBorderStatus;
- import net.minecraft.world.border.WorldBorder;
- import net.minecraft.world.chunk.Chunk;
- import net.minecraftforge.client.IRenderHandler;
- import net.minecraftforge.client.MinecraftForgeClient;
- import net.minecraftforge.fml.relauncher.Side;
- import net.minecraftforge.fml.relauncher.SideOnly;
- import org.apache.logging.log4j.LogManager;
- import org.apache.logging.log4j.Logger;
- import org.lwjgl.opengl.GL11;
- import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
- import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
- import org.spongepowered.asm.mixin.transformer.meta.MixinMerged;
- @SideOnly(value=Side.CLIENT)
- public class RenderGlobal
- implements IWorldAccess,
- IResourceManagerReloadListener,
- RecordingEventHandler.RecordingEventSender {
- private static final Logger field_147599_m = LogManager.getLogger();
- private static final ResourceLocation field_110927_h = new ResourceLocation("textures/environment/moon_phases.png");
- private static final ResourceLocation field_110928_i = new ResourceLocation("textures/environment/sun.png");
- private static final ResourceLocation field_110925_j = new ResourceLocation("textures/environment/clouds.png");
- private static final ResourceLocation field_110926_k = new ResourceLocation("textures/environment/end_sky.png");
- private static final ResourceLocation field_175006_g = new ResourceLocation("textures/misc/forcefield.png");
- private final Minecraft field_72777_q;
- private final TextureManager field_72770_i;
- private final RenderManager field_175010_j;
- private WorldClient field_72769_h;
- public Set field_175009_l = Sets.newLinkedHashSet();
- public List field_72755_R = Lists.newArrayListWithCapacity((int)69696);
- private ViewFrustum field_175008_n;
- private int field_72772_v = -1;
- private int field_72771_w = -1;
- private int field_72781_x = -1;
- private VertexFormat field_175014_r;
- private VertexBuffer field_175013_s;
- private VertexBuffer field_175012_t;
- private VertexBuffer field_175011_u;
- private int field_72773_u;
- private final Map field_72738_E = Maps.newHashMap();
- private final Map field_147593_P = Maps.newHashMap();
- private final TextureAtlasSprite[] field_94141_F = new TextureAtlasSprite[10];
- private Framebuffer field_175015_z;
- private ShaderGroup field_174991_A;
- private double field_174992_B = Double.MIN_VALUE;
- private double field_174993_C = Double.MIN_VALUE;
- private double field_174987_D = Double.MIN_VALUE;
- private int field_174988_E = Integer.MIN_VALUE;
- private int field_174989_F = Integer.MIN_VALUE;
- private int field_174990_G = Integer.MIN_VALUE;
- private double field_174997_H = Double.MIN_VALUE;
- private double field_174998_I = Double.MIN_VALUE;
- private double field_174999_J = Double.MIN_VALUE;
- private double field_175000_K = Double.MIN_VALUE;
- private double field_174994_L = Double.MIN_VALUE;
- public final ChunkRenderDispatcher field_174995_M = new ChunkRenderDispatcher();
- private ChunkRenderContainer field_174996_N;
- private int field_72739_F = -1;
- public int field_72740_G = 2;
- private int field_72748_H;
- private int field_72749_I;
- private int field_72750_J;
- private boolean field_175002_T = false;
- private ClippingHelper field_175001_U;
- private final Vector4f[] field_175004_V = new Vector4f[8];
- private final Vector3d field_175003_W = new Vector3d();
- private boolean field_175005_X = false;
- IRenderChunkFactory field_175007_a;
- private double field_147596_f;
- private double field_147597_g;
- private double field_147602_h;
- public boolean field_147595_R = true;
- private static final String __OBFID = "CL_00000954";
- private RecordingEventHandler recordingEventHandler;
- public ChunkLoadingRenderGlobal replayModRender_hook;
- private boolean replayModRender_passThroughSetupTerrain;
- public RenderGlobal(Minecraft mcIn) {
- this.field_72777_q = mcIn;
- this.field_175010_j = mcIn.func_175598_ae();
- this.field_72770_i = mcIn.func_110434_K();
- this.field_72770_i.func_110577_a(field_175006_g);
- GL11.glTexParameteri((int)3553, (int)10242, (int)10497);
- GL11.glTexParameteri((int)3553, (int)10243, (int)10497);
- GlStateManager.func_179144_i(0);
- this.func_174971_n();
- this.field_175005_X = OpenGlHelper.func_176075_f();
- if (this.field_175005_X) {
- this.field_174996_N = new VboRenderList();
- this.field_175007_a = new VboChunkFactory();
- } else {
- this.field_174996_N = new RenderList();
- this.field_175007_a = new ListChunkFactory();
- }
- this.field_175014_r = new VertexFormat();
- this.field_175014_r.func_177349_a(new VertexFormatElement(0, VertexFormatElement.EnumType.FLOAT, VertexFormatElement.EnumUsage.POSITION, 3));
- this.func_174963_q();
- this.func_174980_p();
- this.func_174964_o();
- }
- @Override
- public void func_110549_a(IResourceManager resourceManager) {
- this.func_174971_n();
- }
- private void func_174971_n() {
- TextureMap texturemap = this.field_72777_q.func_147117_R();
- for (int i = 0; i < this.field_94141_F.length; ++i) {
- this.field_94141_F[i] = texturemap.func_110572_b("minecraft:blocks/destroy_stage_" + i);
- }
- }
- public void func_174966_b() {
- if (OpenGlHelper.field_148824_g) {
- if (ShaderLinkHelper.func_148074_b() == null) {
- ShaderLinkHelper.func_148076_a();
- }
- ResourceLocation resourcelocation = new ResourceLocation("shaders/post/entity_outline.json");
- try {
- this.field_174991_A = new ShaderGroup(this.field_72777_q.func_110434_K(), this.field_72777_q.func_110442_L(), this.field_72777_q.func_147110_a(), resourcelocation);
- this.field_174991_A.func_148026_a(this.field_72777_q.field_71443_c, this.field_72777_q.field_71440_d);
- this.field_175015_z = this.field_174991_A.func_177066_a("final");
- }
- catch (IOException ioexception) {
- field_147599_m.warn("Failed to load shader: " + resourcelocation, (Throwable)ioexception);
- this.field_174991_A = null;
- this.field_175015_z = null;
- }
- catch (JsonSyntaxException jsonsyntaxexception) {
- field_147599_m.warn("Failed to load shader: " + resourcelocation, (Throwable)jsonsyntaxexception);
- this.field_174991_A = null;
- this.field_175015_z = null;
- }
- } else {
- this.field_174991_A = null;
- this.field_175015_z = null;
- }
- }
- public void func_174975_c() {
- if (this.func_174985_d()) {
- GlStateManager.func_179147_l();
- GlStateManager.func_179120_a(770, 771, 0, 1);
- this.field_175015_z.func_178038_a(this.field_72777_q.field_71443_c, this.field_72777_q.field_71440_d, false);
- GlStateManager.func_179084_k();
- }
- }
- protected boolean func_174985_d() {
- return this.field_175015_z != null && this.field_174991_A != null && this.field_72777_q.field_71439_g != null && this.field_72777_q.field_71439_g.func_175149_v() && this.field_72777_q.field_71474_y.field_178883_an.func_151470_d();
- }
- private void func_174964_o() {
- Tessellator tessellator = Tessellator.func_178181_a();
- WorldRenderer worldrenderer = tessellator.func_178180_c();
- if (this.field_175011_u != null) {
- this.field_175011_u.func_177362_c();
- }
- if (this.field_72781_x >= 0) {
- GLAllocation.func_74523_b(this.field_72781_x);
- this.field_72781_x = -1;
- }
- if (this.field_175005_X) {
- this.field_175011_u = new VertexBuffer(this.field_175014_r);
- this.func_174968_a(worldrenderer, -16.0f, true);
- worldrenderer.func_178977_d();
- worldrenderer.func_178965_a();
- this.field_175011_u.func_177360_a(worldrenderer.func_178966_f(), worldrenderer.func_178976_e());
- } else {
- this.field_72781_x = GLAllocation.func_74526_a(1);
- GL11.glNewList((int)this.field_72781_x, (int)4864);
- this.func_174968_a(worldrenderer, -16.0f, true);
- tessellator.func_78381_a();
- GL11.glEndList();
- }
- }
- private void func_174980_p() {
- Tessellator tessellator = Tessellator.func_178181_a();
- WorldRenderer worldrenderer = tessellator.func_178180_c();
- if (this.field_175012_t != null) {
- this.field_175012_t.func_177362_c();
- }
- if (this.field_72771_w >= 0) {
- GLAllocation.func_74523_b(this.field_72771_w);
- this.field_72771_w = -1;
- }
- if (this.field_175005_X) {
- this.field_175012_t = new VertexBuffer(this.field_175014_r);
- this.func_174968_a(worldrenderer, 16.0f, false);
- worldrenderer.func_178977_d();
- worldrenderer.func_178965_a();
- this.field_175012_t.func_177360_a(worldrenderer.func_178966_f(), worldrenderer.func_178976_e());
- } else {
- this.field_72771_w = GLAllocation.func_74526_a(1);
- GL11.glNewList((int)this.field_72771_w, (int)4864);
- this.func_174968_a(worldrenderer, 16.0f, false);
- tessellator.func_78381_a();
- GL11.glEndList();
- }
- }
- private void func_174968_a(WorldRenderer worldRendererIn, float p_174968_2_, boolean p_174968_3_) {
- boolean flag1 = true;
- boolean flag2 = true;
- worldRendererIn.func_178970_b();
- for (int i = -384; i <= 384; i += 64) {
- for (int j = -384; j <= 384; j += 64) {
- float f1 = i;
- float f2 = i + 64;
- if (p_174968_3_) {
- f2 = i;
- f1 = i + 64;
- }
- worldRendererIn.func_178984_b(f1, p_174968_2_, j);
- worldRendererIn.func_178984_b(f2, p_174968_2_, j);
- worldRendererIn.func_178984_b(f2, p_174968_2_, j + 64);
- worldRendererIn.func_178984_b(f1, p_174968_2_, j + 64);
- }
- }
- }
- private void func_174963_q() {
- Tessellator tessellator = Tessellator.func_178181_a();
- WorldRenderer worldrenderer = tessellator.func_178180_c();
- if (this.field_175013_s != null) {
- this.field_175013_s.func_177362_c();
- }
- if (this.field_72772_v >= 0) {
- GLAllocation.func_74523_b(this.field_72772_v);
- this.field_72772_v = -1;
- }
- if (this.field_175005_X) {
- this.field_175013_s = new VertexBuffer(this.field_175014_r);
- this.func_180444_a(worldrenderer);
- worldrenderer.func_178977_d();
- worldrenderer.func_178965_a();
- this.field_175013_s.func_177360_a(worldrenderer.func_178966_f(), worldrenderer.func_178976_e());
- } else {
- this.field_72772_v = GLAllocation.func_74526_a(1);
- GlStateManager.func_179094_E();
- GL11.glNewList((int)this.field_72772_v, (int)4864);
- this.func_180444_a(worldrenderer);
- tessellator.func_78381_a();
- GL11.glEndList();
- GlStateManager.func_179121_F();
- }
- }
- private void func_180444_a(WorldRenderer worldRendererIn) {
- Random random = new Random(10842);
- worldRendererIn.func_178970_b();
- for (int i = 0; i < 1500; ++i) {
- double d0 = random.nextFloat() * 2.0f - 1.0f;
- double d1 = random.nextFloat() * 2.0f - 1.0f;
- double d2 = random.nextFloat() * 2.0f - 1.0f;
- double d3 = 0.15f + random.nextFloat() * 0.1f;
- double d4 = d0 * d0 + d1 * d1 + d2 * d2;
- if (d4 >= 1.0 || d4 <= 0.01) continue;
- d4 = 1.0 / Math.sqrt(d4);
- double d5 = (d0 *= d4) * 100.0;
- double d6 = (d1 *= d4) * 100.0;
- double d7 = (d2 *= d4) * 100.0;
- double d8 = Math.atan2(d0, d2);
- double d9 = Math.sin(d8);
- double d10 = Math.cos(d8);
- double d11 = Math.atan2(Math.sqrt(d0 * d0 + d2 * d2), d1);
- double d12 = Math.sin(d11);
- double d13 = Math.cos(d11);
- double d14 = random.nextDouble() * 3.141592653589793 * 2.0;
- double d15 = Math.sin(d14);
- double d16 = Math.cos(d14);
- for (int j = 0; j < 4; ++j) {
- double d17 = 0.0;
- double d18 = (double)((j & 2) - 1) * d3;
- double d19 = (double)((j + 1 & 2) - 1) * d3;
- double d20 = 0.0;
- double d21 = d18 * d16 - d19 * d15;
- double d22 = d19 * d16 + d18 * d15;
- double d23 = d21 * d12 + 0.0 * d13;
- double d24 = 0.0 * d12 - d21 * d13;
- double d25 = d24 * d9 - d22 * d10;
- double d26 = d22 * d9 + d24 * d10;
- worldRendererIn.func_178984_b(d5 + d25, d6 + d23, d7 + d26);
- }
- }
- }
- public void func_72732_a(WorldClient worldClientIn) {
- if (this.field_72769_h != null) {
- this.field_72769_h.func_72848_b(this);
- }
- this.field_174992_B = Double.MIN_VALUE;
- this.field_174993_C = Double.MIN_VALUE;
- this.field_174987_D = Double.MIN_VALUE;
- this.field_174988_E = Integer.MIN_VALUE;
- this.field_174989_F = Integer.MIN_VALUE;
- this.field_174990_G = Integer.MIN_VALUE;
- this.field_175010_j.func_78717_a(worldClientIn);
- this.field_72769_h = worldClientIn;
- if (worldClientIn != null) {
- worldClientIn.func_72954_a(this);
- this.func_72712_a();
- }
- }
- public void func_72712_a() {
- if (this.field_72769_h != null) {
- Entity entity;
- this.field_147595_R = true;
- Blocks.field_150362_t.func_150122_b(this.field_72777_q.field_71474_y.field_74347_j);
- Blocks.field_150361_u.func_150122_b(this.field_72777_q.field_71474_y.field_74347_j);
- this.field_72739_F = this.field_72777_q.field_71474_y.field_151451_c;
- boolean flag = this.field_175005_X;
- this.field_175005_X = OpenGlHelper.func_176075_f();
- if (flag && !this.field_175005_X) {
- this.field_174996_N = new RenderList();
- this.field_175007_a = new ListChunkFactory();
- } else if (!flag && this.field_175005_X) {
- this.field_174996_N = new VboRenderList();
- this.field_175007_a = new VboChunkFactory();
- }
- if (flag != this.field_175005_X) {
- this.func_174963_q();
- this.func_174980_p();
- this.func_174964_o();
- }
- if (this.field_175008_n != null) {
- this.field_175008_n.func_178160_a();
- }
- this.func_174986_e();
- this.field_175008_n = new ViewFrustum(this.field_72769_h, this.field_72777_q.field_71474_y.field_151451_c, this, this.field_175007_a);
- if (this.field_72769_h != null && (entity = this.field_72777_q.func_175606_aa()) != null) {
- this.field_175008_n.func_178163_a(entity.field_70165_t, entity.field_70161_v);
- }
- this.field_72740_G = 2;
- }
- }
- protected void func_174986_e() {
- this.field_175009_l.clear();
- this.field_174995_M.func_178514_b();
- }
- public void func_72720_a(int p_72720_1_, int p_72720_2_) {
- if (OpenGlHelper.field_148824_g && this.field_174991_A != null) {
- this.field_174991_A.func_148026_a(p_72720_1_, p_72720_2_);
- }
- }
- public void func_180446_a(Entity p_180446_1_, ICamera p_180446_2_, float partialTicks) {
- int pass = MinecraftForgeClient.getRenderPass();
- if (this.field_72740_G > 0) {
- if (pass > 0) {
- return;
- }
- --this.field_72740_G;
- } else {
- Entity entity2;
- int i;
- double d0 = p_180446_1_.field_70169_q + (p_180446_1_.field_70165_t - p_180446_1_.field_70169_q) * (double)partialTicks;
- double d1 = p_180446_1_.field_70167_r + (p_180446_1_.field_70163_u - p_180446_1_.field_70167_r) * (double)partialTicks;
- double d2 = p_180446_1_.field_70166_s + (p_180446_1_.field_70161_v - p_180446_1_.field_70166_s) * (double)partialTicks;
- this.field_72769_h.field_72984_F.func_76320_a("prepare");
- TileEntityRendererDispatcher.field_147556_a.func_178470_a(this.field_72769_h, this.field_72777_q.func_110434_K(), this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), partialTicks);
- this.field_175010_j.func_180597_a(this.field_72769_h, this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), this.field_72777_q.field_147125_j, this.field_72777_q.field_71474_y, partialTicks);
- if (pass == 0) {
- this.field_72748_H = 0;
- this.field_72749_I = 0;
- this.field_72750_J = 0;
- }
- Entity entity1 = this.field_72777_q.func_175606_aa();
- double d3 = entity1.field_70142_S + (entity1.field_70165_t - entity1.field_70142_S) * (double)partialTicks;
- double d4 = entity1.field_70137_T + (entity1.field_70163_u - entity1.field_70137_T) * (double)partialTicks;
- double d5 = entity1.field_70136_U + (entity1.field_70161_v - entity1.field_70136_U) * (double)partialTicks;
- TileEntityRendererDispatcher.field_147554_b = d3;
- TileEntityRendererDispatcher.field_147555_c = d4;
- TileEntityRendererDispatcher.field_147552_d = d5;
- this.field_175010_j.func_178628_a(d3, d4, d5);
- this.field_72777_q.field_71460_t.func_180436_i();
- this.field_72769_h.field_72984_F.func_76318_c("global");
- List list = this.field_72769_h.func_72910_y();
- if (pass == 0) {
- this.field_72748_H = list.size();
- }
- for (i = 0; i < this.field_72769_h.field_73007_j.size(); ++i) {
- entity2 = (Entity)this.field_72769_h.field_73007_j.get(i);
- if (!entity2.shouldRenderInPass(pass)) continue;
- ++this.field_72749_I;
- if (!entity2.func_145770_h(d0, d1, d2)) continue;
- this.field_175010_j.func_147937_a(entity2, partialTicks);
- }
- if (this.func_174985_d()) {
- GlStateManager.func_179143_c(519);
- GlStateManager.func_179106_n();
- this.field_175015_z.func_147614_f();
- this.field_175015_z.func_147610_a(false);
- this.field_72769_h.field_72984_F.func_76318_c("entityOutlines");
- RenderHelper.func_74518_a();
- this.field_175010_j.func_178632_c(true);
- for (i = 0; i < list.size(); ++i) {
- boolean flag1;
- entity2 = (Entity)list.get(i);
- if (!entity2.shouldRenderInPass(pass)) continue;
- boolean flag = this.field_72777_q.func_175606_aa() instanceof EntityLivingBase && ((EntityLivingBase)this.field_72777_q.func_175606_aa()).func_70608_bn();
- boolean bl = flag1 = entity2.func_145770_h(d0, d1, d2) && (entity2.field_70158_ak || p_180446_2_.func_78546_a(entity2.func_174813_aQ()) || entity2.field_70153_n == this.field_72777_q.field_71439_g) && entity2 instanceof EntityPlayer;
- if (entity2 == this.field_72777_q.func_175606_aa() && this.field_72777_q.field_71474_y.field_74320_O == 0 && !flag || !flag1) continue;
- this.field_175010_j.func_147937_a(entity2, partialTicks);
- }
- this.field_175010_j.func_178632_c(false);
- RenderHelper.func_74519_b();
- GlStateManager.func_179132_a(false);
- this.field_174991_A.func_148018_a(partialTicks);
- GlStateManager.func_179132_a(true);
- this.field_72777_q.func_147110_a().func_147610_a(false);
- GlStateManager.func_179127_m();
- GlStateManager.func_179143_c(515);
- GlStateManager.func_179126_j();
- GlStateManager.func_179141_d();
- }
- this.field_72769_h.field_72984_F.func_76318_c("entities");
- for (ContainerLocalRenderInformation containerlocalrenderinformation : this.field_72755_R) {
- Chunk chunk = this.field_72769_h.func_175726_f(containerlocalrenderinformation.field_178036_a.func_178568_j());
- for (Entity entity3 : chunk.func_177429_s()[containerlocalrenderinformation.field_178036_a.func_178568_j().func_177956_o() / 16]) {
- boolean flag2;
- if (!entity3.shouldRenderInPass(pass)) continue;
- boolean bl = flag2 = this.field_175010_j.func_178635_a(entity3, p_180446_2_, d0, d1, d2) || entity3.field_70153_n == this.field_72777_q.field_71439_g;
- if (flag2) {
- boolean flag3;
- boolean bl2 = flag3 = this.field_72777_q.func_175606_aa() instanceof EntityLivingBase ? ((EntityLivingBase)this.field_72777_q.func_175606_aa()).func_70608_bn() : false;
- if (entity3 == this.field_72777_q.func_175606_aa() && this.field_72777_q.field_71474_y.field_74320_O == 0 && !flag3 || entity3.field_70163_u >= 0.0 && entity3.field_70163_u < 256.0 && !this.field_72769_h.func_175667_e(new BlockPos(entity3))) continue;
- ++this.field_72749_I;
- this.field_175010_j.func_147937_a(entity3, partialTicks);
- }
- if (flag2 || !(entity3 instanceof EntityWitherSkull)) continue;
- this.field_72777_q.func_175598_ae().func_178630_b(entity3, partialTicks);
- }
- }
- this.field_72769_h.field_72984_F.func_76318_c("blockentities");
- RenderHelper.func_74519_b();
- for (ContainerLocalRenderInformation containerlocalrenderinformation2 : this.field_72755_R) {
- for (TileEntity tileentity : containerlocalrenderinformation2.field_178036_a.func_178571_g().func_178485_b()) {
- if (!tileentity.shouldRenderInPass(pass) || !p_180446_2_.func_78546_a(tileentity.getRenderBoundingBox())) continue;
- TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity, partialTicks, -1);
- }
- }
- this.func_180443_s();
- for (DestroyBlockProgress destroyblockprogress : this.field_72738_E.values()) {
- TileEntity tileentity;
- BlockPos blockpos = destroyblockprogress.func_180246_b();
- tileentity = this.field_72769_h.func_175625_s(blockpos);
- if (tileentity instanceof TileEntityChest) {
- TileEntityChest tileentitychest = (TileEntityChest)tileentity;
- if (tileentitychest.field_145991_k != null) {
- blockpos = blockpos.func_177972_a(EnumFacing.WEST);
- tileentity = this.field_72769_h.func_175625_s(blockpos);
- } else if (tileentitychest.field_145992_i != null) {
- blockpos = blockpos.func_177972_a(EnumFacing.NORTH);
- tileentity = this.field_72769_h.func_175625_s(blockpos);
- }
- }
- Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c();
- if (tileentity == null || !tileentity.shouldRenderInPass(pass) || !tileentity.canRenderBreaking() || !p_180446_2_.func_78546_a(tileentity.getRenderBoundingBox())) continue;
- TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity, partialTicks, destroyblockprogress.func_73106_e());
- }
- this.func_174969_t();
- this.field_72777_q.field_71460_t.func_175072_h();
- this.field_72777_q.field_71424_I.func_76319_b();
- }
- }
- public String func_72735_c() {
- int i = this.field_175008_n.field_178164_f.length;
- int j = 0;
- for (ContainerLocalRenderInformation containerlocalrenderinformation : this.field_72755_R) {
- CompiledChunk compiledchunk = containerlocalrenderinformation.field_178036_a.field_178590_b;
- if (compiledchunk == CompiledChunk.field_178502_a || compiledchunk.func_178489_a()) continue;
- ++j;
- }
- Object[] arrobject = new Object[5];
- arrobject[0] = j;
- arrobject[1] = i;
- arrobject[2] = this.field_72777_q.field_175612_E ? "(s) " : "";
- arrobject[3] = this.field_72739_F;
- arrobject[4] = this.field_174995_M.func_178504_a();
- return String.format("C: %d/%d %sD: %d, %s", arrobject);
- }
- public String func_72723_d() {
- return "E: " + this.field_72749_I + "/" + this.field_72748_H + ", B: " + this.field_72750_J + ", I: " + (this.field_72748_H - this.field_72750_J - this.field_72749_I);
- }
- public void func_174970_a(Entity entity, double d, ICamera iCamera, int n, boolean bl) {
- void partialTicks;
- boolean flag1;
- Frustum camera;
- RenderChunk renderchunk3;
- RenderGlobal renderGlobal;
- void viewEntity;
- CallbackInfo callbackInfo = new CallbackInfo("func_174970_a", true);
- renderGlobal.replayModRender_setupTerrain(entity, d, iCamera, n, bl, callbackInfo);
- if (callbackInfo.isCancelled()) {
- return;
- }
- if (this.field_72777_q.field_71474_y.field_151451_c != this.field_72739_F) {
- this.func_72712_a();
- }
- this.field_72769_h.field_72984_F.func_76320_a("camera");
- double d1 = viewEntity.field_70165_t - this.field_174992_B;
- double d2 = viewEntity.field_70163_u - this.field_174993_C;
- double d3 = viewEntity.field_70161_v - this.field_174987_D;
- if (this.field_174988_E != viewEntity.field_70176_ah || this.field_174989_F != viewEntity.field_70162_ai || this.field_174990_G != viewEntity.field_70164_aj || d1 * d1 + d2 * d2 + d3 * d3 > 16.0) {
- this.field_174992_B = viewEntity.field_70165_t;
- this.field_174993_C = viewEntity.field_70163_u;
- this.field_174987_D = viewEntity.field_70161_v;
- this.field_174988_E = viewEntity.field_70176_ah;
- this.field_174989_F = viewEntity.field_70162_ai;
- this.field_174990_G = viewEntity.field_70164_aj;
- this.field_175008_n.func_178163_a(viewEntity.field_70165_t, viewEntity.field_70161_v);
- }
- this.field_72769_h.field_72984_F.func_76318_c("renderlistcamera");
- double d4 = viewEntity.field_70142_S + (viewEntity.field_70165_t - viewEntity.field_70142_S) * partialTicks;
- double d5 = viewEntity.field_70137_T + (viewEntity.field_70163_u - viewEntity.field_70137_T) * partialTicks;
- double d6 = viewEntity.field_70136_U + (viewEntity.field_70161_v - viewEntity.field_70136_U) * partialTicks;
- this.field_174996_N.func_178004_a(d4, d5, d6);
- this.field_72769_h.field_72984_F.func_76318_c("cull");
- if (this.field_175001_U != null) {
- Frustum frustum = new Frustum(this.field_175001_U);
- frustum.func_78547_a(this.field_175003_W.x, this.field_175003_W.y, this.field_175003_W.z);
- camera = frustum;
- }
- this.field_72777_q.field_71424_I.func_76318_c("culling");
- BlockPos blockpos1 = new BlockPos(d4, d5 + (double)viewEntity.func_70047_e(), d6);
- RenderChunk renderchunk = this.field_175008_n.func_178161_a(blockpos1);
- BlockPos blockpos = new BlockPos(MathHelper.func_76128_c(d4) / 16 * 16, MathHelper.func_76128_c(d5) / 16 * 16, MathHelper.func_76128_c(d6) / 16 * 16);
- this.field_147595_R = this.field_147595_R || !this.field_175009_l.isEmpty() || viewEntity.field_70165_t != this.field_174997_H || viewEntity.field_70163_u != this.field_174998_I || viewEntity.field_70161_v != this.field_174999_J || (double)viewEntity.field_70125_A != this.field_175000_K || (double)viewEntity.field_70177_z != this.field_174994_L;
- this.field_174997_H = viewEntity.field_70165_t;
- this.field_174998_I = viewEntity.field_70163_u;
- this.field_174999_J = viewEntity.field_70161_v;
- this.field_175000_K = viewEntity.field_70125_A;
- this.field_174994_L = viewEntity.field_70177_z;
- boolean bl2 = flag1 = this.field_175001_U != null;
- if (!flag1 && this.field_147595_R) {
- void frameCount;
- this.field_147595_R = false;
- this.field_72755_R = Lists.newArrayList();
- LinkedList linkedlist = Lists.newLinkedList();
- boolean flag2 = this.field_72777_q.field_175612_E;
- if (renderchunk == null) {
- int j = blockpos1.func_177956_o() > 0 ? 248 : 8;
- for (int k = - this.field_72739_F; k <= this.field_72739_F; ++k) {
- for (int l = - this.field_72739_F; l <= this.field_72739_F; ++l) {
- RenderChunk renderchunk1 = this.field_175008_n.func_178161_a(new BlockPos((k << 4) + 8, j, (l << 4) + 8));
- if (renderchunk1 == null || !camera.func_78546_a(renderchunk1.field_178591_c)) continue;
- renderchunk1.func_178577_a((int)frameCount);
- linkedlist.add(new ContainerLocalRenderInformation(renderchunk1, null, 0, null));
- }
- }
- } else {
- void playerSpectator;
- boolean flag3 = false;
- ContainerLocalRenderInformation containerlocalrenderinformation2 = new ContainerLocalRenderInformation(renderchunk, null, 0, null);
- Set set1 = this.func_174978_c(blockpos1);
- if (!set1.isEmpty() && set1.size() == 1) {
- Vector3f vector3f = this.func_174962_a((Entity)viewEntity, (double)partialTicks);
- EnumFacing enumfacing = EnumFacing.func_176737_a(vector3f.x, vector3f.y, vector3f.z).func_176734_d();
- set1.remove(enumfacing);
- }
- if (set1.isEmpty()) {
- flag3 = true;
- }
- if (flag3 && playerSpectator == false) {
- this.field_72755_R.add(containerlocalrenderinformation2);
- } else {
- if (playerSpectator != false && this.field_72769_h.func_180495_p(blockpos1).func_177230_c().func_149662_c()) {
- flag2 = false;
- }
- renderchunk.func_178577_a((int)frameCount);
- linkedlist.add(containerlocalrenderinformation2);
- }
- }
- while (!linkedlist.isEmpty()) {
- ContainerLocalRenderInformation containerlocalrenderinformation1 = (ContainerLocalRenderInformation)linkedlist.poll();
- renderchunk3 = containerlocalrenderinformation1.field_178036_a;
- EnumFacing enumfacing2 = containerlocalrenderinformation1.field_178034_b;
- BlockPos blockpos2 = renderchunk3.func_178568_j();
- this.field_72755_R.add(containerlocalrenderinformation1);
- for (EnumFacing enumfacing1 : EnumFacing.values()) {
- RenderChunk renderchunk2 = this.func_174973_a(blockpos1, blockpos2, enumfacing1);
- if (flag2 && containerlocalrenderinformation1.field_178035_c.contains(enumfacing1.func_176734_d()) || flag2 && enumfacing2 != null && !renderchunk3.func_178571_g().func_178495_a(enumfacing2.func_176734_d(), enumfacing1) || renderchunk2 == null || !renderchunk2.func_178577_a((int)frameCount) || !camera.func_78546_a(renderchunk2.field_178591_c)) continue;
- ContainerLocalRenderInformation containerlocalrenderinformation = new ContainerLocalRenderInformation(renderchunk2, enumfacing1, containerlocalrenderinformation1.field_178032_d + 1, null);
- containerlocalrenderinformation.field_178035_c.addAll(containerlocalrenderinformation1.field_178035_c);
- containerlocalrenderinformation.field_178035_c.add(enumfacing1);
- linkedlist.add(containerlocalrenderinformation);
- }
- }
- }
- if (this.field_175002_T) {
- this.func_174984_a(d4, d5, d6);
- this.field_175002_T = false;
- }
- this.field_174995_M.func_178513_e();
- Set set = this.field_175009_l;
- this.field_175009_l = Sets.newLinkedHashSet();
- for (ContainerLocalRenderInformation containerlocalrenderinformation1 : this.field_72755_R) {
- renderchunk3 = containerlocalrenderinformation1.field_178036_a;
- if (!renderchunk3.func_178569_m() && !renderchunk3.func_178583_l() && !set.contains(renderchunk3)) continue;
- this.field_147595_R = true;
- if (this.func_174983_a(blockpos, containerlocalrenderinformation1.field_178036_a)) {
- this.field_72777_q.field_71424_I.func_76320_a("build near");
- this.field_174995_M.func_178505_b(renderchunk3);
- renderchunk3.func_178575_a(false);
- this.field_72777_q.field_71424_I.func_76319_b();
- continue;
- }
- this.field_175009_l.add(renderchunk3);
- }
- this.field_175009_l.addAll(set);
- this.field_72777_q.field_71424_I.func_76319_b();
- }
- private boolean func_174983_a(BlockPos blockPos, RenderChunk renderChunk) {
- void p_174983_2_;
- void p_174983_1_;
- RenderGlobal renderGlobal;
- CallbackInfoReturnable callbackInfoReturnable = new CallbackInfoReturnable("func_174983_a", true);
- renderGlobal.replayModRender_isPositionInRenderChunk(blockPos, renderChunk, callbackInfoReturnable);
- if (callbackInfoReturnable.isCancelled()) {
- return callbackInfoReturnable.getReturnValueZ();
- }
- BlockPos blockpos1 = p_174983_2_.func_178568_j();
- return MathHelper.func_76130_a(p_174983_1_.func_177958_n() - blockpos1.func_177958_n()) > 16 ? false : (MathHelper.func_76130_a(p_174983_1_.func_177956_o() - blockpos1.func_177956_o()) > 16 ? false : MathHelper.func_76130_a(p_174983_1_.func_177952_p() - blockpos1.func_177952_p()) <= 16);
- }
- private Set func_174978_c(BlockPos p_174978_1_) {
- VisGraph visgraph = new VisGraph();
- BlockPos blockpos1 = new BlockPos(p_174978_1_.func_177958_n() >> 4 << 4, p_174978_1_.func_177956_o() >> 4 << 4, p_174978_1_.func_177952_p() >> 4 << 4);
- Chunk chunk = this.field_72769_h.func_175726_f(blockpos1);
- for (BlockPos$MutableBlockPos mutableblockpos : BlockPos.func_177975_b(blockpos1, blockpos1.func_177982_a(15, 15, 15))) {
- if (!chunk.func_177428_a(mutableblockpos).func_149662_c()) continue;
- visgraph.func_178606_a(mutableblockpos);
- }
- return visgraph.func_178609_b(p_174978_1_);
- }
- private RenderChunk func_174973_a(BlockPos p_174973_1_, BlockPos p_174973_2_, EnumFacing p_174973_3_) {
- BlockPos blockpos2 = p_174973_2_.func_177967_a(p_174973_3_, 16);
- return MathHelper.func_76130_a(p_174973_1_.func_177958_n() - blockpos2.func_177958_n()) > this.field_72739_F * 16 ? null : (blockpos2.func_177956_o() >= 0 && blockpos2.func_177956_o() < 256 ? (MathHelper.func_76130_a(p_174973_1_.func_177952_p() - blockpos2.func_177952_p()) > this.field_72739_F * 16 ? null : this.field_175008_n.func_178161_a(blockpos2)) : null);
- }
- private void func_174984_a(double p_174984_1_, double p_174984_3_, double p_174984_5_) {
- this.field_175001_U = new ClippingHelperImpl();
- ((ClippingHelperImpl)this.field_175001_U).func_78560_b();
- Matrix4f matrix4f = new Matrix4f(this.field_175001_U.field_178626_c);
- matrix4f.transpose();
- Matrix4f matrix4f1 = new Matrix4f(this.field_175001_U.field_178625_b);
- matrix4f1.transpose();
- Matrix4f matrix4f2 = new Matrix4f();
- matrix4f2.mul(matrix4f1, matrix4f);
- matrix4f2.invert();
- this.field_175003_W.x = p_174984_1_;
- this.field_175003_W.y = p_174984_3_;
- this.field_175003_W.z = p_174984_5_;
- this.field_175004_V[0] = new Vector4f(-1.0f, -1.0f, -1.0f, 1.0f);
- this.field_175004_V[1] = new Vector4f(1.0f, -1.0f, -1.0f, 1.0f);
- this.field_175004_V[2] = new Vector4f(1.0f, 1.0f, -1.0f, 1.0f);
- this.field_175004_V[3] = new Vector4f(-1.0f, 1.0f, -1.0f, 1.0f);
- this.field_175004_V[4] = new Vector4f(-1.0f, -1.0f, 1.0f, 1.0f);
- this.field_175004_V[5] = new Vector4f(1.0f, -1.0f, 1.0f, 1.0f);
- this.field_175004_V[6] = new Vector4f(1.0f, 1.0f, 1.0f, 1.0f);
- this.field_175004_V[7] = new Vector4f(-1.0f, 1.0f, 1.0f, 1.0f);
- for (int i = 0; i < 8; ++i) {
- matrix4f2.transform((Tuple4f)this.field_175004_V[i]);
- this.field_175004_V[i].x /= this.field_175004_V[i].w;
- this.field_175004_V[i].y /= this.field_175004_V[i].w;
- this.field_175004_V[i].z /= this.field_175004_V[i].w;
- this.field_175004_V[i].w = 1.0f;
- }
- }
- protected Vector3f func_174962_a(Entity entityIn, double partialTicks) {
- float f = (float)((double)entityIn.field_70127_C + (double)(entityIn.field_70125_A - entityIn.field_70127_C) * partialTicks);
- float f1 = (float)((double)entityIn.field_70126_B + (double)(entityIn.field_70177_z - entityIn.field_70126_B) * partialTicks);
- if (Minecraft.func_71410_x().field_71474_y.field_74320_O == 2) {
- f += 180.0f;
- }
- float f2 = MathHelper.func_76134_b((- f1) * 0.017453292f - 3.1415927f);
- float f3 = MathHelper.func_76126_a((- f1) * 0.017453292f - 3.1415927f);
- float f4 = - MathHelper.func_76134_b((- f) * 0.017453292f);
- float f5 = MathHelper.func_76126_a((- f) * 0.017453292f);
- return new Vector3f(f3 * f4, f5, f2 * f4);
- }
- public int func_174977_a(EnumWorldBlockLayer blockLayerIn, double partialTicks, int pass, Entity entityIn) {
- RenderHelper.func_74518_a();
- if (blockLayerIn == EnumWorldBlockLayer.TRANSLUCENT) {
- this.field_72777_q.field_71424_I.func_76320_a("translucent_sort");
- double d1 = entityIn.field_70165_t - this.field_147596_f;
- double d2 = entityIn.field_70163_u - this.field_147597_g;
- double d3 = entityIn.field_70161_v - this.field_147602_h;
- if (d1 * d1 + d2 * d2 + d3 * d3 > 1.0) {
- this.field_147596_f = entityIn.field_70165_t;
- this.field_147597_g = entityIn.field_70163_u;
- this.field_147602_h = entityIn.field_70161_v;
- int l = 0;
- for (ContainerLocalRenderInformation containerlocalrenderinformation : this.field_72755_R) {
- if (!containerlocalrenderinformation.field_178036_a.field_178590_b.func_178492_d(blockLayerIn) || l++ >= 15) continue;
- this.field_174995_M.func_178509_c(containerlocalrenderinformation.field_178036_a);
- }
- }
- this.field_72777_q.field_71424_I.func_76319_b();
- }
- this.field_72777_q.field_71424_I.func_76320_a("filterempty");
- int i1 = 0;
- boolean flag = blockLayerIn == EnumWorldBlockLayer.TRANSLUCENT;
- int j1 = flag ? this.field_72755_R.size() - 1 : 0;
- int j = flag ? -1 : this.field_72755_R.size();
- int k1 = flag ? -1 : 1;
- for (int k = j1; k != j; k += k1) {
- RenderChunk renderchunk = ((ContainerLocalRenderInformation)this.field_72755_R.get((int)k)).field_178036_a;
- if (renderchunk.func_178571_g().func_178491_b(blockLayerIn)) continue;
- ++i1;
- this.field_174996_N.func_178002_a(renderchunk, blockLayerIn);
- }
- this.field_72777_q.field_71424_I.func_76318_c("render_" + (Object)((Object)blockLayerIn));
- this.func_174982_a(blockLayerIn);
- this.field_72777_q.field_71424_I.func_76319_b();
- return i1;
- }
- private void func_174982_a(EnumWorldBlockLayer blockLayerIn) {
- this.field_72777_q.field_71460_t.func_180436_i();
- if (OpenGlHelper.func_176075_f()) {
- GL11.glEnableClientState((int)32884);
- OpenGlHelper.func_77472_b(OpenGlHelper.field_77478_a);
- GL11.glEnableClientState((int)32888);
- OpenGlHelper.func_77472_b(OpenGlHelper.field_77476_b);
- GL11.glEnableClientState((int)32888);
- OpenGlHelper.func_77472_b(OpenGlHelper.field_77478_a);
- GL11.glEnableClientState((int)32886);
- }
- this.field_174996_N.func_178001_a(blockLayerIn);
- if (OpenGlHelper.func_176075_f()) {
- List list = DefaultVertexFormats.field_176600_a.func_177343_g();
- for (VertexFormatElement vertexformatelement : list) {
- VertexFormatElement.EnumUsage enumusage = vertexformatelement.func_177375_c();
- int i = vertexformatelement.func_177369_e();
- switch (SwitchEnumUsage.field_178037_a[enumusage.ordinal()]) {
- case 1: {
- GL11.glDisableClientState((int)32884);
- break;
- }
- case 2: {
- OpenGlHelper.func_77472_b(OpenGlHelper.field_77478_a + i);
- GL11.glDisableClientState((int)32888);
- OpenGlHelper.func_77472_b(OpenGlHelper.field_77478_a);
- break;
- }
- case 3: {
- GL11.glDisableClientState((int)32886);
- GlStateManager.func_179117_G();
- }
- }
- }
- }
- this.field_72777_q.field_71460_t.func_175072_h();
- }
- private void func_174965_a(Iterator p_174965_1_) {
- while (p_174965_1_.hasNext()) {
- DestroyBlockProgress destroyblockprogress = (DestroyBlockProgress)p_174965_1_.next();
- int i = destroyblockprogress.func_82743_f();
- if (this.field_72773_u - i <= 400) continue;
- p_174965_1_.remove();
- }
- }
- public void func_72734_e() {
- ++this.field_72773_u;
- if (this.field_72773_u % 20 == 0) {
- this.func_174965_a(this.field_72738_E.values().iterator());
- }
- }
- private void func_180448_r() {
- GlStateManager.func_179106_n();
- GlStateManager.func_179118_c();
- GlStateManager.func_179147_l();
- GlStateManager.func_179120_a(770, 771, 1, 0);
- RenderHelper.func_74518_a();
- GlStateManager.func_179132_a(false);
- this.field_72770_i.func_110577_a(field_110926_k);
- Tessellator tessellator = Tessellator.func_178181_a();
- WorldRenderer worldrenderer = tessellator.func_178180_c();
- for (int i = 0; i < 6; ++i) {
- GlStateManager.func_179094_E();
- if (i == 1) {
- GlStateManager.func_179114_b(90.0f, 1.0f, 0.0f, 0.0f);
- }
- if (i == 2) {
- GlStateManager.func_179114_b(-90.0f, 1.0f, 0.0f, 0.0f);
- }
- if (i == 3) {
- GlStateManager.func_179114_b(180.0f, 1.0f, 0.0f, 0.0f);
- }
- if (i == 4) {
- GlStateManager.func_179114_b(90.0f, 0.0f, 0.0f, 1.0f);
- }
- if (i == 5) {
- GlStateManager.func_179114_b(-90.0f, 0.0f, 0.0f, 1.0f);
- }
- worldrenderer.func_178970_b();
- worldrenderer.func_178991_c(2631720);
- worldrenderer.func_178985_a(-100.0, -100.0, -100.0, 0.0, 0.0);
- worldrenderer.func_178985_a(-100.0, -100.0, 100.0, 0.0, 16.0);
- worldrenderer.func_178985_a(100.0, -100.0, 100.0, 16.0, 16.0);
- worldrenderer.func_178985_a(100.0, -100.0, -100.0, 16.0, 0.0);
- tessellator.func_78381_a();
- GlStateManager.func_179121_F();
- }
- GlStateManager.func_179132_a(true);
- GlStateManager.func_179098_w();
- GlStateManager.func_179141_d();
- }
- public void func_174976_a(float partialTicks, int pass) {
- IRenderHandler renderer = this.field_72769_h.field_73011_w.getSkyRenderer();
- if (renderer != null) {
- renderer.render(partialTicks, this.field_72769_h, this.field_72777_q);
- return;
- }
- if (this.field_72777_q.field_71441_e.field_73011_w.func_177502_q() == 1) {
- this.func_180448_r();
- } else if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) {
- float f7;
- float f8;
- float f9;
- float f11;
- float f10;
- GlStateManager.func_179090_x();
- Vec3 vec3 = this.field_72769_h.func_72833_a(this.field_72777_q.func_175606_aa(), partialTicks);
- float f1 = (float)vec3.field_72450_a;
- float f2 = (float)vec3.field_72448_b;
- float f3 = (float)vec3.field_72449_c;
- if (pass != 2) {
- float f4 = (f1 * 30.0f + f2 * 59.0f + f3 * 11.0f) / 100.0f;
- float f5 = (f1 * 30.0f + f2 * 70.0f) / 100.0f;
- float f6 = (f1 * 30.0f + f3 * 70.0f) / 100.0f;
- f1 = f4;
- f2 = f5;
- f3 = f6;
- }
- GlStateManager.func_179124_c(f1, f2, f3);
- Tessellator tessellator = Tessellator.func_178181_a();
- WorldRenderer worldrenderer = tessellator.func_178180_c();
- GlStateManager.func_179132_a(false);
- GlStateManager.func_179127_m();
- GlStateManager.func_179124_c(f1, f2, f3);
- if (this.field_175005_X) {
- this.field_175012_t.func_177359_a();
- GL11.glEnableClientState((int)32884);
- GL11.glVertexPointer((int)3, (int)5126, (int)12, (long)0);
- this.field_175012_t.func_177358_a(7);
- this.field_175012_t.func_177361_b();
- GL11.glDisableClientState((int)32884);
- } else {
- GlStateManager.func_179148_o(this.field_72771_w);
- }
- GlStateManager.func_179106_n();
- GlStateManager.func_179118_c();
- GlStateManager.func_179147_l();
- GlStateManager.func_179120_a(770, 771, 1, 0);
- RenderHelper.func_74518_a();
- float[] afloat = this.field_72769_h.field_73011_w.func_76560_a(this.field_72769_h.func_72826_c(partialTicks), partialTicks);
- if (afloat != null) {
- float f12;
- GlStateManager.func_179090_x();
- GlStateManager.func_179103_j(7425);
- GlStateManager.func_179094_E();
- GlStateManager.func_179114_b(90.0f, 1.0f, 0.0f, 0.0f);
- GlStateManager.func_179114_b(MathHelper.func_76126_a(this.field_72769_h.func_72929_e(partialTicks)) < 0.0f ? 180.0f : 0.0f, 0.0f, 0.0f, 1.0f);
- GlStateManager.func_179114_b(90.0f, 0.0f, 0.0f, 1.0f);
- f7 = afloat[0];
- f8 = afloat[1];
- f9 = afloat[2];
- if (pass != 2) {
- f10 = (f7 * 30.0f + f8 * 59.0f + f9 * 11.0f) / 100.0f;
- f11 = (f7 * 30.0f + f8 * 70.0f) / 100.0f;
- f12 = (f7 * 30.0f + f9 * 70.0f) / 100.0f;
- f7 = f10;
- f8 = f11;
- f9 = f12;
- }
- worldrenderer.func_178964_a(6);
- worldrenderer.func_178960_a(f7, f8, f9, afloat[3]);
- worldrenderer.func_178984_b(0.0, 100.0, 0.0);
- boolean flag = true;
- worldrenderer.func_178960_a(afloat[0], afloat[1], afloat[2], 0.0f);
- for (int j = 0; j <= 16; ++j) {
- f12 = (float)j * 3.1415927f * 2.0f / 16.0f;
- float f13 = MathHelper.func_76126_a(f12);
- float f14 = MathHelper.func_76134_b(f12);
- worldrenderer.func_178984_b(f13 * 120.0f, f14 * 120.0f, (- f14) * 40.0f * afloat[3]);
- }
- tessellator.func_78381_a();
- GlStateManager.func_179121_F();
- GlStateManager.func_179103_j(7424);
- }
- GlStateManager.func_179098_w();
- GlStateManager.func_179120_a(770, 1, 1, 0);
- GlStateManager.func_179094_E();
- f7 = 1.0f - this.field_72769_h.func_72867_j(partialTicks);
- f8 = 0.0f;
- f9 = 0.0f;
- f10 = 0.0f;
- GlStateManager.func_179131_c(1.0f, 1.0f, 1.0f, f7);
- GlStateManager.func_179109_b(0.0f, 0.0f, 0.0f);
- GlStateManager.func_179114_b(-90.0f, 0.0f, 1.0f, 0.0f);
- GlStateManager.func_179114_b(this.field_72769_h.func_72826_c(partialTicks) * 360.0f, 1.0f, 0.0f, 0.0f);
- f11 = 30.0f;
- this.field_72770_i.func_110577_a(field_110928_i);
- worldrenderer.func_178970_b();
- worldrenderer.func_178985_a(- f11, 100.0, - f11, 0.0, 0.0);
- worldrenderer.func_178985_a(f11, 100.0, - f11, 1.0, 0.0);
- worldrenderer.func_178985_a(f11, 100.0, f11, 1.0, 1.0);
- worldrenderer.func_178985_a(- f11, 100.0, f11, 0.0, 1.0);
- tessellator.func_78381_a();
- f11 = 20.0f;
- this.field_72770_i.func_110577_a(field_110927_h);
- int k = this.field_72769_h.func_72853_d();
- int l = k % 4;
- int i1 = k / 4 % 2;
- float f15 = (float)(l + 0) / 4.0f;
- float f16 = (float)(i1 + 0) / 2.0f;
- float f17 = (float)(l + 1) / 4.0f;
- float f18 = (float)(i1 + 1) / 2.0f;
- worldrenderer.func_178970_b();
- worldrenderer.func_178985_a(- f11, -100.0, f11, f17, f18);
- worldrenderer.func_178985_a(f11, -100.0, f11, f15, f18);
- worldrenderer.func_178985_a(f11, -100.0, - f11, f15, f16);
- worldrenderer.func_178985_a(- f11, -100.0, - f11, f17, f16);
- tessellator.func_78381_a();
- GlStateManager.func_179090_x();
- float f19 = this.field_72769_h.func_72880_h(partialTicks) * f7;
- if (f19 > 0.0f) {
- GlStateManager.func_179131_c(f19, f19, f19, f19);
- if (this.field_175005_X) {
- this.field_175013_s.func_177359_a();
- GL11.glEnableClientState((int)32884);
- GL11.glVertexPointer((int)3, (int)5126, (int)12, (long)0);
- this.field_175013_s.func_177358_a(7);
- this.field_175013_s.func_177361_b();
- GL11.glDisableClientState((int)32884);
- } else {
- GlStateManager.func_179148_o(this.field_72772_v);
- }
- }
- GlStateManager.func_179131_c(1.0f, 1.0f, 1.0f, 1.0f);
- GlStateManager.func_179084_k();
- GlStateManager.func_179141_d();
- GlStateManager.func_179127_m();
- GlStateManager.func_179121_F();
- GlStateManager.func_179090_x();
- GlStateManager.func_179124_c(0.0f, 0.0f, 0.0f);
- double d0 = this.field_72777_q.field_71439_g.func_174824_e((float)partialTicks).field_72448_b - this.field_72769_h.func_72919_O();
- if (d0 < 0.0) {
- GlStateManager.func_179094_E();
- GlStateManager.func_179109_b(0.0f, 12.0f, 0.0f);
- if (this.field_175005_X) {
- this.field_175011_u.func_177359_a();
- GL11.glEnableClientState((int)32884);
- GL11.glVertexPointer((int)3, (int)5126, (int)12, (long)0);
- this.field_175011_u.func_177358_a(7);
- this.field_175011_u.func_177361_b();
- GL11.glDisableClientState((int)32884);
- } else {
- GlStateManager.func_179148_o(this.field_72781_x);
- }
- GlStateManager.func_179121_F();
- f9 = 1.0f;
- f10 = - (float)(d0 + 65.0);
- f11 = -1.0f;
- worldrenderer.func_178970_b();
- worldrenderer.func_178974_a(0, 255);
- worldrenderer.func_178984_b(-1.0, f10, 1.0);
- worldrenderer.func_178984_b(1.0, f10, 1.0);
- worldrenderer.func_178984_b(1.0, -1.0, 1.0);
- worldrenderer.func_178984_b(-1.0, -1.0, 1.0);
- worldrenderer.func_178984_b(-1.0, -1.0, -1.0);
- worldrenderer.func_178984_b(1.0, -1.0, -1.0);
- worldrenderer.func_178984_b(1.0, f10, -1.0);
- worldrenderer.func_178984_b(-1.0, f10, -1.0);
- worldrenderer.func_178984_b(1.0, -1.0, -1.0);
- worldrenderer.func_178984_b(1.0, -1.0, 1.0);
- worldrenderer.func_178984_b(1.0, f10, 1.0);
- worldrenderer.func_178984_b(1.0, f10, -1.0);
- worldrenderer.func_178984_b(-1.0, f10, -1.0);
- worldrenderer.func_178984_b(-1.0, f10, 1.0);
- worldrenderer.func_178984_b(-1.0, -1.0, 1.0);
- worldrenderer.func_178984_b(-1.0, -1.0, -1.0);
- worldrenderer.func_178984_b(-1.0, -1.0, -1.0);
- worldrenderer.func_178984_b(-1.0, -1.0, 1.0);
- worldrenderer.func_178984_b(1.0, -1.0, 1.0);
- worldrenderer.func_178984_b(1.0, -1.0, -1.0);
- tessellator.func_78381_a();
- }
- if (this.field_72769_h.field_73011_w.func_76561_g()) {
- GlStateManager.func_179124_c(f1 * 0.2f + 0.04f, f2 * 0.2f + 0.04f, f3 * 0.6f + 0.1f);
- } else {
- GlStateManager.func_179124_c(f1, f2, f3);
- }
- GlStateManager.func_179094_E();
- GlStateManager.func_179109_b(0.0f, - (float)(d0 - 16.0), 0.0f);
- GlStateManager.func_179148_o(this.field_72781_x);
- GlStateManager.func_179121_F();
- GlStateManager.func_179098_w();
- GlStateManager.func_179132_a(true);
- }
- }
- public void func_180447_b(float p_180447_1_, int p_180447_2_) {
- IRenderHandler renderer = this.field_72777_q.field_71441_e.field_73011_w.getCloudRenderer();
- if (renderer != null) {
- renderer.render(p_180447_1_, this.field_72777_q.field_71441_e, this.field_72777_q);
- return;
- }
- if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) {
- if (this.field_72777_q.field_71474_y.field_74347_j) {
- this.func_180445_c(p_180447_1_, p_180447_2_);
- } else {
- float f5;
- GlStateManager.func_179129_p();
- float f1 = (float)(this.field_72777_q.func_175606_aa().field_70137_T + (this.field_72777_q.func_175606_aa().field_70163_u - this.field_72777_q.func_175606_aa().field_70137_T) * (double)p_180447_1_);
- boolean flag = true;
- boolean flag1 = true;
- Tessellator tessellator = Tessellator.func_178181_a();
- WorldRenderer worldrenderer = tessellator.func_178180_c();
- this.field_72770_i.func_110577_a(field_110925_j);
- GlStateManager.func_179147_l();
- GlStateManager.func_179120_a(770, 771, 1, 0);
- Vec3 vec3 = this.field_72769_h.func_72824_f(p_180447_1_);
- float f2 = (float)vec3.field_72450_a;
- float f3 = (float)vec3.field_72448_b;
- float f4 = (float)vec3.field_72449_c;
- if (p_180447_2_ != 2) {
- f5 = (f2 * 30.0f + f3 * 59.0f + f4 * 11.0f) / 100.0f;
- float f6 = (f2 * 30.0f + f3 * 70.0f) / 100.0f;
- float f7 = (f2 * 30.0f + f4 * 70.0f) / 100.0f;
- f2 = f5;
- f3 = f6;
- f4 = f7;
- }
- f5 = 4.8828125E-4f;
- double d2 = (float)this.field_72773_u + p_180447_1_;
- double d0 = this.field_72777_q.func_175606_aa().field_70169_q + (this.field_72777_q.func_175606_aa().field_70165_t - this.field_72777_q.func_175606_aa().field_70169_q) * (double)p_180447_1_ + d2 * 0.029999999329447746;
- double d1 = this.field_72777_q.func_175606_aa().field_70166_s + (this.field_72777_q.func_175606_aa().field_70161_v - this.field_72777_q.func_175606_aa().field_70166_s) * (double)p_180447_1_;
- int j = MathHelper.func_76128_c(d0 / 2048.0);
- int k = MathHelper.func_76128_c(d1 / 2048.0);
- float f8 = this.field_72769_h.field_73011_w.func_76571_f() - f1 + 0.33f;
- float f9 = (float)((d0 -= (double)(j * 2048)) * 4.8828125E-4);
- float f10 = (float)((d1 -= (double)(k * 2048)) * 4.8828125E-4);
- worldrenderer.func_178970_b();
- worldrenderer.func_178960_a(f2, f3, f4, 0.8f);
- for (int l = -256; l < 256; l += 32) {
- for (int i1 = -256; i1 < 256; i1 += 32) {
- worldrenderer.func_178985_a(l + 0, f8, i1 + 32, (float)(l + 0) * 4.8828125E-4f + f9, (float)(i1 + 32) * 4.8828125E-4f + f10);
- worldrenderer.func_178985_a(l + 32, f8, i1 + 32, (float)(l + 32) * 4.8828125E-4f + f9, (float)(i1 + 32) * 4.8828125E-4f + f10);
- worldrenderer.func_178985_a(l + 32, f8, i1 + 0, (float)(l + 32) * 4.8828125E-4f + f9, (float)(i1 + 0) * 4.8828125E-4f + f10);
- worldrenderer.func_178985_a(l + 0, f8, i1 + 0, (float)(l + 0) * 4.8828125E-4f + f9, (float)(i1 + 0) * 4.8828125E-4f + f10);
- }
- }
- tessellator.func_78381_a();
- GlStateManager.func_179131_c(1.0f, 1.0f, 1.0f, 1.0f);
- GlStateManager.func_179084_k();
- GlStateManager.func_179089_o();
- }
- }
- }
- public boolean func_72721_a(double p_72721_1_, double p_72721_3_, double p_72721_5_, float p_72721_7_) {
- return false;
- }
- private void func_180445_c(float p_180445_1_, int p_180445_2_) {
- float f9;
- float f8;
- float f10;
- GlStateManager.func_179129_p();
- float f1 = (float)(this.field_72777_q.func_175606_aa().field_70137_T + (this.field_72777_q.func_175606_aa().field_70163_u - this.field_72777_q.func_175606_aa().field_70137_T) * (double)p_180445_1_);
- Tessellator tessellator = Tessellator.func_178181_a();
- WorldRenderer worldrenderer = tessellator.func_178180_c();
- float f2 = 12.0f;
- float f3 = 4.0f;
- double d0 = (float)this.field_72773_u + p_180445_1_;
- double d1 = (this.field_72777_q.func_175606_aa().field_70169_q + (this.field_72777_q.func_175606_aa().field_70165_t - this.field_72777_q.func_175606_aa().field_70169_q) * (double)p_180445_1_ + d0 * 0.029999999329447746) / 12.0;
- double d2 = (this.field_72777_q.func_175606_aa().field_70166_s + (this.field_72777_q.func_175606_aa().field_70161_v - this.field_72777_q.func_175606_aa().field_70166_s) * (double)p_180445_1_) / 12.0 + 0.33000001311302185;
- float f4 = this.field_72769_h.field_73011_w.func_76571_f() - f1 + 0.33f;
- int j = MathHelper.func_76128_c(d1 / 2048.0);
- int k = MathHelper.func_76128_c(d2 / 2048.0);
- d1 -= (double)(j * 2048);
- d2 -= (double)(k * 2048);
- this.field_72770_i.func_110577_a(field_110925_j);
- GlStateManager.func_179147_l();
- GlStateManager.func_179120_a(770, 771, 1, 0);
- Vec3 vec3 = this.field_72769_h.func_72824_f(p_180445_1_);
- float f5 = (float)vec3.field_72450_a;
- float f6 = (float)vec3.field_72448_b;
- float f7 = (float)vec3.field_72449_c;
- if (p_180445_2_ != 2) {
- f8 = (f5 * 30.0f + f6 * 59.0f + f7 * 11.0f) / 100.0f;
- f9 = (f5 * 30.0f + f6 * 70.0f) / 100.0f;
- f10 = (f5 * 30.0f + f7 * 70.0f) / 100.0f;
- f5 = f8;
- f6 = f9;
- f7 = f10;
- }
- f8 = 0.00390625f;
- f9 = (float)MathHelper.func_76128_c(d1) * 0.00390625f;
- f10 = (float)MathHelper.func_76128_c(d2) * 0.00390625f;
- float f11 = (float)(d1 - (double)MathHelper.func_76128_c(d1));
- float f12 = (float)(d2 - (double)MathHelper.func_76128_c(d2));
- boolean flag = true;
- boolean flag1 = true;
- float f13 = 9.765625E-4f;
- GlStateManager.func_179152_a(12.0f, 1.0f, 12.0f);
- for (int l = 0; l < 2; ++l) {
- if (l == 0) {
- GlStateManager.func_179135_a(false, false, false, false);
- } else {
- switch (p_180445_2_) {
- case 0: {
- GlStateManager.func_179135_a(false, true, true, true);
- break;
- }
- case 1: {
- GlStateManager.func_179135_a(true, false, false, true);
- break;
- }
- case 2: {
- GlStateManager.func_179135_a(true, true, true, true);
- }
- }
- }
- for (int i1 = -3; i1 <= 4; ++i1) {
- for (int j1 = -3; j1 <= 4; ++j1) {
- int k1;
- worldrenderer.func_178970_b();
- float f14 = i1 * 8;
- float f15 = j1 * 8;
- float f16 = f14 - f11;
- float f17 = f15 - f12;
- if (f4 > -5.0f) {
- worldrenderer.func_178960_a(f5 * 0.7f, f6 * 0.7f, f7 * 0.7f, 0.8f);
- worldrenderer.func_178980_d(0.0f, -1.0f, 0.0f);
- worldrenderer.func_178985_a(f16 + 0.0f, f4 + 0.0f, f17 + 8.0f, (f14 + 0.0f) * 0.00390625f + f9, (f15 + 8.0f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + 8.0f, f4 + 0.0f, f17 + 8.0f, (f14 + 8.0f) * 0.00390625f + f9, (f15 + 8.0f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + 8.0f, f4 + 0.0f, f17 + 0.0f, (f14 + 8.0f) * 0.00390625f + f9, (f15 + 0.0f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + 0.0f, f4 + 0.0f, f17 + 0.0f, (f14 + 0.0f) * 0.00390625f + f9, (f15 + 0.0f) * 0.00390625f + f10);
- }
- if (f4 <= 5.0f) {
- worldrenderer.func_178960_a(f5, f6, f7, 0.8f);
- worldrenderer.func_178980_d(0.0f, 1.0f, 0.0f);
- worldrenderer.func_178985_a(f16 + 0.0f, f4 + 4.0f - 9.765625E-4f, f17 + 8.0f, (f14 + 0.0f) * 0.00390625f + f9, (f15 + 8.0f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + 8.0f, f4 + 4.0f - 9.765625E-4f, f17 + 8.0f, (f14 + 8.0f) * 0.00390625f + f9, (f15 + 8.0f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + 8.0f, f4 + 4.0f - 9.765625E-4f, f17 + 0.0f, (f14 + 8.0f) * 0.00390625f + f9, (f15 + 0.0f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + 0.0f, f4 + 4.0f - 9.765625E-4f, f17 + 0.0f, (f14 + 0.0f) * 0.00390625f + f9, (f15 + 0.0f) * 0.00390625f + f10);
- }
- worldrenderer.func_178960_a(f5 * 0.9f, f6 * 0.9f, f7 * 0.9f, 0.8f);
- if (i1 > -1) {
- worldrenderer.func_178980_d(-1.0f, 0.0f, 0.0f);
- for (k1 = 0; k1 < 8; ++k1) {
- worldrenderer.func_178985_a(f16 + (float)k1 + 0.0f, f4 + 0.0f, f17 + 8.0f, (f14 + (float)k1 + 0.5f) * 0.00390625f + f9, (f15 + 8.0f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + (float)k1 + 0.0f, f4 + 4.0f, f17 + 8.0f, (f14 + (float)k1 + 0.5f) * 0.00390625f + f9, (f15 + 8.0f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + (float)k1 + 0.0f, f4 + 4.0f, f17 + 0.0f, (f14 + (float)k1 + 0.5f) * 0.00390625f + f9, (f15 + 0.0f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + (float)k1 + 0.0f, f4 + 0.0f, f17 + 0.0f, (f14 + (float)k1 + 0.5f) * 0.00390625f + f9, (f15 + 0.0f) * 0.00390625f + f10);
- }
- }
- if (i1 <= 1) {
- worldrenderer.func_178980_d(1.0f, 0.0f, 0.0f);
- for (k1 = 0; k1 < 8; ++k1) {
- worldrenderer.func_178985_a(f16 + (float)k1 + 1.0f - 9.765625E-4f, f4 + 0.0f, f17 + 8.0f, (f14 + (float)k1 + 0.5f) * 0.00390625f + f9, (f15 + 8.0f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + (float)k1 + 1.0f - 9.765625E-4f, f4 + 4.0f, f17 + 8.0f, (f14 + (float)k1 + 0.5f) * 0.00390625f + f9, (f15 + 8.0f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + (float)k1 + 1.0f - 9.765625E-4f, f4 + 4.0f, f17 + 0.0f, (f14 + (float)k1 + 0.5f) * 0.00390625f + f9, (f15 + 0.0f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + (float)k1 + 1.0f - 9.765625E-4f, f4 + 0.0f, f17 + 0.0f, (f14 + (float)k1 + 0.5f) * 0.00390625f + f9, (f15 + 0.0f) * 0.00390625f + f10);
- }
- }
- worldrenderer.func_178960_a(f5 * 0.8f, f6 * 0.8f, f7 * 0.8f, 0.8f);
- if (j1 > -1) {
- worldrenderer.func_178980_d(0.0f, 0.0f, -1.0f);
- for (k1 = 0; k1 < 8; ++k1) {
- worldrenderer.func_178985_a(f16 + 0.0f, f4 + 4.0f, f17 + (float)k1 + 0.0f, (f14 + 0.0f) * 0.00390625f + f9, (f15 + (float)k1 + 0.5f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + 8.0f, f4 + 4.0f, f17 + (float)k1 + 0.0f, (f14 + 8.0f) * 0.00390625f + f9, (f15 + (float)k1 + 0.5f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + 8.0f, f4 + 0.0f, f17 + (float)k1 + 0.0f, (f14 + 8.0f) * 0.00390625f + f9, (f15 + (float)k1 + 0.5f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + 0.0f, f4 + 0.0f, f17 + (float)k1 + 0.0f, (f14 + 0.0f) * 0.00390625f + f9, (f15 + (float)k1 + 0.5f) * 0.00390625f + f10);
- }
- }
- if (j1 <= 1) {
- worldrenderer.func_178980_d(0.0f, 0.0f, 1.0f);
- for (k1 = 0; k1 < 8; ++k1) {
- worldrenderer.func_178985_a(f16 + 0.0f, f4 + 4.0f, f17 + (float)k1 + 1.0f - 9.765625E-4f, (f14 + 0.0f) * 0.00390625f + f9, (f15 + (float)k1 + 0.5f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + 8.0f, f4 + 4.0f, f17 + (float)k1 + 1.0f - 9.765625E-4f, (f14 + 8.0f) * 0.00390625f + f9, (f15 + (float)k1 + 0.5f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + 8.0f, f4 + 0.0f, f17 + (float)k1 + 1.0f - 9.765625E-4f, (f14 + 8.0f) * 0.00390625f + f9, (f15 + (float)k1 + 0.5f) * 0.00390625f + f10);
- worldrenderer.func_178985_a(f16 + 0.0f, f4 + 0.0f, f17 + (float)k1 + 1.0f - 9.765625E-4f, (f14 + 0.0f) * 0.00390625f + f9, (f15 + (float)k1 + 0.5f) * 0.00390625f + f10);
- }
- }
- tessellator.func_78381_a();
- }
- }
- }
- GlStateManager.func_179131_c(1.0f, 1.0f, 1.0f, 1.0f);
- GlStateManager.func_179084_k();
- GlStateManager.func_179089_o();
- }
- public void func_174967_a(long l) {
- void p_174967_1_;
- RenderChunk renderchunk;
- RenderGlobal renderGlobal;
- CallbackInfo callbackInfo = new CallbackInfo("func_174967_a", true);
- renderGlobal.replayModRender_updateChunks(l, callbackInfo);
- if (callbackInfo.isCancelled()) {
- return;
- }
- this.field_147595_R |= this.field_174995_M.func_178516_a((long)p_174967_1_);
- Iterator iterator = this.field_175009_l.iterator();
- while (iterator.hasNext() && this.field_174995_M.func_178507_a(renderchunk = (RenderChunk)iterator.next())) {
- renderchunk.func_178575_a(false);
- iterator.remove();
- }
- }
- public void func_180449_a(Entity p_180449_1_, float p_180449_2_) {
- Tessellator tessellator = Tessellator.func_178181_a();
- WorldRenderer worldrenderer = tessellator.func_178180_c();
- WorldBorder worldborder = this.field_72769_h.func_175723_af();
- double d0 = this.field_72777_q.field_71474_y.field_151451_c * 16;
- if (p_180449_1_.field_70165_t >= worldborder.func_177728_d() - d0 || p_180449_1_.field_70165_t <= worldborder.func_177726_b() + d0 || p_180449_1_.field_70161_v >= worldborder.func_177733_e() - d0 || p_180449_1_.field_70161_v <= worldborder.func_177736_c() + d0) {
- float f9;
- double d7;
- float f8;
- double d8;
- double d1 = 1.0 - worldborder.func_177745_a(p_180449_1_) / d0;
- d1 = Math.pow(d1, 4.0);
- double d2 = p_180449_1_.field_70142_S + (p_180449_1_.field_70165_t - p_180449_1_.field_70142_S) * (double)p_180449_2_;
- double d3 = p_180449_1_.field_70137_T + (p_180449_1_.field_70163_u - p_180449_1_.field_70137_T) * (double)p_180449_2_;
- double d4 = p_180449_1_.field_70136_U + (p_180449_1_.field_70161_v - p_180449_1_.field_70136_U) * (double)p_180449_2_;
- GlStateManager.func_179147_l();
- GlStateManager.func_179120_a(770, 1, 1, 0);
- this.field_72770_i.func_110577_a(field_175006_g);
- GlStateManager.func_179132_a(false);
- GlStateManager.func_179094_E();
- int i = worldborder.func_177734_a().func_177766_a();
- float f1 = (float)(i >> 16 & 255) / 255.0f;
- float f2 = (float)(i >> 8 & 255) / 255.0f;
- float f3 = (float)(i & 255) / 255.0f;
- GlStateManager.func_179131_c(f1, f2, f3, (float)d1);
- GlStateManager.func_179136_a(-3.0f, -3.0f);
- GlStateManager.func_179088_q();
- GlStateManager.func_179092_a(516, 0.1f);
- GlStateManager.func_179141_d();
- GlStateManager.func_179129_p();
- float f4 = (float)(Minecraft.func_71386_F() % 3000) / 3000.0f;
- float f5 = 0.0f;
- float f6 = 0.0f;
- float f7 = 128.0f;
- worldrenderer.func_178970_b();
- worldrenderer.func_178969_c(- d2, - d3, - d4);
- worldrenderer.func_78914_f();
- double d5 = Math.max((double)MathHelper.func_76128_c(d4 - d0), worldborder.func_177736_c());
- double d6 = Math.min((double)MathHelper.func_76143_f(d4 + d0), worldborder.func_177733_e());
- if (d2 > worldborder.func_177728_d() - d0) {
- f8 = 0.0f;
- d7 = d5;
- while (d7 < d6) {
- d8 = Math.min(1.0, d6 - d7);
- f9 = (float)d8 * 0.5f;
- worldrenderer.func_178985_a(worldborder.func_177728_d(), 256.0, d7, f4 + f8, f4 + 0.0f);
- worldrenderer.func_178985_a(worldborder.func_177728_d(), 256.0, d7 + d8, f4 + f9 + f8, f4 + 0.0f);
- worldrenderer.func_178985_a(worldborder.func_177728_d(), 0.0, d7 + d8, f4 + f9 + f8, f4 + 128.0f);
- worldrenderer.func_178985_a(worldborder.func_177728_d(), 0.0, d7, f4 + f8, f4 + 128.0f);
- d7 += 1.0;
- f8 += 0.5f;
- }
- }
- if (d2 < worldborder.func_177726_b() + d0) {
- f8 = 0.0f;
- d7 = d5;
- while (d7 < d6) {
- d8 = Math.min(1.0, d6 - d7);
- f9 = (float)d8 * 0.5f;
- worldrenderer.func_178985_a(worldborder.func_177726_b(), 256.0, d7, f4 + f8, f4 + 0.0f);
- worldrenderer.func_178985_a(worldborder.func_177726_b(), 256.0, d7 + d8, f4 + f9 + f8, f4 + 0.0f);
- worldrenderer.func_178985_a(worldborder.func_177726_b(), 0.0, d7 + d8, f4 + f9 + f8, f4 + 128.0f);
- worldrenderer.func_178985_a(worldborder.func_177726_b(), 0.0, d7, f4 + f8, f4 + 128.0f);
- d7 += 1.0;
- f8 += 0.5f;
- }
- }
- d5 = Math.max((double)MathHelper.func_76128_c(d2 - d0), worldborder.func_177726_b());
- d6 = Math.min((double)MathHelper.func_76143_f(d2 + d0), worldborder.func_177728_d());
- if (d4 > worldborder.func_177733_e() - d0) {
- f8 = 0.0f;
- d7 = d5;
- while (d7 < d6) {
- d8 = Math.min(1.0, d6 - d7);
- f9 = (float)d8 * 0.5f;
- worldrenderer.func_178985_a(d7, 256.0, worldborder.func_177733_e(), f4 + f8, f4 + 0.0f);
- worldrenderer.func_178985_a(d7 + d8, 256.0, worldborder.func_177733_e(), f4 + f9 + f8, f4 + 0.0f);
- worldrenderer.func_178985_a(d7 + d8, 0.0, worldborder.func_177733_e(), f4 + f9 + f8, f4 + 128.0f);
- worldrenderer.func_178985_a(d7, 0.0, worldborder.func_177733_e(), f4 + f8, f4 + 128.0f);
- d7 += 1.0;
- f8 += 0.5f;
- }
- }
- if (d4 < worldborder.func_177736_c() + d0) {
- f8 = 0.0f;
- d7 = d5;
- while (d7 < d6) {
- d8 = Math.min(1.0, d6 - d7);
- f9 = (float)d8 * 0.5f;
- worldrenderer.func_178985_a(d7, 256.0, worldborder.func_177736_c(), f4 + f8, f4 + 0.0f);
- worldrenderer.func_178985_a(d7 + d8, 256.0, worldborder.func_177736_c(), f4 + f9 + f8, f4 + 0.0f);
- worldrenderer.func_178985_a(d7 + d8, 0.0, worldborder.func_177736_c(), f4 + f9 + f8, f4 + 128.0f);
- worldrenderer.func_178985_a(d7, 0.0, worldborder.func_177736_c(), f4 + f8, f4 + 128.0f);
- d7 += 1.0;
- f8 += 0.5f;
- }
- }
- tessellator.func_78381_a();
- worldrenderer.func_178969_c(0.0, 0.0, 0.0);
- GlStateManager.func_179089_o();
- GlStateManager.func_179118_c();
- GlStateManager.func_179136_a(0.0f, 0.0f);
- GlStateManager.func_179113_r();
- GlStateManager.func_179141_d();
- GlStateManager.func_179084_k();
- GlStateManager.func_179121_F();
- GlStateManager.func_179132_a(true);
- }
- }
- private void func_180443_s() {
- GlStateManager.func_179120_a(774, 768, 1, 0);
- GlStateManager.func_179147_l();
- GlStateManager.func_179131_c(1.0f, 1.0f, 1.0f, 0.5f);
- GlStateManager.func_179136_a(-3.0f, -3.0f);
- GlStateManager.func_179088_q();
- GlStateManager.func_179092_a(516, 0.1f);
- GlStateManager.func_179141_d();
- GlStateManager.func_179094_E();
- }
- private void func_174969_t() {
- GlStateManager.func_179118_c();
- GlStateManager.func_179136_a(0.0f, 0.0f);
- GlStateManager.func_179113_r();
- GlStateManager.func_179141_d();
- GlStateManager.func_179132_a(true);
- GlStateManager.func_179121_F();
- }
- public void func_174981_a(Tessellator p_174981_1_, WorldRenderer p_174981_2_, Entity p_174981_3_, float p_174981_4_) {
- double d0 = p_174981_3_.field_70142_S + (p_174981_3_.field_70165_t - p_174981_3_.field_70142_S) * (double)p_174981_4_;
- double d1 = p_174981_3_.field_70137_T + (p_174981_3_.field_70163_u - p_174981_3_.field_70137_T) * (double)p_174981_4_;
- double d2 = p_174981_3_.field_70136_U + (p_174981_3_.field_70161_v - p_174981_3_.field_70136_U) * (double)p_174981_4_;
- if (!this.field_72738_E.isEmpty()) {
- this.field_72770_i.func_110577_a(TextureMap.field_110575_b);
- this.func_180443_s();
- p_174981_2_.func_178970_b();
- p_174981_2_.func_178967_a(DefaultVertexFormats.field_176600_a);
- p_174981_2_.func_178969_c(- d0, - d1, - d2);
- p_174981_2_.func_78914_f();
- Iterator iterator = this.field_72738_E.values().iterator();
- while (iterator.hasNext()) {
- boolean hasBreak;
- DestroyBlockProgress destroyblockprogress = (DestroyBlockProgress)iterator.next();
- BlockPos blockpos = destroyblockprogress.func_180246_b();
- double d3 = (double)blockpos.func_177958_n() - d0;
- double d4 = (double)blockpos.func_177956_o() - d1;
- double d5 = (double)blockpos.func_177952_p() - d2;
- Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c();
- TileEntity te = this.field_72769_h.func_175625_s(blockpos);
- boolean bl = hasBreak = block instanceof BlockChest || block instanceof BlockEnderChest || block instanceof BlockSign || block instanceof BlockSkull;
- if (!hasBreak) {
- boolean bl2 = hasBreak = te != null && te.canRenderBreaking();
- }
- if (hasBreak) continue;
- if (d3 * d3 + d4 * d4 + d5 * d5 > 1024.0) {
- iterator.remove();
- continue;
- }
- IBlockState iblockstate = this.field_72769_h.func_180495_p(blockpos);
- if (iblockstate.func_177230_c().func_149688_o() == Material.field_151579_a) continue;
- int i = destroyblockprogress.func_73106_e();
- TextureAtlasSprite textureatlassprite = this.field_94141_F[i];
- BlockRendererDispatcher blockrendererdispatcher = this.field_72777_q.func_175602_ab();
- blockrendererdispatcher.func_175020_a(iblockstate, blockpos, textureatlassprite, this.field_72769_h);
- }
- p_174981_1_.func_78381_a();
- p_174981_2_.func_178969_c(0.0, 0.0, 0.0);
- this.func_174969_t();
- }
- }
- public void func_72731_b(EntityPlayer p_72731_1_, MovingObjectPosition p_72731_2_, int p_72731_3_, float p_72731_4_) {
- if (p_72731_3_ == 0 && p_72731_2_.field_72313_a == MovingObjectPosition.MovingObjectType.BLOCK) {
- GlStateManager.func_179147_l();
- GlStateManager.func_179120_a(770, 771, 1, 0);
- GlStateManager.func_179131_c(0.0f, 0.0f, 0.0f, 0.4f);
- GL11.glLineWidth((float)2.0f);
- GlStateManager.func_179090_x();
- GlStateManager.func_179132_a(false);
- float f1 = 0.002f;
- BlockPos blockpos = p_72731_2_.func_178782_a();
- Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c();
- if (block.func_149688_o() != Material.field_151579_a && this.field_72769_h.func_175723_af().func_177746_a(blockpos)) {
- block.func_180654_a(this.field_72769_h, blockpos);
- double d0 = p_72731_1_.field_70142_S + (p_72731_1_.field_70165_t - p_72731_1_.field_70142_S) * (double)p_72731_4_;
- double d1 = p_72731_1_.field_70137_T + (p_72731_1_.field_70163_u - p_72731_1_.field_70137_T) * (double)p_72731_4_;
- double d2 = p_72731_1_.field_70136_U + (p_72731_1_.field_70161_v - p_72731_1_.field_70136_U) * (double)p_72731_4_;
- RenderGlobal.func_147590_a(block.func_180646_a(this.field_72769_h, blockpos).func_72314_b(0.0020000000949949026, 0.0020000000949949026, 0.0020000000949949026).func_72317_d(- d0, - d1, - d2), -1);
- }
- GlStateManager.func_179132_a(true);
- GlStateManager.func_179098_w();
- GlStateManager.func_179084_k();
- }
- }
- public static void func_147590_a(AxisAlignedBB boundingBox, int p_147590_1_) {
- Tessellator tessellator = Tessellator.func_178181_a();
- WorldRenderer worldrenderer = tessellator.func_178180_c();
- worldrenderer.func_178964_a(3);
- if (p_147590_1_ != -1) {
- worldrenderer.func_178991_c(p_147590_1_);
- }
- worldrenderer.func_178984_b(boundingBox.field_72340_a, boundingBox.field_72338_b, boundingBox.field_72339_c);
- worldrenderer.func_178984_b(boundingBox.field_72336_d, boundingBox.field_72338_b, boundingBox.field_72339_c);
- worldrenderer.func_178984_b(boundingBox.field_72336_d, boundingBox.field_72338_b, boundingBox.field_72334_f);
- worldrenderer.func_178984_b(boundingBox.field_72340_a, boundingBox.field_72338_b, boundingBox.field_72334_f);
- worldrenderer.func_178984_b(boundingBox.field_72340_a, boundingBox.field_72338_b, boundingBox.field_72339_c);
- tessellator.func_78381_a();
- worldrenderer.func_178964_a(3);
- if (p_147590_1_ != -1) {
- worldrenderer.func_178991_c(p_147590_1_);
- }
- worldrenderer.func_178984_b(boundingBox.field_72340_a, boundingBox.field_72337_e, boundingBox.field_72339_c);
- worldrenderer.func_178984_b(boundingBox.field_72336_d, boundingBox.field_72337_e, boundingBox.field_72339_c);
- worldrenderer.func_178984_b(boundingBox.field_72336_d, boundingBox.field_72337_e, boundingBox.field_72334_f);
- worldrenderer.func_178984_b(boundingBox.field_72340_a, boundingBox.field_72337_e, boundingBox.field_72334_f);
- worldrenderer.func_178984_b(boundingBox.field_72340_a, boundingBox.field_72337_e, boundingBox.field_72339_c);
- tessellator.func_78381_a();
- worldrenderer.func_178964_a(1);
- if (p_147590_1_ != -1) {
- worldrenderer.func_178991_c(p_147590_1_);
- }
- worldrenderer.func_178984_b(boundingBox.field_72340_a, boundingBox.field_72338_b, boundingBox.field_72339_c);
- worldrenderer.func_178984_b(boundingBox.field_72340_a, boundingBox.field_72337_e, boundingBox.field_72339_c);
- worldrenderer.func_178984_b(boundingBox.field_72336_d, boundingBox.field_72338_b, boundingBox.field_72339_c);
- worldrenderer.func_178984_b(boundingBox.field_72336_d, boundingBox.field_72337_e, boundingBox.field_72339_c);
- worldrenderer.func_178984_b(boundingBox.field_72336_d, boundingBox.field_72338_b, boundingBox.field_72334_f);
- worldrenderer.func_178984_b(boundingBox.field_72336_d, boundingBox.field_72337_e, boundingBox.field_72334_f);
- worldrenderer.func_178984_b(boundingBox.field_72340_a, boundingBox.field_72338_b, boundingBox.field_72334_f);
- worldrenderer.func_178984_b(boundingBox.field_72340_a, boundingBox.field_72337_e, boundingBox.field_72334_f);
- tessellator.func_78381_a();
- }
- private void func_72725_b(int p_72725_1_, int p_72725_2_, int p_72725_3_, int p_72725_4_, int p_72725_5_, int p_72725_6_) {
- this.field_175008_n.func_178162_a(p_72725_1_, p_72725_2_, p_72725_3_, p_72725_4_, p_72725_5_, p_72725_6_);
- }
- @Override
- public void func_174960_a(BlockPos pos) {
- int i = pos.func_177958_n();
- int j = pos.func_177956_o();
- int k = pos.func_177952_p();
- this.func_72725_b(i - 1, j - 1, k - 1, i + 1, j + 1, k + 1);
- }
- @Override
- public void func_174959_b(BlockPos pos) {
- int i = pos.func_177958_n();
- int j = pos.func_177956_o();
- int k = pos.func_177952_p();
- this.func_72725_b(i - 1, j - 1, k - 1, i + 1, j + 1, k + 1);
- }
- @Override
- public void func_147585_a(int x1, int y1, int z1, int x2, int y2, int z2) {
- this.func_72725_b(x1 - 1, y1 - 1, z1 - 1, x2 + 1, y2 + 1, z2 + 1);
- }
- @Override
- public void func_174961_a(String recordName, BlockPos blockPosIn) {
- ISound isound = (ISound)this.field_147593_P.get(blockPosIn);
- if (isound != null) {
- this.field_72777_q.func_147118_V().func_147683_b(isound);
- this.field_147593_P.remove(blockPosIn);
- }
- if (recordName != null) {
- ItemRecord itemrecord = ItemRecord.func_150926_b(recordName);
- ResourceLocation resource = null;
- if (itemrecord != null) {
- this.field_72777_q.field_71456_v.func_73833_a(itemrecord.func_150927_i());
- resource = itemrecord.getRecordResource(recordName);
- }
- if (resource == null) {
- resource = new ResourceLocation(recordName);
- }
- PositionedSoundRecord positionedsoundrecord = PositionedSoundRecord.func_147675_a(resource, blockPosIn.func_177958_n(), blockPosIn.func_177956_o(), blockPosIn.func_177952_p());
- this.field_147593_P.put(blockPosIn, positionedsoundrecord);
- this.field_72777_q.func_147118_V().func_147682_a(positionedsoundrecord);
- }
- }
- @Override
- public void func_72704_a(String soundName, double x, double y, double z, float volume, float pitch) {
- }
- @Override
- public void func_85102_a(EntityPlayer except, String soundName, double x, double y, double z, float volume, float pitch) {
- }
- @Override
- public /* varargs */ void func_180442_a(int p_180442_1_, boolean p_180442_2_, final double p_180442_3_, final double p_180442_5_, final double p_180442_7_, double p_180442_9_, double p_180442_11_, double p_180442_13_, int ... p_180442_15_) {
- try {
- this.func_174974_b(p_180442_1_, p_180442_2_, p_180442_3_, p_180442_5_, p_180442_7_, p_180442_9_, p_180442_11_, p_180442_13_, p_180442_15_);
- }
- catch (Throwable throwable) {
- CrashReport crashreport = CrashReport.func_85055_a(throwable, "Exception while adding particle");
- CrashReportCategory crashreportcategory = crashreport.func_85058_a("Particle being added");
- crashreportcategory.func_71507_a("ID", p_180442_1_);
- if (p_180442_15_ != null) {
- crashreportcategory.func_71507_a("Parameters", p_180442_15_);
- }
- crashreportcategory.func_71500_a("Position", new Callable(){
- private static final String __OBFID = "CL_00000955";
- public String call() {
- return CrashReportCategory.func_85074_a(p_180442_3_, p_180442_5_, p_180442_7_);
- }
- });
- throw new ReportedException(crashreport);
- }
- }
- private /* varargs */ void func_174972_a(EnumParticleTypes particleIn, double p_174972_2_, double p_174972_4_, double p_174972_6_, double p_174972_8_, double p_174972_10_, double p_174972_12_, int ... p_174972_14_) {
- this.func_180442_a(particleIn.func_179348_c(), particleIn.func_179344_e(), p_174972_2_, p_174972_4_, p_174972_6_, p_174972_8_, p_174972_10_, p_174972_12_, p_174972_14_);
- }
- private /* varargs */ EntityFX func_174974_b(int p_174974_1_, boolean p_174974_2_, double p_174974_3_, double p_174974_5_, double p_174974_7_, double p_174974_9_, double p_174974_11_, double p_174974_13_, int ... p_174974_15_) {
- if (this.field_72777_q != null && this.field_72777_q.func_175606_aa() != null && this.field_72777_q.field_71452_i != null) {
- int k = this.field_72777_q.field_71474_y.field_74362_aa;
- if (k == 1 && this.field_72769_h.field_73012_v.nextInt(3) == 0) {
- k = 2;
- }
- double d6 = this.field_72777_q.func_175606_aa().field_70165_t - p_174974_3_;
- double d7 = this.field_72777_q.func_175606_aa().field_70163_u - p_174974_5_;
- double d8 = this.field_72777_q.func_175606_aa().field_70161_v - p_174974_7_;
- if (p_174974_2_) {
- return this.field_72777_q.field_71452_i.func_178927_a(p_174974_1_, p_174974_3_, p_174974_5_, p_174974_7_, p_174974_9_, p_174974_11_, p_174974_13_, p_174974_15_);
- }
- double d9 = 16.0;
- return d6 * d6 + d7 * d7 + d8 * d8 > 256.0 ? null : (k > 1 ? null : this.field_72777_q.field_71452_i.func_178927_a(p_174974_1_, p_174974_3_, p_174974_5_, p_174974_7_, p_174974_9_, p_174974_11_, p_174974_13_, p_174974_15_));
- }
- return null;
- }
- @Override
- public void func_72703_a(Entity entityIn) {
- }
- @Override
- public void func_72709_b(Entity entityIn) {
- }
- public void func_72728_f() {
- }
- @Override
- public void func_180440_a(int p_180440_1_, BlockPos p_180440_2_, int p_180440_3_) {
- switch (p_180440_1_) {
- case 1013:
- case 1018: {
- if (this.field_72777_q.func_175606_aa() == null) break;
- double d0 = (double)p_180440_2_.func_177958_n() - this.field_72777_q.func_175606_aa().field_70165_t;
- double d1 = (double)p_180440_2_.func_177956_o() - this.field_72777_q.func_175606_aa().field_70163_u;
- double d2 = (double)p_180440_2_.func_177952_p() - this.field_72777_q.func_175606_aa().field_70161_v;
- double d3 = Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2);
- double d4 = this.field_72777_q.func_175606_aa().field_70165_t;
- double d5 = this.field_72777_q.func_175606_aa().field_70163_u;
- double d6 = this.field_72777_q.func_175606_aa().field_70161_v;
- if (d3 > 0.0) {
- d4 += d0 / d3 * 2.0;
- d5 += d1 / d3 * 2.0;
- d6 += d2 / d3 * 2.0;
- }
- if (p_180440_1_ == 1013) {
- this.field_72769_h.func_72980_b(d4, d5, d6, "mob.wither.spawn", 1.0f, 1.0f, false);
- break;
- }
- this.field_72769_h.func_72980_b(d4, d5, d6, "mob.enderdragon.end", 5.0f, 1.0f, false);
- }
- }
- }
- @Override
- public void func_180439_a(EntityPlayer p_180439_1_, int p_180439_2_, BlockPos blockPosIn, int p_180439_4_) {
- Random random = this.field_72769_h.field_73012_v;
- switch (p_180439_2_) {
- case 1000: {
- this.field_72769_h.func_175731_a(blockPosIn, "random.click", 1.0f, 1.0f, false);
- break;
- }
- case 1001: {
- this.field_72769_h.func_175731_a(blockPosIn, "random.click", 1.0f, 1.2f, false);
- break;
- }
- case 1002: {
- this.field_72769_h.func_175731_a(blockPosIn, "random.bow", 1.0f, 1.2f, false);
- break;
- }
- case 1003: {
- this.field_72769_h.func_175731_a(blockPosIn, "random.door_open", 1.0f, this.field_72769_h.field_73012_v.nextFloat() * 0.1f + 0.9f, false);
- break;
- }
- case 1004: {
- this.field_72769_h.func_175731_a(blockPosIn, "random.fizz", 0.5f, 2.6f + (random.nextFloat() - random.nextFloat()) * 0.8f, false);
- break;
- }
- case 1005: {
- if (Item.func_150899_d(p_180439_4_) instanceof ItemRecord) {
- this.field_72769_h.func_175717_a(blockPosIn, "records." + ((ItemRecord)Item.func_150899_d((int)p_180439_4_)).field_150929_a);
- break;
- }
- this.field_72769_h.func_175717_a(blockPosIn, null);
- break;
- }
- case 1006: {
- this.field_72769_h.func_175731_a(blockPosIn, "random.door_close", 1.0f, this.field_72769_h.field_73012_v.nextFloat() * 0.1f + 0.9f, false);
- break;
- }
- case 1007: {
- this.field_72769_h.func_175731_a(blockPosIn, "mob.ghast.charge", 10.0f, (random.nextFloat() - random.nextFloat()) * 0.2f + 1.0f, false);
- break;
- }
- case 1008: {
- this.field_72769_h.func_175731_a(blockPosIn, "mob.ghast.fireball", 10.0f, (random.nextFloat() - random.nextFloat()) * 0.2f + 1.0f, false);
- break;
- }
- case 1009: {
- this.field_72769_h.func_175731_a(blockPosIn, "mob.ghast.fireball", 2.0f, (random.nextFloat() - random.nextFloat()) * 0.2f + 1.0f, false);
- break;
- }
- case 1010: {
- this.field_72769_h.func_175731_a(blockPosIn, "mob.zombie.wood", 2.0f, (random.nextFloat() - random.nextFloat()) * 0.2f + 1.0f, false);
- break;
- }
- case 1011: {
- this.field_72769_h.func_175731_a(blockPosIn, "mob.zombie.metal", 2.0f, (random.nextFloat() - random.nextFloat()) * 0.2f + 1.0f, false);
- break;
- }
- case 1012: {
- this.field_72769_h.func_175731_a(blockPosIn, "mob.zombie.woodbreak", 2.0f, (random.nextFloat() - random.nextFloat()) * 0.2f + 1.0f, false);
- break;
- }
- case 1014: {
- this.field_72769_h.func_175731_a(blockPosIn, "mob.wither.shoot", 2.0f, (random.nextFloat() - random.nextFloat()) * 0.2f + 1.0f, false);
- break;
- }
- case 1015: {
- this.field_72769_h.func_175731_a(blockPosIn, "mob.bat.takeoff", 0.05f, (random.nextFloat() - random.nextFloat()) * 0.2f + 1.0f, false);
- break;
- }
- case 1016: {
- this.field_72769_h.func_175731_a(blockPosIn, "mob.zombie.infect", 2.0f, (random.nextFloat() - random.nextFloat()) * 0.2f + 1.0f, false);
- break;
- }
- case 1017: {
- this.field_72769_h.func_175731_a(blockPosIn, "mob.zombie.unfect", 2.0f, (random.nextFloat() - random.nextFloat()) * 0.2f + 1.0f, false);
- break;
- }
- case 1020: {
- this.field_72769_h.func_175731_a(blockPosIn, "random.anvil_break", 1.0f, this.field_72769_h.field_73012_v.nextFloat() * 0.1f + 0.9f, false);
- break;
- }
- case 1021: {
- this.field_72769_h.func_175731_a(blockPosIn, "random.anvil_use", 1.0f, this.field_72769_h.field_73012_v.nextFloat() * 0.1f + 0.9f, false);
- break;
- }
- case 1022: {
- this.field_72769_h.func_175731_a(blockPosIn, "random.anvil_land", 0.3f, this.field_72769_h.field_73012_v.nextFloat() * 0.1f + 0.9f, false);
- break;
- }
- case 2000: {
- int j1 = p_180439_4_ % 3 - 1;
- int k = p_180439_4_ / 3 % 3 - 1;
- double d1 = (double)blockPosIn.func_177958_n() + (double)j1 * 0.6 + 0.5;
- double d2 = (double)blockPosIn.func_177956_o() + 0.5;
- double d13 = (double)blockPosIn.func_177952_p() + (double)k * 0.6 + 0.5;
- for (int k1 = 0; k1 < 10; ++k1) {
- double d14 = random.nextDouble() * 0.2 + 0.01;
- double d15 = d1 + (double)j1 * 0.01 + (random.nextDouble() - 0.5) * (double)k * 0.5;
- double d4 = d2 + (random.nextDouble() - 0.5) * 0.5;
- double d6 = d13 + (double)k * 0.01 + (random.nextDouble() - 0.5) * (double)j1 * 0.5;
- double d8 = (double)j1 * d14 + random.nextGaussian() * 0.01;
- double d10 = -0.03 + random.nextGaussian() * 0.01;
- double d12 = (double)k * d14 + random.nextGaussian() * 0.01;
- this.func_174972_a(EnumParticleTypes.SMOKE_NORMAL, d15, d4, d6, d8, d10, d12, new int[0]);
- }
- return;
- }
- case 2001: {
- Block block = Block.func_149729_e(p_180439_4_ & 4095);
- if (block.func_149688_o() != Material.field_151579_a) {
- this.field_72777_q.func_147118_V().func_147682_a(new PositionedSoundRecord(new ResourceLocation(block.field_149762_H.func_150495_a()), (block.field_149762_H.func_150497_c() + 1.0f) / 2.0f, block.field_149762_H.func_150494_d() * 0.8f, (float)blockPosIn.func_177958_n() + 0.5f, (float)blockPosIn.func_177956_o() + 0.5f, (float)blockPosIn.func_177952_p() + 0.5f));
- }
- this.field_72777_q.field_71452_i.func_180533_a(blockPosIn, block.func_176203_a(p_180439_4_ >> 12 & 255));
- break;
- }
- case 2002: {
- int l;
- double d0 = blockPosIn.func_177958_n();
- double d1 = blockPosIn.func_177956_o();
- double d2 = blockPosIn.func_177952_p();
- for (l = 0; l < 8; ++l) {
- this.func_174972_a(EnumParticleTypes.ITEM_CRACK, d0, d1, d2, random.nextGaussian() * 0.15, random.nextDouble() * 0.2, random.nextGaussian() * 0.15, Item.func_150891_b(Items.field_151068_bn), p_180439_4_);
- }
- l = Items.field_151068_bn.func_77620_a(p_180439_4_);
- float f = (float)(l >> 16 & 255) / 255.0f;
- float f1 = (float)(l >> 8 & 255) / 255.0f;
- float f2 = (float)(l >> 0 & 255) / 255.0f;
- EnumParticleTypes enumparticletypes = EnumParticleTypes.SPELL;
- if (Items.field_151068_bn.func_77833_h(p_180439_4_)) {
- enumparticletypes = EnumParticleTypes.SPELL_INSTANT;
- }
- for (int i1 = 0; i1 < 100; ++i1) {
- double d3 = random.nextDouble() * 4.0;
- double d5 = random.nextDouble() * 3.141592653589793 * 2.0;
- double d7 = Math.cos(d5) * d3;
- double d9 = 0.01 + random.nextDouble() * 0.5;
- double d11 = Math.sin(d5) * d3;
- EntityFX entityfx = this.func_174974_b(enumparticletypes.func_179348_c(), enumparticletypes.func_179344_e(), d0 + d7 * 0.1, d1 + 0.3, d2 + d11 * 0.1, d7, d9, d11, new int[0]);
- if (entityfx == null) continue;
- float f3 = 0.75f + random.nextFloat() * 0.25f;
- entityfx.func_70538_b(f * f3, f1 * f3, f2 * f3);
- entityfx.func_70543_e((float)d3);
- }
- this.field_72769_h.func_175731_a(blockPosIn, "game.potion.smash", 1.0f, this.field_72769_h.field_73012_v.nextFloat() * 0.1f + 0.9f, false);
- break;
- }
- case 2003: {
- double d0 = (double)blockPosIn.func_177958_n() + 0.5;
- double d1 = blockPosIn.func_177956_o();
- double d2 = (double)blockPosIn.func_177952_p() + 0.5;
- for (int l = 0; l < 8; ++l) {
- this.func_174972_a(EnumParticleTypes.ITEM_CRACK, d0, d1, d2, random.nextGaussian() * 0.15, random.nextDouble() * 0.2, random.nextGaussian() * 0.15, Item.func_150891_b(Items.field_151061_bv));
- }
- for (double d13 = 0.0; d13 < 6.283185307179586; d13 += 0.15707963267948966) {
- this.func_174972_a(EnumParticleTypes.PORTAL, d0 + Math.cos(d13) * 5.0, d1 - 0.4, d2 + Math.sin(d13) * 5.0, Math.cos(d13) * -5.0, 0.0, Math.sin(d13) * -5.0, new int[0]);
- this.func_174972_a(EnumParticleTypes.PORTAL, d0 + Math.cos(d13) * 5.0, d1 - 0.4, d2 + Math.sin(d13) * 5.0, Math.cos(d13) * -7.0, 0.0, Math.sin(d13) * -7.0, new int[0]);
- }
- return;
- }
- case 2004: {
- for (int i1 = 0; i1 < 20; ++i1) {
- double d3 = (double)blockPosIn.func_177958_n() + 0.5 + ((double)this.field_72769_h.field_73012_v.nextFloat() - 0.5) * 2.0;
- double d5 = (double)blockPosIn.func_177956_o() + 0.5 + ((double)this.field_72769_h.field_73012_v.nextFloat() - 0.5) * 2.0;
- double d7 = (double)blockPosIn.func_177952_p() + 0.5 + ((double)this.field_72769_h.field_73012_v.nextFloat() - 0.5) * 2.0;
- this.field_72769_h.func_175688_a(EnumParticleTypes.SMOKE_NORMAL, d3, d5, d7, 0.0, 0.0, 0.0, new int[0]);
- this.field_72769_h.func_175688_a(EnumParticleTypes.FLAME, d3, d5, d7, 0.0, 0.0, 0.0, new int[0]);
- }
- return;
- }
- case 2005: {
- ItemDye.func_180617_a(this.field_72769_h, blockPosIn, p_180439_4_);
- }
- }
- }
- @Override
- public void func_180441_b(int n, BlockPos blockPos, int n2) {
- void progress;
- void breakerId;
- RenderGlobal renderGlobal;
- CallbackInfo callbackInfo = new CallbackInfo("func_180441_b", false);
- renderGlobal.saveBlockBreakProgressPacket(n, blockPos, n2, callbackInfo);
- if (progress >= 0 && progress < 10) {
- void pos;
- DestroyBlockProgress destroyblockprogress = (DestroyBlockProgress)this.field_72738_E.get((int)breakerId);
- if (destroyblockprogress == null || destroyblockprogress.func_180246_b().func_177958_n() != pos.func_177958_n() || destroyblockprogress.func_180246_b().func_177956_o() != pos.func_177956_o() || destroyblockprogress.func_180246_b().func_177952_p() != pos.func_177952_p()) {
- destroyblockprogress = new DestroyBlockProgress((int)breakerId, (BlockPos)pos);
- this.field_72738_E.put((int)breakerId, destroyblockprogress);
- }
- destroyblockprogress.func_73107_a((int)progress);
- destroyblockprogress.func_82744_b(this.field_72773_u);
- } else {
- this.field_72738_E.remove((int)breakerId);
- }
- }
- public void func_174979_m() {
- this.field_147595_R = true;
- }
- @MixinMerged(mixin="com.replaymod.recording.mixin.MixinRenderGlobal", priority=1000, sessionId="6fd3d252-0c76-49ea-aa4c-a7307d0965a9")
- @Override
- public void setRecordingEventHandler(RecordingEventHandler recordingEventHandler) {
- this.recordingEventHandler = recordingEventHandler;
- }
- @MixinMerged(mixin="com.replaymod.recording.mixin.MixinRenderGlobal", priority=1000, sessionId="6fd3d252-0c76-49ea-aa4c-a7307d0965a9")
- @Override
- public RecordingEventHandler getRecordingEventHandler() {
- return this.recordingEventHandler;
- }
- @MixinMerged(mixin="com.replaymod.recording.mixin.MixinRenderGlobal", priority=1000, sessionId="6fd3d252-0c76-49ea-aa4c-a7307d0965a9")
- public void saveBlockBreakProgressPacket(int breakerId, BlockPos pos, int progress, CallbackInfo info) {
- if (this.recordingEventHandler != null) {
- this.recordingEventHandler.onBlockBreakAnim(breakerId, pos, progress);
- }
- }
- @MixinMerged(mixin="com.replaymod.render.mixin.MixinRenderGlobal", priority=1000, sessionId="6fd3d252-0c76-49ea-aa4c-a7307d0965a9")
- public void replayModRender_setupTerrain(Entity viewEntity, double partialTicks, ICamera camera, int frameCount, boolean playerSpectator, CallbackInfo ci) {
- if (this.replayModRender_hook != null && !this.replayModRender_passThroughSetupTerrain) {
- this.replayModRender_passThroughSetupTerrain = true;
- do {
- this.func_174970_a(viewEntity, partialTicks, camera, this.replayModRender_hook.nextFrameId(), playerSpectator);
- } while (this.field_147595_R);
- this.replayModRender_passThroughSetupTerrain = false;
- ci.cancel();
- }
- }
- @MixinMerged(mixin="com.replaymod.render.mixin.MixinRenderGlobal", priority=1000, sessionId="6fd3d252-0c76-49ea-aa4c-a7307d0965a9")
- public void replayModRender_isPositionInRenderChunk(BlockPos pos, RenderChunk chunk, CallbackInfoReturnable<Boolean> ci) {
- if (this.replayModRender_hook != null) {
- ci.setReturnValue((Object)true);
- }
- }
- @MixinMerged(mixin="com.replaymod.render.mixin.MixinRenderGlobal", priority=1000, sessionId="6fd3d252-0c76-49ea-aa4c-a7307d0965a9")
- public void replayModRender_updateChunks(long finishTimeNano, CallbackInfo ci) {
- if (this.replayModRender_hook != null) {
- if (ShaderReflection.renderGlobal_chunksToUpdateForced != null) {
- try {
- Set ctuf = (Set)ShaderReflection.renderGlobal_chunksToUpdateForced.get(this);
- for (RenderChunk renderChunk : ctuf) {
- this.replayModRender_hook.renderDispatcher.field_178519_d.add(renderChunk.func_178574_d());
- }
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
- this.replayModRender_hook.updateChunks();
- ci.cancel();
- }
- }
- @SideOnly(value=Side.CLIENT)
- public class ContainerLocalRenderInformation {
- final RenderChunk field_178036_a;
- final EnumFacing field_178034_b;
- final Set field_178035_c;
- final int field_178032_d;
- private static final String __OBFID = "CL_00002534";
- private ContainerLocalRenderInformation(RenderChunk p_i46248_2_, EnumFacing p_i46248_3_, int p_i46248_4_) {
- this.field_178035_c = EnumSet.noneOf(EnumFacing.class);
- this.field_178036_a = p_i46248_2_;
- this.field_178034_b = p_i46248_3_;
- this.field_178032_d = p_i46248_4_;
- }
- ContainerLocalRenderInformation(RenderChunk p_i46249_2_, EnumFacing p_i46249_3_, int p_i46249_4_, Object p_i46249_5_) {
- this(p_i46249_2_, p_i46249_3_, p_i46249_4_);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment