mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-21 21:02:15 +00:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85b0277a66 | ||
|
|
0525b31262 | ||
|
|
fdb2053c50 |
No files matched your search
@@ -26,17 +26,7 @@ public class BlockError extends Block {
|
||||
public BlockError() {
|
||||
super(Material.rock);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onTextureStitch(TextureStitchEvent.Pre event) {
|
||||
if (event.map.getTextureType() == 0) {
|
||||
for (int i = 0; i < icons.length; i++) {
|
||||
icons[i] = event.map.registerIcon("angelica:error_block_" + i);
|
||||
}
|
||||
}
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -45,4 +35,15 @@ public class BlockError extends Block {
|
||||
return meta >= 0 && meta < icons.length ? icons[meta] : null;
|
||||
}
|
||||
|
||||
public static class EventHandler{
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onTextureStitch(TextureStitchEvent.Pre event) {
|
||||
if (event.map.getTextureType() == 0) {
|
||||
for (int i = 0; i < icons.length; i++) {
|
||||
icons[i] = event.map.registerIcon("angelica:error_block_" + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,12 +117,13 @@ final class Enchantment extends OverrideBase {
|
||||
return;
|
||||
}
|
||||
begin(intensity);
|
||||
Tessellator.instance.startDrawingQuads();
|
||||
Tessellator.instance.addVertexWithUV(x0, y0, z, 0.0f, 0.0f);
|
||||
Tessellator.instance.addVertexWithUV(x0, y1, z, 0.0f, 1.0f);
|
||||
Tessellator.instance.addVertexWithUV(x1, y1, z, 1.0f, 1.0f);
|
||||
Tessellator.instance.addVertexWithUV(x1, y0, z, 1.0f, 0.0f);
|
||||
Tessellator.instance.draw();
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertexWithUV(x0, y0, z, 0.0f, 0.0f);
|
||||
tess.addVertexWithUV(x0, y1, z, 0.0f, 1.0f);
|
||||
tess.addVertexWithUV(x1, y1, z, 1.0f, 1.0f);
|
||||
tess.addVertexWithUV(x1, y0, z, 1.0f, 0.0f);
|
||||
tess.draw();
|
||||
end();
|
||||
}
|
||||
|
||||
|
||||
@@ -427,13 +427,13 @@ public class SkyRenderer {
|
||||
private static void drawTile(int tile) {
|
||||
double tileX = (tile % 3) / 3.0;
|
||||
double tileY = (tile / 3) / 2.0;
|
||||
Tessellator.instance.startDrawingQuads();
|
||||
Tessellator.instance.addVertexWithUV(-SKY_DISTANCE, -SKY_DISTANCE, -SKY_DISTANCE, tileX, tileY);
|
||||
Tessellator.instance.addVertexWithUV(-SKY_DISTANCE, -SKY_DISTANCE, SKY_DISTANCE, tileX, tileY + 0.5);
|
||||
Tessellator.instance
|
||||
.addVertexWithUV(SKY_DISTANCE, -SKY_DISTANCE, SKY_DISTANCE, tileX + 1.0 / 3.0, tileY + 0.5);
|
||||
Tessellator.instance.addVertexWithUV(SKY_DISTANCE, -SKY_DISTANCE, -SKY_DISTANCE, tileX + 1.0 / 3.0, tileY);
|
||||
Tessellator.instance.draw();
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertexWithUV(-SKY_DISTANCE, -SKY_DISTANCE, -SKY_DISTANCE, tileX, tileY);
|
||||
tess.addVertexWithUV(-SKY_DISTANCE, -SKY_DISTANCE, SKY_DISTANCE, tileX, tileY + 0.5);
|
||||
tess.addVertexWithUV(SKY_DISTANCE, -SKY_DISTANCE, SKY_DISTANCE, tileX + 1.0 / 3.0, tileY + 0.5);
|
||||
tess.addVertexWithUV(SKY_DISTANCE, -SKY_DISTANCE, -SKY_DISTANCE, tileX + 1.0 / 3.0, tileY);
|
||||
tess.draw();
|
||||
}
|
||||
|
||||
void setBlendingMethod(float brightness) {
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.gtnewhorizon.gtnhlib.client.renderer.TessellatorManager;
|
||||
import com.gtnewhorizons.angelica.AngelicaMod;
|
||||
import com.gtnewhorizons.angelica.Tags;
|
||||
import com.gtnewhorizons.angelica.config.AngelicaConfig;
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.InputEvent;
|
||||
@@ -39,6 +38,7 @@ import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
@@ -603,18 +603,18 @@ public class Iris {
|
||||
}
|
||||
|
||||
public static String getFormattedVersion() {
|
||||
final ChatFormatting color;
|
||||
final EnumChatFormatting color;
|
||||
String version = getVersion();
|
||||
|
||||
if (version.endsWith("-development-environment")) {
|
||||
color = ChatFormatting.GOLD;
|
||||
color = EnumChatFormatting.GOLD;
|
||||
version = version.replace("-development-environment", " (Development Environment)");
|
||||
} else if (version.endsWith("-dirty") || version.contains("unknown") || version.endsWith("-nogit")) {
|
||||
color = ChatFormatting.RED;
|
||||
color = EnumChatFormatting.RED;
|
||||
} else if (version.contains("+rev.")) {
|
||||
color = ChatFormatting.LIGHT_PURPLE;
|
||||
color = EnumChatFormatting.LIGHT_PURPLE;
|
||||
} else {
|
||||
color = ChatFormatting.GREEN;
|
||||
color = EnumChatFormatting.GREEN;
|
||||
}
|
||||
|
||||
return color + version;
|
||||
|
||||
Reference in new issue
Block a user