diff --git a/src/main/java/electroblob/wizardry/client/renderer/overlay/RenderSixthSense.java b/src/main/java/electroblob/wizardry/client/renderer/overlay/RenderSixthSense.java index f73dfb0f..ecb9aaa3 100644 --- a/src/main/java/electroblob/wizardry/client/renderer/overlay/RenderSixthSense.java +++ b/src/main/java/electroblob/wizardry/client/renderer/overlay/RenderSixthSense.java @@ -30,12 +30,11 @@ import org.lwjgl.opengl.GL11; @EventBusSubscriber(Side.CLIENT) public class RenderSixthSense { - private static final ResourceLocation MARKER_TEXTURE = new ResourceLocation(Wizardry.MODID, "textures/gui/sixth_sense_marker.png"); private static final ResourceLocation SCREEN_OVERLAY_TEXTURE = new ResourceLocation(Wizardry.MODID, "textures/gui/sixth_sense_overlay.png"); - private static final int PASSIVE_MOB_MARKER_COLOUR = 0xc6ff00; - private static final int HOSTILE_MOB_MARKER_COLOUR = 0x004a97; - private static final int PLAYER_MARKER_COLOUR = 0xffffff; + private static final ResourceLocation PASSIVE_MOB_MARKER_TEXTURE = new ResourceLocation(Wizardry.MODID, "textures/gui/sixth_sense_marker_passive.png"); + private static final ResourceLocation HOSTILE_MOB_MARKER_TEXTURE = new ResourceLocation(Wizardry.MODID, "textures/gui/sixth_sense_marker_hostile.png"); + private static final ResourceLocation PLAYER_MARKER_TEXTURE = new ResourceLocation(Wizardry.MODID, "textures/gui/sixth_sense_marker_player.png"); @SubscribeEvent public static void onRenderGameOverlayEvent(RenderGameOverlayEvent.Post event){ @@ -88,26 +87,19 @@ public class RenderSixthSense { GlStateManager.rotate(180 - renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(yaw, 1.0F, 0.0F, 0.0F); - // Makes the colour add to the colour of the texture pixels, rather than the default multiplying - GlStateManager.glTexEnvi(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, GL11.GL_ADD); + GlStateManager.color(1, 1, 1, 1); - int colour = PASSIVE_MOB_MARKER_COLOUR; + ResourceLocation texture = PASSIVE_MOB_MARKER_TEXTURE; if(ItemArtefact.isArtefactActive(mc.player, WizardryItems.charm_sixth_sense)){ - if(event.getEntity() instanceof IMob) colour = HOSTILE_MOB_MARKER_COLOUR; - else if(event.getEntity() instanceof EntityPlayer) colour = PLAYER_MARKER_COLOUR; + if(event.getEntity() instanceof IMob) texture = HOSTILE_MOB_MARKER_TEXTURE; + else if(event.getEntity() instanceof EntityPlayer) texture = PLAYER_MARKER_TEXTURE; } - int r = colour >> 16 & 255; - int g = colour >> 8 & 255; - int b = colour & 255; - - GlStateManager.color(r/255f, g/255f, b/255f, 1); + mc.renderEngine.bindTexture(texture); buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX); - mc.renderEngine.bindTexture(MARKER_TEXTURE); - buffer.pos(-0.6, 0.6, 0).tex(0, 0).endVertex(); buffer.pos(0.6, 0.6, 0).tex(1, 0).endVertex(); buffer.pos(0.6, -0.6, 0).tex(1, 1).endVertex(); @@ -119,8 +111,6 @@ public class RenderSixthSense { GlStateManager.disableBlend(); GlStateManager.enableLighting(); GlStateManager.enableDepth(); - // Reverses the colour addition change from before - GlStateManager.glTexEnvi(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, GL11.GL_MODULATE); GlStateManager.popMatrix(); } diff --git a/src/main/resources/assets/ebwizardry/lang/en_gb.lang b/src/main/resources/assets/ebwizardry/lang/en_gb.lang index f635d8ee..11489e78 100644 --- a/src/main/resources/assets/ebwizardry/lang/en_gb.lang +++ b/src/main/resources/assets/ebwizardry/lang/en_gb.lang @@ -408,7 +408,7 @@ item.ebwizardry\:charm_abseiling.desc=Holding sneak whilst grappling slowly pays item.ebwizardry\:charm_silk_touch.name=Moonstone Orb item.ebwizardry\:charm_silk_touch.desc=Blocks broken with the mine spell always drop themselves item.ebwizardry\:charm_sixth_sense.name=Dire Wolf Pelt -item.ebwizardry\:charm_sixth_sense.desc=Sixth sense displays different colours for passive, neutral and hostile mobs +item.ebwizardry\:charm_sixth_sense.desc=Sixth sense displays different shapes for passive, neutral and hostile mobs item.ebwizardry\:charm_stop_time.name=Peculiar Pocketwatch item.ebwizardry\:charm_stop_time.desc=The slow time spell makes time stand still item.ebwizardry\:charm_light.name=Elevinia's Everburning Lantern diff --git a/src/main/resources/assets/ebwizardry/lang/en_us.lang b/src/main/resources/assets/ebwizardry/lang/en_us.lang index 86fcbbf4..eeb840e1 100644 --- a/src/main/resources/assets/ebwizardry/lang/en_us.lang +++ b/src/main/resources/assets/ebwizardry/lang/en_us.lang @@ -408,7 +408,7 @@ item.ebwizardry\:charm_abseiling.desc=Holding sneak whilst grappling slowly pays item.ebwizardry\:charm_silk_touch.name=Moonstone Orb item.ebwizardry\:charm_silk_touch.desc=Blocks broken with the mine spell always drop themselves item.ebwizardry\:charm_sixth_sense.name=Dire Wolf Pelt -item.ebwizardry\:charm_sixth_sense.desc=Sixth sense displays different colors for passive, neutral and hostile mobs +item.ebwizardry\:charm_sixth_sense.desc=Sixth sense displays different shapes for passive, neutral and hostile mobs item.ebwizardry\:charm_stop_time.name=Peculiar Pocketwatch item.ebwizardry\:charm_stop_time.desc=The slow time spell makes time stand still item.ebwizardry\:charm_light.name=Elevinia's Everburning Lantern diff --git a/src/main/resources/assets/ebwizardry/textures/gui/sixth_sense_marker.png b/src/main/resources/assets/ebwizardry/textures/gui/sixth_sense_marker.png deleted file mode 100644 index 8b83f5ab..00000000 Binary files a/src/main/resources/assets/ebwizardry/textures/gui/sixth_sense_marker.png and /dev/null differ diff --git a/src/main/resources/assets/ebwizardry/textures/gui/sixth_sense_marker_hostile.png b/src/main/resources/assets/ebwizardry/textures/gui/sixth_sense_marker_hostile.png new file mode 100644 index 00000000..ba05f9b9 Binary files /dev/null and b/src/main/resources/assets/ebwizardry/textures/gui/sixth_sense_marker_hostile.png differ diff --git a/src/main/resources/assets/ebwizardry/textures/gui/sixth_sense_marker_passive.png b/src/main/resources/assets/ebwizardry/textures/gui/sixth_sense_marker_passive.png new file mode 100644 index 00000000..456a6a2f Binary files /dev/null and b/src/main/resources/assets/ebwizardry/textures/gui/sixth_sense_marker_passive.png differ diff --git a/src/main/resources/assets/ebwizardry/textures/gui/sixth_sense_marker_player.png b/src/main/resources/assets/ebwizardry/textures/gui/sixth_sense_marker_player.png new file mode 100644 index 00000000..4937fb15 Binary files /dev/null and b/src/main/resources/assets/ebwizardry/textures/gui/sixth_sense_marker_player.png differ