most features now check for mps items before activating (including energy display)

This commit is contained in:
MachineMuse 2013-04-13 20:03:47 -06:00
parent 7df3f423d6
commit 1495460e2b
16 changed files with 4727 additions and 3749 deletions

View file

@ -17,3 +17,9 @@ Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

File diff suppressed because it is too large Load diff

View file

@ -17,3 +17,9 @@ Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

View file

@ -72,77 +72,97 @@ vt 0.883716 0.315406
vt 0.909915 0.293073
vn 0.050064 0.184317 0.981591
vn 0.050064 0.184317 0.981591
vn 0.517135 0.484043 0.705885
vn -0.442634 0.484043 0.754836
vn -0.600893 0.645617 0.471281
vn 0.645724 0.645617 0.407701
vn 0.695677 0.676320 -0.242126
vn -0.281682 0.419662 0.862867
vn 0.361550 0.652692 0.665789
vn -0.402485 0.490936 0.772650
vn 0.450035 0.878624 0.159651
vn -0.716701 0.676320 -0.170091
vn 0.886618 0.427742 -0.175914
vn -0.050059 -0.184833 -0.981494
vn -0.050059 -0.184833 -0.981494
vn -0.050059 -0.184833 -0.981494
vn -0.050059 -0.184833 -0.981494
vn 0.775735 0.335959 0.534197
vn 0.999306 -0.031359 -0.020108
vn -0.996166 -0.031359 0.081666
vn -0.717360 0.335959 0.610349
vn 0.998944 -0.037895 -0.025988
vn 0.841555 0.202122 0.500931
vn -0.996404 -0.037895 0.075780
vn -0.796364 0.368644 0.479485
vn 0.001485 -0.999575 0.029125
vn 0.001485 -0.999575 0.029125
vn 0.001485 -0.999575 0.029125
vn 0.001485 -0.999575 0.029125
vn 0.997977 -0.062657 0.010759
vn -0.991704 -0.062657 0.112238
vn 0.998691 -0.024698 0.044792
vn -0.988952 -0.024698 0.146168
vn -0.050064 0.184317 0.981591
vn 0.442634 0.484043 0.754836
vn -0.517135 0.484043 0.705885
vn 0.281682 0.419662 0.862867
vn -0.050064 0.184317 0.981591
vn 0.600893 0.645617 0.471281
vn -0.361550 0.652692 0.665789
vn 0.402485 0.490936 0.772650
vn 0.716701 0.676320 -0.170091
vn -0.695677 0.676320 -0.242126
vn -0.645724 0.645617 0.407701
vn -0.450035 0.878624 0.159651
vn -0.886618 0.427742 -0.175914
vn 0.050059 -0.184833 -0.981494
vn 0.050059 -0.184833 -0.981494
vn 0.050059 -0.184833 -0.981494
vn 0.050059 -0.184833 -0.981494
vn -0.775735 0.335959 0.534197
vn -0.999306 -0.031359 -0.020108
vn 0.717360 0.335959 0.610349
vn 0.996166 -0.031359 0.081666
vn -0.841555 0.202122 0.500931
vn -0.998944 -0.037895 -0.025988
vn 0.796364 0.368644 0.479485
vn 0.996404 -0.037895 0.075780
vn -0.001485 -0.999575 0.029125
vn -0.001485 -0.999575 0.029125
vn -0.001485 -0.999575 0.029125
vn -0.001485 -0.999575 0.029125
vn -0.997977 -0.062657 0.010759
vn 0.991704 -0.062657 0.112238
vn -0.998691 -0.024697 0.044792
vn 0.988952 -0.024698 0.146168
s 1
g booties
usemtl initialShadingGroup
f 9/1/1 10/2/2 11/3/3 12/4/4
f 3/19/5 4/17/6 6/18/7 5/20/8
s off
f 5/8/9 6/7/10 2/9/11 1/16/12
f 9/1/1 10/2/2 12/4/3
f 12/4/3 10/2/2 11/3/4
f 3/19/5 4/17/6 5/20/7
f 5/20/7 4/17/6 6/18/8
s 3
f 5/8/9 6/7/10 1/16/11
f 1/16/11 6/7/10 2/9/12
s 1
f 7/11/13 2/9/14 6/7/7 4/6/6
f 5/21/8 1/22/15 8/12/16 3/5/5
f 8/12/16 7/11/13 4/6/6 3/5/5
s off
f 1/10/17 2/15/18 10/14/19 9/13/20
f 2/9/13 6/7/8 7/11/14
f 7/11/14 6/7/8 4/6/6
f 1/22/15 8/12/16 5/21/7
f 5/21/7 8/12/16 3/5/5
f 8/12/16 7/11/14 3/5/5
f 3/5/5 7/11/14 4/6/6
s 5
f 1/10/17 2/15/18 9/13/19
f 9/13/19 2/15/18 10/14/20
s 1
f 2/9/14 7/11/13 11/3/3 10/2/21
f 7/11/13 8/12/16 12/4/4 11/3/3
f 8/12/16 1/22/15 9/1/22 12/4/4
s 3
f 21/23/23 24/26/24 23/25/25 22/24/26
f 15/27/27 17/30/28 18/29/29 16/28/30
s off
f 17/31/31 13/34/32 14/33/33 18/32/34
s 3
f 19/35/35 16/36/30 18/32/29 14/33/36
f 17/37/28 15/40/27 20/39/37 13/38/38
f 20/39/37 15/40/27 16/36/30 19/35/35
s off
f 13/41/39 21/44/40 22/43/41 14/42/42
s 3
f 14/33/36 22/24/43 23/25/25 19/35/35
f 19/35/35 23/25/25 24/26/24 20/39/37
f 20/39/37 24/26/24 21/23/44 13/38/38
f 2/9/13 7/11/14 10/2/21
f 10/2/21 7/11/14 11/3/4
f 7/11/14 8/12/16 11/3/4
f 11/3/4 8/12/16 12/4/3
f 1/22/15 9/1/22 8/12/16
f 8/12/16 9/1/22 12/4/3
s 6
f 21/23/23 24/26/24 22/24/25
f 22/24/25 24/26/24 23/25/26
f 15/27/27 17/30/28 16/28/29
f 16/28/29 17/30/28 18/29/30
s 8
f 17/31/31 13/34/32 18/32/33
f 18/32/33 13/34/32 14/33/34
s 6
f 16/36/29 18/32/30 19/35/35
f 19/35/35 18/32/30 14/33/36
f 15/40/27 20/39/37 17/37/28
f 17/37/28 20/39/37 13/38/38
f 20/39/37 15/40/27 19/35/35
f 19/35/35 15/40/27 16/36/29
s 9
f 13/41/39 21/44/40 14/42/41
f 14/42/41 21/44/40 22/43/42
s 6
f 14/33/36 22/24/43 19/35/35
f 19/35/35 22/24/43 23/25/26
f 19/35/35 23/25/26 20/39/37
f 20/39/37 23/25/26 24/26/24
f 24/26/24 21/23/44 20/39/37
f 20/39/37 21/23/44 13/38/38

View file

@ -17,3 +17,9 @@ Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

File diff suppressed because it is too large Load diff

View file

@ -17,3 +17,9 @@ Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

File diff suppressed because it is too large Load diff

View file

@ -17,3 +17,9 @@ Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

File diff suppressed because it is too large Load diff

View file

@ -23,10 +23,12 @@ import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
public class TinkerTableRenderer extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler {
protected TinkerTableModel model;
protected int renderId;
protected ArmorModel armormodel;
public TinkerTableRenderer(int renderId) {
model = new TinkerTableModel();
this.renderId = renderId;
// armormodel = new ArmorModel();
}
@Override
@ -34,6 +36,9 @@ public class TinkerTableRenderer extends TileEntitySpecialRenderer implements IS
Minecraft.getMinecraft().renderEngine.bindTexture(Config.TINKERTABLE_TEXTURE_PATH);
GL11.glPushMatrix();
GL11.glTranslated(x, y, z);
// armormodel.armorChestplate.renderAll();
model.doRender(null, x, y, z, partialTickTime, partialTickTime);
// float texturex = 80 / 256.0f;
// float texturey = 32 / 256.0f;

View file

@ -11,15 +11,7 @@ import java.lang.reflect.InvocationTargetException;
import net.machinemuse.powersuits.common.Config;
import net.machinemuse.powersuits.common.MuseLogger;
import net.machinemuse.powersuits.network.packets.MusePacketFallDistance;
import net.machinemuse.powersuits.network.packets.MusePacketInstallModuleRequest;
import net.machinemuse.powersuits.network.packets.MusePacketInventoryRefresh;
import net.machinemuse.powersuits.network.packets.MusePacketModeChangeRequest;
import net.machinemuse.powersuits.network.packets.MusePacketPlasmaBolt;
import net.machinemuse.powersuits.network.packets.MusePacketPlayerUpdate;
import net.machinemuse.powersuits.network.packets.MusePacketSalvageModuleRequest;
import net.machinemuse.powersuits.network.packets.MusePacketToggleRequest;
import net.machinemuse.powersuits.network.packets.MusePacketTweakRequest;
import net.machinemuse.powersuits.network.packets.*;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
@ -45,7 +37,6 @@ public class MusePacketHandler implements IPacketHandler {
addPacketType(2, MusePacketInstallModuleRequest.class);
addPacketType(3, MusePacketSalvageModuleRequest.class);
addPacketType(4, MusePacketTweakRequest.class);
addPacketType(5, MusePacketFallDistance.class);
addPacketType(6, MusePacketPlayerUpdate.class);
addPacketType(7, MusePacketToggleRequest.class);
addPacketType(8, MusePacketPlasmaBolt.class);

View file

@ -1,37 +0,0 @@
package net.machinemuse.powersuits.network.packets;
import java.io.DataInputStream;
import net.machinemuse.powersuits.network.MusePacket;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import cpw.mods.fml.common.network.Player;
public class MusePacketFallDistance extends MusePacket {
protected double distance;
protected EntityPlayer entityPlayer;
public MusePacketFallDistance(EntityPlayer player, double distance) {
super((Player) player);
writeDouble(distance);
}
public MusePacketFallDistance(DataInputStream data, Player player) {
super(data, player);
distance = readDouble();
}
@Override
public void handleClient(EntityClientPlayerMP player) {
// TODO Auto-generated method stub
}
@Override
public void handleServer(EntityPlayerMP player) {
player.fallDistance = (float) distance;
}
}

View file

@ -54,7 +54,7 @@ public class ClientTickHandler implements ITickHandler {
public void tickEnd(EnumSet<TickType> type, Object... tickData) {
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
if (player != null) {
if (player != null && MuseItemUtils.modularItemsEquipped(player).size() > 0) {
if (slotSelected > -1) {
player.inventory.currentItem = slotSelected;
Minecraft.getMinecraft().playerController.updateController();

View file

@ -25,7 +25,8 @@ import cpw.mods.fml.common.ITickHandler;
import cpw.mods.fml.common.TickType;
/**
* Tick handler for Player update step. tickStart() is queued before the entity is updated, and tickEnd() is queued afterwards.
* Tick handler for Player update step. tickStart() is queued before the entity
* is updated, and tickEnd() is queued afterwards.
*
* Player update step: "Called to update the entity's position/logic."
*
@ -60,8 +61,10 @@ public class PlayerTickHandler implements ITickHandler {
// double totalEnergyDrain = 0;
double foodAdjustment = 0;
boolean foundItem = false;
for (IPlayerTickModule module : ModuleManager.getPlayerTickModules()) {
for (ItemStack itemStack : modularItemsEquipped) {
foundItem = true;
if (module.isValidForItem(itemStack, player)) {
if (MuseItemUtils.itemHasActiveModule(itemStack, module.getName())) {
module.onPlayerTickActive(player, itemStack);
@ -91,7 +94,7 @@ public class PlayerTickHandler implements ITickHandler {
torso.getTagCompound().removeTag("ench");
}
}
if (foundItem) {
player.getFoodStats().addExhaustion((float) (-foodAdjustment));
player.fallDistance = (float) MovementManager.computeFallHeightFromVelocity(MuseMathUtils.clampDouble(player.motionY, -1000.0, 0.0));
@ -101,6 +104,7 @@ public class PlayerTickHandler implements ITickHandler {
player.motionZ *= weightCapacity / totalWeight;
}
}
}
public static void thrust(EntityPlayer player, double thrust, double jetEnergy, boolean flightControl) {
PlayerInputMap movementInput = PlayerInputMap.getInputMapFor(player.username);

View file

@ -51,7 +51,7 @@ public class RenderTickHandler implements ITickHandler {
@Override
public void tickEnd(EnumSet<TickType> type, Object... tickData) {
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
if (player != null) {
if (player != null && MuseItemUtils.modularItemsEquipped(player).size() > 0) {
double currEnergy = ElectricItemUtils.getPlayerEnergy(player);
double maxEnergy = ElectricItemUtils.getMaxEnergy(player);
if (maxEnergy > 0) {
@ -73,7 +73,6 @@ public class RenderTickHandler implements ITickHandler {
// lightningCounter = (lightningCounter + 1) % 50;
}
}
if (Minecraft.getMinecraft().currentScreen == null) {
MuseRenderer.TEXTURE_MAP = MuseRenderer.ITEM_TEXTURE_QUILT;
Minecraft mc = Minecraft.getMinecraft();
@ -153,6 +152,7 @@ public class RenderTickHandler implements ITickHandler {
}
}
}
}