The blue glow of the Shield of Repulsion now goes away when the player is moving.
This commit is contained in:
parent
93c3dd966f
commit
f7174144b7
|
@ -314,7 +314,14 @@ public class PlayerAetherRenderer {
|
|||
if (playerAether.getAccessoryInventory().getStackInSlot(AccessoryType.SHIELD) != null) {
|
||||
ItemAccessory shield = (ItemAccessory) playerAether.getAccessoryInventory().getStackInSlot(AccessoryType.SHIELD).getItem();
|
||||
|
||||
this.mc.getTextureManager().bindTexture(shield.texture);
|
||||
if (player.motionX == 0.0 && (player.motionY == -0.0784000015258789 || player.motionY == 0.0) && player.motionZ == 0.0 && shield.hasInactiveTexture())
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(shield.texture);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(shield.texture_inactive);
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
|
|
|
@ -260,7 +260,7 @@ public class ItemsAether {
|
|||
welcoming_skies = register("welcoming_skies", new ItemAetherDisc("welcoming_skies", "Void", "Welcoming Skies").setTextureName(Aether.find("music/welcoming_skies"))).setCreativeTab(null);
|
||||
legacy = register("legacy", new ItemAetherDisc("legacy", "Lachney", "Legacy").setTextureName(Aether.find("music/legacy"))).setCreativeTab(null);
|
||||
|
||||
repulsion_shield = register("repulsion_shield", new ItemAccessory(AccessoryType.SHIELD).setTexture("repulsion").setDungeonLoot().setMaxDamage(512).setTextureName(Aether.find("accessories/repulsion_shield")));
|
||||
repulsion_shield = register("repulsion_shield", new ItemAccessory(AccessoryType.SHIELD).setTexture("repulsion").setInactiveTexture("repulsion_movement").setDungeonLoot().setMaxDamage(512).setTextureName(Aether.find("accessories/repulsion_shield")));
|
||||
lore_book = register("lore_book", new ItemLoreBook().setTextureName(Aether.find("misc/lore_book")));
|
||||
|
||||
developer_stick = register("developer_stick", new ItemDeveloperStick().setTextureName(Aether.find("skyroot_stick")));
|
||||
|
|
|
@ -36,12 +36,14 @@ public class ItemAccessory extends Item {
|
|||
|
||||
protected final AccessoryType extraType;
|
||||
|
||||
public ResourceLocation texture;
|
||||
public ResourceLocation texture, texture_inactive;
|
||||
|
||||
private int colorHex = 0xdddddd;
|
||||
|
||||
private boolean isDungeonLoot = false;
|
||||
|
||||
private boolean hasInactiveTexture = false;
|
||||
|
||||
public static final IBehaviorDispenseItem DISPENSER_BEHAVIOR = new BehaviorDefaultDispenseItem() {
|
||||
protected ItemStack dispenseStack(IBlockSource source, ItemStack stack) {
|
||||
ItemStack itemstack = ItemAccessory.dispenseAccessory(source, stack);
|
||||
|
@ -162,4 +164,17 @@ public class ItemAccessory extends Item {
|
|||
return this;
|
||||
}
|
||||
|
||||
public ItemAccessory setInactiveTexture(String location)
|
||||
{
|
||||
this.texture_inactive = new ResourceLocation("aether_legacy", "textures/armor/accessory_" + location + ".png");
|
||||
this.hasInactiveTexture = true;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasInactiveTexture()
|
||||
{
|
||||
return this.hasInactiveTexture;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue