Skip to content

Commit

Permalink
Enable Capes/Format Code
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander committed Feb 12, 2014
1 parent 612f7a9 commit 56d348d
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 33 deletions.
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/TConstruct.java
Expand Up @@ -11,6 +11,7 @@

import tconstruct.achievements.TAchievements;
import tconstruct.client.TControls;
import tconstruct.client.event.EventCloakRender;
import tconstruct.common.TContent;
import tconstruct.common.TProxyCommon;
import tconstruct.common.TRecipes;
Expand Down Expand Up @@ -177,7 +178,7 @@ public void init (FMLInitializationEvent event)
packetPipeline.initalise();
if (event.getSide() == Side.CLIENT)
{
//MinecraftForge.EVENT_BUS.register(new EventCloakRender());
MinecraftForge.EVENT_BUS.register(new EventCloakRender());
}

DimensionBlacklist.getBadBimensions();
Expand Down
Expand Up @@ -128,7 +128,7 @@ public void openInventory ()
}

@Override
public boolean canUpdate()
public boolean canUpdate ()
{
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java
Expand Up @@ -199,9 +199,9 @@ public void openInventory ()
public void closeInventory ()
{
}

@Override
public boolean canUpdate()
public boolean canUpdate ()
{
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/tconstruct/blocks/logic/ToolStationLogic.java
Expand Up @@ -58,10 +58,10 @@ public Container getGuiContainer (InventoryPlayer inventoryplayer, World world,
public void onInventoryChanged ()
{
buildTool(toolName);
if (this.getWorld() != null)
if (this.worldObj != null)
{
this.blockMetadata = this.getWorld().getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
this.getWorld().markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
this.blockMetadata = this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/client/TClientEvents.java
Expand Up @@ -96,7 +96,7 @@ public void postStitch (TextureStitchEvent.Post event)
//public static int right_height = 39;
Random rand = new Random();
int updateCounter = 0;

GameSettings gs = Minecraft.getMinecraft().gameSettings;

/* HUD */
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/client/TClientTickHandler.java
Expand Up @@ -13,7 +13,8 @@ public class TClientTickHandler
{
Minecraft mc = Minecraft.getMinecraft();

TControls controlInstance = ((TProxyClient)TConstruct.proxy).controlInstance;
TControls controlInstance = ((TProxyClient) TConstruct.proxy).controlInstance;

public TClientTickHandler()
{
}
Expand Down
32 changes: 16 additions & 16 deletions src/main/java/tconstruct/client/TControls.java
Expand Up @@ -70,22 +70,22 @@ public void keyDown (Type types, KeyBinding kb, boolean tickEnd, boolean isRepea
if (mc.thePlayer.capabilities.isCreativeMode)
return;

if (jumping && midairJumps >0)
{
mc.thePlayer.motionY = 0.42D;
mc.thePlayer.fallDistance = 0;

if (mc.thePlayer.isPotionActive(Potion.jump))
{
mc.thePlayer.motionY += (double) ((float) (mc.thePlayer.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F);
}

midairJumps --;
resetFallDamage(mc.thePlayer.getDisplayName());
}

if (!jumping)
jumping = mc.thePlayer.isAirBorne;
if (jumping && midairJumps > 0)
{
mc.thePlayer.motionY = 0.42D;
mc.thePlayer.fallDistance = 0;

if (mc.thePlayer.isPotionActive(Potion.jump))
{
mc.thePlayer.motionY += (double) ((float) (mc.thePlayer.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F);
}

midairJumps--;
resetFallDamage(mc.thePlayer.getDisplayName());
}

if (!jumping)
jumping = mc.thePlayer.isAirBorne;
}
}
/*else if (kb == stiltsKey) //Stilts
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/library/armor/AModInteger.java
Expand Up @@ -22,7 +22,7 @@ public AModInteger(int effect, String dataKey, EnumSet<EnumArmorPart> armorTypes
color = c;
tooltipName = tip;
}

@Override
protected boolean canModify (ItemStack armor, ItemStack[] input)
{
Expand All @@ -34,7 +34,7 @@ protected boolean canModify (ItemStack armor, ItemStack[] input)
}
return false;
}

@Override
public void modify (ItemStack[] input, ItemStack tool)
{
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/tconstruct/modifiers/armor/AModDoubleJump.java
Expand Up @@ -26,7 +26,7 @@ protected boolean canModify (ItemStack armor, ItemStack[] input)
}
return false;
}

@Override
protected int addToolTip (ItemStack tool, String tooltip, String modifierTip)
{
Expand Down Expand Up @@ -57,16 +57,16 @@ protected int addToolTip (ItemStack tool, String tooltip, String modifierTip)
}
}
}

@Override
protected String getProperName (String tooltip, String tag)
{
if (tag.contains("Double-Jump"))
return color+"Triple-Jump";
return color + "Triple-Jump";

if (tag.contains("Triple-Jump"))
return color+"Quadruple-Jump";
return color + "Quadruple-Jump";

return color+"Double-Jump";
return color + "Double-Jump";
}
}

0 comments on commit 56d348d

Please sign in to comment.