pull in some armor stuff from 1.6

This commit is contained in:
Progwml6 committed 2014-02-08 13:30:19 -05:00
1 parent 8fdef45de4
commit 86f8a2003f
15 files changed
+198 -20

No files matched your search

@@ -7,6 +7,7 @@ import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.settings.GameSettings;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.IAttributeInstance;
@@ -95,6 +96,8 @@ public class TClientEvents
//public static int right_height = 39;
Random rand = new Random();
int updateCounter = 0;
GameSettings gs = Minecraft.getMinecraft().gameSettings;
/* HUD */
@SubscribeEvent
@@ -222,6 +225,10 @@ public class TClientEvents
GuiIngameForge.left_height += 10;
event.setCanceled(true);
if (event.type == ElementType.CROSSHAIRS && gs.thirdPersonView != 0)
{
event.setCanceled(true);
}
}
}
}
@@ -2,6 +2,7 @@ package tconstruct.client;
import net.minecraft.client.Minecraft;
import net.minecraft.init.Blocks;
import tconstruct.TConstruct;
import tconstruct.common.TRepo;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent;
@@ -12,7 +13,7 @@ public class TClientTickHandler
{
Minecraft mc = Minecraft.getMinecraft();
//TControls controlInstance = ((TProxyClient)TConstruct.proxy).controlInstance;
TControls controlInstance = ((TProxyClient)TConstruct.proxy).controlInstance;
public TClientTickHandler()
{
}
@@ -26,8 +27,8 @@ public class TClientTickHandler
TRepo.oreBerry.setGraphicsLevel(Blocks.leaves.field_150121_P);
TRepo.oreBerrySecond.setGraphicsLevel(Blocks.leaves.field_150121_P);
TRepo.slimeLeaves.setGraphicsLevel(Blocks.leaves.field_150121_P);
/*if (mc.thePlayer != null && !mc.thePlayer.isAirBorne)
controlInstance.landOnGround();*/
if (mc.thePlayer != null && mc.thePlayer.onGround)
controlInstance.landOnGround();
}
}
+9 -12
View File
@@ -7,6 +7,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.potion.Potion;
import tconstruct.TConstruct;
import tconstruct.client.event.EventCloakRender;
import tconstruct.client.tabs.TabRegistry;
@@ -24,7 +25,7 @@ public class TControls extends TKeyHandler
static Minecraft mc;
boolean jumping;
boolean doubleJump = true;
int midairJumps = 0;
boolean climbing = false;
boolean onGround = false;
boolean onStilts = false;
@@ -64,17 +65,13 @@ public class TControls extends TKeyHandler
{
EventCloakRender.instance.refreshCapes();
}
/*if (kb == jumpKey) //Double jump
if (kb == jumpKey) //Double jump
{
if (mc.thePlayer.capabilities.isCreativeMode)
return;
if (jumping && !doubleJump)
if (jumping && midairJumps >0)
{
System.out.println("Jump!");
//if (player == null)
//player = mc.thePlayer;
mc.thePlayer.motionY = 0.42D;
mc.thePlayer.fallDistance = 0;
@@ -83,13 +80,13 @@ public class TControls extends TKeyHandler
mc.thePlayer.motionY += (double) ((float) (mc.thePlayer.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F);
}
doubleJump = true;
resetFallDamage(mc.thePlayer.username);
midairJumps --;
resetFallDamage(mc.thePlayer.getDisplayName());
}
if (!jumping)
jumping = mc.thePlayer.isAirBorne;
}*/
}
}
/*else if (kb == stiltsKey) //Stilts
{
@@ -118,13 +115,13 @@ public class TControls extends TKeyHandler
public void landOnGround ()
{
doubleJump = false;
midairJumps = 0;
jumping = false;
}
public void resetControls ()
{
doubleJump = false;
midairJumps = 0;
jumping = false;
climbing = false;
onGround = false;
@@ -88,6 +88,20 @@ public class CraftingStationGui extends GuiContainer
fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation18") + tags.getInteger("Modifiers"), xSize + 8, base + offset * 10, 0xffffff);
offset++;
}
boolean displayToolTips = true;
int tipNum = 0;
while (displayToolTips)
{
tipNum++;
String tooltip = "ModifierTip" + tipNum;
if (tags.hasKey(tooltip))
{
String tipName = tags.getString(tooltip);
fontRendererObj.drawString("- " + tipName, xSize + 8, base + (offset + tipNum) * 10, 0xffffff);
}
else
displayToolTips = false;
}
}
void drawModularToolStats (ItemStack stack, ToolCore tool, NBTTagCompound tags)