Lots of tessellator substitutions, full findreplace from CC to BlockPos. Some low hanging fruit in client

This commit is contained in:
Vincent Lee committed 2015-11-14 00:39:42 -06:00
1 parent 4d674da1b7
commit 8591551a1b
128 files changed
+553 -524

No files matched your search

@@ -21,7 +21,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.util.IIcon;
import net.minecraftforge.client.event.RenderPlayerEvent;
import org.lwjgl.opengl.GL11;
@@ -131,7 +130,7 @@ public final class BaubleRenderHandler {
float f1 = icon.getMaxU();
float f2 = icon.getMinV();
float f3 = icon.getMaxV();
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
Color color = new Color(item.getColorFromItemStack(stack, 1));
GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
@@ -21,7 +21,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderWorldLastEvent;
@@ -49,7 +49,7 @@ public final class BoundTileRenderer {
ItemStack stack = player.getCurrentEquippedItem();
int color = Color.HSBtoRGB(ClientTickHandler.ticksInGame % 200 / 200F, 0.6F, 1F);
if(stack != null && stack.getItem() instanceof ICoordBoundItem) {
ChunkCoordinates coords = ((ICoordBoundItem) stack.getItem()).getBinding(stack);
BlockPos coords = ((ICoordBoundItem) stack.getItem()).getBinding(stack);
if(coords != null)
renderBlockOutlineAt(coords, color);
}
@@ -69,13 +69,13 @@ public final class BoundTileRenderer {
if(stackInSlot != null && stackInSlot.getItem() instanceof IWireframeCoordinateListProvider) {
IWireframeCoordinateListProvider provider = (IWireframeCoordinateListProvider) stackInSlot.getItem();
List<ChunkCoordinates> coordsList = provider.getWireframesToDraw(player, stackInSlot);
List<BlockPos> coordsList = provider.getWireframesToDraw(player, stackInSlot);
if(coordsList != null)
for(ChunkCoordinates coords : coordsList)
for(BlockPos coords : coordsList)
renderBlockOutlineAt(coords, color);
if(stackInSlot.getItem() instanceof IExtendedWireframeCoordinateListProvider) {
ChunkCoordinates coords = ((IExtendedWireframeCoordinateListProvider) stackInSlot.getItem()).getSourceWireframe(player, stackInSlot);
BlockPos coords = ((IExtendedWireframeCoordinateListProvider) stackInSlot.getItem()).getSourceWireframe(player, stackInSlot);
if(coords != null && coords.posY > -1)
renderBlockOutlineAt(coords, color, 5F);
}
@@ -88,11 +88,11 @@ public final class BoundTileRenderer {
GL11.glPopMatrix();
}
private void renderBlockOutlineAt(ChunkCoordinates pos, int color) {
private void renderBlockOutlineAt(BlockPos pos, int color) {
renderBlockOutlineAt(pos, color, 1F);
}
private void renderBlockOutlineAt(ChunkCoordinates pos, int color, float thickness) {
private void renderBlockOutlineAt(BlockPos pos, int color, float thickness) {
GL11.glPushMatrix();
GL11.glTranslated(pos.posX - RenderManager.renderPosX, pos.posY - RenderManager.renderPosY, pos.posZ - RenderManager.renderPosZ + 1);
Color colorRGB = new Color(color);
@@ -133,7 +133,7 @@ public final class BoundTileRenderer {
}
private void renderBlockOutline(AxisAlignedBB aabb) {
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
double ix = aabb.minX;
double iy = aabb.minY;
@@ -143,41 +143,41 @@ public final class BoundTileRenderer {
double az = aabb.maxZ;
tessellator.startDrawing(GL11.GL_LINES);
tessellator.addVertex(ix, iy, iz);
tessellator.addVertex(ix, ay, iz);
tessellator.getWorldRenderer().addVertex(ix, iy, iz);
tessellator.getWorldRenderer().addVertex(ix, ay, iz);
tessellator.addVertex(ix, ay, iz);
tessellator.addVertex(ax, ay, iz);
tessellator.getWorldRenderer().addVertex(ix, ay, iz);
tessellator.getWorldRenderer().addVertex(ax, ay, iz);
tessellator.addVertex(ax, ay, iz);
tessellator.addVertex(ax, iy, iz);
tessellator.getWorldRenderer().addVertex(ax, ay, iz);
tessellator.getWorldRenderer().addVertex(ax, iy, iz);
tessellator.addVertex(ax, iy, iz);
tessellator.addVertex(ix, iy, iz);
tessellator.getWorldRenderer().addVertex(ax, iy, iz);
tessellator.getWorldRenderer().addVertex(ix, iy, iz);
tessellator.addVertex(ix, iy, az);
tessellator.addVertex(ix, ay, az);
tessellator.getWorldRenderer().addVertex(ix, iy, az);
tessellator.getWorldRenderer().addVertex(ix, ay, az);
tessellator.addVertex(ix, iy, az);
tessellator.addVertex(ax, iy, az);
tessellator.getWorldRenderer().addVertex(ix, iy, az);
tessellator.getWorldRenderer().addVertex(ax, iy, az);
tessellator.addVertex(ax, iy, az);
tessellator.addVertex(ax, ay, az);
tessellator.getWorldRenderer().addVertex(ax, iy, az);
tessellator.getWorldRenderer().addVertex(ax, ay, az);
tessellator.addVertex(ix, ay, az);
tessellator.addVertex(ax, ay, az);
tessellator.getWorldRenderer().addVertex(ix, ay, az);
tessellator.getWorldRenderer().addVertex(ax, ay, az);
tessellator.addVertex(ix, iy, iz);
tessellator.addVertex(ix, iy, az);
tessellator.getWorldRenderer().addVertex(ix, iy, iz);
tessellator.getWorldRenderer().addVertex(ix, iy, az);
tessellator.addVertex(ix, ay, iz);
tessellator.addVertex(ix, ay, az);
tessellator.getWorldRenderer().addVertex(ix, ay, iz);
tessellator.getWorldRenderer().addVertex(ix, ay, az);
tessellator.addVertex(ax, iy, iz);
tessellator.addVertex(ax, iy, az);
tessellator.getWorldRenderer().addVertex(ax, iy, iz);
tessellator.getWorldRenderer().addVertex(ax, iy, az);
tessellator.addVertex(ax, ay, iz);
tessellator.addVertex(ax, ay, az);
tessellator.getWorldRenderer().addVertex(ax, ay, iz);
tessellator.getWorldRenderer().addVertex(ax, ay, az);
tessellator.draw();
}
@@ -104,13 +104,13 @@ public final class ContributorFancinessHandler {
GL11.glRotatef(r, 0F, 0F, 1F);
float s = 0.9F;
GL11.glScalef(s, s, s);
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
GL11.glRotatef(-r, 0F, 0F, 1F);
GL11.glTranslatef(-t, -0F, 0F);
GL11.glScalef(-1F, 1F, 1F);
GL11.glTranslatef(t, -0F, 0F);
GL11.glRotatef(r, 0F, 0F, 1F);
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
GL11.glPopMatrix();
}
@@ -130,7 +130,7 @@ public final class ContributorFancinessHandler {
GL11.glScalef(0.4F, 0.4F, 0.4F);
GL11.glTranslatef(-1.2F, 0.2F, 0.125F);
GL11.glRotatef(20F, 1F, 0F, 0F);
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
GL11.glPopMatrix();
}
@@ -148,7 +148,7 @@ public final class ContributorFancinessHandler {
GL11.glScalef(0.4F, 0.4F, 0.4F);
GL11.glTranslatef(1.2F, 0.5F, 0F);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
GL11.glPopMatrix();
}
@@ -166,7 +166,7 @@ public final class ContributorFancinessHandler {
GL11.glTranslatef(-0.5F, 0.7F, 0F);
ShaderHelper.useShader(ShaderHelper.gold);
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ShaderHelper.releaseShader();
GL11.glPopMatrix();
}
@@ -28,7 +28,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.profiler.Profiler;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
@@ -77,7 +77,7 @@ public class LightningHandler {
GL11.glPushMatrix();
GL11.glTranslated(-interpPosX, -interpPosY, -interpPosZ);
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
GL11.glDepthMask(false);
GL11.glEnable(GL11.GL_BLEND);
@@ -86,14 +86,14 @@ public class LightningHandler {
ParticleRenderDispatcher.lightningCount = 0;
render.bindTexture(outsideResource);
tessellator.startDrawingQuads();
tessellator.getWorldRenderer().startDrawingQuads();
tessellator.setBrightness(0xF000F0);
for(LightningBolt bolt : LightningBolt.boltlist)
renderBolt(bolt, tessellator, frame, ActiveRenderInfo.rotationX, ActiveRenderInfo.rotationXZ, ActiveRenderInfo.rotationZ, ActiveRenderInfo.rotationXY, 0, false);
tessellator.draw();
render.bindTexture(insideResource);
tessellator.startDrawingQuads();
tessellator.getWorldRenderer().startDrawingQuads();
tessellator.setBrightness(0xF000F0);
for(LightningBolt bolt : LightningBolt.boltlist)
renderBolt(bolt, tessellator, frame, ActiveRenderInfo.rotationX, ActiveRenderInfo.rotationXZ, ActiveRenderInfo.rotationZ, ActiveRenderInfo.rotationXY, 1, true);
@@ -147,27 +147,27 @@ public class LightningHandler {
int color = inner ? bolt.colorInner : bolt.colorOuter;
tessellator.setColorRGBA_I(color, (int) (mainalpha * rendersegment.light * new Color(color).getAlpha()));
tessellator.addVertexWithUV(endvec.x - diff2.x, endvec.y - diff2.y, endvec.z - diff2.z, 0.5, 0);
tessellator.addVertexWithUV(startvec.x - diff1.x, startvec.y - diff1.y, startvec.z - diff1.z, 0.5, 0);
tessellator.addVertexWithUV(startvec.x + diff1.x, startvec.y + diff1.y, startvec.z + diff1.z, 0.5, 1);
tessellator.addVertexWithUV(endvec.x + diff2.x, endvec.y + diff2.y, endvec.z + diff2.z, 0.5, 1);
tessellator.getWorldRenderer().addVertexWithUV(endvec.x - diff2.x, endvec.y - diff2.y, endvec.z - diff2.z, 0.5, 0);
tessellator.getWorldRenderer().addVertexWithUV(startvec.x - diff1.x, startvec.y - diff1.y, startvec.z - diff1.z, 0.5, 0);
tessellator.getWorldRenderer().addVertexWithUV(startvec.x + diff1.x, startvec.y + diff1.y, startvec.z + diff1.z, 0.5, 1);
tessellator.getWorldRenderer().addVertexWithUV(endvec.x + diff2.x, endvec.y + diff2.y, endvec.z + diff2.z, 0.5, 1);
if(rendersegment.next == null) {
Vector3 roundend = rendersegment.endpoint.point.copy().add(rendersegment.diff.copy().normalize().multiply(width));
tessellator.addVertexWithUV(roundend.x - diff2.x, roundend.y - diff2.y, roundend.z - diff2.z, 0, 0);
tessellator.addVertexWithUV(endvec.x - diff2.x, endvec.y - diff2.y, endvec.z - diff2.z, 0.5, 0);
tessellator.addVertexWithUV(endvec.x + diff2.x, endvec.y + diff2.y, endvec.z + diff2.z, 0.5, 1);
tessellator.addVertexWithUV(roundend.x + diff2.x, roundend.y + diff2.y, roundend.z + diff2.z, 0, 1);
tessellator.getWorldRenderer().addVertexWithUV(roundend.x - diff2.x, roundend.y - diff2.y, roundend.z - diff2.z, 0, 0);
tessellator.getWorldRenderer().addVertexWithUV(endvec.x - diff2.x, endvec.y - diff2.y, endvec.z - diff2.z, 0.5, 0);
tessellator.getWorldRenderer().addVertexWithUV(endvec.x + diff2.x, endvec.y + diff2.y, endvec.z + diff2.z, 0.5, 1);
tessellator.getWorldRenderer().addVertexWithUV(roundend.x + diff2.x, roundend.y + diff2.y, roundend.z + diff2.z, 0, 1);
}
if(rendersegment.prev == null) {
Vector3 roundend = rendersegment.startpoint.point.copy().subtract(rendersegment.diff.copy().normalize().multiply(width));
tessellator.addVertexWithUV(startvec.x - diff1.x, startvec.y - diff1.y, startvec.z - diff1.z, 0.5, 0);
tessellator.addVertexWithUV(roundend.x - diff1.x, roundend.y - diff1.y, roundend.z - diff1.z, 0, 0);
tessellator.addVertexWithUV(roundend.x + diff1.x, roundend.y + diff1.y, roundend.z + diff1.z, 0, 1);
tessellator.addVertexWithUV(startvec.x + diff1.x, startvec.y + diff1.y, startvec.z + diff1.z, 0.5, 1);
tessellator.getWorldRenderer().addVertexWithUV(startvec.x - diff1.x, startvec.y - diff1.y, startvec.z - diff1.z, 0.5, 0);
tessellator.getWorldRenderer().addVertexWithUV(roundend.x - diff1.x, roundend.y - diff1.y, roundend.z - diff1.z, 0, 0);
tessellator.getWorldRenderer().addVertexWithUV(roundend.x + diff1.x, roundend.y + diff1.y, roundend.z + diff1.z, 0, 1);
tessellator.getWorldRenderer().addVertexWithUV(startvec.x + diff1.x, startvec.y + diff1.y, startvec.z + diff1.z, 0.5, 1);
}
}
}
@@ -177,7 +177,7 @@ public class LightningHandler {
public ArrayList<Segment> segments = new ArrayList<Segment>();
public Vector3 start;
public Vector3 end;
ChunkCoordinates target;
BlockPos target;
HashMap<Integer, Integer> splitparents = new HashMap<Integer, Integer>();
public double length;
@@ -335,7 +335,7 @@ public class LightningHandler {
public LightningBolt(World world, Vector3 sourcevec, TileEntity target, float ticksPerMeter, long seed, int colorOuter, int colorInner) {
this(world, sourcevec, getFocalPoint(target), ticksPerMeter, seed, colorOuter, colorInner);
this.target = new ChunkCoordinates(target.xCoord, target.yCoord, target.zCoord);
this.target = new BlockPos(target.xCoord, target.yCoord, target.zCoord);
}
public void setWrapper(Entity entity) {
@@ -19,7 +19,7 @@ import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
@@ -45,7 +45,7 @@ public final class MultiblockRenderHandler {
private static RenderBlocks blockRender = RenderBlocks.getInstance();
public static MultiblockSet currentMultiblock;
public static ChunkCoordinates anchor;
public static BlockPos anchor;
public static int angle;
public static void setMultiblock(MultiblockSet set) {
@@ -66,7 +66,7 @@ public final class MultiblockRenderHandler {
@SubscribeEvent
public void onPlayerInteract(PlayerInteractEvent event) {
if(currentMultiblock != null && anchor == null && event.action == Action.RIGHT_CLICK_BLOCK && event.entityPlayer == Minecraft.getMinecraft().thePlayer) {
anchor = new ChunkCoordinates(event.x, event.y, event.z);
anchor = new BlockPos(event.x, event.y, event.z);
angle = MathHelper.floor_double(event.entityPlayer.rotationYaw * 4.0 / 360.0 + 0.5) & 3;
event.setCanceled(true);
}
@@ -97,7 +97,7 @@ public final class MultiblockRenderHandler {
}
private boolean renderComponentInWorld(World world, Multiblock mb, MultiblockComponent comp, int anchorX, int anchorY, int anchorZ) {
ChunkCoordinates pos = comp.getRelativePosition();
BlockPos pos = comp.getRelativePosition();
int x = pos.posX + anchorX;
int y = pos.posY + anchorY;
int z = pos.posZ + anchorZ;
@@ -116,7 +116,7 @@ public final class MultiblockRenderHandler {
GL11.glTranslated(-0.5, -0.5, -0.5);
blockAccess.update(null, mb, mb.offX, mb.offY, mb.offZ);
for(MultiblockComponent comp : mb.getComponents()) {
ChunkCoordinates pos = comp.getRelativePosition();
BlockPos pos = comp.getRelativePosition();
doRenderComponent(mb, comp, pos.posX + mb.offX, pos.posY + mb.offY, pos.posZ + mb.offZ, 1);
}
}
@@ -148,9 +148,9 @@ public final class MultiblockRenderHandler {
GL11.glColor4f(red, green, blue, alpha);
IBlockAccess oldBlockAccess = blockRender.blockAccess;
blockRender.blockAccess = blockAccess;
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
blockRender.renderAllFaces = true;
tessellator.startDrawingQuads();
tessellator.getWorldRenderer().startDrawingQuads();
tessellator.disableColor();
try {
blockRender.renderBlockByRenderType(block, x, y, z);
@@ -18,7 +18,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
@@ -68,7 +68,7 @@ public final class RedStringRenderer {
private static void renderTile(TileRedString tile) {
ForgeDirection dir = ForgeDirection.getOrientation(tile.getBlockMetadata());
ChunkCoordinates bind = tile.getBinding();
BlockPos bind = tile.getBinding();
if(bind != null) {
GL11.glPushMatrix();
@@ -80,7 +80,7 @@ public final class RedStringRenderer {
int stages = (int) (vecOrig.mag() / vecMag.mag());
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
GL11.glLineWidth(1F);
tessellator.startDrawing(GL11.GL_LINES);
@@ -18,7 +18,7 @@ import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.MovingObjectPosition;
import net.minecraftforge.client.event.RenderWorldLastEvent;
@@ -47,7 +47,7 @@ public final class SubTileRadiusRenderHandler {
ItemStack stackHeld = mc.thePlayer.getCurrentEquippedItem();
if(stackHeld != null && stackHeld.getItem() == ModItems.twigWand && ItemTwigWand.getBindMode(stackHeld)) {
ChunkCoordinates coords = ItemTwigWand.getBoundTile(stackHeld);
BlockPos coords = ItemTwigWand.getBoundTile(stackHeld);
if(coords.posY != -1) {
x = coords.posX;
y = coords.posY;
@@ -94,29 +94,29 @@ public final class SubTileRadiusRenderHandler {
double x = aabb.maxX - aabb.minX - f;
double z = aabb.maxZ - aabb.minZ - f;
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertex(x, f, f);
tessellator.addVertex(f, f, f);
tessellator.addVertex(f, f, z);
tessellator.addVertex(x, f, z);
Tessellator tessellator = Tessellator.getInstance();
tessellator.getWorldRenderer().startDrawingQuads();
tessellator.getWorldRenderer().addVertex(x, f, f);
tessellator.getWorldRenderer().addVertex(f, f, f);
tessellator.getWorldRenderer().addVertex(f, f, z);
tessellator.getWorldRenderer().addVertex(x, f, z);
tessellator.draw();
x += f;
z += f;
double f1 = f + f / 4F;
GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 64);
tessellator.startDrawingQuads();
tessellator.addVertex(x, f1, 0);
tessellator.addVertex(0, f1, 0);
tessellator.addVertex(0, f1, z);
tessellator.addVertex(x, f1, z);
tessellator.getWorldRenderer().startDrawingQuads();
tessellator.getWorldRenderer().addVertex(x, f1, 0);
tessellator.getWorldRenderer().addVertex(0, f1, 0);
tessellator.getWorldRenderer().addVertex(0, f1, z);
tessellator.getWorldRenderer().addVertex(x, f1, z);
tessellator.draw();
GL11.glPopMatrix();
}
public void renderCircle(ChunkCoordinates center, double radius) {
public void renderCircle(BlockPos center, double radius) {
GL11.glPushMatrix();
double x = center.posX + 0.5;
double y = center.posY;
@@ -134,30 +134,30 @@ public final class SubTileRadiusRenderHandler {
int step = totalAngles / drawAngles;
radius -= f;
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
tessellator.startDrawing(GL11.GL_TRIANGLE_FAN);
tessellator.addVertex(0, f, 0);
tessellator.getWorldRenderer().addVertex(0, f, 0);
for(int i = 0; i < totalAngles + 1; i += step) {
double rad = (totalAngles - i) * Math.PI / 180.0;
double xp = Math.cos(rad) * radius;
double zp = Math.sin(rad) * radius;
tessellator.addVertex(xp, f, zp);
tessellator.getWorldRenderer().addVertex(xp, f, zp);
}
tessellator.addVertex(0, f, 0);
tessellator.getWorldRenderer().addVertex(0, f, 0);
tessellator.draw();
radius += f;
double f1 = f + f / 4F;
GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 64);
tessellator.startDrawing(GL11.GL_TRIANGLE_FAN);
tessellator.addVertex(0, f1, 0);
tessellator.getWorldRenderer().addVertex(0, f1, 0);
for(int i = 0; i < totalAngles + 1; i += step) {
double rad = (totalAngles - i) * Math.PI / 180.0;
double xp = Math.cos(rad) * radius;
double zp = Math.sin(rad) * radius;
tessellator.addVertex(xp, f1, zp);
tessellator.getWorldRenderer().addVertex(xp, f1, zp);
}
tessellator.addVertex(0, f1, 0);
tessellator.getWorldRenderer().addVertex(0, f1, 0);
tessellator.draw();
GL11.glPopMatrix();
}
@@ -56,7 +56,7 @@ public final class TooltipAdditionDisplayHandler {
ItemStack stack = slot.getStack();
if(stack != null) {
ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
FontRenderer font = mc.fontRenderer;
FontRenderer font = mc.fontRendererObj;
int mouseX = Mouse.getX() * res.getScaledWidth() / mc.displayWidth;
int mouseY = res.getScaledHeight() - Mouse.getY() * res.getScaledHeight() / mc.displayHeight;
@@ -151,13 +151,13 @@ public final class TooltipAdditionDisplayHandler {
}
} else lexiconLookupTime = 0F;
RenderItem.getInstance().renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, new ItemStack(ModItems.lexicon), x, y);
mc.getRenderItem().renderItemIntoGUI(new ItemStack(ModItems.lexicon), x, y);
GL11.glDisable(GL11.GL_LIGHTING);
font.drawStringWithShadow("?", x + 10, y + 8, 0xFFFFFFFF);
GL11.glScalef(0.5F, 0.5F, 1F);
boolean mac = Minecraft.isRunningOnMac;
mc.fontRenderer.drawStringWithShadow(EnumChatFormatting.BOLD + (ConfigHandler.useShiftForQuickLookup ? "Shift" : (mac ? "Cmd" : "Ctrl")), (x + 10) * 2 - 16, (y + 8) * 2 + 20, 0xFFFFFFFF);
mc.fontRendererObj.drawStringWithShadow(EnumChatFormatting.BOLD + (ConfigHandler.useShiftForQuickLookup ? "Shift" : (mac ? "Cmd" : "Ctrl")), (x + 10) * 2 - 16, (y + 8) * 2 + 20, 0xFFFFFFFF);
GL11.glScalef(2F, 2F, 1F);
GL11.glEnable(GL11.GL_DEPTH_TEST);
@@ -111,7 +111,7 @@ public final class RenderHelper {
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glShadeModel(GL11.GL_SMOOTH);
Tessellator var15 = Tessellator.instance;
Tessellator var15 = Tessellator.getInstance();
var15.startDrawingQuads();
var15.setColorRGBA_F(var8, var9, var10, var7);
var15.addVertex(par3, par2, z);
@@ -131,17 +131,17 @@ public final class RenderHelper {
}
public static void drawTexturedModalRect(int par1, int par2, float z, int par3, int par4, int par5, int par6, float f, float f1) {
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(par1 + 0, par2 + par6, z, (par3 + 0) * f, (par4 + par6) * f1);
tessellator.addVertexWithUV(par1 + par5, par2 + par6, z, (par3 + par5) * f, (par4 + par6) * f1);
tessellator.addVertexWithUV(par1 + par5, par2 + 0, z, (par3 + par5) * f, (par4 + 0) * f1);
tessellator.addVertexWithUV(par1 + 0, par2 + 0, z, (par3 + 0) * f, (par4 + 0) * f1);
Tessellator tessellator = Tessellator.getInstance();
tessellator.getWorldRenderer().startDrawingQuads();
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + par6, z, (par3 + 0) * f, (par4 + par6) * f1);
tessellator.getWorldRenderer().addVertexWithUV(par1 + par5, par2 + par6, z, (par3 + par5) * f, (par4 + par6) * f1);
tessellator.getWorldRenderer().addVertexWithUV(par1 + par5, par2 + 0, z, (par3 + par5) * f, (par4 + 0) * f1);
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + 0, z, (par3 + 0) * f, (par4 + 0) * f1);
tessellator.draw();
}
public static void renderStar(int color, float xScale, float yScale, float zScale, long seed) {
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
int ticks = ClientTickHandler.ticksInGame % 200;
if (ticks >= 100)
@@ -174,12 +174,12 @@ public final class RenderHelper {
float f3 = random.nextFloat() * 20F + 5F + f2 * 10F;
float f4 = random.nextFloat() * 2F + 1F + f2 * 2F;
tessellator.setColorRGBA_I(color, (int) (255F * (1F - f2)));
tessellator.addVertex(0, 0, 0);
tessellator.getWorldRenderer().addVertex(0, 0, 0);
tessellator.setColorRGBA_F(0F, 0F, 0F, 0);
tessellator.addVertex(-0.866D * f4, f3, -0.5F * f4);
tessellator.addVertex(0.866D * f4, f3, -0.5F * f4);
tessellator.addVertex(0, f3, 1F * f4);
tessellator.addVertex(-0.866D * f4, f3, -0.5F * f4);
tessellator.getWorldRenderer().addVertex(-0.866D * f4, f3, -0.5F * f4);
tessellator.getWorldRenderer().addVertex(0.866D * f4, f3, -0.5F * f4);
tessellator.getWorldRenderer().addVertex(0, f3, 1F * f4);
tessellator.getWorldRenderer().addVertex(-0.866D * f4, f3, -0.5F * f4);
tessellator.draw();
}
@@ -27,7 +27,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemRecord;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntitySkull;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraft.world.WorldSettings.GameType;
@@ -240,47 +240,47 @@ public class ClientProxy extends CommonProxy {
}
private void initRenderers() {
LibRenderIDs.idAltar = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idSpecialFlower = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idSpreader = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idPool = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idPylon = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idMiniIsland = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idTinyPotato = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idSpawnerClaw = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idBrewery = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idCorporeaIndex = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idPump = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idDoubleFlower = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idCorporeaCrystalCybe = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idIncensePlate = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idHourglass = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idCocoon = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idLightRelay = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idBellows = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idTeruTeruBozu = RenderingRegistry.getNextAvailableRenderId();
LibRenderIDs.idAvatar = RenderingRegistry.getNextAvailableRenderId();
RenderSpecialFlower specialFlowerRender = new RenderSpecialFlower(LibRenderIDs.idSpecialFlower);
RenderingRegistry.registerBlockHandler(new RenderAltar());
RenderingRegistry.registerBlockHandler(specialFlowerRender);
RenderingRegistry.registerBlockHandler(new RenderSpreader());
RenderingRegistry.registerBlockHandler(new RenderPool());
RenderingRegistry.registerBlockHandler(new RenderPylon());
RenderingRegistry.registerBlockHandler(new RenderFloatingFlower());
RenderingRegistry.registerBlockHandler(new RenderTinyPotato());
RenderingRegistry.registerBlockHandler(new RenderSpawnerClaw());
RenderingRegistry.registerBlockHandler(new RenderBrewery());
RenderingRegistry.registerBlockHandler(new RenderCorporeaIndex());
RenderingRegistry.registerBlockHandler(new RenderPump());
RenderingRegistry.registerBlockHandler(new RenderDoubleFlower());
RenderingRegistry.registerBlockHandler(new RenderCorporeaCrystalCube());
RenderingRegistry.registerBlockHandler(new RenderIncensePlate());
RenderingRegistry.registerBlockHandler(new RenderHourglass());
RenderingRegistry.registerBlockHandler(new RenderCocoon());
RenderingRegistry.registerBlockHandler(new RenderBellows());
RenderingRegistry.registerBlockHandler(new RenderTeruTeruBozu());
RenderingRegistry.registerBlockHandler(new RenderAvatar());
// LibRenderIDs.idAltar = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idSpecialFlower = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idSpreader = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idPool = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idPylon = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idMiniIsland = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idTinyPotato = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idSpawnerClaw = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idBrewery = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idCorporeaIndex = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idPump = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idDoubleFlower = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idCorporeaCrystalCybe = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idIncensePlate = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idHourglass = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idCocoon = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idLightRelay = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idBellows = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idTeruTeruBozu = RenderingRegistry.getNextAvailableRenderId();
// LibRenderIDs.idAvatar = RenderingRegistry.getNextAvailableRenderId();
//
// RenderSpecialFlower specialFlowerRender = new RenderSpecialFlower(LibRenderIDs.idSpecialFlower);
// RenderingRegistry.registerBlockHandler(new RenderAltar());
// RenderingRegistry.registerBlockHandler(specialFlowerRender);
// RenderingRegistry.registerBlockHandler(new RenderSpreader());
// RenderingRegistry.registerBlockHandler(new RenderPool());
// RenderingRegistry.registerBlockHandler(new RenderPylon());
// RenderingRegistry.registerBlockHandler(new RenderFloatingFlower());
// RenderingRegistry.registerBlockHandler(new RenderTinyPotato());
// RenderingRegistry.registerBlockHandler(new RenderSpawnerClaw());
// RenderingRegistry.registerBlockHandler(new RenderBrewery());
// RenderingRegistry.registerBlockHandler(new RenderCorporeaIndex());
// RenderingRegistry.registerBlockHandler(new RenderPump());
// RenderingRegistry.registerBlockHandler(new RenderDoubleFlower());
// RenderingRegistry.registerBlockHandler(new RenderCorporeaCrystalCube());
// RenderingRegistry.registerBlockHandler(new RenderIncensePlate());
// RenderingRegistry.registerBlockHandler(new RenderHourglass());
// RenderingRegistry.registerBlockHandler(new RenderCocoon());
// RenderingRegistry.registerBlockHandler(new RenderBellows());
// RenderingRegistry.registerBlockHandler(new RenderTeruTeruBozu());
// RenderingRegistry.registerBlockHandler(new RenderAvatar());
IMultiblockRenderHook.renderHooks.put(ModBlocks.flower, specialFlowerRender);
IMultiblockRenderHook.renderHooks.put(ModBlocks.shinyFlower, specialFlowerRender);
@@ -436,11 +436,11 @@ public class ClientProxy extends CommonProxy {
int xp = x + i - iradius;
int zp = z + j - iradius;
if((int) Math.floor(MathHelper.pointDistancePlane(xp, zp, x, z)) == (iradius - 1))
mb.addComponent(new AnyComponent(new ChunkCoordinates(xp - x, 1, zp - z), block, 0));
mb.addComponent(new AnyComponent(new BlockPos(xp - x, 1, zp - z), block, 0));
}
MultiblockRenderHandler.setMultiblock(mb.makeSet());
MultiblockRenderHandler.anchor = new ChunkCoordinates(x, y, z);
MultiblockRenderHandler.anchor = new BlockPos(x, y, z);
}
@Override
@@ -67,13 +67,13 @@ public class FXSparkle extends EntityFX {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
Minecraft.getMinecraft().renderEngine.bindTexture(ConfigHandler.matrixMode ? ObfuscationHelper.getParticleTexture() : particles);
tessellator.startDrawingQuads();
tessellator.getWorldRenderer().startDrawingQuads();
for(FXSparkle sparkle : queuedRenders)
sparkle.renderQueued(tessellator);
tessellator.draw();
ShaderHelper.useShader(ShaderHelper.filmGrain);
tessellator.startDrawingQuads();
tessellator.getWorldRenderer().startDrawingQuads();
for(FXSparkle sparkle : queuedCorruptRenders)
sparkle.renderQueued(tessellator);
tessellator.draw();
@@ -104,10 +104,10 @@ public class FXSparkle extends EntityFX {
tessellator.setBrightness(0x0000f0);
tessellator.setColorRGBA_F(particleRed * var16, particleGreen * var16, particleBlue * var16, 1);
tessellator.addVertexWithUV(var13 - f1 * var12 - f4 * var12, var14 - f2 * var12, var15 - f3 * var12 - f5 * var12, var9, var11);
tessellator.addVertexWithUV(var13 - f1 * var12 + f4 * var12, var14 + f2 * var12, var15 - f3 * var12 + f5 * var12, var9, var10);
tessellator.addVertexWithUV(var13 + f1 * var12 + f4 * var12, var14 + f2 * var12, var15 + f3 * var12 + f5 * var12, var8, var10);
tessellator.addVertexWithUV(var13 + f1 * var12 - f4 * var12, var14 - f2 * var12, var15 + f3 * var12 - f5 * var12, var8, var11);
tessellator.getWorldRenderer().addVertexWithUV(var13 - f1 * var12 - f4 * var12, var14 - f2 * var12, var15 - f3 * var12 - f5 * var12, var9, var11);
tessellator.getWorldRenderer().addVertexWithUV(var13 - f1 * var12 + f4 * var12, var14 + f2 * var12, var15 - f3 * var12 + f5 * var12, var9, var10);
tessellator.getWorldRenderer().addVertexWithUV(var13 + f1 * var12 + f4 * var12, var14 + f2 * var12, var15 + f3 * var12 + f5 * var12, var8, var10);
tessellator.getWorldRenderer().addVertexWithUV(var13 + f1 * var12 - f4 * var12, var14 - f2 * var12, var15 + f3 * var12 - f5 * var12, var8, var11);
}
@@ -81,7 +81,7 @@ public class FXWisp extends EntityFX {
Minecraft.getMinecraft().renderEngine.bindTexture(ConfigHandler.matrixMode ? ObfuscationHelper.getParticleTexture() : particles);
if(!queuedRenders.isEmpty()) {
tessellator.startDrawingQuads();
tessellator.getWorldRenderer().startDrawingQuads();
for(FXWisp wisp : queuedRenders)
wisp.renderQueued(tessellator, true);
tessellator.draw();
@@ -89,7 +89,7 @@ public class FXWisp extends EntityFX {
if(!queuedDepthIgnoringRenders.isEmpty()) {
GL11.glDisable(GL11.GL_DEPTH_TEST);
tessellator.startDrawingQuads();
tessellator.getWorldRenderer().startDrawingQuads();
for(FXWisp wisp : queuedDepthIgnoringRenders)
wisp.renderQueued(tessellator, false);
tessellator.draw();
@@ -119,10 +119,10 @@ public class FXWisp extends EntityFX {
tessellator.setBrightness(240);
tessellator.setColorRGBA_F(particleRed, particleGreen, particleBlue, 0.5F);
tessellator.addVertexWithUV(f11 - f1 * f10 - f4 * f10, f12 - f2 * f10, f13 - f3 * f10 - f5 * f10, 0, 1);
tessellator.addVertexWithUV(f11 - f1 * f10 + f4 * f10, f12 + f2 * f10, f13 - f3 * f10 + f5 * f10, 1, 1);
tessellator.addVertexWithUV(f11 + f1 * f10 + f4 * f10, f12 + f2 * f10, f13 + f3 * f10 + f5 * f10, 1, 0);
tessellator.addVertexWithUV(f11 + f1 * f10 - f4 * f10, f12 - f2 * f10, f13 + f3 * f10 - f5 * f10, 0, 0);
tessellator.getWorldRenderer().addVertexWithUV(f11 - f1 * f10 - f4 * f10, f12 - f2 * f10, f13 - f3 * f10 - f5 * f10, 0, 1);
tessellator.getWorldRenderer().addVertexWithUV(f11 - f1 * f10 + f4 * f10, f12 + f2 * f10, f13 - f3 * f10 + f5 * f10, 1, 1);
tessellator.getWorldRenderer().addVertexWithUV(f11 + f1 * f10 + f4 * f10, f12 + f2 * f10, f13 + f3 * f10 + f5 * f10, 1, 0);
tessellator.getWorldRenderer().addVertexWithUV(f11 + f1 * f10 - f4 * f10, f12 - f2 * f10, f13 + f3 * f10 - f5 * f10, 0, 0);
}
@Override
@@ -28,7 +28,7 @@ public final class ParticleRenderDispatcher {
// Called from LightningHandler.onRenderWorldLast since that was
// already registered. /shrug
public static void dispatch() {
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
boolean isLightingEnabled = GL11.glGetBoolean(GL11.GL_LIGHTING);
Profiler profiler = Minecraft.getMinecraft().mcProfiler;
@@ -59,9 +59,9 @@ public class GuiFlowerBag extends GuiContainer {
int x = guiLeft + slotf.xDisplayPosition;
int y = guiTop + slotf.yDisplayPosition;
RenderHelper.enableGUIStandardItemLighting();
RenderItem.getInstance().renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, stack, x, y);
mc.getRenderItem().renderItemIntoGUI(stack, x, y);
RenderHelper.disableStandardItemLighting();
mc.fontRenderer.drawStringWithShadow("0", x + 11, y + 9, 0xFF6666);
mc.fontRendererObj.drawStringWithShadow("0", x + 11, y + 9, 0xFF6666);
}
}
}
@@ -13,10 +13,14 @@ package vazkii.botania.client.gui.bag;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.IChatComponent;
import vazkii.botania.common.item.ItemFlowerBag;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.lib.LibItemNames;
import java.util.Arrays;
public class InventoryFlowerBag implements IInventory {
private static final ItemStack[] FALLBACK_INVENTORY = new ItemStack[16];
@@ -133,22 +137,47 @@ public class InventoryFlowerBag implements IInventory {
}
@Override
public boolean hasCustomInventoryName() {
public int getField(int id) {
return 0;
}
@Override
public void setField(int id, int value) {}
@Override
public int getFieldCount() {
return 0;
}
@Override
public void clear() {
if (stacks != null) {
Arrays.fill(stacks, null);
}
}
@Override
public boolean hasCustomName() {
return false;
}
@Override
public void openInventory() {
public IChatComponent getDisplayName() {
return new ChatComponentText(getCommandSenderName());
}
@Override
public void openInventory(EntityPlayer player) {
// NO-OP
}
@Override
public void closeInventory() {
public void closeInventory(EntityPlayer player) {
// NO-OP
}
@Override
public String getInventoryName() {
public String getCommandSenderName() {
return LibItemNames.FLOWER_BAG;
}
@@ -15,12 +15,13 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ContainerWorkbench;
import net.minecraft.inventory.Slot;
import net.minecraft.inventory.SlotCrafting;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
public class ContainerCraftingHalo extends ContainerWorkbench {
public ContainerCraftingHalo(InventoryPlayer p_i1808_1_, World p_i1808_2_) {
super(p_i1808_1_, p_i1808_2_, 0, 0, 0);
super(p_i1808_1_, p_i1808_2_, BlockPos.ORIGIN); // todo 1.8 verify
craftMatrix = new InventoryCraftingHalo(this, 3, 3);
@@ -91,7 +91,7 @@ public class RecipeHandlerElvenTrade extends TemplateRecipeHandler {
GuiDraw.drawTexturedModalRect(30, 10, 17, 17, 100, 80);
GL11.glDisable(GL11.GL_BLEND);
GuiDraw.changeTexture(TextureMap.locationBlocksTexture);
RenderItem.getInstance().renderIcon(35, 29, BlockAlfPortal.portalTex, 48, 48);
Minecraft.getMinecraft().getRenderItem().renderIcon(35, 29, BlockAlfPortal.portalTex, 48, 48);
}
private static boolean hasElvenKnowledge() {
@@ -121,7 +121,7 @@ public class RecipeHandlerPetalApothecary extends TemplateRecipeHandler {
if(recipe == null)
continue;
if(recipe.getOutput().stackTagCompound != null && NEIServerUtils.areStacksSameType(recipe.getOutput(), result) || recipe.getOutput().stackTagCompound == null && NEIServerUtils.areStacksSameTypeCrafting(recipe.getOutput(), result) && recipe.getOutput().getItem() != Items.skull)
if(recipe.getOutput().getTagCompound() != null && NEIServerUtils.areStacksSameType(recipe.getOutput(), result) || recipe.getOutput().getTagCompound() == null && NEIServerUtils.areStacksSameTypeCrafting(recipe.getOutput(), result) && recipe.getOutput().getItem() != Items.skull)
arecipes.add(getCachedRecipe(recipe));
}
}
@@ -249,9 +249,9 @@ public class ModelArmorElementium extends ModelBiped {
if (itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction();
if (enumaction == EnumAction.block)
if (enumaction == EnumAction.BLOCK)
heldItemRight = 3;
else if (enumaction == EnumAction.bow)
else if (enumaction == EnumAction.BOW)
aimedBow = true;
}
}
@@ -178,9 +178,9 @@ public class ModelArmorManasteel extends ModelBiped {
if (itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction();
if (enumaction == EnumAction.block)
if (enumaction == EnumAction.BLOCK)
heldItemRight = 3;
else if (enumaction == EnumAction.bow)
else if (enumaction == EnumAction.BOW)
aimedBow = true;
}
}
@@ -179,9 +179,9 @@ public class ModelArmorManaweave extends ModelBiped {
if (itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction();
if (enumaction == EnumAction.block)
if (enumaction == EnumAction.BLOCK)
heldItemRight = 3;
else if (enumaction == EnumAction.bow)
else if (enumaction == EnumAction.BOW)
aimedBow = true;
}
}
@@ -270,9 +270,9 @@ public class ModelArmorTerrasteel extends ModelBiped {
if (itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction();
if (enumaction == EnumAction.block)
if (enumaction == EnumAction.BLOCK)
heldItemRight = 3;
else if (enumaction == EnumAction.bow)
else if (enumaction == EnumAction.BOW)
aimedBow = true;
}
}
@@ -29,7 +29,7 @@ public class RenderDoubleFlower implements ISimpleBlockRenderingHandler {
@Override
public boolean renderWorldBlock(IBlockAccess world, int p_147774_2_, int p_147774_3_, int p_147774_4_, Block block, int modelId, RenderBlocks renderer) {
BlockDoublePlant p_147774_1_ = (BlockDoublePlant) block;
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
tessellator.setBrightness(p_147774_1_.getMixedBrightnessForBlock(world, p_147774_2_, p_147774_3_, p_147774_4_));
tessellator.setColorOpaque_F(1F, 1F, 1F);
long j1 = p_147774_2_ * 3129871 ^ p_147774_4_ * 116129781L;
@@ -41,7 +41,7 @@ public class RenderSpecialFlower implements ISimpleBlockRenderingHandler, IMulti
// Copied from RenderBlocks
public static boolean renderCrossedSquares(IBlockAccess blockAccess, Block par1Block, int par2, int par3, int par4, RenderBlocks render) {
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
tessellator.setBrightness(par1Block.getMixedBrightnessForBlock(blockAccess, par2, par3, par4));
float f = 1.0F;
int l = par1Block.colorMultiplier(blockAccess, par2, par3, par4);
@@ -80,7 +80,7 @@ public class RenderSpecialFlower implements ISimpleBlockRenderingHandler, IMulti
// Copied from RenderBlocks
public static void drawCrossedSquares(IBlockAccess blockAccess, Block par1Block, IIcon icon, int x, int y, int z, double par3, double par5, double par7, float par9, RenderBlocks render) {
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
double d3 = icon.getMinU();
double d4 = icon.getMinV();
@@ -91,22 +91,22 @@ public class RenderSpecialFlower implements ISimpleBlockRenderingHandler, IMulti
double d9 = par3 + 0.5D + d7;
double d10 = par7 + 0.5D - d7;
double d11 = par7 + 0.5D + d7;
tessellator.addVertexWithUV(d8, par5 + par9, d10, d3, d4);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d10, d3, d6);
tessellator.addVertexWithUV(d9, par5 + 0.0D, d11, d5, d6);
tessellator.addVertexWithUV(d9, par5 + par9, d11, d5, d4);
tessellator.addVertexWithUV(d9, par5 + par9, d11, d3, d4);
tessellator.addVertexWithUV(d9, par5 + 0.0D, d11, d3, d6);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d10, d5, d6);
tessellator.addVertexWithUV(d8, par5 + par9, d10, d5, d4);
tessellator.addVertexWithUV(d8, par5 + par9, d11, d3, d4);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d11, d3, d6);
tessellator.addVertexWithUV(d9, par5 + 0.0D, d10, d5, d6);
tessellator.addVertexWithUV(d9, par5 + par9, d10, d5, d4);
tessellator.addVertexWithUV(d9, par5 + par9, d10, d3, d4);
tessellator.addVertexWithUV(d9, par5 + 0.0D, d10, d3, d6);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d11, d5, d6);
tessellator.addVertexWithUV(d8, par5 + par9, d11, d5, d4);
tessellator.getWorldRenderer().addVertexWithUV(d8, par5 + par9, d10, d3, d4);
tessellator.getWorldRenderer().addVertexWithUV(d8, par5 + 0.0D, d10, d3, d6);
tessellator.getWorldRenderer().addVertexWithUV(d9, par5 + 0.0D, d11, d5, d6);
tessellator.getWorldRenderer().addVertexWithUV(d9, par5 + par9, d11, d5, d4);
tessellator.getWorldRenderer().addVertexWithUV(d9, par5 + par9, d11, d3, d4);
tessellator.getWorldRenderer().addVertexWithUV(d9, par5 + 0.0D, d11, d3, d6);
tessellator.getWorldRenderer().addVertexWithUV(d8, par5 + 0.0D, d10, d5, d6);
tessellator.getWorldRenderer().addVertexWithUV(d8, par5 + par9, d10, d5, d4);
tessellator.getWorldRenderer().addVertexWithUV(d8, par5 + par9, d11, d3, d4);
tessellator.getWorldRenderer().addVertexWithUV(d8, par5 + 0.0D, d11, d3, d6);
tessellator.getWorldRenderer().addVertexWithUV(d9, par5 + 0.0D, d10, d5, d6);
tessellator.getWorldRenderer().addVertexWithUV(d9, par5 + par9, d10, d5, d4);
tessellator.getWorldRenderer().addVertexWithUV(d9, par5 + par9, d10, d3, d4);
tessellator.getWorldRenderer().addVertexWithUV(d9, par5 + 0.0D, d10, d3, d6);
tessellator.getWorldRenderer().addVertexWithUV(d8, par5 + 0.0D, d11, d5, d6);
tessellator.getWorldRenderer().addVertexWithUV(d8, par5 + par9, d11, d5, d4);
}
@Override
@@ -121,7 +121,7 @@ public class RenderSpecialFlower implements ISimpleBlockRenderingHandler, IMulti
@Override
public void renderBlockForMultiblock(IBlockAccess world, Multiblock mb, Block block, int meta, RenderBlocks renderBlocks, MultiblockComponent comp, float alpha) {
Tessellator tess = Tessellator.instance;
Tessellator tess = Tessellator.getInstance();
tess.startDrawingQuads();
drawCrossedSquares(world, block, block.getIcon(0, meta), 0, 0, 0, -0.5, -0.5, -0.5, 1F, renderBlocks);
tess.draw();
@@ -63,7 +63,7 @@ public class RenderBabylonWeapon extends Render {
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);
GL11.glDisable(GL11.GL_LIGHTING);
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
GL11.glPopMatrix();
GL11.glDisable(GL11.GL_CULL_FACE);
@@ -72,7 +72,7 @@ public class RenderBabylonWeapon extends Render {
Minecraft.getMinecraft().renderEngine.bindTexture(babylon);
Tessellator tes = Tessellator.instance;
Tessellator tes = Tessellator.getInstance();
ShaderHelper.useShader(ShaderHelper.halo);
Random rand = new Random(weapon.getUniqueID().getMostSignificantBits());
GL11.glRotatef(-90F, 1F, 0F, 0F);
@@ -89,7 +89,7 @@ public class RenderCorporeaSpark extends RenderSparkBase<EntityCorporeaSpark> {
GL11.glTranslated(gap * i, 0F, 0F);
for(int j = -shift; j < shift; j++) {
GL11.glTranslated(0F, gap * j, 0F);
ItemRenderer.renderItemIn2D(Tessellator.instance, minU + stepU * (i + shift), minV + stepV * (j + shift + 1), minU + stepU * (i + shift + 1), minV + stepV * (j + shift), icon.getIconWidth() / pieces, icon.getIconHeight() / pieces, 1F / 8F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), minU + stepU * (i + shift), minV + stepV * (j + shift + 1), minU + stepU * (i + shift + 1), minV + stepV * (j + shift), icon.getIconWidth() / pieces, icon.getIconHeight() / pieces, 1F / 8F);
GL11.glTranslated(0F, -gap * j, 0F);
}
GL11.glTranslated(-gap * i, 0F, 0F);
@@ -46,7 +46,7 @@ public class RenderSparkBase<T extends Entity> extends RenderEntity {
float scale = 0.75F + 0.1F * (float) Math.sin(time / 10);
GL11.glScalef(scale, scale, scale);
bindEntityTexture(par1Entity);
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
GL11.glPushMatrix();
float r = 180.0F - renderManager.playerViewY;
@@ -38,7 +38,7 @@ public class RenderThornChakram extends Render {
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glScalef(0.5F, 0.5F, 0.5F);
bindEntityTexture(p_76986_1_);
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
func_77026_a(tessellator, iicon, fire ? 240 : -1);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
@@ -82,7 +82,7 @@ public class RenderBow implements IItemRenderer {
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1F, 1F, 1F, 1F);
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), scale);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), scale);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
@@ -79,7 +79,7 @@ public class RenderLens implements IItemRenderer {
float scale = 1F / 16F;
GL11.glColor4f(1F, 1F, 1F, 1F);
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), scale);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), scale);
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_BLEND);
@@ -109,14 +109,14 @@ public class RenderLens implements IItemRenderer {
float par4 = 16;
float par5 = 16;
float zLevel = 0F;
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
Tessellator tessellator = Tessellator.getInstance();
tessellator.getWorldRenderer().startDrawingQuads();
if(shiny)
tessellator.setBrightness(240);
tessellator.addVertexWithUV(par1 + 0, par2 + par5, zLevel, icon.getMinU(), icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + par5, zLevel, icon.getMaxU(), icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + 0, zLevel, icon.getMaxU(), icon.getMinV());
tessellator.addVertexWithUV(par1 + 0, par2 + 0, zLevel, icon.getMinU(), icon.getMinV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + par5, zLevel, icon.getMinU(), icon.getMaxV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + par4, par2 + par5, zLevel, icon.getMaxU(), icon.getMaxV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + par4, par2 + 0, zLevel, icon.getMaxU(), icon.getMinV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + 0, zLevel, icon.getMinU(), icon.getMinV());
tessellator.draw();
}
@@ -67,7 +67,7 @@ public class RenderTransparentItem implements IItemRenderer {
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1F, 1F, 1F, 1F);
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), scale);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), scale);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
@@ -68,13 +68,13 @@ public class RenderTileAlfPortal extends TileEntitySpecialRenderer {
}
public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) {
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
Tessellator tessellator = Tessellator.getInstance();
tessellator.getWorldRenderer().startDrawingQuads();
tessellator.setBrightness(brightness);
tessellator.addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV());
tessellator.addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV());
tessellator.draw();
}
@@ -129,7 +129,7 @@ public class RenderTileAltar extends TileEntitySpecialRenderer {
float f1 = icon.getMaxU();
float f2 = icon.getMinV();
float f3 = icon.getMaxV();
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
GL11.glColor3f(1F, 1F, 1F);
}
@@ -168,14 +168,14 @@ public class RenderTileAltar extends TileEntitySpecialRenderer {
}
public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) {
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
Tessellator tessellator = Tessellator.getInstance();
tessellator.getWorldRenderer().startDrawingQuads();
if(brightness != -1)
tessellator.setBrightness(brightness);
tessellator.addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV());
tessellator.addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV());
tessellator.draw();
}
@@ -79,7 +79,7 @@ public class RenderTileAvatar extends TileEntitySpecialRenderer {
float f1 = icon.getMaxU();
float f2 = icon.getMinV();
float f3 = icon.getMaxV();
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
GL11.glColor3f(1F, 1F, 1F);
}
renderPass++;
@@ -93,7 +93,7 @@ public class RenderTileBrewery extends TileEntitySpecialRenderer {
float f2 = icon.getMinV();
float f3 = icon.getMaxV();
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
GL11.glColor3f(1F, 1F, 1F);
}
renderPass++;
@@ -108,13 +108,13 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer {
}
public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) {
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
Tessellator tessellator = Tessellator.getInstance();
tessellator.getWorldRenderer().startDrawingQuads();
tessellator.setBrightness(brightness);
tessellator.addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV());
tessellator.addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV());
tessellator.draw();
}
@@ -68,7 +68,7 @@ public class RenderTileFloatingFlower extends TileEntitySpecialRenderer {
float f3 = icon.getMaxV();
GL11.glTranslatef(0.25F, 0.4F, 0.5F);
GL11.glScalef(0.5F, 0.5F, 0.5F);
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 32F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 32F);
GL11.glColor3f(1F, 1F, 1F);
GL11.glPopMatrix();
}
@@ -76,7 +76,7 @@ public class RenderTileIncensePlate extends TileEntitySpecialRenderer {
float f1 = icon.getMaxU();
float f2 = icon.getMinV();
float f3 = icon.getMaxV();
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 32F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 32F);
GL11.glColor3f(1F, 1F, 1F);
}
renderPass++;
@@ -43,7 +43,7 @@ public class RenderTileLightRelay extends TileEntitySpecialRenderer {
float scale = 0.75F;
GL11.glScalef(scale, scale, scale);
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
GL11.glPushMatrix();
float r = 180.0F - RenderManager.instance.playerViewY;
@@ -139,13 +139,13 @@ public class RenderTilePool extends TileEntitySpecialRenderer {
}
public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) {
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
Tessellator tessellator = Tessellator.getInstance();
tessellator.getWorldRenderer().startDrawingQuads();
tessellator.setBrightness(brightness);
tessellator.addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV());
tessellator.addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV());
tessellator.draw();
}
@@ -93,7 +93,7 @@ public class RenderTileRuneAltar extends TileEntitySpecialRenderer {
float f1 = icon.getMaxU();
float f2 = icon.getMinV();
float f3 = icon.getMaxV();
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
GL11.glColor3f(1F, 1F, 1F);
}
renderPass++;
@@ -52,7 +52,7 @@ public class RenderTileSparkChanger extends TileEntitySpecialRenderer {
float f1 = icon.getMaxU();
float f2 = icon.getMinV();
float f3 = icon.getMaxV();
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
GL11.glColor3f(1F, 1F, 1F);
}
renderPass++;
@@ -96,8 +96,8 @@ public class RenderTileStarfield extends TileEntitySpecialRenderer {
GL11.glTranslatef(-f1, -f3, -f2);
f9 = f8 + ActiveRenderInfo.objectY;
GL11.glTranslatef(ActiveRenderInfo.objectX * f5 / f9, ActiveRenderInfo.objectZ * f5 / f9, -f2);
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
Tessellator tessellator = Tessellator.getInstance();
tessellator.getWorldRenderer().startDrawingQuads();
Color color = Color.getHSBColor(Minecraft.getSystemTime() / 20F % 360 / 360F, 1F, 1F);
f11 = color.getRed() / 255F;
@@ -105,10 +105,10 @@ public class RenderTileStarfield extends TileEntitySpecialRenderer {
float f13 = color.getBlue() / 255F;
tessellator.setColorRGBA_F(f11 * f7, f12 * f7, f13 * f7, 1.0F);
tessellator.addVertex(p_147500_2_, p_147500_4_ + f4, p_147500_6_);
tessellator.addVertex(p_147500_2_, p_147500_4_ + f4, p_147500_6_ + 1.0D);
tessellator.addVertex(p_147500_2_ + 1.0D, p_147500_4_ + f4, p_147500_6_ + 1.0D);
tessellator.addVertex(p_147500_2_ + 1.0D, p_147500_4_ + f4, p_147500_6_);
tessellator.getWorldRenderer().addVertex(p_147500_2_, p_147500_4_ + f4, p_147500_6_);
tessellator.getWorldRenderer().addVertex(p_147500_2_, p_147500_4_ + f4, p_147500_6_ + 1.0D);
tessellator.getWorldRenderer().addVertex(p_147500_2_ + 1.0D, p_147500_4_ + f4, p_147500_6_ + 1.0D);
tessellator.getWorldRenderer().addVertex(p_147500_2_ + 1.0D, p_147500_4_ + f4, p_147500_6_);
tessellator.draw();
GL11.glPopMatrix();
GL11.glMatrixMode(GL11.GL_MODELVIEW);
@@ -67,13 +67,13 @@ public class RenderTileTerraPlate extends TileEntitySpecialRenderer {
}
public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) {
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
Tessellator tessellator = Tessellator.getInstance();
tessellator.getWorldRenderer().startDrawingQuads();
tessellator.setBrightness(brightness);
tessellator.addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV());
tessellator.addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV());
tessellator.getWorldRenderer().addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV());
tessellator.draw();
}
@@ -347,15 +347,15 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
GL11.glDepthMask(false);
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
Tessellator tessellator = Tessellator.instance;
Tessellator tessellator = Tessellator.getInstance();
GL11.glDisable(GL11.GL_TEXTURE_2D);
tessellator.startDrawingQuads();
tessellator.getWorldRenderer().startDrawingQuads();
int i = mc.fontRenderer.getStringWidth(potato.name) / 2;
tessellator.setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.25F);
tessellator.addVertex(-i - 1, -1.0D, 0.0D);
tessellator.addVertex(-i - 1, 8.0D, 0.0D);
tessellator.addVertex(i + 1, 8.0D, 0.0D);
tessellator.addVertex(i + 1, -1.0D, 0.0D);
tessellator.getWorldRenderer().addVertex(-i - 1, -1.0D, 0.0D);
tessellator.getWorldRenderer().addVertex(-i - 1, 8.0D, 0.0D);
tessellator.getWorldRenderer().addVertex(i + 1, 8.0D, 0.0D);
tessellator.getWorldRenderer().addVertex(i + 1, -1.0D, 0.0D);
tessellator.draw();
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDepthMask(true);
@@ -367,13 +367,13 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glDisable(GL11.GL_TEXTURE_2D);
tessellator.startDrawingQuads();
tessellator.getWorldRenderer().startDrawingQuads();
i = mc.fontRenderer.getStringWidth(s) / 2;
tessellator.setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.25F);
tessellator.addVertex(-i - 1, -1.0D, 0.0D);
tessellator.addVertex(-i - 1, 8.0D, 0.0D);
tessellator.addVertex(i + 1, 8.0D, 0.0D);
tessellator.addVertex(i + 1, -1.0D, 0.0D);
tessellator.getWorldRenderer().addVertex(-i - 1, -1.0D, 0.0D);
tessellator.getWorldRenderer().addVertex(-i - 1, 8.0D, 0.0D);
tessellator.getWorldRenderer().addVertex(i + 1, 8.0D, 0.0D);
tessellator.getWorldRenderer().addVertex(i + 1, -1.0D, 0.0D);
tessellator.draw();
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDepthMask(true);
@@ -395,6 +395,6 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
float f1 = icon.getMaxU();
float f2 = icon.getMinV();
float f3 = icon.getMaxV();
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
}
}
@@ -12,7 +12,7 @@ package vazkii.botania.common.block.subtile;
import net.minecraft.block.Block;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.lexicon.LexiconEntry;
@@ -51,7 +51,7 @@ public class SubTilePureDaisy extends SubTileEntity {
positionAt = 0;
int[] acoords = POSITIONS[positionAt];
ChunkCoordinates coords = new ChunkCoordinates(supertile.xCoord + acoords[0], supertile.yCoord + acoords[1], supertile.zCoord + acoords[2]);
BlockPos coords = new BlockPos(supertile.xCoord + acoords[0], supertile.yCoord + acoords[1], supertile.zCoord + acoords[2]);
World world = supertile.getWorld();
if(!world.isAirBlock(coords.posX, coords.posY, coords.posZ)) {
Block block = world.getBlock(coords.posX, coords.posY, coords.posZ);
@@ -90,7 +90,7 @@ public class SubTilePureDaisy extends SubTileEntity {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), 1);
return new RadiusDescriptor.Square(toBlockPos(), 1);
}
@Override
@@ -87,7 +87,7 @@ public class SubTileAgricarnation extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), getRange());
return new RadiusDescriptor.Square(toBlockPos(), getRange());
}
@Override
@@ -91,7 +91,7 @@ public class SubTileBellethorn extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), getRange());
return new RadiusDescriptor.Square(toBlockPos(), getRange());
}
@Override
@@ -98,7 +98,7 @@ public class SubTileBubbell extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Circle(toChunkCoordinates(), range);
return new RadiusDescriptor.Circle(toBlockPos(), range);
}
@Override
@@ -17,7 +17,7 @@ import net.minecraft.block.Block;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.RadiusDescriptor;
import vazkii.botania.api.subtile.SubTileFunctional;
@@ -36,7 +36,7 @@ public class SubTileClayconia extends SubTileFunctional {
if(!supertile.getWorld().isRemote && ticksExisted % 5 == 0) {
int manaCost = 80;
if(mana >= manaCost) {
ChunkCoordinates coords = getCoordsToPut();
BlockPos coords = getCoordsToPut();
if(coords != null) {
supertile.getWorld().setBlockToAir(coords.posX, coords.posY, coords.posZ);
if(ConfigHandler.blockBreakParticles)
@@ -49,8 +49,8 @@ public class SubTileClayconia extends SubTileFunctional {
}
}
public ChunkCoordinates getCoordsToPut() {
List<ChunkCoordinates> possibleCoords = new ArrayList();
public BlockPos getCoordsToPut() {
List<BlockPos> possibleCoords = new ArrayList();
for(int i = -RANGE; i < RANGE + 1; i++)
for(int j = -RANGE_Y; j < RANGE_Y + 1; j++)
@@ -60,7 +60,7 @@ public class SubTileClayconia extends SubTileFunctional {
int z = supertile.zCoord + k;
Block block = supertile.getWorld().getBlock(x, y, z);
if(block == Block.getBlockFromName("sand"))
possibleCoords.add(new ChunkCoordinates(x, y, z));
possibleCoords.add(new BlockPos(x, y, z));
}
if(possibleCoords.isEmpty())
@@ -70,7 +70,7 @@ public class SubTileClayconia extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -110,7 +110,7 @@ public class SubTileDaffomill extends SubTileFunctional {
public RadiusDescriptor getRadius() {
AxisAlignedBB aabb = aabbForOrientation();
aabb.minY = supertile.yCoord;
return new RadiusDescriptor.Rectangle(toChunkCoordinates(), aabb);
return new RadiusDescriptor.Rectangle(toBlockPos(), aabb);
}
@Override
@@ -108,7 +108,7 @@ public class SubTileExoflame extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -44,7 +44,7 @@ public class SubTileFallenKanade extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -92,7 +92,7 @@ public class SubTileHeiseiDream extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -201,7 +201,7 @@ public class SubTileHopperhock extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), getRange());
return new RadiusDescriptor.Square(toBlockPos(), getRange());
}
public int getRange() {
@@ -62,7 +62,7 @@ public class SubTileHyacidus extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -69,7 +69,7 @@ public class SubTileJadedAmaranthus extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -73,7 +73,7 @@ public class SubTileLoonuim extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
}
@@ -17,7 +17,7 @@ import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.BiomeDictionary.Type;
import vazkii.botania.api.lexicon.LexiconEntry;
@@ -54,7 +54,7 @@ public class SubTileMarimorphosis extends SubTileFunctional {
return;
if(!supertile.getWorld().isRemote && mana >= COST && ticksExisted % 2 == 0) {
ChunkCoordinates coords = getCoordsToPut();
BlockPos coords = getCoordsToPut();
if(coords != null) {
ItemStack stack = getStoneToPut(coords);
if(stack != null) {
@@ -71,7 +71,7 @@ public class SubTileMarimorphosis extends SubTileFunctional {
}
}
public ItemStack getStoneToPut(ChunkCoordinates coords) {
public ItemStack getStoneToPut(BlockPos coords) {
List<Type> types = Arrays.asList(BiomeDictionary.getTypesForBiome(supertile.getWorld().getBiomeGenForCoords(coords.posX, coords.posZ)));
List<Integer> values = new ArrayList();
@@ -87,8 +87,8 @@ public class SubTileMarimorphosis extends SubTileFunctional {
return new ItemStack(ModFluffBlocks.biomeStoneA, 1, values.get(supertile.getWorld().rand.nextInt(values.size())));
}
public ChunkCoordinates getCoordsToPut() {
List<ChunkCoordinates> possibleCoords = new ArrayList();
public BlockPos getCoordsToPut() {
List<BlockPos> possibleCoords = new ArrayList();
int range = getRange();
int rangeY = getRangeY();
@@ -101,7 +101,7 @@ public class SubTileMarimorphosis extends SubTileFunctional {
int z = supertile.zCoord + k;
Block block = supertile.getWorld().getBlock(x, y, z);
if(block != null && block.isReplaceableOreGen(supertile.getWorld(), x, y, z, Blocks.stone))
possibleCoords.add(new ChunkCoordinates(x, y, z));
possibleCoords.add(new BlockPos(x, y, z));
}
if(possibleCoords.isEmpty())
@@ -111,7 +111,7 @@ public class SubTileMarimorphosis extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), getRange());
return new RadiusDescriptor.Square(toBlockPos(), getRange());
}
public int getRange() {
@@ -50,7 +50,7 @@ public class SubTileMedumone extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -19,7 +19,7 @@ import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.WeightedRandom;
import net.minecraftforge.oredict.OreDictionary;
import vazkii.botania.api.BotaniaAPI;
@@ -48,7 +48,7 @@ public class SubTileOrechid extends SubTileFunctional {
int cost = getCost();
if(!supertile.getWorld().isRemote && mana >= cost && ticksExisted % getDelay() == 0) {
ChunkCoordinates coords = getCoordsToPut();
BlockPos coords = getCoordsToPut();
if(coords != null) {
ItemStack stack = getOreToPut();
if(stack != null) {
@@ -96,8 +96,8 @@ public class SubTileOrechid extends SubTileFunctional {
return getOreToPut();
}
public ChunkCoordinates getCoordsToPut() {
List<ChunkCoordinates> possibleCoords = new ArrayList();
public BlockPos getCoordsToPut() {
List<BlockPos> possibleCoords = new ArrayList();
Block source = getSourceBlock();
for(int i = -RANGE; i < RANGE + 1; i++)
@@ -108,7 +108,7 @@ public class SubTileOrechid extends SubTileFunctional {
int z = supertile.zCoord + k;
Block block = supertile.getWorld().getBlock(x, y, z);
if(block != null && block.isReplaceableOreGen(supertile.getWorld(), x, y, z, source))
possibleCoords.add(new ChunkCoordinates(x, y, z));
possibleCoords.add(new BlockPos(x, y, z));
}
if(possibleCoords.isEmpty())
@@ -138,7 +138,7 @@ public class SubTileOrechid extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -66,7 +66,7 @@ public class SubTilePollidisiac extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -27,7 +27,7 @@ import net.minecraft.item.ItemReed;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
@@ -67,7 +67,7 @@ public class SubTileRannuncarpus extends SubTileFunctional {
BlockData filter = getUnderlyingBlock();
boolean scanned = false;
List<ChunkCoordinates> validPositions = new ArrayList();
List<BlockPos> validPositions = new ArrayList();
int rangePlace = getRange();
int rangePlaceY = getRangeY();
@@ -94,7 +94,7 @@ public class SubTileRannuncarpus extends SubTileFunctional {
Block blockAbove = supertile.getWorld().getBlock(xp, yp + 1, zp);
if(filter.equals(supertile.getWorld(), xp, yp, zp) && (blockAbove.isAir(supertile.getWorld(), xp, yp + 1, zp) || blockAbove.isReplaceable(supertile.getWorld(), xp, yp + 1, zp)))
validPositions.add(new ChunkCoordinates(xp, yp + 1, zp));
validPositions.add(new BlockPos(xp, yp + 1, zp));
}
scanned = true;
@@ -111,7 +111,7 @@ public class SubTileRannuncarpus extends SubTileFunctional {
blockToPlace = Blocks.redstone_wire;
if(blockToPlace != null) {
ChunkCoordinates coords = validPositions.get(supertile.getWorld().rand.nextInt(validPositions.size()));
BlockPos coords = validPositions.get(supertile.getWorld().rand.nextInt(validPositions.size()));
if(blockToPlace.canPlaceBlockAt(supertile.getWorld(), coords.posX, coords.posY, coords.posZ)) {
supertile.getWorld().setBlock(coords.posX, coords.posY, coords.posZ, blockToPlace, stack.getItemDamage(), 1 | 2);
if(ConfigHandler.blockBreakParticles)
@@ -181,7 +181,7 @@ public class SubTileRannuncarpus extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), getRange());
return new RadiusDescriptor.Square(toBlockPos(), getRange());
}
public int getRange() {
@@ -77,7 +77,7 @@ public class SubTileSolegnolia extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Circle(toChunkCoordinates(), getRange());
return new RadiusDescriptor.Circle(toBlockPos(), getRange());
}
@Override
@@ -20,7 +20,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.mana.IManaItem;
@@ -99,7 +99,7 @@ public class SubTileSpectranthemum extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -152,7 +152,7 @@ public class SubTileSpectranthemum extends SubTileFunctional {
@Override
@SideOnly(Side.CLIENT)
public BlockPos getBinding() {
return Minecraft.getMinecraft().thePlayer.isSneaking() && bindY != -1 ? new ChunkCoordinates(bindX, bindY, bindZ) : super.getBinding();
return Minecraft.getMinecraft().thePlayer.isSneaking() && bindY != -1 ? new BlockPos(bindX, bindY, bindZ) : super.getBinding();
}
@Override
@@ -79,7 +79,7 @@ public class SubTileTangleberrie extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Circle(toChunkCoordinates(), getRange());
return new RadiusDescriptor.Circle(toBlockPos(), getRange());
}
@Override
@@ -85,7 +85,7 @@ public class SubTileTigerseye extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -47,7 +47,7 @@ public class SubTileVinculotus extends SubTileFunctional {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Circle(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Circle(toBlockPos(), RANGE);
}
@Override
@@ -42,7 +42,7 @@ public class SubTileArcaneRose extends SubTileGenerating {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -188,7 +188,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -95,7 +95,7 @@ public class SubTileEndoflame extends SubTileGenerating {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -62,7 +62,7 @@ public class SubTileEntropinnyum extends SubTileGenerating {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
};
@Override
@@ -76,7 +76,7 @@ public class SubTileGourmaryllis extends SubTileGenerating {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -140,7 +140,7 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), 1);
return new RadiusDescriptor.Square(toBlockPos(), 1);
}
@Override
@@ -53,7 +53,7 @@ public class SubTileKekimurus extends SubTileGenerating {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -19,7 +19,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import vazkii.botania.api.lexicon.LexiconEntry;
@@ -54,7 +54,7 @@ public class SubTileMunchdew extends SubTileGenerating {
int manaPerLeaf = 160;
eatLeaves : {
if(getMaxMana() - mana >= manaPerLeaf && !supertile.getWorld().isRemote && ticksExisted % 4 == 0) {
List<ChunkCoordinates> coords = new ArrayList();
List<BlockPos> coords = new ArrayList();
int x = supertile.xCoord;
int y = supertile.yCoord;
int z = supertile.zCoord;
@@ -75,7 +75,7 @@ public class SubTileMunchdew extends SubTileGenerating {
}
if(exposed)
coords.add(new ChunkCoordinates(xp, yp, zp));
coords.add(new BlockPos(xp, yp, zp));
}
}
@@ -83,7 +83,7 @@ public class SubTileMunchdew extends SubTileGenerating {
break eatLeaves;
Collections.shuffle(coords);
ChunkCoordinates breakCoords = coords.get(0);
BlockPos breakCoords = coords.get(0);
Block block = supertile.getWorld().getBlock(breakCoords.posX, breakCoords.posY, breakCoords.posZ);
int meta = supertile.getWorld().getBlockMetadata(breakCoords.posX, breakCoords.posY, breakCoords.posZ);
supertile.getWorld().setBlockToAir(breakCoords.posX, breakCoords.posY, breakCoords.posZ);
@@ -104,7 +104,7 @@ public class SubTileMunchdew extends SubTileGenerating {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -65,7 +65,7 @@ public class SubTileNarslimmus extends SubTileGenerating {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -114,7 +114,7 @@ public class SubTileRafflowsia extends SubTileGenerating {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -64,7 +64,7 @@ public class SubTileSpectrolus extends SubTileGenerating {
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
return new RadiusDescriptor.Square(toBlockPos(), RANGE);
}
@Override
@@ -12,7 +12,7 @@ package vazkii.botania.common.block.tile;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
public class TileCell extends TileMod {
@@ -27,8 +27,8 @@ public class TileCell extends TileMod {
private int generation;
private boolean ticked;
private ChunkCoordinates flowerCoords = new ChunkCoordinates();
private ChunkCoordinates validCoords = new ChunkCoordinates();
private BlockPos flowerCoords = new BlockPos();
private BlockPos validCoords = new BlockPos();
@Override
public boolean canUpdate() {
@@ -53,7 +53,7 @@ public class TileCell extends TileMod {
return matchCoords(validCoords, this) && matchCoords(flowerCoords, flower);
}
private boolean matchCoords(ChunkCoordinates coords, TileEntity tile) {
private boolean matchCoords(BlockPos coords, TileEntity tile) {
return coords.posX == tile.xCoord && coords.posY == tile.yCoord && coords.posZ == tile.zCoord;
}
@@ -27,7 +27,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.internal.VanillaPacketDispatcher;
@@ -88,10 +88,10 @@ public class TileEnchanter extends TileMod implements ISparkAttachable {
mb.addComponent(, o[0], Blocks.obsidian, 0);
for(int[] p : PYLON_LOCATIONS[0]) {
mb.addComponent(, p[0], ModBlocks.pylon, 0);
mb.addComponent(new FlowerComponent(new ChunkCoordinates(p[0], p[1], p[2]), ModBlocks.flower));
mb.addComponent(new FlowerComponent(new BlockPos(p[0], p[1], p[2]), ModBlocks.flower));
}
for(int[] f : FLOWER_LOCATIONS)
mb.addComponent(new FlowerComponent(new ChunkCoordinates(f[0], f[1] + 1, f[2]), ModBlocks.flower));
mb.addComponent(new FlowerComponent(new BlockPos(f[0], f[1] + 1, f[2]), ModBlocks.flower));
mb.addComponent(, 0, Blocks.lapis_block, 0);
@@ -24,7 +24,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
@@ -87,7 +87,7 @@ public class TileLightRelay extends TileMod implements IWandBindable {
vecTip.add(vecMag);
}
ChunkCoordinates endpoint = getEndpoint();
BlockPos endpoint = getEndpoint();
if(endpoint != null && !worldObj.isRemote) {
float range = 0.5F;
List<EntityEnderPearl> enderPearls = worldObj.getEntitiesWithinAABB(EntityEnderPearl.class, new AxisAlignedBB(xCoord - range, yCoord - range, zCoord - range, xCoord + 1 + range, yCoord + 1 + range, zCoord + 1 + range));
@@ -105,10 +105,10 @@ public class TileLightRelay extends TileMod implements IWandBindable {
return block == ModBlocks.lightRelay;
}
public ChunkCoordinates getEndpoint() {
public BlockPos getEndpoint() {
List<TileLightRelay> pointsPassed = new ArrayList();
TileLightRelay relay = this;
ChunkCoordinates lastCoords = null;
BlockPos lastCoords = null;
// Doing while(true) gives an unreachable code error
boolean run = true;
@@ -117,7 +117,7 @@ public class TileLightRelay extends TileMod implements IWandBindable {
return null; // Circular path
pointsPassed.add(relay);
ChunkCoordinates coords = relay.getBinding();
BlockPos coords = relay.getBinding();
if(coords == null)
return lastCoords;
@@ -138,7 +138,7 @@ public class TileLightRelay extends TileMod implements IWandBindable {
@Override
public BlockPos getBinding() {
return bindY == -1 ? null : new ChunkCoordinates(bindX, bindY, bindZ);
return bindY == -1 ? null : new BlockPos(bindX, bindY, bindZ);
}
@Override
@@ -232,7 +232,7 @@ public class TileLightRelay extends TileMod implements IWandBindable {
worldObj.scheduleBlockUpdate(x, y, z, tile.getBlockType(), tile.getBlockType().tickRate(worldObj));
}
ChunkCoordinates bind = ((TileLightRelay) tile).getBinding();
BlockPos bind = ((TileLightRelay) tile).getBinding();
if(bind != null) {
setExit(bind.posX, bind.posY, bind.posZ);
return;
@@ -21,7 +21,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
@@ -74,7 +74,7 @@ public class TileSpecialFlower extends TileMod implements IWandBindable, ISubTil
if(subTile != null) {
TileEntity tileBelow = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(tileBelow instanceof TileRedStringRelay) {
ChunkCoordinates coords = ((TileRedStringRelay) tileBelow).getBinding();
BlockPos coords = ((TileRedStringRelay) tileBelow).getBinding();
if(coords != null) {
int currX = xCoord;
int currY = yCoord;
@@ -25,7 +25,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@@ -596,7 +596,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
return null;
TileEntity tile = (TileEntity) receiver;
return new ChunkCoordinates(tile.xCoord, tile.yCoord, tile.zCoord);
return new BlockPos(tile.xCoord, tile.yCoord, tile.zCoord);
}
@Override
@@ -15,14 +15,14 @@ import net.minecraft.init.Blocks;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraftforge.common.util.ForgeDirection;
import vazkii.botania.api.wand.ITileBound;
import vazkii.botania.common.block.tile.TileMod;
public abstract class TileRedString extends TileMod implements ITileBound {
private ChunkCoordinates binding;
private BlockPos binding;
@Override
public void updateEntity() {
@@ -31,7 +31,7 @@ public abstract class TileRedString extends TileMod implements ITileBound {
int y = yCoord;
int z = zCoord;
int range = getRange();
ChunkCoordinates currBinding = getBinding();
BlockPos currBinding = getBinding();
setBinding(null);
for(int i = 0; i < range; i++) {
@@ -46,7 +46,7 @@ public abstract class TileRedString extends TileMod implements ITileBound {
continue;
if(acceptBlock(x, y, z)) {
setBinding(new ChunkCoordinates(x, y, z));
setBinding(new BlockPos(x, y, z));
if(currBinding == null || currBinding.posX != x || currBinding.posY != y || currBinding.posZ != z)
onBound(x, y, z);
break;
@@ -74,7 +74,7 @@ public abstract class TileRedString extends TileMod implements ITileBound {
return binding;
}
public void setBinding(ChunkCoordinates binding) {
public void setBinding(BlockPos binding) {
this.binding = binding;
}
@@ -83,12 +83,12 @@ public abstract class TileRedString extends TileMod implements ITileBound {
}
public TileEntity getTileAtBinding() {
ChunkCoordinates binding = getBinding();
BlockPos binding = getBinding();
return binding == null ? null : worldObj.getTileEntity(binding.posX, binding.posY, binding.posZ);
}
public Block getBlockAtBinding() {
ChunkCoordinates binding = getBinding();
BlockPos binding = getBinding();
return binding == null ? Blocks.air : worldObj.getBlock(binding.posX, binding.posY, binding.posZ);
}
@@ -11,7 +11,7 @@
package vazkii.botania.common.block.tile.string;
import net.minecraft.block.Block;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraftforge.common.util.ForgeDirection;
public class TileRedStringComparator extends TileRedString {
@@ -22,7 +22,7 @@ public class TileRedStringComparator extends TileRedString {
public void updateEntity() {
super.updateEntity();
ChunkCoordinates binding = getBinding();
BlockPos binding = getBinding();
ForgeDirection dir = getOrientation();
Block block = getBlockAtBinding();
int origVal = comparatorValue;
@@ -12,7 +12,7 @@ package vazkii.botania.common.block.tile.string;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityDispenser;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
public class TileRedStringDispenser extends TileRedStringContainer {
@@ -23,7 +23,7 @@ public class TileRedStringDispenser extends TileRedStringContainer {
}
public void tickDispenser() {
ChunkCoordinates bind = getBinding();
BlockPos bind = getBinding();
if(bind != null) {
TileEntity tile = worldObj.getTileEntity(bind.posX, bind.posY, bind.posZ);
if(tile instanceof TileEntityDispenser)
@@ -14,26 +14,26 @@ import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.IGrowable;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
public class TileRedStringFertilizer extends TileRedString {
public boolean func_149851_a(World p_149851_1_, boolean p_149851_5_) {
ChunkCoordinates binding = getBinding();
BlockPos binding = getBinding();
Block block = getBlockAtBinding();
return block instanceof IGrowable ? ((IGrowable) block).func_149851_a(p_149851_1_, binding.posX, binding.posY, binding.posZ, p_149851_5_) : false;
}
public boolean func_149852_a(World p_149852_1_, Random p_149852_2_) {
ChunkCoordinates binding = getBinding();
BlockPos binding = getBinding();
Block block = getBlockAtBinding();
return block instanceof IGrowable ? ((IGrowable) block).func_149852_a(p_149852_1_, p_149852_2_, binding.posX, binding.posY, binding.posZ) : false;
}
public void func_149853_b(World p_149853_1_, Random p_149853_2_) {
ChunkCoordinates binding = getBinding();
BlockPos binding = getBinding();
Block block = getBlockAtBinding();
if(block instanceof IGrowable)
((IGrowable) block).func_149853_b(p_149853_1_, p_149853_2_, binding.posX, binding.posY, binding.posZ);
@@ -15,7 +15,7 @@ import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
public class TileRedStringInterceptor extends TileRedString {
@@ -50,7 +50,7 @@ public class TileRedStringInterceptor extends TileRedString {
}
if(inter.worldObj == world) {
ChunkCoordinates coords = inter.getBinding();
BlockPos coords = inter.getBinding();
if(coords != null && coords.posX == x && coords.posY == y && coords.posZ == z) {
if(!world.isRemote) {
Block block = inter.getBlockType();
@@ -14,7 +14,7 @@ import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.StatCollector;
import vazkii.botania.common.core.helper.MathHelper;
import vazkii.botania.common.world.SkyblockWorldEvents;
@@ -53,7 +53,7 @@ public class CommandSkyblockSpread extends CommandBase {
EntityPlayer player = getPlayer(sender, args[0]);
if(player != null) {
ChunkCoordinates spawn = player.worldObj.getSpawnPoint();
BlockPos spawn = player.worldObj.getSpawnPoint();
int x, z;
do {
@@ -16,7 +16,7 @@ import java.util.Map;
import java.util.WeakHashMap;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import vazkii.botania.api.internal.IManaNetwork;
import vazkii.botania.api.mana.ManaNetworkEvent;
@@ -48,14 +48,14 @@ public final class ManaNetworkHandler implements IManaNetwork {
}
@Override
public TileEntity getClosestPool(ChunkCoordinates pos, World world, int limit) {
public TileEntity getClosestPool(BlockPos pos, World world, int limit) {
if(manaPools.containsKey(world))
return getClosest(manaPools.get(world), pos, world.isRemote, limit);
return null;
}
@Override
public TileEntity getClosestCollector(ChunkCoordinates pos, World world, int limit) {
public TileEntity getClosestCollector(BlockPos pos, World world, int limit) {
if(manaCollectors.containsKey(world))
return getClosest(manaCollectors.get(world), pos, world.isRemote, limit);
return null;
@@ -81,7 +81,7 @@ public final class ManaNetworkHandler implements IManaNetwork {
return false;
}
private synchronized TileEntity getClosest(List<TileSignature> tiles, ChunkCoordinates pos, boolean remoteCheck, int limit) {
private synchronized TileEntity getClosest(List<TileSignature> tiles, BlockPos pos, boolean remoteCheck, int limit) {
float closest = Float.MAX_VALUE;
TileEntity closestTile = null;
@@ -44,7 +44,7 @@ import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.MathHelper;
@@ -131,7 +131,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
for(int i = 0; i < 3; i++)
for(int j = 0; j < 3; j++)
mb.addComponent(new BeaconComponent(new ChunkCoordinates(i - 1, 0, j - 1)));
mb.addComponent(new BeaconComponent(new BlockPos(i - 1, 0, j - 1)));
mb.addComponent(, 0, Blocks.beacon, 0);
mb.setRenderOffset(0, -1, 0);
@@ -257,11 +257,11 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
return dataWatcher.getWatchableObjectInt(22);
}
public ChunkCoordinates getSource() {
public BlockPos getSource() {
int x = dataWatcher.getWatchableObjectInt(23);
int y = dataWatcher.getWatchableObjectInt(24);
int z = dataWatcher.getWatchableObjectInt(25);
return new ChunkCoordinates(x, y, z);
return new BlockPos(x, y, z);
}
public int getMobSpawnTicks() {
@@ -313,7 +313,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
par1nbtTagCompound.setBoolean(TAG_AGGRO, isAggored());
par1nbtTagCompound.setInteger(TAG_MOB_SPAWN_TICKS, getMobSpawnTicks());
ChunkCoordinates source = getSource();
BlockPos source = getSource();
par1nbtTagCompound.setInteger(TAG_SOURCE_X, source.posX);
par1nbtTagCompound.setInteger(TAG_SOURCE_Y, source.posY);
par1nbtTagCompound.setInteger(TAG_SOURCE_Z, source.posZ);
@@ -474,14 +474,14 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
@Override
public void setDead() {
ChunkCoordinates source = getSource();
BlockPos source = getSource();
Botania.proxy.playRecordClientSided(worldObj, source.posX, source.posY, source.posZ, null);
isPlayingMusic = false;
super.setDead();
}
public List<EntityPlayer> getPlayersAround() {
ChunkCoordinates source = getSource();
BlockPos source = getSource();
float range = 15F;
List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(source.posX + 0.5 - range, source.posY + 0.5 - range, source.posZ + 0.5 - range, source.posX + 0.5 + range, source.posY + 0.5 + range, source.posZ + 0.5 + range));
return players;
@@ -517,7 +517,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
}
}
ChunkCoordinates source = getSource();
BlockPos source = getSource();
boolean hard = isHardMode();
float range = RANGE + 3F;
List<EntityPlayer> players = getPlayersAround();
@@ -755,7 +755,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
flag = true;
// Prevent out of bounds teleporting
ChunkCoordinates source = getSource();
BlockPos source = getSource();
if(vazkii.botania.common.core.helper.MathHelper.pointDistanceSpace(posX, posY, posZ, source.posX, source.posY, source.posZ) > 12)
flag = false;
}
@@ -867,7 +867,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
public static class BeaconComponent extends MultiblockComponent {
public BeaconComponent(ChunkCoordinates relPos) {
public BeaconComponent(BlockPos relPos) {
super(relPos, Blocks.iron_block, 0);
}
@@ -17,7 +17,7 @@ import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Blocks;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
@@ -34,10 +34,10 @@ public class EntityEnderAirBottle extends EntityThrowable {
@Override
protected void onImpact(MovingObjectPosition pos) {
if(pos.entityHit == null && !worldObj.isRemote) {
List<ChunkCoordinates> coordsList = getCoordsToPut(pos.blockX, pos.blockY, pos.blockZ);
List<BlockPos> coordsList = getCoordsToPut(pos.blockX, pos.blockY, pos.blockZ);
worldObj.playAuxSFX(2002, (int)Math.round(posX), (int)Math.round(posY), (int)Math.round(posZ), 8);
for(ChunkCoordinates coords : coordsList) {
for(BlockPos coords : coordsList) {
worldObj.setBlock(coords.posX, coords.posY, coords.posZ, Blocks.end_stone);
if(Math.random() < 0.1)
worldObj.playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(Blocks.end_stone));
@@ -46,9 +46,9 @@ public class EntityEnderAirBottle extends EntityThrowable {
}
}
public List<ChunkCoordinates> getCoordsToPut(int xCoord, int yCoord, int zCoord) {
List<ChunkCoordinates> possibleCoords = new ArrayList();
List<ChunkCoordinates> selectedCoords = new ArrayList();
public List<BlockPos> getCoordsToPut(int xCoord, int yCoord, int zCoord) {
List<BlockPos> possibleCoords = new ArrayList();
List<BlockPos> selectedCoords = new ArrayList();
int range = 4;
int rangeY = 4;
@@ -60,12 +60,12 @@ public class EntityEnderAirBottle extends EntityThrowable {
int z = zCoord + k;
Block block = worldObj.getBlock(x, y, z);
if(block != null && block.isReplaceableOreGen(worldObj, x, y, z, Blocks.stone))
possibleCoords.add(new ChunkCoordinates(x, y, z));
possibleCoords.add(new BlockPos(x, y, z));
}
int count = 64;
while(!possibleCoords.isEmpty() && count > 0) {
ChunkCoordinates coords = possibleCoords.get(worldObj.rand.nextInt(possibleCoords.size()));
BlockPos coords = possibleCoords.get(worldObj.rand.nextInt(possibleCoords.size()));
possibleCoords.remove(coords);
selectedCoords.add(coords);
count--;
@@ -28,7 +28,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.internal.IManaBurst;
@@ -428,7 +428,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
stack.writeToNBT(lensCmp);
par1nbtTagCompound.setTag(TAG_LENS_STACK, lensCmp);
ChunkCoordinates coords = getBurstSourceChunkCoordinates();
BlockPos coords = getBurstSourceBlockPos();
par1nbtTagCompound.setInteger(TAG_SPREADER_X, coords.posX);
par1nbtTagCompound.setInteger(TAG_SPREADER_Y, coords.posY);
par1nbtTagCompound.setInteger(TAG_SPREADER_Z, coords.posZ);
@@ -578,7 +578,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
if(BotaniaAPI.internalHandler.isBuildcraftPipe(tile))
return;
ChunkCoordinates coords = getBurstSourceChunkCoordinates();
BlockPos coords = getBurstSourceBlockPos();
if(tile != null && (tile.xCoord != coords.posX || tile.yCoord != coords.posY || tile.zCoord != coords.posZ))
collidedTile = tile;
@@ -649,7 +649,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
}
public TileEntity getShooter() {
ChunkCoordinates coords = getBurstSourceChunkCoordinates();
BlockPos coords = getBurstSourceBlockPos();
TileEntity tile = worldObj.getTileEntity(coords.posX, coords.posY, coords.posZ);
return tile;
}
@@ -736,12 +736,12 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
final int coordsStart = dataWatcherStart + 6;
@Override
public ChunkCoordinates getBurstSourceChunkCoordinates() {
public BlockPos getBurstSourceBlockPos() {
int x = dataWatcher.getWatchableObjectInt(coordsStart);
int y = dataWatcher.getWatchableObjectInt(coordsStart + 1);
int z = dataWatcher.getWatchableObjectInt(coordsStart + 2);
return new ChunkCoordinates(x, y, z);
return new BlockPos(x, y, z);
}
@Override
@@ -840,7 +840,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
}
public void setDeathTicksForFakeParticle() {
ChunkCoordinates coords = getBurstSourceChunkCoordinates();
BlockPos coords = getBurstSourceBlockPos();
TileEntity tile = worldObj.getTileEntity(coords.posX, coords.posY, coords.posZ);
if(tile != null && tile instanceof IManaSpreader)
((IManaSpreader) tile).setLastBurstDeathTick(getTicksExisted());
@@ -848,7 +848,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
public static class PositionProperties {
public final ChunkCoordinates coords;
public final BlockPos coords;
public final Block block;
public final int meta;
@@ -858,7 +858,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
int x = MathHelper.floor_double(entity.posX);
int y = MathHelper.floor_double(entity.posY);
int z = MathHelper.floor_double(entity.posZ);
coords = new ChunkCoordinates(x, y, z);
coords = new BlockPos(x, y, z);
block = entity.worldObj.getBlock(x, y, z);
meta = entity.worldObj.getBlockMetadata(x, y, z);
}
@@ -401,7 +401,7 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
@SideOnly(Side.CLIENT)
public void render(ItemStack stack, EntityPlayer player, float partialTicks) {
Minecraft mc = Minecraft.getMinecraft();
Tessellator tess = Tessellator.instance;
Tessellator tess = Tessellator.getInstance();
Tessellator.renderingWorldRenderer = false;
GL11.glPushMatrix();
@@ -466,7 +466,7 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
float f1 = icon.getMaxU();
float f2 = icon.getMinV();
float f3 = icon.getMaxV();
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
GL11.glColor3f(1F, 1F, 1F);
}
renderPass++;
@@ -15,7 +15,7 @@ import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.ModBlocks;
@@ -32,7 +32,7 @@ public class ItemFertilizer extends ItemMod {
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
final int range = 3;
if(!par3World.isRemote) {
List<ChunkCoordinates> validCoords = new ArrayList();
List<BlockPos> validCoords = new ArrayList();
for(int i = -range - 1; i < range; i++)
for(int j = -range - 1; j < range; j++) {
@@ -41,13 +41,13 @@ public class ItemFertilizer extends ItemMod {
int y = par5 + k + 1;
int z = par6 + j + 1;
if(par3World.isAirBlock(x, y, z) && (!par3World.provider.hasNoSky || y < 255) && ModBlocks.flower.canBlockStay(par3World, x, y, z))
validCoords.add(new ChunkCoordinates(x, y, z));
validCoords.add(new BlockPos(x, y, z));
}
}
int flowerCount = Math.min(validCoords.size(), par3World.rand.nextBoolean() ? 3 : 4);
for(int i = 0; i < flowerCount; i++) {
ChunkCoordinates coords = validCoords.get(par3World.rand.nextInt(validCoords.size()));
BlockPos coords = validCoords.get(par3World.rand.nextInt(validCoords.size()));
validCoords.remove(coords);
par3World.setBlock(coords.posX, coords.posY, coords.posZ, ModBlocks.flower, par3World.rand.nextInt(16), 1 | 2);
}
@@ -25,7 +25,7 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import vazkii.botania.api.item.IGrassHornExcempt;
@@ -117,7 +117,7 @@ public class ItemGrassHorn extends ItemMod {
Random rand = new Random(srcx ^ srcy ^ srcz);
int range = 12 - stackDmg * 3;
int rangeY = 3 + stackDmg * 4;
List<ChunkCoordinates> coords = new ArrayList();
List<BlockPos> coords = new ArrayList();
for(int i = -range; i < range + 1; i++)
for(int j = -range; j < range + 1; j++)
@@ -128,14 +128,14 @@ public class ItemGrassHorn extends ItemMod {
Block block = world.getBlock(x, y, z);
if(block instanceof IHornHarvestable ? ((IHornHarvestable) block).canHornHarvest(world, x, y, z, stack, type) : stackDmg == 0 && block instanceof BlockBush && !(block instanceof ISpecialFlower) && (!(block instanceof IGrassHornExcempt) || ((IGrassHornExcempt) block).canUproot(world, x, y, z)) || stackDmg == 1 && block.isLeaves(world, x, y, z) || stackDmg == 2 && block == Blocks.snow_layer)
coords.add(new ChunkCoordinates(x, y, z));
coords.add(new BlockPos(x, y, z));
}
Collections.shuffle(coords, rand);
int count = Math.min(coords.size(), 32 + stackDmg * 16);
for(int i = 0; i < count; i++) {
ChunkCoordinates currCoords = coords.get(i);
BlockPos currCoords = coords.get(i);
List<ItemStack> items = new ArrayList();
Block block = world.getBlock(currCoords.posX, currCoords.posY, currCoords.posZ);
int meta = world.getBlockMetadata(currCoords.posX, currCoords.posY, currCoords.posZ);
@@ -23,7 +23,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import vazkii.botania.client.core.helper.IconHelper;
@@ -146,9 +146,9 @@ public class ItemGrassSeeds extends ItemMod {
private static BlockSwapper swapperFromMeta(World world, int x, int y, int z, int meta) {
switch(meta) {
case 1 : return new BlockSwapper(world, new ChunkCoordinates(x, y, z), Blocks.dirt, 2);
case 2 : return new BlockSwapper(world, new ChunkCoordinates(x, y, z), Blocks.mycelium, 0);
default : return new BlockSwapper(world, new ChunkCoordinates(x, y, z), Blocks.grass, 0);
case 1 : return new BlockSwapper(world, new BlockPos(x, y, z), Blocks.dirt, 2);
case 2 : return new BlockSwapper(world, new BlockPos(x, y, z), Blocks.mycelium, 0);
default : return new BlockSwapper(world, new BlockPos(x, y, z), Blocks.grass, 0);
}
}
@@ -159,10 +159,10 @@ public class ItemGrassSeeds extends ItemMod {
final Block blockToSet;
final int metaToSet;
ChunkCoordinates startCoords;
BlockPos startCoords;
int ticksExisted = 0;
BlockSwapper(World world, ChunkCoordinates coords, Block block, int meta) {
BlockSwapper(World world, BlockPos coords, Block block, int meta) {
this.world = world;
blockToSet = block;
metaToSet = meta;
@@ -184,7 +184,7 @@ public class ItemGrassSeeds extends ItemMod {
if(block == blockToSet && meta == metaToSet) {
if(ticksExisted % 20 == 0) {
List<ChunkCoordinates> validCoords = new ArrayList();
List<BlockPos> validCoords = new ArrayList();
for(int k = -1; k < 2; k++)
for(int l = -1; l < 2; l++) {
int x1 = x + k;
@@ -192,11 +192,11 @@ public class ItemGrassSeeds extends ItemMod {
Block block1 = world.getBlock(x1, y, z1);
int meta1 = world.getBlockMetadata(x1, y, z1);
if(block1 == Blocks.dirt && meta1 == 0)
validCoords.add(new ChunkCoordinates(x1, y, z1));
validCoords.add(new BlockPos(x1, y, z1));
}
if(!validCoords.isEmpty() && !world.isRemote) {
ChunkCoordinates coords = validCoords.get(rand.nextInt(validCoords.size()));
BlockPos coords = validCoords.get(rand.nextInt(validCoords.size()));
world.setBlock(coords.posX, coords.posY, coords.posZ, blockToSet, metaToSet, 1 | 2);
}
}
@@ -19,7 +19,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.server.MinecraftServer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import vazkii.botania.api.mana.IManaItem;
@@ -172,11 +172,11 @@ public class ItemManaMirror extends ItemMod implements IManaItem, ICoordBoundIte
ItemNBTHelper.setInt(stack, TAG_DIM, pool == null ? 0 : pool.getWorld().provider.dimensionId);
}
public ChunkCoordinates getPoolCoords(ItemStack stack) {
public BlockPos getPoolCoords(ItemStack stack) {
int x = ItemNBTHelper.getInt(stack, TAG_POS_X, 0);
int y = ItemNBTHelper.getInt(stack, TAG_POS_Y, -1);
int z = ItemNBTHelper.getInt(stack, TAG_POS_Z, 0);
return new ChunkCoordinates(x, y, z);
return new BlockPos(x, y, z);
}
public int getDimension(ItemStack stack) {
@@ -188,7 +188,7 @@ public class ItemManaMirror extends ItemMod implements IManaItem, ICoordBoundIte
if(server == null)
return fallbackPool;
ChunkCoordinates coords = getPoolCoords(stack);
BlockPos coords = getPoolCoords(stack);
if(coords.posY == -1)
return null;
@@ -26,7 +26,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.BlockPos;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
@@ -67,7 +67,7 @@ public class ItemTwigWand extends Item16Colors implements ICoordBoundItem {
@Override
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
Block block = par3World.getBlock(par4, par5, par6);
ChunkCoordinates boundTile = getBoundTile(par1ItemStack);
BlockPos boundTile = getBoundTile(par1ItemStack);
if(boundTile.posY != -1 && par2EntityPlayer.isSneaking() && (boundTile.posX != par4 || boundTile.posY != par5 || boundTile.posZ != par6)) {
TileEntity tile = par3World.getTileEntity(boundTile.posX, boundTile.posY, boundTile.posZ);
@@ -177,7 +177,7 @@ public class ItemTwigWand extends Item16Colors implements ICoordBoundItem {
@Override
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
ChunkCoordinates coords = getBoundTile(par1ItemStack);
BlockPos coords = getBoundTile(par1ItemStack);
TileEntity tile = par2World.getTileEntity(coords.posX, coords.posY, coords.posZ);
if(tile == null || !(tile instanceof IWandBindable))
setBoundTile(par1ItemStack, 0, -1, 0);
@@ -275,11 +275,11 @@ public class ItemTwigWand extends Item16Colors implements ICoordBoundItem {
ItemNBTHelper.setInt(stack, TAG_BOUND_TILE_Z, z);
}
public static ChunkCoordinates getBoundTile(ItemStack stack) {
public static BlockPos getBoundTile(ItemStack stack) {
int x = ItemNBTHelper.getInt(stack, TAG_BOUND_TILE_X, 0);
int y = ItemNBTHelper.getInt(stack, TAG_BOUND_TILE_Y, -1);
int z = ItemNBTHelper.getInt(stack, TAG_BOUND_TILE_Z, 0);
return new ChunkCoordinates(x, y, z);
return new BlockPos(x, y, z);
}
public static boolean getBindMode(ItemStack stack) {
@@ -296,7 +296,7 @@ public class ItemTwigWand extends Item16Colors implements ICoordBoundItem {
@Override
public BlockPos getBinding(ItemStack stack) {
ChunkCoordinates bound = getBoundTile(stack);
BlockPos bound = getBoundTile(stack);
if(bound.posY != -1)
return bound;
@@ -304,7 +304,7 @@ public class ItemTwigWand extends Item16Colors implements ICoordBoundItem {
if(pos != null) {
TileEntity tile = Minecraft.getMinecraft().theWorld.getTileEntity(pos.blockX, pos.blockY, pos.blockZ);
if(tile != null && tile instanceof ITileBound) {
ChunkCoordinates coords = ((ITileBound) tile).getBinding();
BlockPos coords = ((ITileBound) tile).getBinding();
return coords;
}
}
Loaded 100 of 128 files, more files were not shown because too many files have changed in this diff. Show more