Revert "Revert "See extended description""

This reverts commit d5c937eb7b.
This commit is contained in:
MachineMuse 2013-01-19 07:13:10 -07:00
parent d5c937eb7b
commit 1fede2a1ae
20 changed files with 768 additions and 319 deletions

View file

@ -0,0 +1,8 @@
BTW, some new components that will be added soon (and added to the cost of existing modules as well as some new ones):
-Tungsten plating (for heat capacity)
-Cooling systems of some sort
-Carbon myofibers (artificial muscles, will supplement servos in movement modules)
-Control circuits (for modules that can be configured on-the-fly)
-Laser/hologram emitters (for HUD-related modules as well as cosmetic ones)
-Force field generators (to make energy shields more difficult to acquire, and perhaps add some some other things like an item magnet, hover mode, etc.)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -92,7 +92,7 @@ public abstract class MuseStringUtils {
break;
}
strlist.add(str.substring(i, j));
i = j;
i = j+1;
}
strlist.add(str.substring(i));

View file

@ -45,23 +45,32 @@ public class MuseIcon {
public static final MuseIcon IRON_PLATING = new MuseIcon(WC_ICON_PATH, 7);
public static final MuseIcon DIAMOND_PLATING = new MuseIcon(WC_ICON_PATH, 8);
public static final MuseIcon HEART = new MuseIcon(WC_ICON_PATH, 13);
public static final MuseIcon BATTERY_FULL = new MuseIcon(WC_ICON_PATH, 14);
public static final MuseIcon BATTERY_EMPTY = new MuseIcon(WC_ICON_PATH, 15);
public static final MuseIcon FIELD_EMITTER = new MuseIcon(WC_ICON_PATH, 14);
public static final MuseIcon CARBON_MYOFIBER = new MuseIcon(WC_ICON_PATH, 15);
public static final MuseIcon SHOCK_ABSORBER = new MuseIcon(WC_ICON_PATH, 16);
public static final MuseIcon PARACHUTE_MODULE = new MuseIcon(WC_ICON_PATH, 18);
public static final MuseIcon TRANSPARENT_ARMOR = new MuseIcon(WC_ICON_PATH, 20);
public static final MuseIcon GO_FAST = new MuseIcon(WC_ICON_PATH, 21);
public static final MuseIcon SWIM_BOOST = new MuseIcon(WC_ICON_PATH, 21);
// Component icons
public static final MuseIcon COMPONENT_WIRING = new MuseIcon(WC_ICON_PATH, 32);
public static final MuseIcon COMPONENT_SOLENOID = new MuseIcon(WC_ICON_PATH, 33);
public static final MuseIcon COMPONENT_GLIDERWING = new MuseIcon(WC_ICON_PATH, 35);
public static final MuseIcon COMPONENT_SERVOMOTOR = new MuseIcon(WC_ICON_PATH, 34);
public static final MuseIcon COMPONENT_IONTHRUSTER = new MuseIcon(WC_ICON_PATH, 36);
public static final MuseIcon COMPONENT_LVCAPACITOR = new MuseIcon(WC_ICON_PATH, 37);
public static final MuseIcon COMPONENT_PARACHUTE = new MuseIcon(WC_ICON_PATH, 38);
public static final MuseIcon COMPONENT_MVCAPACITOR = new MuseIcon(WC_ICON_PATH, 53);
public static final MuseIcon COMPONENT_HVCAPACITOR = new MuseIcon(WC_ICON_PATH, 69);
public static final MuseIcon WIRING = new MuseIcon(WC_ICON_PATH, 32);
public static final MuseIcon SOLENOID = new MuseIcon(WC_ICON_PATH, 33);
public static final MuseIcon GLIDERWING = new MuseIcon(WC_ICON_PATH, 35);
public static final MuseIcon SERVOMOTOR = new MuseIcon(WC_ICON_PATH, 34);
public static final MuseIcon IONTHRUSTER = new MuseIcon(WC_ICON_PATH, 36);
public static final MuseIcon LVCAPACITOR = new MuseIcon(WC_ICON_PATH, 37);
public static final MuseIcon PARACHUTE = new MuseIcon(WC_ICON_PATH, 38);
public static final MuseIcon MVCAPACITOR = new MuseIcon(WC_ICON_PATH, 53);
public static final MuseIcon HVCAPACITOR = new MuseIcon(WC_ICON_PATH, 69);
public static final MuseIcon BATTERY1 = new MuseIcon(WC_ICON_PATH, 30);
public static final MuseIcon BATTERY2 = new MuseIcon(WC_ICON_PATH, 46);
public static final MuseIcon BATTERYCRYSTAL = new MuseIcon(WC_ICON_PATH, 62);
public static final MuseIcon ALIEN = new MuseIcon(WC_ICON_PATH, 78);
public static final MuseIcon NETHERSTAR = new MuseIcon(WC_ICON_PATH, 94);
public static final MuseIcon ARCREACTOR = new MuseIcon(WC_ICON_PATH, 110);
public static final MuseIcon CIRCUIT = new MuseIcon(WC_ICON_PATH, 31);
public static final MuseIcon LAMP = new MuseIcon(WC_ICON_PATH, 47);
public static final MuseIcon CRYSTAL = new MuseIcon(WC_ICON_PATH, 63);
String texturefile;
int index;

View file

@ -17,7 +17,7 @@ public class ItemSelectionFrame extends ScrollableFrame {
protected int selectedItemStack = -1;
protected EntityPlayer player;
protected List<Point2D> itemPoints;
public ItemSelectionFrame(Point2D topleft, Point2D bottomright,
Colour borderColour, Colour insideColour, EntityPlayer player) {
super(topleft, bottomright, borderColour, insideColour);
@ -27,7 +27,7 @@ public class ItemSelectionFrame extends ScrollableFrame {
loadPoints(slots.size());
loadItems();
}
private void loadPoints(int num) {
double centerx = (topleft.x() + bottomright.x()) / 2;
double centery = (topleft.y() + bottomright.y()) / 2;
@ -42,50 +42,54 @@ public class ItemSelectionFrame extends ScrollableFrame {
point, 200));
}
}
private void loadItems() {
itemButtons = new ArrayList<ClickableItem>();
double centerx = (topleft.x() + bottomright.x()) / 2;
double centery = (topleft.y() + bottomright.y()) / 2;
List<Integer> slots = ItemUtils
.getModularItemSlotsInInventory(player.inventory);
if (slots.size() > itemPoints.size()) {
loadPoints(slots.size());
}
if (slots.size() > 0) {
Iterator<Point2D> pointiterator = itemPoints.iterator();
for (int slot : slots) {
ClickableItem clickie = new ClickableItem(
player.inventory.getStackInSlot(slot),
pointiterator.next(), slot);
itemButtons.add(clickie);
if (player != null) {
itemButtons = new ArrayList<ClickableItem>();
double centerx = (topleft.x() + bottomright.x()) / 2;
double centery = (topleft.y() + bottomright.y()) / 2;
List<Integer> slots = ItemUtils
.getModularItemSlotsInInventory(player.inventory);
if (slots.size() > itemPoints.size()) {
loadPoints(slots.size());
}
if (slots.size() > 0) {
Iterator<Point2D> pointiterator = itemPoints.iterator();
for (int slot : slots) {
ClickableItem clickie = new ClickableItem(
player.inventory.getStackInSlot(slot),
pointiterator.next(), slot);
itemButtons.add(clickie);
}
}
}
}
@Override public void update(double mousex, double mousey) {
@Override
public void update(double mousex, double mousey) {
loadItems();
}
@Override public void draw() {
@Override
public void draw() {
drawBackground();
drawItems();
drawSelection();
}
private void drawBackground() {
MuseRenderer.drawFrameRect(topleft, bottomright, borderColour,
insideColour, 0, 4);
}
private void drawItems() {
for (ClickableItem item : itemButtons) {
item.draw();
}
}
private void drawSelection() {
if (selectedItemStack != -1) {
MuseRenderer.drawCircleAround(
@ -96,10 +100,11 @@ public class ItemSelectionFrame extends ScrollableFrame {
10);
}
}
public boolean hasNoItems() {
return itemButtons.size() == 0;
}
public ClickableItem getSelectedItem() {
if (itemButtons.size() > selectedItemStack && selectedItemStack != -1) {
return itemButtons.get(selectedItemStack);
@ -107,8 +112,9 @@ public class ItemSelectionFrame extends ScrollableFrame {
return null;
}
}
@Override public void onMouseDown(double x, double y, int button) {
@Override
public void onMouseDown(double x, double y, int button) {
int i = 0;
for (ClickableItem item : itemButtons) {
if (item.hitBox(x, y)) {
@ -119,8 +125,9 @@ public class ItemSelectionFrame extends ScrollableFrame {
}
}
}
@Override public List<String> getToolTip(int x, int y) {
@Override
public List<String> getToolTip(int x, int y) {
int itemHover = -1;
int i = 0;
for (ClickableItem item : itemButtons) {
@ -137,5 +144,5 @@ public class ItemSelectionFrame extends ScrollableFrame {
return null;
}
}
}

View file

@ -22,17 +22,17 @@ import cpw.mods.fml.relauncher.Side;
*
*/
public class ClientProxy extends CommonProxy {
private static EquipmentRenderer equipmentRenderer = new EquipmentRenderer();
private static ToolRenderer toolRenderer = new ToolRenderer();
private static RenderTickHandler renderTickHandler;
private static PlayerTickHandlerClient playerTickHandler;
public static KeybindKeyHandler keybindHandler;
/**
* Register all the custom renderers for this mod.
*/
@Override
public void registerRenderers() {
// MinecraftForgeClient.registerItemRenderer(PowersuitsMod.powerTool.itemID,
// equipmentRenderer);
MinecraftForgeClient.registerItemRenderer(PowersuitsMod.powerTool.itemID, toolRenderer);
int tinkTableRenderID = RenderingRegistry.getNextAvailableRenderId();
TinkerTableRenderer tinkTableRenderer = new TinkerTableRenderer(
tinkTableRenderID);
@ -52,6 +52,8 @@ public class ClientProxy extends CommonProxy {
*/
@Override
public void registerHandlers() {
keybindHandler = new KeybindKeyHandler();
playerTickHandler = new PlayerTickHandlerClient();
TickRegistry.registerTickHandler(playerTickHandler, Side.CLIENT);

View file

@ -0,0 +1,45 @@
package net.machinemuse.powersuits.client;
import java.util.EnumSet;
import org.lwjgl.input.Keyboard;
import net.minecraft.client.settings.KeyBinding;
import cpw.mods.fml.client.registry.KeyBindingRegistry.KeyHandler;
import cpw.mods.fml.common.TickType;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class KeybindKeyHandler extends KeyHandler {
public static KeyBinding openKeybindGUI = new KeyBinding("Open Muse Keybind GUI", Keyboard.KEY_K);
public KeybindKeyHandler() {
super(new KeyBinding[]{openKeybindGUI}, new boolean[]{false});
}
@Override
public String getLabel() {
return "machineMuseKeybinds";
}
@Override
public void keyDown(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd, boolean isRepeat) {
if(kb.equals(openKeybindGUI)) {
}
}
@Override
public void keyUp(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd) {
// TODO Auto-generated method stub
}
@Override
public EnumSet<TickType> ticks() {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -6,12 +6,25 @@
package net.machinemuse.powersuits.client;
import net.machinemuse.powersuits.common.MuseLogger;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainerCreative;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.client.ForgeHooksClient;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
public class ToolModel extends ModelBase
{
public final static String TEXTUREPATH = "/resource/tool.png";
// fields
ModelRenderer mainarm;
@ -269,45 +282,168 @@ public class ToolModel extends ModelBase
setRotation(supportleft5, 0F, -0.7714355F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
public static int xtap;
public static int ytap;
public static int ztap;
public static boolean tap;
public void render(Entity entity, float scale, boolean isFirstPerson)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5);
mainarm.render(f5);
armorright.render(f5);
armorleft.render(f5);
wristtopright.render(f5);
wristtopleft.render(f5);
wristbottomright.render(f5);
wristbottomleft.render(f5);
index1.render(f5);
index2.render(f5);
middlefinger1.render(f5);
middlefinger2.render(f5);
ringfinger1.render(f5);
ringfinger2.render(f5);
pinky1.render(f5);
pinky2.render(f5);
thumb1.render(f5);
thumb2.render(f5);
fingerguard.render(f5);
crystalholder.render(f5);
crystal.render(f5);
supportright1.render(f5);
supportright2.render(f5);
supportright3.render(f5);
supportright4.render(f5);
supportright5.render(f5);
supportbaseright.render(f5);
palm.render(f5);
supportbaseleft.render(f5);
supportleftfront.render(f5);
supportrightfront.render(f5);
supportleft1.render(f5);
supportleft2.render(f5);
supportleft3.render(f5);
supportleft4.render(f5);
supportleft5.render(f5);
// super.render(entity, f, f1, f2, f3, f4, f5);
int numsegments = 16;
if (!tap) {
if (Keyboard.isKeyDown(Keyboard.KEY_NUMPAD1)) {
xtap = (xtap + 1);
tap = true;
}
if (Keyboard.isKeyDown(Keyboard.KEY_NUMPAD2)) {
ytap = (ytap + 1);
tap = true;
}
if (Keyboard.isKeyDown(Keyboard.KEY_NUMPAD3)) {
ztap = (ztap + 1);
tap = true;
}
if (Keyboard.isKeyDown(Keyboard.KEY_NUMPAD4)) {
xtap = (xtap - 1);
tap = true;
}
if (Keyboard.isKeyDown(Keyboard.KEY_NUMPAD5)) {
ytap = (ytap - 1);
tap = true;
}
if (Keyboard.isKeyDown(Keyboard.KEY_NUMPAD6)) {
ztap = (ztap - 1);
tap = true;
}
if (Keyboard.isKeyDown(Keyboard.KEY_NUMPAD8)) {
xtap = 0;
ytap = 0;
ztap = 0;
tap = true;
}
if (Keyboard.isKeyDown(Keyboard.KEY_NUMPAD0)) {
MuseLogger.logDebug(xtap + ", " + ytap + ", " + ztap);
tap = true;
}
} else {
if (!Keyboard.isKeyDown(Keyboard.KEY_NUMPAD0)
&& !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD1)
&& !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD2)
&& !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD3)
&& !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD4)
&& !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD5)
&& !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD6)) {
tap = false;
}
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
tap = false;
}
}
GL11.glPushMatrix();
ForgeHooksClient.bindTexture(TEXTUREPATH, 0);
double scale1 = 1.0 / 16.0;
boolean isThisEntity = entity == Minecraft.getMinecraft().renderViewEntity;
isFirstPerson = (Minecraft.getMinecraft().gameSettings.thirdPersonView == 0);
boolean isInInventoryGui = Minecraft.getMinecraft().currentScreen instanceof GuiInventory
|| Minecraft.getMinecraft().currentScreen instanceof GuiContainerCreative;
boolean doFirstPersonRender = isThisEntity && isFirstPerson && !isInInventoryGui;
if (doFirstPersonRender) {
// if (entity instanceof EntityPlayer) {
// EntityPlayer player = (EntityPlayer) entity;
// RenderPlayer rp = new RenderPlayer();
// // Render first person hand:
// rp.func_82441_a(player);
// }
GL11.glScaled(scale1, scale1, scale1);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glRotatef(270, 1, 0, 0);
GL11.glRotatef(45, 0, 1, 0);
GL11.glRotatef(-90, 0, 0, 1);
GL11.glTranslatef(0, 0, 4);
// GL11.glRotatef(xtap, 1, 0, 0);
// GL11.glRotatef(ytap, 0, 1, 0);
// GL11.glRotatef(ztap, 0, 0, 1);
} else {
GL11.glScaled(-scale1, scale1, scale1);
GL11.glRotatef(-90, 0, 1, 0);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(35, 1, 0, 0);
GL11.glRotatef(-5, 0, 1, 0);
GL11.glRotatef(1.5F, 0, 0, 1);
GL11.glTranslatef(2 / 4.0F, 3 / 4.0F, 1 / 4.0F);
GL11.glTranslatef(-2, -1, 4);
}
GL11.glPushMatrix();
// Compensate for offset when Sebk was doing his rendering
GL11.glRotatef(-15, 1, 0, 0);
GL11.glTranslatef(3, 0, 8);
GL11.glScalef(1 / 1.5F, 1 / 1.5F, 1 / 1.5F);
if (doFirstPersonRender) {
mainarm.render(scale);
}
armorright.render(scale);
armorleft.render(scale);
wristtopright.render(scale);
wristtopleft.render(scale);
wristbottomright.render(scale);
wristbottomleft.render(scale);
index1.render(scale);
index2.render(scale);
middlefinger1.render(scale);
middlefinger2.render(scale);
ringfinger1.render(scale);
ringfinger2.render(scale);
pinky1.render(scale);
pinky2.render(scale);
thumb1.render(scale);
thumb2.render(scale);
fingerguard.render(scale);
crystalholder.render(scale);
supportright1.render(scale);
supportright2.render(scale);
supportright3.render(scale);
supportright4.render(scale);
supportright5.render(scale);
supportbaseright.render(scale);
palm.render(scale);
supportbaseleft.render(scale);
supportleftfront.render(scale);
supportrightfront.render(scale);
supportleft1.render(scale);
supportleft2.render(scale);
supportleft3.render(scale);
supportleft4.render(scale);
supportleft5.render(scale);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0F, 240.0F);
crystal.render(scale);
GL11.glPopMatrix();
// GL11.glDisable(GL11.GL_DEPTH_TEST);
// GL11.glBegin(GL11.GL_LINES);
//
// GL11.glColor3f(1, 0, 0);
// GL11.glVertex3f(-16, 0, 0);
// GL11.glVertex3f(16, 0, 0);
//
// GL11.glColor3f(0, 1, 0);
// GL11.glVertex3f(0, -16, 0);
// GL11.glVertex3f(0, 16, 0);
//
// GL11.glColor3f(0, 0, 1);
// GL11.glVertex3f(0, 0, -16);
// GL11.glVertex3f(0, 0, 16);
// GL11.glColor3f(1, 1, 1);
// GL11.glEnd();
// GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glPopMatrix();
}
private void setRotation(ModelRenderer model, float x, float y, float z)
@ -317,6 +453,12 @@ public class ToolModel extends ModelBase
model.rotateAngleZ = z;
}
/**
* Sets the model's various rotation angles. For bipeds, par1 and par2 are
* used for animating the movement of arms and legs, where par1 represents
* the time(so that arms and legs swing back and forth) and par2 represents
* how "far" arms and legs can swing at most.
*/
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
{
super.setRotationAngles(f, f1, f2, f3, f4, 0.0625f, null);

View file

@ -1,7 +1,12 @@
package net.machinemuse.powersuits.client;
import org.lwjgl.opengl.GL11;
import net.machinemuse.general.geometry.Colour;
import net.machinemuse.general.geometry.MuseRenderer;
import net.machinemuse.general.gui.MuseIcon;
import net.machinemuse.powersuits.item.IModularItem;
import net.machinemuse.powersuits.item.ItemPowerTool;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.client.renderer.entity.Render;
@ -11,6 +16,7 @@ import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.storage.MapData;
import net.minecraftforge.client.ForgeHooksClient;
import net.minecraftforge.client.IItemRenderer;
/**
@ -21,7 +27,8 @@ import net.minecraftforge.client.IItemRenderer;
* @author MachineMuse
*
*/
public class EquipmentRenderer extends Render implements IItemRenderer {
public class ToolRenderer extends Render implements IItemRenderer {
public ToolModel model = new ToolModel();
/**
* Forge checks this to see if our custom renderer will handle a certain
@ -51,98 +58,31 @@ public class EquipmentRenderer extends Render implements IItemRenderer {
@Override
public void renderItem(ItemRenderType type, ItemStack itemStack,
Object... data) {
IModularItem item;
if (itemStack.getItem() instanceof IModularItem) {
item = (IModularItem) (itemStack.getItem());
} else {
return;
}
boolean drawIcon = false;
switch (type) {
case ENTITY:
RenderBlocks renderEntity = (RenderBlocks) data[0];
EntityItem entityEntity = (EntityItem) data[1];
model.render(null, 1, false);
break;
case INVENTORY:
RenderBlocks renderInventory = (RenderBlocks) data[0];
MuseRenderer.drawIconAt(0, 0, ItemPowerTool.getCurrentIconFor(itemStack), Colour.WHITE);
break;
case EQUIPPED:
RenderBlocks renderEquipped = (RenderBlocks) data[0];
EntityLiving entityEquipped = (EntityLiving) data[1];
model.render(entityEquipped, 1, false);
break;
case FIRST_PERSON_MAP:
EntityPlayer playerFirstPerson = (EntityPlayer) data[0];
RenderEngine engineFirstPerson = (RenderEngine) data[1];
MapData mapDataFirstPerson = (MapData) data[2];
model.render(playerFirstPerson, 1, true);
break;
default:
}
switch (item.getItemType()) {
case PowerArmorHead:
drawHead(itemStack);
break;
case PowerArmorTorso:
drawTorso(itemStack);
break;
case PowerArmorLegs:
drawLegs(itemStack);
break;
case PowerArmorFeet:
drawFeet(itemStack);
break;
case PowerTool:
new ToolModel().render(null, 0, 0, 0, 0, 0, 0);
break;
default:
break;
}
}
public void drawHead(ItemStack itemStack) {
}
public void drawTorso(ItemStack itemStack) {
}
public void drawLegs(ItemStack itemStack) {
float z = 1.0F;
float a = 1F;
float[] v = {
2, 1, z,
14, 1, z,
15, 15, z,
9, 15, z,
8, 5, z,
7, 15, z,
1, 15, z
};
float[] c = {
1.0F, 1.0F, 1.0F, a,
0.1F, 0.1F, 0.1F, a,
0.1F, 0.1F, 0.1F, a,
0.7F, 0.7F, 0.7f, a,
0.8F, 0.8F, 0.8F, a,
0.9F, 0.9F, 0.9F, a,
1.0F, 1.0F, 1.0F, a
};
int[] i = {
0, 6, 5,
0, 5, 4,
0, 4, 1,
1, 3, 2,
1, 4, 3
};
MuseRenderer.drawTriangles2D(v, c, i);
}
public void drawFeet(ItemStack itemStack) {
// MuseRenderer.drawRectPrism(0, 16, 0, 16, 0, 16);
}
public void drawTool(ItemStack itemStack, ItemRenderType type) {
}
/**
@ -169,8 +109,7 @@ public class EquipmentRenderer extends Render implements IItemRenderer {
@Override
public void doRender(Entity var1, double var2, double var4, double var6, float var8, float var9) {
// TODO Auto-generated method stub
}
}

View file

@ -1,5 +1,6 @@
package net.machinemuse.powersuits.common;
import net.machinemuse.powersuits.client.KeybindKeyHandler;
import net.machinemuse.powersuits.network.MusePacketHandler;
import net.machinemuse.powersuits.tick.PlayerTickHandlerClient;
import cpw.mods.fml.common.ITickHandler;

View file

@ -1,16 +1,21 @@
package net.machinemuse.powersuits.common;
import cpw.mods.fml.common.Loader;
import org.lwjgl.input.Keyboard;
import net.machinemuse.general.MuseStringUtils;
import net.machinemuse.general.gui.MuseIcon;
import net.machinemuse.powersuits.item.ItemComponent;
import net.machinemuse.powersuits.item.ModularCommon;
import net.machinemuse.powersuits.powermodule.ModuleManager;
import net.machinemuse.powersuits.powermodule.PowerModule;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.Configuration;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
/**
* Initial attempt at storing all tweakable/configurable values in one class.
@ -139,23 +144,23 @@ public class Config {
boolean[] ALLITEMS = { true, true, true, true, true };
PowerModule module;
module = new PowerModule(ModularCommon.MODULE_IRON_PLATING, ARMORONLY, MuseIcon.IRON_PLATING, ModularCommon.CATEGORY_ARMOR)
.setDescription("Iron plating is heavy but protective.")
.addInstallCost(new ItemStack(Item.ingotIron, 5))
module = new PowerModule(ModularCommon.MODULE_BASIC_PLATING, ARMORONLY, MuseIcon.IRON_PLATING, ModularCommon.CATEGORY_ARMOR)
.setDescription("Basic plating is heavy but protective.")
.addInstallCost(copyAndResize(ItemComponent.basicPlating, 1))
.addTradeoffProperty("Plating Thickness", ModularCommon.ARMOR_VALUE_PHYSICAL, 5, " Points")
.addTradeoffProperty("Plating Thickness", ModularCommon.WEIGHT, 10000, "g");
ModuleManager.addModule(module);
module = new PowerModule(ModularCommon.MODULE_DIAMOND_PLATING, ARMORONLY, MuseIcon.DIAMOND_PLATING, ModularCommon.CATEGORY_ARMOR)
.setDescription("Diamonds are lighter, harder, and more protective than Iron but much harder to find.")
.addInstallCost(new ItemStack(Item.diamond, 5))
.setDescription("Advanced plating is lighter, harder, and more protective than Basic but much harder to make.")
.addInstallCost(copyAndResize(ItemComponent.advancedPlating, 1))
.addTradeoffProperty("Plating Thickness", ModularCommon.ARMOR_VALUE_PHYSICAL, 6, " Points")
.addTradeoffProperty("Plating Thickness", ModularCommon.WEIGHT, 6000, "g");
ModuleManager.addModule(module);
module = new PowerModule(ModularCommon.MODULE_ENERGY_SHIELD, ARMORONLY, MuseIcon.ENERGY_SHIELD, ModularCommon.CATEGORY_ARMOR)
.setDescription("Energy shields are much lighter than plating, but consume energy.")
.addInstallCost(copyAndResize(ItemComponent.solenoid, 4))
.addInstallCost(copyAndResize(ItemComponent.fieldEmitter, 4))
.addTradeoffProperty("Field Strength", ModularCommon.ARMOR_VALUE_ENERGY, 6, " Points")
.addTradeoffProperty("Field Strength", ModularCommon.ARMOR_ENERGY_CONSUMPTION, 500, "J");
ModuleManager.addModule(module);
@ -190,7 +195,7 @@ public class Config {
.addTradeoffProperty("Overclock", ModularCommon.PICKAXE_HARVEST_SPEED, 18);
ModuleManager.addModule(module);
module = new PowerModule(ModularCommon.MODULE_BATTERY_BASIC, ALLITEMS, MuseIcon.COMPONENT_LVCAPACITOR, ModularCommon.CATEGORY_ENERGY)
module = new PowerModule(ModularCommon.MODULE_BATTERY_BASIC, ALLITEMS, MuseIcon.BATTERY1, ModularCommon.CATEGORY_ENERGY)
.setDescription("Integrate a battery to allow the item to store energy.")
.addInstallCost(copyAndResize(ItemComponent.lvcapacitor, 1))
.addBaseProperty(ModularCommon.MAXIMUM_ENERGY, 20000, "J")
@ -199,7 +204,7 @@ public class Config {
.addTradeoffProperty("Battery Size", ModularCommon.WEIGHT, 8000);
ModuleManager.addModule(module);
module = new PowerModule(ModularCommon.MODULE_BATTERY_ADVANCED, ALLITEMS, MuseIcon.BATTERY_EMPTY, ModularCommon.CATEGORY_ENERGY)
module = new PowerModule(ModularCommon.MODULE_BATTERY_ADVANCED, ALLITEMS, MuseIcon.BATTERY2, ModularCommon.CATEGORY_ENERGY)
.setDescription("Integrate a more advanced battery to store more energy.")
.addInstallCost(copyAndResize(ItemComponent.mvcapacitor, 1))
.addBaseProperty(ModularCommon.MAXIMUM_ENERGY, 100000, "J")
@ -208,7 +213,7 @@ public class Config {
.addTradeoffProperty("Battery Size", ModularCommon.WEIGHT, 8000);
ModuleManager.addModule(module);
module = new PowerModule(ModularCommon.MODULE_BATTERY_ELITE, ALLITEMS, MuseIcon.BATTERY_FULL, ModularCommon.CATEGORY_ENERGY)
module = new PowerModule(ModularCommon.MODULE_BATTERY_ELITE, ALLITEMS, MuseIcon.BATTERYCRYSTAL, ModularCommon.CATEGORY_ENERGY)
.setDescription("Integrate a the most advanced battery to store an extensive amount of energy.")
.addInstallCost(copyAndResize(ItemComponent.hvcapacitor, 1))
.addBaseProperty(ModularCommon.MAXIMUM_ENERGY, 750000, "J")
@ -223,27 +228,17 @@ public class Config {
.addInstallCost(new ItemStack(Item.diamond, 3));
ModuleManager.addModule(module);
module = new PowerModule(ModularCommon.MODULE_RED_TINT, ARMORONLY, MuseIcon.PLATE_2_RED, ModularCommon.CATEGORY_COSMETIC)
.setDescription("Give your armor some red tinting. Combine with the other cosmetic modules to customize your armor's appearance.")
.addInstallCost(new ItemStack(Item.dyePowder, 1, 1))
.addTradeoffProperty("Intensity", ModularCommon.MODULE_RED_TINT, 1, "%");
ModuleManager.addModule(module);
module = new PowerModule(ModularCommon.MODULE_GREEN_TINT, ARMORONLY, MuseIcon.PLATE_2_GREEN, ModularCommon.CATEGORY_COSMETIC)
.setDescription("Give your armor some green tinting. Combine with the other cosmetic modules to customize your armor's appearance.")
.addInstallCost(new ItemStack(Item.dyePowder, 1, 2))
.addTradeoffProperty("Intensity", ModularCommon.MODULE_GREEN_TINT, 1, "%");
ModuleManager.addModule(module);
module = new PowerModule(ModularCommon.MODULE_BLUE_TINT, ARMORONLY, MuseIcon.PLATE_2_BLUE, ModularCommon.CATEGORY_COSMETIC)
.setDescription("Give your armor some blue tinting. Combine with the other cosmetic modules to customize your armor's appearance.")
.addInstallCost(new ItemStack(Item.dyePowder, 1, 4))
.addTradeoffProperty("Intensity", ModularCommon.MODULE_BLUE_TINT, 1, "%");
module = new PowerModule(ModularCommon.MODULE_TINT, ARMORONLY, MuseIcon.NETHERSTAR, ModularCommon.CATEGORY_COSMETIC)
.setDescription("Give your armor some coloured tinting to customize your armor's appearance.")
.addInstallCost(copyAndResize(ItemComponent.laserHologram, 1))
.addTradeoffProperty("Red Intensity", ModularCommon.RED_TINT, 1, "%")
.addTradeoffProperty("Green Intensity", ModularCommon.GREEN_TINT, 1, "%")
.addTradeoffProperty("Blue Intensity", ModularCommon.BLUE_TINT, 1, "%");
ModuleManager.addModule(module);
module = new PowerModule(ModularCommon.MODULE_TRANSPARENT_ARMOR, ARMORONLY, MuseIcon.TRANSPARENT_ARMOR, ModularCommon.CATEGORY_COSMETIC)
.setDescription("Make the item transparent, so you can show off your skin without losing armor.")
.addInstallCost(new ItemStack(Block.glass, 3));
.addInstallCost(copyAndResize(ItemComponent.laserHologram, 1));
ModuleManager.addModule(module);
module = new PowerModule(ModularCommon.MODULE_SPRINT_ASSIST, LEGSONLY, MuseIcon.SPRINT_ASSIST, ModularCommon.CATEGORY_MOVEMENT)
@ -266,6 +261,10 @@ public class Config {
module, "Power",
ModularCommon.JUMP_ENERGY_CONSUMPTION, "J", 0, 5,
ModularCommon.JUMP_MULTIPLIER, "%", 1, 4);
ModuleManager.addSimpleTradeoff(
module, "Compensation",
ModularCommon.JUMP_ENERGY_CONSUMPTION, "J", 0, 1,
ModularCommon.JUMP_FOOD_COMPENSATION, "%", 0, 1);
ModuleManager.addModule(module);
module = new PowerModule(ModularCommon.MODULE_SHOCK_ABSORBER, FEETONLY, MuseIcon.SHOCK_ABSORBER, ModularCommon.CATEGORY_MOVEMENT)
@ -322,7 +321,7 @@ public class Config {
.addTradeoffProperty("Power", ModularCommon.UNDERWATER_HARVEST_SPEED, 0.8);
ModuleManager.addModule(module);
module = new PowerModule(ModularCommon.MODULE_SWIM_BOOST, LEGSONLY, MuseIcon.INDICATOR_1_BLUE, ModularCommon.CATEGORY_AQUATIC)
module = new PowerModule(ModularCommon.MODULE_SWIM_BOOST, LEGSONLY, MuseIcon.SWIM_BOOST, ModularCommon.CATEGORY_AQUATIC)
.setDescription(
"By refitting an ion thruster for underwater use, you may be able to add extra forward (or backward) thrust when underwater.")
.addInstallCost(copyAndResize(ItemComponent.ionThruster, 1))
@ -331,7 +330,7 @@ public class Config {
.addTradeoffProperty("Thrust", ModularCommon.SWIM_BOOST_AMOUNT, 1, "m/s");
ModuleManager.addModule(module);
module = new PowerModule(ModularCommon.MODULE_CLIMB_ASSIST, LEGSONLY, MuseIcon.GO_FAST, ModularCommon.CATEGORY_MOVEMENT)
module = new PowerModule(ModularCommon.MODULE_CLIMB_ASSIST, LEGSONLY, MuseIcon.INDICATOR_1_BLUE, ModularCommon.CATEGORY_MOVEMENT)
.setDescription("A pair of dedicated servos allow you to effortlessly step up 1m-high ledges.")
.addInstallCost(copyAndResize(ItemComponent.servoMotor, 2));
ModuleManager.addModule(module);
@ -413,4 +412,22 @@ public class Config {
public static Configuration getConfig() {
return config;
}
public static boolean doAdditionalInfo() {
if(FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT){
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
return true;
}
}
return false;
}
public static Object additionalInfoInstructions() {
String message = "Press SHIFT for more information.";
message = MuseStringUtils.wrapMultipleFormatTags(
message,
MuseStringUtils.FormatCodes.Grey,
MuseStringUtils.FormatCodes.Italic);
return message;
}
}

View file

@ -1,6 +1,7 @@
package net.machinemuse.powersuits.common;
import net.machinemuse.powersuits.block.BlockTinkerTable;
import net.machinemuse.powersuits.client.KeybindKeyHandler;
import net.machinemuse.powersuits.event.EventHandler;
import net.machinemuse.powersuits.event.MovementManager;
import net.machinemuse.powersuits.item.ItemComponent;
@ -36,7 +37,7 @@ import cpw.mods.fml.common.network.NetworkRegistry;
// Informs forge that this is a base mod class, and gives it some info for the
// FML mod list. This is also where it looks to see if your client's version
// matches the server's.
@Mod(modid = "mmmPowersuits", name = "MachineMuse's Modular Powersuits", version = "0.1.10")
@Mod(modid = "mmmPowersuits", name = "MachineMuse's Modular Powersuits", version = "0.1.37")
// Informs forge of the requirements:
//
// clientSideRequired means players can't connect without it. True for things
@ -120,6 +121,7 @@ public class PowersuitsMod {
tinkerTable = new BlockTinkerTable();
components = new ItemComponent();
components.populate();
Config.loadPowerModules();
@ -139,5 +141,6 @@ public class PowersuitsMod {
public void postInit(FMLPostInitializationEvent event) {
proxy.postInit();
RecipeManager.addRecipes();
Config.getConfig().save();
}
}

View file

@ -1,5 +1,6 @@
package net.machinemuse.powersuits.common;
import gregtechmod.api.GregTech_API;
import ic2.api.Ic2Recipes;
import net.machinemuse.powersuits.item.ItemComponent;
import net.minecraft.block.Block;
@ -28,11 +29,38 @@ public class RecipeManager {
ItemStack glass = new ItemStack(Block.glass);
ItemStack glowstone = new ItemStack(Item.lightStoneDust);
ItemStack emerald = new ItemStack(Item.emerald);
ItemStack lapis = new ItemStack(Item.dyePowder, 1, 4); // metadata 4 =
// 'blue'
ItemStack diamond = new ItemStack(Item.diamond);
ItemStack lapis = new ItemStack(Item.dyePowder, 1, 4);
ItemStack rosered = new ItemStack(Item.dyePowder, 1, 1);
ItemStack cactusgreen = new ItemStack(Item.dyePowder, 1, 2);
ItemStack enderPearl = new ItemStack(Item.enderPearl);
if (ModCompatability.vanillaRecipesEnabled()) {
GameRegistry.addRecipe(ItemComponent.basicPlating,
"II",
"CI",
"II",
'C', ItemComponent.wiring,
'I', iron);
GameRegistry.addRecipe(ItemComponent.advancedPlating,
"II",
"CI",
"II",
'C', ItemComponent.solenoid,
'I', diamond);
GameRegistry.addRecipe(ItemComponent.laserHologram,
"YTG",
"TWT",
"BTR",
'W', ItemComponent.wiring,
'T', glass,
'Y', glowstone,
'G', cactusgreen,
'B', lapis,
'R', rosered);
GameRegistry.addRecipe(new ItemStack(PowersuitsMod.tinkerTable),
"ILI",
"LEL",
@ -114,17 +142,60 @@ public class RecipeManager {
"EIE",
'I', iron, 'E', ItemComponent.solenoid, 'W', ItemComponent.wiring);
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true,
"SES",
"ESE",
"SES",
'S', ItemComponent.solenoid,
'E', enderPearl));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.controlCircuit, true,
"WGW",
"LWL",
"WGW",
'W', ItemComponent.wiring,
'G', glass,
'L', lapis));
GameRegistry.addRecipe(ItemComponent.ionThruster,
" EE",
" FE",
"IG ",
"IEE",
'I', iron, 'E', ItemComponent.solenoid, 'G', glowstone);
"IFE",
'I', iron,
'E', ItemComponent.solenoid,
'G', glowstone,
'F', ItemComponent.fieldEmitter);
}
if (ModCompatability.UERecipesEnabled()) {
String basicCircuit = "basicCircuit";
String advancedCircuit = "advancedCircuit";
String eliteCircuit = "eliteCircuit";
ItemStack lapisBlock = new ItemStack(Block.blockLapis);
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.laserHologram, true,
"YTG",
"TWT",
"BTR",
'W', ItemComponent.wiring,
'T', glass,
'Y', glowstone,
'G', cactusgreen,
'B', lapis,
'R', rosered));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.basicPlating, true,
"II",
"CI",
"II",
'C', basicCircuit,
'I', "plateSteel"));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.advancedPlating, true,
"II",
"CI",
"II",
'C', advancedCircuit,
'I', diamond));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(PowersuitsMod.tinkerTable), true,
"ILI",
@ -197,10 +268,24 @@ public class RecipeManager {
" C ",
"EIE", 'I', iron, 'E', ItemComponent.solenoid, 'C', "basicCircuit"));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true,
"SES",
"ECE",
"SES",
'S', ItemComponent.solenoid,
'E', enderPearl,
'C', "advancedCircuit"));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.ionThruster, true,
" EE",
" FE",
"CG ",
"IEE", 'I', "plateSteel", 'E', ItemComponent.solenoid, 'G', glowstone, 'C', "advancedCircuit"));
"IFE",
'I',
"plateSteel",
'E', ItemComponent.solenoid,
'G', glowstone,
'C', "advancedCircuit",
'F', ItemComponent.fieldEmitter));
}
if (ModCompatability.IC2RecipesEnabled()) {
circuit = ModCompatability.getIC2Item("electronicCircuit").copy();
@ -213,9 +298,33 @@ public class RecipeManager {
ItemStack energyCrystal = ModCompatability.getIC2Item("energyCrystal").copy();
ItemStack lapotronCrystal = ModCompatability.getIC2Item("lapotronCrystal").copy();
ItemStack iridiumOre = ModCompatability.getIC2Item("iridiumOre").copy();
ItemStack carbonFiber = ModCompatability.getIC2Item("carbonPlate").copy();
ItemStack carbonPlate = ModCompatability.getIC2Item("carbonPlate").copy();
ItemStack machine = ModCompatability.getIC2Item("machine").copy();
ItemStack advMachine = ModCompatability.getIC2Item("advancedMachine").copy();
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.laserHologram, true,
"YTG",
"TWT",
"BTR",
'W', ItemComponent.wiring,
'T', glass,
'Y', glowstone,
'G', cactusgreen,
'B', lapis,
'R', rosered));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.basicPlating, true,
"II",
"CI",
"II",
'C', circuit,
'I', "ingotRefinedIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.advancedPlating, true,
"II",
"CI",
"II",
'C', advCircuit,
'I', diamond));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(PowersuitsMod.tinkerTable), true,
"E",
@ -283,7 +392,7 @@ public class RecipeManager {
" CC",
"CCI",
"C ",
'C', carbonFiber.copy(),
'C', carbonPlate.copy(),
'I', ItemComponent.solenoid));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.servoMotor, true,
@ -291,6 +400,14 @@ public class RecipeManager {
"EME",
'M', machine.copy(), 'E', ItemComponent.solenoid, 'W', circuit.copy()));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true,
"SES",
"ECE",
"SES",
'S', ItemComponent.solenoid,
'E', enderPearl,
'C', advCircuit));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.ionThruster, true,
" EE",
"MG ",
@ -305,103 +422,178 @@ public class RecipeManager {
// This means Gregtech is installed, and GregoriusT in his infinite
// wisdom has registered literally everything in the universe with
// the ore dictionary, so we can just use strings here :D ...once we decide what to put.
circuit = ModCompatability.getIC2Item("electronicCircuit");
ItemStack advCircuit = ModCompatability.getIC2Item("advancedCircuit");
gold = ModCompatability.getIC2Item("goldCableItem");
String refIron = "ingotRefinedIron";
String tin = "ingotTin";
String copper = "ingotCopper";
ItemStack reBattery = ModCompatability.getIC2Item("reBattery").copy();
ItemStack energyCrystal = ModCompatability.getIC2Item("energyCrystal").copy();
ItemStack lapotronCrystal = ModCompatability.getIC2Item("lapotronCrystal").copy();
String computerMonitor = "monitorTier02";
String advancedCircuit = "circuitTier04";
String refinedIron = "ingotRefinedIron";
String advancedMachine = "rawMachineTier02";
String dataStorageCircuit = "circuitTier05";
String energyFlowCircuit = "circuitTier07";
String machineParts = "itemMachineParts";
String nitrogen = "molecule_1n";
ItemStack neutronReflector = GregTech_API.getGregTechItem(40, 1, 0);;
String advancedHeatVent = "item.reactorVentDiamond";
ItemStack carbonPlate = ModCompatability.getIC2Item("carbonPlate").copy();
ItemStack uninsulatedCopper = ModCompatability.getIC2Item("copperCableItem").copy();
ItemStack luminator = ModCompatability.getIC2Item("luminator").copy();
ItemStack iridiumOre = ModCompatability.getIC2Item("iridiumOre");
ItemStack carbonFiber = ModCompatability.getIC2Item("carbonPlate");
ItemStack machine = ModCompatability.getIC2Item("machine");
ItemStack advMachine = ModCompatability.getIC2Item("advancedMachine");
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.laserHologram, true,
"LLL",
"RGB",
"LLL",
'L', luminator,
'R', "gemRuby",
'G', "gemGreenSapphire",
'B', "gemSapphire"));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.basicPlating, true,
"II",
"CI",
"II",
'C', advancedCircuit,
'I', "ingotTitanium"));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.advancedPlating, true,
"II",
"CI",
"II",
'C', dataStorageCircuit,
'I', "plateIridium"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(PowersuitsMod.tinkerTable), true,
"E", "C", "M",
'E', "gemEmerald", 'C', "circuitTier04", 'M', "rawMachineTier02"));
"CVC",
"IEI",
"IMI",
'C', advancedCircuit,
'E', emerald,
'V', computerMonitor,
'I', refinedIron,
'M', advancedMachine));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(PowersuitsMod.powerArmorHead), true,
"III",
"C C",
'I', refIron, 'C', circuit.copy()));
"ACA",
"MVM",
'A', "ingotAluminium",
'C', dataStorageCircuit,
'M', machineParts,
'V', computerMonitor));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(PowersuitsMod.powerArmorTorso), true,
"I I",
"CIC",
"III",
'I', refIron, 'C', circuit.copy()));
"AMA",
"ACA",
"AAA",
'A', "ingotAluminium",
'C', dataStorageCircuit,
'M', machineParts));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(PowersuitsMod.powerArmorLegs), true,
"III",
"C C",
"I I",
'I', refIron, 'C', circuit.copy()));
"MCM",
"A A",
"A A",
'A', "ingotAluminium",
'C', dataStorageCircuit,
'M', machineParts));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(PowersuitsMod.powerArmorFeet), true,
"C C",
"I I",
'I', refIron, 'C', circuit.copy()));
"M M",
"ACA",
'A', "ingotAluminium",
'C', dataStorageCircuit,
'M', machineParts));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(PowersuitsMod.powerTool), true,
"A A",
"AMA",
" C ",
"CI ",
" IC",
'I', refIron, 'C', circuit.copy()));
'A', "ingotAluminium",
'C', dataStorageCircuit,
'M', machineParts));
GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(ItemComponent.wiring, 2), true,
"GRG", 'G', gold.copy(), 'R', redstone));
"CCC",
"SSS",
"CCC",
'C', uninsulatedCopper,
'S', "ingotSilver"));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.parachute, true,
"WWW", "S S", 'W', wool, 'S', string));
"WWW",
"S S",
"CNC",
'W', wool,
'S', string,
'C', carbonPlate,
'N', nitrogen));
Ic2Recipes.addCraftingRecipe(ItemComponent.lvcapacitor,
"WBW",
'W', ItemComponent.wiring.copy(),
'B', reBattery);
"IWI",
"IBI",
"IBI",
'W', ItemComponent.wiring,
'I', refinedIron,
'B', "100kEUStore"); // Lithium battery
Ic2Recipes.addCraftingRecipe(ItemComponent.mvcapacitor,
"WBW",
'W', ItemComponent.wiring.copy(),
'B', energyCrystal);
"IWI",
"IBI",
"IBI",
'W', ItemComponent.wiring,
'I', "ingotTitanium",
'B', "1kkEUStore"); // Lapotron crystal
Ic2Recipes.addCraftingRecipe(ItemComponent.hvcapacitor,
"WBW",
'W', ItemComponent.wiring.copy(),
'B', lapotronCrystal);
"IWI",
"IBI",
"IBI",
'W', ItemComponent.wiring,
'I', "ingotChrome",
'B', "10kkEUStore"); // Lapotronic EnergyOrb
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solenoid, true,
" W ",
"WIW",
" W ",
"WSW",
"WSW",
"WSW",
'W', ItemComponent.wiring,
'I', machine));
'S', "ingotSteel"));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.gliderWing, true,
" CC",
"CCI",
"C ",
'C', carbonFiber.copy(),
'I', ItemComponent.solenoid));
" MC",
"MPI",
"M ",
'P', carbonPlate,
'M', "plateMagnalium",
'I', ItemComponent.solenoid,
'C', advancedCircuit));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.servoMotor, true,
" W ",
"EME",
'M', machine.copy(), 'E', ItemComponent.solenoid, 'W', circuit.copy()));
"IBI",
"CSC",
"IBI",
'I', "ingotSteel",
'B', "ingotBrass",
'C', advancedCircuit,
'S', ItemComponent.solenoid));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true,
"ISI",
"CUC",
"ISI",
'I', "plateIridium",
'S', ItemComponent.solenoid,
'U', energyFlowCircuit,
'C', "itemSuperconductor"));
GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.ionThruster, true,
" EE",
"MG ",
"CEE",
'I', iron,
'E', ItemComponent.solenoid,
'G', glowstone,
'C', advCircuit.copy(),
'M', advMachine.copy()));
"ISI",
"FCF",
"N N",
'I', "plateIridium",
'S', "itemSuperconductor",
'N', neutronReflector,
'C', ItemComponent.hvcapacitor,
'F', ItemComponent.fieldEmitter));
}
}
}

View file

@ -3,9 +3,12 @@ package net.machinemuse.powersuits.event;
import java.util.HashMap;
import java.util.Map;
import net.machinemuse.powersuits.common.MuseLogger;
import net.machinemuse.powersuits.item.ItemPowerArmor;
import net.machinemuse.powersuits.item.ItemUtils;
import net.machinemuse.powersuits.item.ModularCommon;
import net.machinemuse.powersuits.network.MusePacket;
import net.machinemuse.powersuits.network.packets.MusePacketPlayerUpdate;
import net.machinemuse.powersuits.powermodule.ModuleManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@ -41,6 +44,14 @@ public class MovementManager {
if (drain < avail) {
ItemUtils.drainPlayerEnergy(player, drain);
setPlayerJumpTicks(player, jumpAssist);
double jumpCompensationRatio = ModuleManager.computeModularProperty(stack, ModularCommon.JUMP_FOOD_COMPENSATION);
MuseLogger.logDebug("Jumped");
if (player.isSprinting()) {
player.getFoodStats().addExhaustion((float) (-0.8 * jumpCompensationRatio));
} else {
player.getFoodStats().addExhaustion((float) (-0.2 * jumpCompensationRatio));
}
}
}

View file

@ -16,6 +16,7 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
public class ItemComponent extends Item {
public static List<Integer> icons;
public static List<String> names;
public static List<String> descriptions;
public static ItemStack wiring;
public static ItemStack solenoid;
@ -27,6 +28,12 @@ public class ItemComponent extends Item {
public static ItemStack mvcapacitor;
public static ItemStack hvcapacitor;
public static ItemStack evcapacitor;
public static ItemStack basicPlating;
public static ItemStack advancedPlating;
public static ItemStack fieldEmitter;
public static ItemStack laserHologram;
public static ItemStack carbonMyofiber;
public static ItemStack controlCircuit;
public ItemComponent() {
super(Config.getAssignedItemID(Config.Items.PowerArmorComponent));
@ -35,40 +42,54 @@ public class ItemComponent extends Item {
this.setCreativeTab(Config.getCreativeTab());
icons = new ArrayList();
names = new ArrayList();
descriptions = new ArrayList();
}
public ItemStack addComponent(String name, MuseIcon icon) {
names.add(name);
public ItemStack addComponent(String oredictName, String englishName, String description, MuseIcon icon) {
names.add(oredictName);
icons.add(icon.getIconIndex());
descriptions.add(description);
this.setTextureFile(icon.getTexturefile());
ItemStack stack = new ItemStack(this, 1, names.size() - 1);
LanguageRegistry.addName(stack, name);
LanguageRegistry.addName(stack, englishName);
return stack;
}
public void addInformation(ItemStack stack, EntityPlayer player, List currentTipList, boolean advancedToolTips) {
currentTipList.add(
MuseStringUtils.wrapMultipleFormatTags(
"Power Armor Component",
MuseStringUtils.FormatCodes.Grey,
MuseStringUtils.FormatCodes.Italic));
currentTipList.add(
MuseStringUtils.wrapMultipleFormatTags(
"For use in Tinker Table",
MuseStringUtils.FormatCodes.Grey,
MuseStringUtils.FormatCodes.Italic));
if(Config.doAdditionalInfo()){
String message = "For use in Tinker Table.";
message = MuseStringUtils.wrapMultipleFormatTags(
message,
MuseStringUtils.FormatCodes.Grey,
MuseStringUtils.FormatCodes.Italic);
currentTipList.add(message);
int damage = stack.getItemDamage();
if( damage < descriptions.size()) {
String description = descriptions.get(damage);
currentTipList.addAll(MuseStringUtils.wrapStringToLength(description, 30));
}
} else {
currentTipList.add(Config.additionalInfoInstructions());
}
}
public void populate() {
wiring = addComponent("Wiring", MuseIcon.COMPONENT_WIRING);
solenoid = addComponent("Solenoid", MuseIcon.COMPONENT_SOLENOID);
servoMotor = addComponent("Servo Motor", MuseIcon.COMPONENT_SERVOMOTOR);
gliderWing = addComponent("Glider Wing", MuseIcon.COMPONENT_GLIDERWING);
ionThruster = addComponent("Ion Thruster", MuseIcon.COMPONENT_IONTHRUSTER);
lvcapacitor = addComponent("LV Capacitor", MuseIcon.COMPONENT_LVCAPACITOR);
mvcapacitor = addComponent("MV Capacitor", MuseIcon.COMPONENT_MVCAPACITOR);
hvcapacitor = addComponent("HV Capacitor", MuseIcon.COMPONENT_HVCAPACITOR);
parachute = addComponent("Parachute", MuseIcon.COMPONENT_PARACHUTE);
// NOTE: Only add to end otherwise people's IDs will get screwed up n.n'
wiring = addComponent("componentWiring", "Wiring", "A special type of wiring with high voltaic capacity and precision, necessary for the sensitive electronics in power armor.", MuseIcon.WIRING);
solenoid = addComponent("componentSolenoid", "Solenoid","Wires wound around a ferromagnetic core produces a basic electromagnet.", MuseIcon.SOLENOID);
servoMotor = addComponent("componentServo", "Servo Motor", "A special type of motor which uses a pulse-modulated signal to enact very precise movements.", MuseIcon.SERVOMOTOR);
gliderWing = addComponent("componentGliderWing", "Glider Wing", "A lightweight aerodynamic wing with an electromagnet for quick deployment and retraction.", MuseIcon.GLIDERWING);
ionThruster = addComponent("componentIonThruster", "Ion Thruster", "Essentially a miniature particle accelerator. Accelerates ions to near-light speed to produce thrust.", MuseIcon.IONTHRUSTER);
lvcapacitor = addComponent("componentLVCapacitor", "LV Capacitor", "A simple capacitor can store and discharge small amounts of energy rapidly.", MuseIcon.LVCAPACITOR);
mvcapacitor = addComponent("componentMVCapacitor", "MV Capacitor","A more advanced capacitor which can store more energy at higher voltages.", MuseIcon.MVCAPACITOR);
hvcapacitor = addComponent("componentHVCapacitor", "HV Capacitor", "A synthetic crystal device which can store and release massive amounts of energy.", MuseIcon.HVCAPACITOR);
parachute = addComponent("componentParachute", "Parachute", "A simple reusable parachute which can be deployed and recovered in midair.", MuseIcon.PARACHUTE);
basicPlating = addComponent("componentPlatingBasic", "Basic Plating", "Some carefully-arranged metal armor plates.", MuseIcon.IRON_PLATING);
advancedPlating = addComponent("componentPlatingAdvanced", "Advanced Plating","Some carefully-arranged armor plates of a rare and stronger material", MuseIcon.DIAMOND_PLATING);
fieldEmitter = addComponent("componentFieldEmitter", "Force Field Emitter","An advanced device which directly manipulates electromagnetic and gravitational fields in an area.", MuseIcon.FIELD_EMITTER);
laserHologram = addComponent("componentLaserEmitter", "Hologram Emitter", "A multicoloured laser array which can cheaply alter the appearance of something.", MuseIcon.NETHERSTAR);
carbonMyofiber = addComponent("componentCarbonMyofiber", "Carbon Myofiber", "An artificial muscle with less range of movement but more strength than human muscles.", MuseIcon.NEXUS_1_BLUE);
controlCircuit = addComponent("controlCircuit", "Control Circuit", "A simple networkable microcontroller for coordinating an individual component.", MuseIcon.CIRCUIT);
}
/**

View file

@ -120,9 +120,9 @@ public abstract class ItemPowerArmor extends ItemArmor
}
public Colour getColorFromItemStack(ItemStack stack) {
double computedred = ModuleManager.computeModularProperty(stack, ModularCommon.MODULE_RED_TINT);
double computedgreen = ModuleManager.computeModularProperty(stack, ModularCommon.MODULE_GREEN_TINT);
double computedblue = ModuleManager.computeModularProperty(stack, ModularCommon.MODULE_BLUE_TINT);
double computedred = ModuleManager.computeModularProperty(stack, ModularCommon.RED_TINT);
double computedgreen = ModuleManager.computeModularProperty(stack, ModularCommon.GREEN_TINT);
double computedblue = ModuleManager.computeModularProperty(stack, ModularCommon.BLUE_TINT);
Colour colour = new Colour(
clampDouble(1 + computedred - (computedblue + computedgreen), 0, 1),
clampDouble(1 + computedgreen - (computedblue + computedred), 0, 1),
@ -159,9 +159,9 @@ public abstract class ItemPowerArmor extends ItemArmor
public boolean hasColor(ItemStack stack)
{
NBTTagCompound itemTag = ItemUtils.getMuseItemTag(stack);
if (ItemUtils.tagHasModule(itemTag, ModularCommon.MODULE_RED_TINT)
|| ItemUtils.tagHasModule(itemTag, ModularCommon.MODULE_GREEN_TINT)
|| ItemUtils.tagHasModule(itemTag, ModularCommon.MODULE_BLUE_TINT)) {
if (ItemUtils.tagHasModule(itemTag, ModularCommon.RED_TINT)
|| ItemUtils.tagHasModule(itemTag, ModularCommon.GREEN_TINT)
|| ItemUtils.tagHasModule(itemTag, ModularCommon.BLUE_TINT)) {
MuseLogger.logDebug("True!");
return true;
} else {
@ -268,7 +268,7 @@ public abstract class ItemPowerArmor extends ItemArmor
@Override
public double onUse(double joulesNeeded, ItemStack itemStack) {
return ModularCommon.onUse(joulesNeeded, itemStack);
return ModularCommon.discharge(joulesNeeded, itemStack);
}
@Override
@ -340,7 +340,7 @@ public abstract class ItemPowerArmor extends ItemArmor
joulesRequested = maxJoules / 200.0;
}
double currentJoules = ModularCommon.getJoules(stack);
double givenJoules = ModularCommon.onUse(joulesRequested, stack);
double givenJoules = ModularCommon.discharge(joulesRequested, stack);
if (simulate) {
ModularCommon.setJoules(currentJoules, stack);
}

View file

@ -299,7 +299,7 @@ public class ItemPowerTool extends ItemTool
@Override
public double onUse(double joulesNeeded, ItemStack itemStack) {
return ModularCommon.onUse(joulesNeeded, itemStack);
return ModularCommon.discharge(joulesNeeded, itemStack);
}
@Override
@ -363,7 +363,7 @@ public class ItemPowerTool extends ItemTool
double joulesRequested = ModCompatability.joulesFromEU(amount);
double currentJoules = ModularCommon.getJoules(stack);
double givenJoules = ModularCommon.onUse(joulesRequested, stack);
double givenJoules = ModularCommon.discharge(joulesRequested, stack);
if(simulate) {
ModularCommon.setJoules(currentJoules, stack);
}
@ -416,4 +416,8 @@ public class ItemPowerTool extends ItemTool
return 0;
}
public static MuseIcon getCurrentIconFor(ItemStack itemStack) {
return MuseIcon.TOOL_PICK;
}
}

View file

@ -1,13 +1,15 @@
package net.machinemuse.powersuits.item;
import java.util.LinkedList;
import java.util.List;
import net.machinemuse.general.MuseStringUtils;
import net.machinemuse.powersuits.common.Config;
import net.machinemuse.powersuits.powermodule.ModuleManager;
import net.machinemuse.powersuits.powermodule.PowerModule;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import universalelectricity.core.electricity.ElectricInfo;
public abstract class ModularCommon {
/**
@ -28,9 +30,10 @@ public abstract class ModularCommon {
public static final String BATTERY_WEIGHT = "Battery Weight";
public static final String SPRINT_ENERGY_CONSUMPTION = "Sprint Energy Consumption";
public static final String SPRINT_SPEED_MULTIPLIER = "Sprint Speed Multiplier";
public static final String SPRINT_FOOD_COMPENSATION = "Exhaustion Compensation";
public static final String SPRINT_FOOD_COMPENSATION = "Sprint Exhaustion Compensation";
public static final String JUMP_ENERGY_CONSUMPTION = "Jump Energy Consumption";
public static final String JUMP_MULTIPLIER = "Jump Multiplier";
public static final String JUMP_FOOD_COMPENSATION = "Jump Exhaustion Compensation";
public static final String SHOCK_ABSORB_MULTIPLIER = "Distance Reduction";
public static final String SHOCK_ABSORB_ENERGY_CONSUMPTION = "Impact Energy consumption";
public static final String JET_ENERGY_CONSUMPTION = "Jet Energy Consumption";
@ -40,6 +43,9 @@ public abstract class ModularCommon {
public static final String UNDERWATER_HARVEST_SPEED = "Underwater Harvest Speed";
public static final String SWIM_BOOST_AMOUNT = "Underwater Movement Boost";
public static final String SWIM_BOOST_ENERGY_CONSUMPTION = "Swim Boost Energy Consumption";
public static final String RED_TINT = "Red Tint";
public static final String GREEN_TINT = "Green Tint";
public static final String BLUE_TINT = "Blue Tint";
/**
* Module names
@ -50,7 +56,7 @@ public abstract class ModularCommon {
public static final String MODULE_BATTERY_BASIC = "Basic Battery";
public static final String MODULE_BATTERY_ADVANCED = "Advanced Battery";
public static final String MODULE_BATTERY_ELITE = "Elite Battery";
public static final String MODULE_IRON_PLATING = "Iron Plating";
public static final String MODULE_BASIC_PLATING = "Iron Plating";
public static final String MODULE_DIAMOND_PLATING = "Diamond Plating";
public static final String MODULE_ENERGY_SHIELD = "Energy Shield";
public static final String MODULE_DIAMOND_PICK_UPGRADE = "Diamond Drill Upgrade";
@ -65,9 +71,7 @@ public abstract class ModularCommon {
public static final String MODULE_ANTIGRAVITY = "Antigravity Drive";
public static final String MODULE_WATER_ELECTROLYZER = "Water Electrolyzer";
public static final String MODULE_AQUA_AFFINITY = "Aqua Affinity";
public static final String MODULE_RED_TINT = "Red Tint";
public static final String MODULE_GREEN_TINT = "Green Tint";
public static final String MODULE_BLUE_TINT = "Blue Tint";
public static final String MODULE_TINT = "Custom Colour Module";
public static final String MODULE_CLIMB_ASSIST = "Uphill Step Assist";
public static final String MODULE_SWIM_BOOST = "Swim Boost";
@ -110,11 +114,33 @@ public abstract class ModularCommon {
currentTipList.add(
MuseStringUtils.wrapMultipleFormatTags(energyinfo, MuseStringUtils.FormatCodes.Italic.character, MuseStringUtils.FormatCodes.Grey)
);
if (Config.doAdditionalInfo()) {
List<String> installed = ModularCommon.getItemInstalledModules(player, stack);
if (installed.size() == 0) {
String message = "No installed modules! This item is useless until you add some modules at a Tinker Table.";
currentTipList.addAll(MuseStringUtils.wrapStringToLength(message, 30));
} else {
currentTipList.add("Installed Modules:");
currentTipList.addAll(installed);
}
} else {
currentTipList.add(Config.additionalInfoInstructions());
}
}
// ///////////////////////////// //
// --- UNIVERSAL ELECTRICITY --- //
// ///////////////////////////// //
/**
* Provide energy to an item.
*
* @param joulesNeeded
* Amount to request (in UE Joules).
* @param itemStack
* Itemstack to request the energy from.
* @return Amount of joules provided by the item.
*/
public static double charge(double amount, ItemStack itemStack) {
double stored = getJoules(itemStack);
double capacity = getMaxJoules(itemStack) - stored;
@ -124,7 +150,16 @@ public abstract class ModularCommon {
return surplus;
}
public static double onUse(double joulesNeeded, ItemStack itemStack) {
/**
* Request energy from this item.
*
* @param joulesNeeded
* Amount to request (in UE Joules).
* @param itemStack
* Itemstack to request the energy from.
* @return Amount of joules provided by the item.
*/
public static double discharge(double joulesNeeded, ItemStack itemStack) {
NBTTagCompound itemProperties = ItemUtils.getMuseItemTag(itemStack);
double joulesAvail = getJoules(itemStack);
@ -167,4 +202,15 @@ public abstract class ModularCommon {
public static double getTotalWeight(ItemStack stack) {
return ModuleManager.computeModularProperty(stack, ModularCommon.WEIGHT);
}
public static List<String> getItemInstalledModules(EntityPlayer player, ItemStack stack) {
NBTTagCompound itemTag = ItemUtils.getMuseItemTag(stack);
List<String> modules = new LinkedList();
for (PowerModule module : ItemUtils.getValidModulesForItem(player, stack)) {
if (ItemUtils.tagHasModule(itemTag, module.getName())) {
modules.add(module.getName());
}
}
return modules;
}
}

View file

@ -43,14 +43,14 @@ public class PlayerTickHandlerClient implements ITickHandler {
if (side == Side.CLIENT && rawPlayer instanceof EntityClientPlayerMP) {
EntityClientPlayerMP player = (EntityClientPlayerMP) rawPlayer;
handleClient(player);
} else if((side == Side.SERVER) && (rawPlayer instanceof EntityPlayerMP)) {
} else if ((side == Side.SERVER) && (rawPlayer instanceof EntityPlayerMP)) {
EntityPlayerMP player = (EntityPlayerMP) rawPlayer;
handleServer(player);
}
}
public void handleClient(EntityClientPlayerMP player) {
}
public void handleClient(EntityClientPlayerMP player) {
ItemStack helmet = player.getCurrentArmor(3);
ItemStack torso = player.getCurrentArmor(2);
ItemStack pants = player.getCurrentArmor(1);
@ -62,12 +62,10 @@ public class PlayerTickHandlerClient implements ITickHandler {
double weightCapacity = 25000;
double totalEnergyDrain = 0;
double exhaustionAdjustment = 0;
double foodAdjustment = 0;
double landMovementFactor = 0.1;
double jumpMovementFactor = 0.02;
double horzMovement = Math.sqrt(player.motionX * player.motionX + player.motionZ * player.motionZ);
double exhaustion = Math.round(horzMovement * 100.0F) * 0.01;
Vec3 playerHorzFacing = player.getLookVec();
playerHorzFacing.yCoord = 0;
@ -131,7 +129,6 @@ public class PlayerTickHandlerClient implements ITickHandler {
}
}
} else {
// Jump Assist
if (hasJumpAssist && jumpkey) {
double multiplier = MovementManager.getPlayerJumpMultiplier(player);
if (multiplier > 0) {
@ -183,7 +180,8 @@ public class PlayerTickHandlerClient implements ITickHandler {
// Parachute
if (hasParachute && sneakkey && player.motionY < -0.1 && (!hasGlider || forwardkey <= 0)) {
double totalVelocity = Math.sqrt(horzMovement * horzMovement + player.motionY * player.motionY)*getWeightPenaltyRatio(totalWeight, weightCapacity);
double totalVelocity = Math.sqrt(player.motionX * player.motionX + player.motionZ * player.motionZ + player.motionY * player.motionY)
* getWeightPenaltyRatio(totalWeight, weightCapacity);
if (totalVelocity > 0) {
player.motionX = player.motionX * 0.1 / totalVelocity;
player.motionY = player.motionY * 0.1 / totalVelocity;
@ -193,6 +191,9 @@ public class PlayerTickHandlerClient implements ITickHandler {
// Sprint assist
if (hasSprintAssist && player.isSprinting()) {
double horzMovement = Math.sqrt(player.motionX * player.motionX + player.motionZ * player.motionZ);
double exhaustion = Math.round(horzMovement * 100.0F) * 0.01;
double sprintCost = ModuleManager.computeModularProperty(pants, ModularCommon.SPRINT_ENERGY_CONSUMPTION);
if (sprintCost + totalEnergyDrain < totalEnergy) {
double sprintMultiplier = ModuleManager.computeModularProperty(pants, ModularCommon.SPRINT_SPEED_MULTIPLIER);
@ -200,7 +201,7 @@ public class PlayerTickHandlerClient implements ITickHandler {
totalEnergyDrain += sprintCost;
player.landMovementFactor *= sprintMultiplier;
exhaustionComp += -0.01 * exhaustion * exhaustionComp;
foodAdjustment += 0.01 * exhaustion * exhaustionComp;
}
}
}
@ -216,20 +217,21 @@ public class PlayerTickHandlerClient implements ITickHandler {
ItemUtils.givePlayerEnergy(player, -totalEnergyDrain);
}
player.addExhaustion((float) (exhaustionAdjustment));
player.getFoodStats().addExhaustion((float) (-foodAdjustment));
// Weight movement penalty
if (totalWeight > weightCapacity) {
player.motionX *= weightCapacity / totalWeight;
player.motionZ *= weightCapacity / totalWeight;
}
MusePacket packet = new MusePacketPlayerUpdate(player, -totalEnergyDrain, exhaustionAdjustment);
MusePacket packet = new MusePacketPlayerUpdate(player, -totalEnergyDrain, -foodAdjustment);
player.sendQueue.addToSendQueue(packet.getPacket250());
}
public void handleServer(EntityPlayerMP player) {
}
public static double getWeightPenaltyRatio(double currentWeight, double capacity) {