Add dire wolf pelt
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
package electroblob.wizardry.block;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
public class BlockPermafrost extends Block {
|
||||||
|
|
||||||
|
public BlockPermafrost(){
|
||||||
|
super(Material.ICE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getSlipperiness(IBlockState state, IBlockAccess world, BlockPos pos, @Nullable Entity entity){
|
||||||
|
return super.getSlipperiness(state, world, pos, entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,9 @@ package electroblob.wizardry.client.renderer.overlay;
|
|||||||
import electroblob.wizardry.Wizardry;
|
import electroblob.wizardry.Wizardry;
|
||||||
import electroblob.wizardry.client.WizardryClientEventHandler;
|
import electroblob.wizardry.client.WizardryClientEventHandler;
|
||||||
import electroblob.wizardry.constants.Constants;
|
import electroblob.wizardry.constants.Constants;
|
||||||
|
import electroblob.wizardry.item.ItemArtefact;
|
||||||
import electroblob.wizardry.registry.Spells;
|
import electroblob.wizardry.registry.Spells;
|
||||||
|
import electroblob.wizardry.registry.WizardryItems;
|
||||||
import electroblob.wizardry.registry.WizardryPotions;
|
import electroblob.wizardry.registry.WizardryPotions;
|
||||||
import electroblob.wizardry.spell.Spell;
|
import electroblob.wizardry.spell.Spell;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
@@ -15,6 +17,8 @@ import net.minecraft.client.renderer.entity.RenderManager;
|
|||||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.item.EntityArmorStand;
|
import net.minecraft.entity.item.EntityArmorStand;
|
||||||
|
import net.minecraft.entity.monster.IMob;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||||
import net.minecraftforge.client.event.RenderLivingEvent;
|
import net.minecraftforge.client.event.RenderLivingEvent;
|
||||||
@@ -29,6 +33,10 @@ public class RenderSixthSense {
|
|||||||
private static final ResourceLocation MARKER_TEXTURE = new ResourceLocation(Wizardry.MODID, "textures/gui/sixth_sense_marker.png");
|
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 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;
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onRenderGameOverlayEvent(RenderGameOverlayEvent.Post event){
|
public static void onRenderGameOverlayEvent(RenderGameOverlayEvent.Post event){
|
||||||
|
|
||||||
@@ -80,7 +88,21 @@ public class RenderSixthSense {
|
|||||||
GlStateManager.rotate(180 - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
GlStateManager.rotate(180 - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||||
GlStateManager.rotate(yaw, 1.0F, 0.0F, 0.0F);
|
GlStateManager.rotate(yaw, 1.0F, 0.0F, 0.0F);
|
||||||
|
|
||||||
GlStateManager.color(1, 1, 1, 1);
|
// 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);
|
||||||
|
|
||||||
|
int colour = PASSIVE_MOB_MARKER_COLOUR;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
int r = colour >> 16 & 255;
|
||||||
|
int g = colour >> 8 & 255;
|
||||||
|
int b = colour & 255;
|
||||||
|
|
||||||
|
GlStateManager.color(r/255f, g/255f, b/255f, 1);
|
||||||
|
|
||||||
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
|
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
|
||||||
|
|
||||||
@@ -97,6 +119,8 @@ public class RenderSixthSense {
|
|||||||
GlStateManager.disableBlend();
|
GlStateManager.disableBlend();
|
||||||
GlStateManager.enableLighting();
|
GlStateManager.enableLighting();
|
||||||
GlStateManager.enableDepth();
|
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();
|
GlStateManager.popMatrix();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -280,6 +280,7 @@ public final class WizardryItems {
|
|||||||
public static final Item charm_growth = placeholder();
|
public static final Item charm_growth = placeholder();
|
||||||
public static final Item charm_abseiling = placeholder();
|
public static final Item charm_abseiling = placeholder();
|
||||||
public static final Item charm_silk_touch = placeholder();
|
public static final Item charm_silk_touch = placeholder();
|
||||||
|
public static final Item charm_sixth_sense = placeholder();
|
||||||
public static final Item charm_stop_time = placeholder();
|
public static final Item charm_stop_time = placeholder();
|
||||||
public static final Item charm_light = placeholder();
|
public static final Item charm_light = placeholder();
|
||||||
public static final Item charm_transportation = placeholder();
|
public static final Item charm_transportation = placeholder();
|
||||||
@@ -647,6 +648,7 @@ public final class WizardryItems {
|
|||||||
registerItem(registry, "charm_growth", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.CHARM));
|
registerItem(registry, "charm_growth", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.CHARM));
|
||||||
registerItem(registry, "charm_abseiling", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
registerItem(registry, "charm_abseiling", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
||||||
registerItem(registry, "charm_silk_touch", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.CHARM));
|
registerItem(registry, "charm_silk_touch", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.CHARM));
|
||||||
|
registerItem(registry, "charm_sixth_sense", new ItemArtefact(EnumRarity.UNCOMMON, ItemArtefact.Type.CHARM));
|
||||||
registerItem(registry, "charm_stop_time", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.CHARM));
|
registerItem(registry, "charm_stop_time", new ItemArtefact(EnumRarity.EPIC, ItemArtefact.Type.CHARM));
|
||||||
registerItem(registry, "charm_light", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
registerItem(registry, "charm_light", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
||||||
registerItem(registry, "charm_transportation", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
registerItem(registry, "charm_transportation", new ItemArtefact(EnumRarity.RARE, ItemArtefact.Type.CHARM));
|
||||||
|
|||||||
@@ -399,6 +399,8 @@ item.ebwizardry\:charm_abseiling.name=Enchanted Twine
|
|||||||
item.ebwizardry\:charm_abseiling.desc=Holding sneak whilst grappling slowly pays out the line
|
item.ebwizardry\:charm_abseiling.desc=Holding sneak whilst grappling slowly pays out the line
|
||||||
item.ebwizardry\:charm_silk_touch.name=Moonstone Orb
|
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_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_stop_time.name=Peculiar Pocketwatch
|
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_stop_time.desc=The slow time spell makes time stand still
|
||||||
item.ebwizardry\:charm_light.name=Elevinia's Everburning Lantern
|
item.ebwizardry\:charm_light.name=Elevinia's Everburning Lantern
|
||||||
|
|||||||
@@ -399,6 +399,8 @@ item.ebwizardry\:charm_abseiling.name=Enchanted Twine
|
|||||||
item.ebwizardry\:charm_abseiling.desc=Holding sneak whilst grappling slowly pays out the line
|
item.ebwizardry\:charm_abseiling.desc=Holding sneak whilst grappling slowly pays out the line
|
||||||
item.ebwizardry\:charm_silk_touch.name=Moonstone Orb
|
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_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_stop_time.name=Peculiar Pocketwatch
|
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_stop_time.desc=The slow time spell makes time stand still
|
||||||
item.ebwizardry\:charm_light.name=Elevinia's Everburning Lantern
|
item.ebwizardry\:charm_light.name=Elevinia's Everburning Lantern
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "ebwizardry:items/charm_sixth_sense"
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1023 B After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
Reference in New Issue
Block a user