Skip to content

Instantly share code, notes, and snippets.

GlStateManager.pushMatrix();
{
for (float j = 2 * PI; j >= 0 ; j -= 2 * PI / 36f)
{
buffer.begin(GL_LINES, DefaultVertexFormats.POSITION_COLOR);
for (float i = 2 * PI; i >= 0 ; i -= 2 * PI / 36f)
{
buffer.pos(Math.cos(i) * radius, Math.sin(i) * radius, 0).color(color.x, color.y, color.z, color.w).endVertex();
}
Tessellator.getInstance().draw();
GlStateManager.pushMatrix();
{
for (int j = 0; j < 360; j+= 10)
{
buffer.begin(GL_LINE_LOOP, DefaultVertexFormats.POSITION_COLOR);
for (int i = 0; i < 360; i+= 10)
{
float degInRad = i * DEG2RAD;
buffer.pos(Math.cos(degInRad) * radius, 0, Math.sin(degInRad) * radius).color(color.x, color.y, color.z, color.w).endVertex();
}
GlStateManager.pushMatrix();
{
GlStateManager.translate(minX - plX,
0 - plY,
minZ - plZ);
GlStateManager.glLineWidth(5);
GlStateManager.disableLighting();
GlStateManager.disableTexture2D();
GlStateManager.disableDepth();
{
public List<Chunk> getSpawnChunks()
{
List<Chunk> temp = new ArrayList<>();
IChunkProvider chunkProvider = FMLCommonHandler.instance().getMinecraftServerInstance().getEntityWorld().getChunkProvider();
for (int x = spawnPoint.getX() - 256; x < spawnPoint.getX() + 256; x++)
{
for (int z = spawnPoint.getZ() - 256; z < spawnPoint.getZ() + 256; z++)
{
BlockPos tempPos = new BlockPos(x,0,z);
Chunk chunk = FMLCommonHandler.instance().getMinecraftServerInstance().getEntityWorld().getChunkFromBlockCoords(tempPos);;
buildscript {
repositories {
mavenCentral()
jcenter()
mavenLocal()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
protected void renderLivingLabel(T entityIn, String str, double x, double y, double z, int maxDistance)
{
double d0 = entityIn.getDistanceSqToEntity(this.renderManager.livingPlayer);
if (d0 <= (double)(maxDistance * maxDistance))
{
boolean flag = entityIn.isSneaking();
GlStateManager.pushMatrix();
float f = flag ? 0.25F : 0.0F;
GlStateManager.translate((float)x, (float)y + entityIn.height + 0.5F - f, (float)z);
private void drawTextInfo(String text, Vector3d center, double scaleFactor, VertexBuffer buffer)
{
GlStateManager.pushMatrix();
{
/*GlStateManager.translate//z - 0.5f + data.center.getZ() - pos.getZ());*/
GlStateManager.translate(center.getX(), center.getY(), center.getZ());
GlStateManager.disableLighting();
GlStateManager.disableTexture2D();
GlStateManager.disableDepth();
{
private void drawBorderSpehere(int radius, VertexBuffer buffer, Vector4f color)
{
GlStateManager.glLineWidth(1);
int space = 10;
int upper = 90;
int upper2 = 360 - space;
double x, y, z;
int R = radius;
for (int b = -space; b <= upper; b += space)
{
protected void renderLivingLabel(T entityIn, String str, double x, double y, double z, int maxDistance) {
double d0 = entityIn.getDistanceSqToEntity(this.renderManager.livingPlayer);
if(d0 <= (double)(maxDistance * maxDistance)) {
boolean flag = entityIn.isSneaking();
GlStateManager.pushMatrix();
float f = flag?0.25F:0.0F;
GlStateManager.translate((float)x, (float)y + entityIn.height + 0.5F - f, (float)z);
GlStateManager.glNormal3f(0.0F, 1.0F, 0.0F);
GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate((float)(this.renderManager.options.thirdPersonView == 2?-1:1) * this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
package jiraiyah.librarian.events;
import jiraiyah.librarian.infrastructure.VillageData;
import jiraiyah.librarian.inits.KeyBindings;
import jiraiyah.librarian.network.VillageInfoPlayerMessage;
import jiraiyah.librarian.utilities.Log;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.VertexBuffer;