mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-30 17:06:56 +01:00
maybe fix weird rendering in front stuff
This commit is contained in:
parent
91069163f8
commit
d391ed570e
2 changed files with 14 additions and 8 deletions
|
@ -36,9 +36,6 @@ import net.minecraft.util.math.AxisAlignedBB;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.common.extensions.IForgeTileEntity;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
|
||||
public abstract class KineticTileEntity extends SmartTileEntity
|
||||
implements ITickableTileEntity, IHaveGoggleInformation, IHaveHoveringInformation {
|
||||
|
@ -459,4 +456,9 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||
return overStressed;
|
||||
}
|
||||
|
||||
public static AxisAlignedBB NOWHERE_AABB = new AxisAlignedBB(Double.NaN, Double.NaN, Double.NaN, Double.NaN, Double.NaN, Double.NaN);
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return super.getRenderBoundingBox();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ import net.minecraftforge.client.event.RenderWorldLastEvent;
|
|||
import net.minecraftforge.fml.common.Mod;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
import org.lwjgl.opengl.GL40;
|
||||
|
||||
import java.util.*;
|
||||
|
@ -71,7 +72,9 @@ public class FastKineticRenderer {
|
|||
RenderSystem.enableBlend();
|
||||
RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
RenderSystem.enableCull();
|
||||
RenderSystem.enableLighting();
|
||||
RenderSystem.enableDepthTest();
|
||||
GL11.glCullFace(GL11.GL_BACK);
|
||||
|
||||
GameRenderer gameRenderer = Minecraft.getInstance().gameRenderer;
|
||||
LightTexture lightManager = gameRenderer.getLightmapTextureManager();
|
||||
|
@ -79,11 +82,11 @@ public class FastKineticRenderer {
|
|||
Texture blockAtlasTexture = Minecraft.getInstance().textureManager.getTexture(PlayerContainer.BLOCK_ATLAS_TEXTURE);
|
||||
Texture lightTexture = Minecraft.getInstance().textureManager.getTexture(lightManager.resourceLocation);
|
||||
|
||||
GL40.glActiveTexture(GL40.GL_TEXTURE0);
|
||||
GL40.glBindTexture(GL11.GL_TEXTURE_2D, blockAtlasTexture.getGlTextureId());
|
||||
GL13.glActiveTexture(GL40.GL_TEXTURE0);
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, blockAtlasTexture.getGlTextureId());
|
||||
|
||||
GL40.glActiveTexture(GL40.GL_TEXTURE0 + 1);
|
||||
GL40.glBindTexture(GL11.GL_TEXTURE_2D, lightTexture.getGlTextureId());
|
||||
GL13.glActiveTexture(GL40.GL_TEXTURE0 + 1);
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, lightTexture.getGlTextureId());
|
||||
RenderSystem.texParameter(3553, 10241, 9729);
|
||||
RenderSystem.texParameter(3553, 10240, 9729);
|
||||
RenderSystem.texParameter(3553, 10242, 10496);
|
||||
|
@ -134,6 +137,7 @@ public class FastKineticRenderer {
|
|||
RenderSystem.disableCull();
|
||||
RenderSystem.disableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
RenderSystem.disableDepthTest();
|
||||
|
||||
while (!runs.isEmpty()) {
|
||||
runs.remove().run();
|
||||
|
|
Loading…
Reference in a new issue