Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: 7ff742edc5
...
compare: 7fd371b9de
  • 14 commits
  • 42 files changed
  • 0 commit comments
  • 1 contributor
Showing with 739 additions and 612 deletions.
  1. +3 −1 .gitignore
  2. +20 −4 README.txt
  3. BIN  project/lib/jinput.jar
  4. BIN  project/lib/lwjgl-source-2.7.1.zip
  5. BIN  project/lib/lwjgl.jar
  6. BIN  project/lib/lwjgl_util.jar
  7. BIN  project/lib/minecraft-dev124-lib.jar
  8. BIN  project/lib/minecraft-dev124-mlmp-lib.jar
  9. BIN  project/lib/minecraft_server-dev124-lib.jar
  10. BIN  project/lib/minecraft_server-dev124-mlmp-lib.jar
  11. BIN  project/resources/thx/helicopter-alt.png
  12. BIN  project/resources/thx/helicopter.png
  13. BIN  project/resources/thx/rocket.png
  14. +11 −2 project/src-thx/client/net/minecraft/src/ThxConfig.java
  15. +18 −11 project/src-thx/client/net/minecraft/src/ThxEntityHelicopter.java
  16. +2 −32 project/src-thx/client/net/minecraft/src/ThxEntityMissile.java
  17. +4 −18 project/src-thx/client/net/minecraft/src/ThxEntityRocket.java
  18. +14 −100 project/src-thx/client/net/minecraft/src/ThxModelHelicopter.java
  19. +63 −36 project/src-thx/client/net/minecraft/src/ThxModelHelicopterAlt.java
  20. +77 −0 project/src-thx/client/net/minecraft/src/ThxModelHelicopterBase.java
  21. +3 −1 project/src-thx/client/net/minecraft/src/ThxModelMissile.java
  22. +2 −2 project/src-thx/client/net/minecraft/src/mod_Thx.java
  23. +15 −3 project/src-thx/common/net/minecraft/src/ThxConfigBase.java
  24. +9 −4 project/src-thx/common/net/minecraft/src/ThxEntity.java
  25. +116 −46 project/src-thx/common/net/minecraft/src/ThxEntityHelicopterBase.java
  26. +44 −118 project/src-thx/common/net/minecraft/src/ThxEntityMissileBase.java
  27. +195 −0 project/src-thx/common/net/minecraft/src/ThxEntityProjectile.java
  28. +33 −194 project/src-thx/common/net/minecraft/src/ThxEntityRocketBase.java
  29. +1 −2  project/src-thx/server/net/minecraft/src/EntityTrackerEntry.java
  30. +11 −0 project/src-thx/server/net/minecraft/src/ThxConfig.java
  31. +7 −3 project/src-thx/server/net/minecraft/src/ThxEntityHelicopter.java
  32. +2 −2 project/src-thx/server/net/minecraft/src/ThxEntityMissile.java
  33. +0 −9 project/src-thx/server/net/minecraft/src/ThxEntityRocket.java
  34. +3 −5 project/src-thx/server/net/minecraft/src/mod_Thx.java
  35. +11 −6 project_client/.classpath
  36. +18 −5 project_client/.project
  37. 0  project_client/build.xml
  38. +17 −0 project_client/project_client_debug.launch
  39. +4 −3 project_server/.classpath
  40. +18 −5 project_server/.project
  41. 0  project_server/build.xml
  42. +18 −0 project_server/project_server_debug.launch
View
4 .gitignore 100644 → 100755
@@ -1,3 +1,5 @@
+.metadata/
project_client/temp/
+project_client/debug.log
project_server/temp/
-.metadata/
+project_server/debug.log
View
24 README.txt 100755 → 100644
@@ -1,17 +1,17 @@
-Minecraft THX Helicopter Mod, v017 for Minecraft 1.2.5, 20120417, mod_thx-mc125_v017
+Minecraft THX Helicopter Mod, v018 for mc125 with MLMP, 20120517, mod_thx-mc125_v018
INTRODUCTION
------------
-This version is v017 for use with Minecraft and ModLoader/MP 1.2.5 for both single- and multi-player.
+This version is v018 for use with Minecraft and ModLoader/MP 1.2.5 for both single- and multi-player.
You can download the compiled binary zip files from GitHub:
- https://github.com/downloads/theoxylo/minecraft_mod_thx/mod_thx_helicopter_CLIENT_mc125_v017.zip
+ https://github.com/downloads/theoxylo/minecraft_mod_thx/mod_thx_helicopter_CLIENT_mc125_v018.zip
- https://github.com/downloads/theoxylo/minecraft_mod_thx/mod_thx_helicopter_SERVER_mc125_v017.zip
+ https://github.com/downloads/theoxylo/minecraft_mod_thx/mod_thx_helicopter_SERVER_mc125_v018.zip
And you can download the exact ModLoader and ModLoaderMP files you need from their respective download links (not affiliated with this mod):
@@ -144,6 +144,22 @@ Official YouTube playlist:
CHANGELOG
---------
+v018: still for use with Minecraft and ModLoader/MP 1.2.5
+v018: added ower support to missile (e.g. xp)
+v018: added improved projectile hit detection
+v018: added remote detonation to missile
+v018: added entity on fire for direct missile hit
+v018: added splash damage for missile and rocket
+v018: added damage to helicopter from fire
+v018: added damage display when critical
+v018: added more powerful missile explosion but without fire
+v018: added rocket attack for friendly ai
+v018: added defend mode for friendly ai
+v018: added more missiles fired by ai
+v018: added surrender for critically damaged ai
+v018: changed client config file to 'mod_thx_options.txt'
+v018: changed server config file to 'mod_thx_options.cfg'
+
v017: now for use with Minecraft and ModLoader 1.2.5
v017: added basic ai for friendly and enemy drones
View
BIN  project/lib/jinput.jar
Binary file not shown
View
BIN  project/lib/lwjgl-source-2.7.1.zip
Binary file not shown
View
BIN  project/lib/lwjgl.jar
Binary file not shown
View
BIN  project/lib/lwjgl_util.jar
Binary file not shown
View
BIN  project/lib/minecraft-dev124-lib.jar
Binary file not shown
View
BIN  project/lib/minecraft-dev124-mlmp-lib.jar
Binary file not shown
View
BIN  project/lib/minecraft_server-dev124-lib.jar
Binary file not shown
View
BIN  project/lib/minecraft_server-dev124-mlmp-lib.jar
Binary file not shown
View
BIN  project/resources/thx/helicopter-alt.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  project/resources/thx/helicopter.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  project/resources/thx/rocket.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
13 project/src-thx/client/net/minecraft/src/ThxConfig.java
@@ -5,6 +5,17 @@
public class ThxConfig extends ThxConfigBase
{
+ ThxConfig()
+ {
+ loadProperties();
+ }
+
+ @Override
+ String getFilename()
+ {
+ return ModLoader.getMinecraftInstance().getMinecraftDir() + "/mods/mod_thx_options.txt";
+ }
+
@Override
boolean loadDefaults(Properties props)
{
@@ -22,8 +33,6 @@ boolean loadDefaults(Properties props)
defaultAdded = ensureDefault(props, "key_right", Keyboard.getKeyName(Keyboard.KEY_D)) || defaultAdded;
defaultAdded = ensureDefault(props, "key_rotate_left", Keyboard.getKeyName(Keyboard.KEY_G)) || defaultAdded;
defaultAdded = ensureDefault(props, "key_rotate_right", Keyboard.getKeyName(Keyboard.KEY_H)) || defaultAdded;
- defaultAdded = ensureDefault(props, "key_fire_missile", Keyboard.getKeyName(Keyboard.KEY_M)) || defaultAdded;
- defaultAdded = ensureDefault(props, "key_fire_rocket", Keyboard.getKeyName(Keyboard.KEY_R)) || defaultAdded;
defaultAdded = ensureDefault(props, "key_rocket_reload", Keyboard.getKeyName(Keyboard.KEY_I)) || defaultAdded;
defaultAdded = ensureDefault(props, "key_look_pitch", Keyboard.getKeyName(Keyboard.KEY_L)) || defaultAdded;
defaultAdded = ensureDefault(props, "key_auto_level", Keyboard.getKeyName(Keyboard.KEY_K)) || defaultAdded;
View
29 project/src-thx/client/net/minecraft/src/ThxEntityHelicopter.java
@@ -18,8 +18,6 @@
static int KEY_RIGHT = Keyboard.getKeyIndex(mod_Thx.getProperty("key_right"));
static int KEY_ROTATE_LEFT = Keyboard.getKeyIndex(mod_Thx.getProperty("key_rotate_left"));
static int KEY_ROTATE_RIGHT = Keyboard.getKeyIndex(mod_Thx.getProperty("key_rotate_right"));
- static int KEY_FIRE_MISSILE = Keyboard.getKeyIndex(mod_Thx.getProperty("key_fire_missile"));
- static int KEY_FIRE_ROCKET = Keyboard.getKeyIndex(mod_Thx.getProperty("key_fire_rocket"));
static int KEY_ROCKET_RELOAD = Keyboard.getKeyIndex(mod_Thx.getProperty("key_rocket_reload"));
static int KEY_LOOK_PITCH = Keyboard.getKeyIndex(mod_Thx.getProperty("key_look_pitch"));
static int KEY_AUTO_LEVEL = Keyboard.getKeyIndex(mod_Thx.getProperty("key_auto_level"));
@@ -41,14 +39,23 @@
public ThxEntityHelicopter(World world)
{
super(world);
- helper = new ThxEntityHelperClient(this, new ThxModelHelicopter());
minecraft = ModLoader.getMinecraftInstance();
}
public ThxEntityHelicopter(World world, double x, double y, double z, float yaw)
{
- this(world);
- setPositionAndRotation(x, y + yOffset, z, yaw, 0f);
+ super(world, x, y, z, yaw);
+ minecraft = ModLoader.getMinecraftInstance();
+ }
+
+ @Override
+ ThxEntityHelper createHelper()
+ {
+ if (mod_Thx.getBoolProperty("enable_alt_model"))
+ {
+ return new ThxEntityHelperClient(this, new ThxModelHelicopterAlt());
+ }
+ return new ThxEntityHelperClient(this, new ThxModelHelicopter());
}
public Entity getPilot()
@@ -98,7 +105,7 @@ void onUpdatePilot()
// adjust model rotor speed according to throttle
float power = (throttle - THROTTLE_MIN) / (THROTTLE_MAX - THROTTLE_MIN);
- ((ThxModelHelicopter) helper.model).rotorSpeed = power / 2f + .75f;
+ ((ThxModelHelicopterBase) helper.model).rotorSpeed = power / 2f + .75f;
return;
}
@@ -474,7 +481,7 @@ else if (Keyboard.isKeyDown(KEY_DESCEND) || (Keyboard.isKeyDown(KEY_BACK) && loo
// adjust model rotor speed according to throttle
float power = (throttle - THROTTLE_MIN) / (THROTTLE_MAX - THROTTLE_MIN);
- ((ThxModelHelicopter) helper.model).rotorSpeed = power / 2f + .75f;
+ ((ThxModelHelicopterBase) helper.model).rotorSpeed = power / 2f + .75f;
}
@Override
@@ -486,9 +493,9 @@ void onUpdateDrone()
// adjust model rotor speed according to throttle
float power = (throttle - THROTTLE_MIN) / (THROTTLE_MAX - THROTTLE_MIN);
- ((ThxModelHelicopter) helper.model).rotorSpeed = power / 2f + .75f;
+ ((ThxModelHelicopterBase) helper.model).rotorSpeed = power / 2f + .75f;
- float rotorSpeed = ((ThxModelHelicopter) helper.model).rotorSpeed;
+ float rotorSpeed = ((ThxModelHelicopterBase) helper.model).rotorSpeed;
plog("drone rotorSpeed: " + rotorSpeed);
}
@@ -498,7 +505,7 @@ void onUpdateVacant()
super.onUpdateVacant();
// power down rotor
- ((ThxModelHelicopter) helper.model).rotorSpeed = 0f;
+ ((ThxModelHelicopterBase) helper.model).rotorSpeed = 0f;
}
@Override
@@ -556,7 +563,7 @@ void pilotExit()
super.pilotExit();
- ThxModelHelicopter model = (ThxModelHelicopter) helper.model;
+ ThxModelHelicopterBase model = (ThxModelHelicopterBase) helper.model;
model.visible = true;
model.rotorSpeed = 0f;
}
View
34 project/src-thx/client/net/minecraft/src/ThxEntityMissile.java
@@ -7,42 +7,12 @@ public ThxEntityMissile(World world)
super(world);
}
- public ThxEntityMissile(World world, double x, double y, double z, double dx, double dy, double dz, float yaw, float pitch)
+ public ThxEntityMissile(Entity owner, double x, double y, double z, double dx, double dy, double dz, float yaw, float pitch)
{
- super(world, x, y, z, dx, dy, dz, yaw, pitch);
+ super(owner, x, y, z, dx, dy, dz, yaw, pitch);
}
@Override
- public void onUpdate()
- {
- if (!launched)
- {
- launched = true;
-
- //onLaunch();
- String sfx = "mob.ghast.fireball";
- log("onLaunch: playSound: " + sfx);
- worldObj.playSoundAtEntity(this, sfx, 1f, 1f);
- }
-
- exhaustTimer -= deltaTime;
- if (exhaustTimer < 0f)
- {
- exhaustTimer = EXHAUST_DELAY;
- worldObj.spawnParticle("largesmoke", posX, posY, posZ, 0.0, 0.0, 0.0);
- }
- worldObj.spawnParticle("smoke", posX, posY, posZ, 0.0, 0.0, 0.0);
-
- if (worldObj.isRemote)
- {
- moveEntity(motionX, motionY, motionZ); // this will update posX, posY, posZ
- return;
- }
-
- super.onUpdate();
- }
-
- @Override
ThxEntityHelper createHelper()
{
return new ThxEntityHelperClient(this, new ThxModelMissile());
View
22 project/src-thx/client/net/minecraft/src/ThxEntityRocket.java
@@ -13,29 +13,15 @@ public ThxEntityRocket(Entity owner, double x, double y, double z, double dx, do
}
@Override
- public void onUpdate()
- {
- super.onUpdate();
- }
-
- @Override
ThxEntityHelper createHelper()
{
- ThxModel model = new ThxModelMissile();
+ ThxModelMissile model = new ThxModelMissile();
overrideMissileModel:
{
model.renderTexture = "/thx/rocket.png";
- model.rotationRollSpeed = 90f; // units?
+ //model.rotationRollSpeed = 90f; // units?
+ model.rollRadPerSec = -8f;
}
return new ThxEntityHelperClient(this, model);
}
-
- @Override
- public void spawn(Packet230ModLoader packet)
- {
- super.spawn(packet);
-
- log("*** rocket spawn(): owner: " + owner);
- }
-}
-
+}
View
114 project/src-thx/client/net/minecraft/src/ThxModelHelicopter.java
@@ -1,30 +1,15 @@
package net.minecraft.src;
-public class ThxModelHelicopter extends ThxModel
+public class ThxModelHelicopter extends ThxModelHelicopterBase
{
- boolean bottomVisible = true;
-
- float scale = 0.0625f;
+ //float scale = 0.0625f;
float x2scale = 0.125f;
float centerScale = 1.0f;
- float rotorSpeed = 0f;
- float lastRotorRad = 0f;
- float lastTailRotorRad = 0f;
- float MAX_ROTOR_SPEED = 18f * ((float)mod_Thx.getIntProperty("rotor_speed_percent")) / 100f;
-
- float SPIN_UP_TIME = 10f;
- float timeSpun = 0f;
-
- boolean ENABLE_ROTOR;
public ModelRenderer mainRotor;
public ModelRenderer rotor2;
public ModelRenderer rotor3;
- //public ModelRenderer cockpit1;
- //public ModelRenderer cockpit2;
- //public ModelRenderer cockpit3;
-
public ModelRenderer windshield;
public ModelRenderer bottom;
public ModelRenderer frontWall;
@@ -35,16 +20,11 @@
public ModelRenderer tail;
public ModelRenderer tailRotor;
- //public ModelRenderer body;
-
public ThxModelHelicopter()
{
renderTexture = "/thx/helicopter.png";
-
- ENABLE_ROTOR = mod_Thx.getBoolProperty("enable_rotor");
- // All model boxes are now scaled x2 at rendering time to save texture space
- // (with the exception of the windsheield which is already min size)
+ // All model boxes are now scaled x2 at rendering time to conserve texture space
bottom:
{
@@ -156,6 +136,7 @@ public ThxModelHelicopter()
}
windshield:
{
+ // will be scaled x2 at render
float length = 9f;
float height = 7f;
float width = 0f;
@@ -168,23 +149,17 @@ public ThxModelHelicopter()
public void render()
{
- update();
-
- //System.out.println("Model delta time sec: " + deltaTime);
+ super.render();
if (!visible) return;
- if (bottomVisible) bottom.render(x2scale);
+ bottom.render(x2scale);
frontWall.render(x2scale);
backWall.render(x2scale);
leftWall.render(x2scale);
rightWall.render(x2scale);
- // windshield
- //cockpit1.render(scale);
- //cockpit2.render(scale);
- //cockpit3.render(scale);
windshield.render(x2scale);
// rotor supports
@@ -193,75 +168,14 @@ public void render()
tail.render(x2scale);
- if (ENABLE_ROTOR && !paused)
- {
- if (rotorSpeed > 0f)
- {
- if (timeSpun < SPIN_UP_TIME)
- {
- timeSpun += deltaTime * 3f; // spin up faster than spin down
-
- mainRotor.rotateAngleY += deltaTime * MAX_ROTOR_SPEED * rotorSpeed * timeSpun / SPIN_UP_TIME;
- tailRotor.rotateAngleZ -= deltaTime * MAX_ROTOR_SPEED * timeSpun / SPIN_UP_TIME; // not linked to throttle
- }
- else
- {
- mainRotor.rotateAngleY += deltaTime * MAX_ROTOR_SPEED * rotorSpeed;
- tailRotor.rotateAngleZ -= deltaTime * MAX_ROTOR_SPEED;
- }
-
- if (mainRotor.rotateAngleY > 2*PI) mainRotor.rotateAngleY -= 2*PI;
- mainRotor.render(x2scale);
- mainRotor.rotateAngleY += 1.5707f; // add second blade perp
- mainRotor.render(x2scale);
-
- if (tailRotor.rotateAngleZ < 2*PI) tailRotor.rotateAngleZ += 2*PI;
- tailRotor.render(x2scale);
- tailRotor.rotateAngleZ -= 1.5707f; // add second blade perp
- tailRotor.render(x2scale);
- }
- else
- {
- rotorSpeed = 0f;
-
- if (timeSpun > 0f)
- {
- timeSpun -= deltaTime;
-
- mainRotor.rotateAngleY += deltaTime * MAX_ROTOR_SPEED * (1 - MathHelper.cos(timeSpun / SPIN_UP_TIME));
- tailRotor.rotateAngleZ += deltaTime * MAX_ROTOR_SPEED * (1 - MathHelper.cos(timeSpun / SPIN_UP_TIME));
-
- // remember stopping position
- lastRotorRad = mainRotor.rotateAngleY;
- lastTailRotorRad = tailRotor.rotateAngleZ;
- }
- else
- {
- mainRotor.rotateAngleY = lastRotorRad;
- tailRotor.rotateAngleZ = lastTailRotorRad;
- }
-
- mainRotor.render(x2scale);
- mainRotor.rotateAngleY += 1.5707f; // add second blade perp
- mainRotor.render(x2scale);
-
- tailRotor.render(x2scale);
- tailRotor.rotateAngleZ -= 1.5707f; // add second blade perp
- tailRotor.render(x2scale);
- }
- }
- else
- {
- // show fixed rotor by rendering twice
- mainRotor.rotateAngleY = 0.7854f;
- mainRotor.render(x2scale);
- mainRotor.rotateAngleY += 1.5707f;
- mainRotor.render(x2scale);
+ mainRotor.rotateAngleY = mainRotorAngle;
+ mainRotor.render(x2scale);
+ mainRotor.rotateAngleY += 1.5707f;
+ mainRotor.render(x2scale);
- tailRotor.rotateAngleZ = 0.7854f;
- tailRotor.render(x2scale);
- tailRotor.rotateAngleZ += 1.5707f;
- tailRotor.render(x2scale);
- }
+ tailRotor.rotateAngleZ = tailRotorAngle;
+ tailRotor.render(x2scale);
+ tailRotor.rotateAngleZ += 1.5707f;
+ tailRotor.render(x2scale);
}
}
View
99 project/src-thx/client/net/minecraft/src/ThxModelHelicopterAlt.java
@@ -1,55 +1,82 @@
package net.minecraft.src;
-public class ThxModelHelicopterAlt extends ThxModelHelicopter
+public class ThxModelHelicopterAlt extends ThxModelHelicopterBase
{
- public ModelRenderer body1;
- public ModelRenderer body2;
+ public ModelRenderer body;
+ public ModelRenderer mainRotor;
+ public ModelRenderer tailRotor;
+ public ModelRenderer windshield;
public ThxModelHelicopterAlt()
{
renderTexture = "/thx/helicopter-alt.png";
- // new body, large enough to hide player model in 3rd person view.
- // in 1st person view, it is invisible
- float length = 16f;
- float height = 4f;
- float width = 4f;
- float heightOffset = -9f; //9 units off ground
-
- body1 = new ModelRenderer(this, 8, 2); // texture start at upper-left pixel (8,4) of png
- body1.setRotationPoint(0f, 0f + heightOffset, 8f); // 8 units right
- body1.addBox(-length/2f, -height/2f, -width/2f, (int)length, (int)height, (int)width); // box is centered at rotation point)
- body1.rotateAngleZ = -.3f; // ~20 degrees pitch forward
-
- length = 16f;
- height = 8f;
- width = 6f;
-
- body2 = new ModelRenderer(this, 6, 12);
- body2.setRotationPoint(0f, 0f + heightOffset, -8f); // 8 units left
- body2.addBox(-length/2f, -height/2f, -width/2f, (int)length, (int)height, (int)width);
-
- //body2.rotateAngleZ = -.7f; // Pitch rad, ~40 degrees pitch forward or down
- //body2.rotateAngleY = -1.5f; // Yaw rad, ~90 degrees yaw left (counter-clockwise)
- //body2.rotateAngleX = -.3f; // Roll rad,
+ body:
+ {
+ // will be rendered at increased scale --
+ // large enough to hide player in 3rd person view.
+ // in 1st person view, body is invisible and only
+ // windshield and rotors are rendered
+
+ float length = 12f; // units are pixels in a 64x32 texture
+ float height = 8f;
+ float width = 6f;
+ body = new ModelRenderer(this, 0, 12);
+ body.addBox(-length/2f, -height/2f, -width/2f, (int)length, (int)height, (int)width);
+ body.setRotationPoint(0f, -2f, 0f); // move up
+ }
+ mainRotor:
+ {
+ float length = 30f;
+ float height = 0f;
+ float width = 1f;
+ mainRotor = new ModelRenderer(this, 0, 0);
+ mainRotor.addBox(-length/2f, -height/2f, -width/2f, (int)length, (int)height, (int)width);
+ mainRotor.setRotationPoint(2f, -11.7f, 0f); // halved to adjust for scale, and a little subtracted
+ }
+ tailRotor:
+ {
+ float length = 8f;
+ float height = 1f;
+ float width = 0f;
+ tailRotor = new ModelRenderer(this, 0, 2);
+ tailRotor.addBox(-length/2f, -height/2f, -width/2f, (int)length, (int)height, (int)width);
+ tailRotor.setRotationPoint(16f, -7f, .7f);
+ }
+ windshield:
+ {
+ float length = 9f;
+ float height = 7f;
+ float width = 0f;
+ windshield = new ModelRenderer(this, 0, 4);
+ windshield.addBox(-length/2f, -height/2f, -width/2f, (int)length, (int)height, (int)width);
+ windshield.setRotationPoint(-6.5f, -5.5f, 0f);
+ windshield.rotateAngleY = PI * 1.5f; // rotate 270 deg yaw for proper orientation
+ }
}
public void render()
{
- update();
+ super.render();
- //float scale = 0.0625f;
- float scale = 0.07f;
+ if (!visible) return;
- //System.out.println("Model delta time sec: " + deltaTime);
+ float scale = 0.125f;
+
+ body.render(scale * 2f);
- if (!visible) return;
+ mainRotor.rotateAngleY = mainRotorAngle;
+ mainRotor.render(scale * 1.3f);
+ // rotate 1/4 turn and render again
+ mainRotor.rotateAngleY += 1.5707f;
+ mainRotor.render(scale * 1.3f);
- body1.render(scale);
+ tailRotor.rotateAngleZ = tailRotorAngle;
+ tailRotor.render(scale * 1.3f);
+ // rotate 1/4 turn and render again
+ tailRotor.rotateAngleZ += 1.5707f;
+ tailRotor.render(scale * 1.3f);
- body2.rotateAngleX += deltaTime * .4f; // slow roll
- body2.rotateAngleY += deltaTime * .4f; // slow yaw
- body2.rotateAngleZ += deltaTime * .4f; // slow pitch
- body2.render(scale);
+ windshield.render(scale * 1.3f);
}
}
View
77 project/src-thx/client/net/minecraft/src/ThxModelHelicopterBase.java
@@ -0,0 +1,77 @@
+package net.minecraft.src;
+
+public class ThxModelHelicopterBase extends ThxModel
+{
+ boolean ENABLE_ROTOR;
+
+ float mainRotorAngle = 0f;
+ float mainRotorAnglePrev = 0f;
+ float tailRotorAngle = 0f;
+ float tailRotorAnglePrev = 0f;
+
+ float rotorSpeed = 0f;
+ float MAX_ROTOR_SPEED = 18f * ((float)mod_Thx.getIntProperty("rotor_speed_percent")) / 100f;
+
+ float timeSpun = 0f;
+ float SPIN_UP_TIME = 10f;
+
+ public ThxModelHelicopterBase()
+ {
+ mod_Thx.log("ThxModelHelicopterBase");
+
+ ENABLE_ROTOR = mod_Thx.getBoolProperty("enable_rotor");
+ }
+
+ public void render()
+ {
+ update();
+
+ if (ENABLE_ROTOR && !paused)
+ {
+ if (rotorSpeed > 0f)
+ {
+ if (timeSpun < SPIN_UP_TIME)
+ {
+ timeSpun += deltaTime * 3f; // spin up faster than spin down
+
+ mainRotorAngle += deltaTime * MAX_ROTOR_SPEED * rotorSpeed * timeSpun / SPIN_UP_TIME;
+ tailRotorAngle -= deltaTime * MAX_ROTOR_SPEED * timeSpun / SPIN_UP_TIME; // not linked to throttle
+ }
+ else
+ {
+ mainRotorAngle += deltaTime * MAX_ROTOR_SPEED * rotorSpeed;
+ tailRotorAngle -= deltaTime * MAX_ROTOR_SPEED;
+ }
+ if (mainRotorAngle > 2*PI) mainRotorAngle -= 2*PI;
+ if (tailRotorAngle < 2*PI) tailRotorAngle += 2*PI;
+ }
+ else
+ {
+ rotorSpeed = 0f;
+
+ if (timeSpun > 0f)
+ {
+ timeSpun -= deltaTime;
+
+ mainRotorAngle += deltaTime * MAX_ROTOR_SPEED * (1 - MathHelper.cos(timeSpun / SPIN_UP_TIME));
+ tailRotorAngle += deltaTime * MAX_ROTOR_SPEED * (1 - MathHelper.cos(timeSpun / SPIN_UP_TIME));
+
+ // remember stopping position
+ mainRotorAnglePrev = mainRotorAngle;
+ tailRotorAnglePrev = tailRotorAngle;
+ }
+ else
+ {
+ mainRotorAngle = mainRotorAnglePrev;
+ tailRotorAngle = tailRotorAnglePrev;
+ }
+ }
+ }
+ else
+ {
+ // show fixed rotor by rendering twice
+ mainRotorAngle = 0.7854f;
+ tailRotorAngle = 0.7854f;
+ }
+ }
+}
View
4 project/src-thx/client/net/minecraft/src/ThxModelMissile.java
@@ -4,6 +4,8 @@
{
public ModelRenderer missile;
+ float rollRadPerSec = 5f;
+
public ThxModelMissile()
{
renderTexture = "/thx/missile.png";
@@ -24,7 +26,7 @@ public void render()
if (!visible) return;
// spiral
- missile.rotateAngleX += deltaTime * 5f; // radians per sec
+ missile.rotateAngleX += deltaTime * rollRadPerSec;
if (missile.rotateAngleX > 2*PI) missile.rotateAngleX -= 2*PI;
//float scale = .0625f; // original size
View
4 project/src-thx/client/net/minecraft/src/mod_Thx.java
@@ -10,7 +10,7 @@
public mod_Thx()
{
- log("mod_Thx() called");
+ System.out.println("mod_Thx() called");
config = new ThxConfig();
instance = this; // for easy access by static methods and to instance methods
}
@@ -86,7 +86,7 @@ public void addRenderer(java.util.Map map)
public String getVersion()
{
//log("getVersion called");
- return "Minecraft THX Helicopter Mod - mod_thx-mc125_v017";
+ return "Minecraft THX Helicopter Mod - mod_thx-mc125_v018";
}
@Override
View
18 project/src-thx/common/net/minecraft/src/ThxConfigBase.java
@@ -1,5 +1,6 @@
package net.minecraft.src;
+import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@@ -15,7 +16,8 @@
static boolean LOG_INCOMING_PACKETS;
Properties props;
- String filename = "mods/mod_thx.options";
+
+ abstract String getFilename();
String getProperty(String name)
{
@@ -56,6 +58,7 @@ boolean ensureDefault(Properties props, String name, String defaultValue)
{
if (props.getProperty(name) == null)
{
+ log("adding default property value for " + name + ": " + defaultValue);
props.setProperty(name, defaultValue);
return true;
}
@@ -66,10 +69,15 @@ void loadProperties()
{
boolean writeFile = false;
+ String filename = getFilename();
+
props = new Properties();
try
{
- props.load(new FileInputStream(filename));
+ File file = new File(filename);
+ log("Reading properties from file: " + file.getAbsolutePath());
+
+ props.load(new FileInputStream(file));
}
catch(FileNotFoundException ioe1)
{
@@ -96,11 +104,15 @@ void loadProperties()
}
ENABLE_LOGGING = getBoolProperty("enable_logging");
+ log("logging enabled: " + ENABLE_LOGGING);
+
LOG_INCOMING_PACKETS = getBoolProperty("enable_logging_p230_inbound");
+ log("inbound packet 230 logging enabled: " + LOG_INCOMING_PACKETS);
}
void log(String s)
{
- mod_Thx.log(s);
+ //mod_Thx.log(s);
+ System.out.println("ThxConfig: " + s);
}
}
View
13 project/src-thx/common/net/minecraft/src/ThxEntity.java
@@ -29,6 +29,7 @@
Vector3 pos = new Vector3(); // position
Vector3 vel = new Vector3(); // velocity
+ Vector3 acc = new Vector3(); // velocity
Vector3 ypr = new Vector3(); // yaw, pitch, roll
// vectors relative to entity orientation
@@ -38,7 +39,6 @@
ThxEntityHelper helper;
- int NET_PACKET_TYPE;
Packet230ModLoader lastUpdatePacket;
int cmd_reload;
@@ -61,7 +61,7 @@ public ThxEntity(World world)
{
super(world);
- log(world.isRemote ? "Created new MP client entity" : "Created new SP/MP master entity");
+ //log(world.isRemote ? "Created new MP client entity" : "Created new SP/MP master entity");
preventEntitySpawning = true;
@@ -75,6 +75,7 @@ public void onUpdate()
long time = System.nanoTime();
deltaTime = ((float) (time - prevTime)) / 1000000000f; // convert to sec
+ if (deltaTime > .05f) deltaTime = .05f; // 20 ticks per second
prevTime = time;
lastTickPosX = prevPosX = posX;
@@ -345,7 +346,7 @@ protected boolean canTriggerWalking()
@Override
protected void entityInit()
{
- log(this + " entityInit called");
+ log(this + " entityInit");
}
@Override
@@ -397,7 +398,7 @@ public Packet230ModLoader getUpdatePacket()
Packet230ModLoader packet = new Packet230ModLoader();
packet.modId = mod_Thx.instance.getId();
- packet.packetType = NET_PACKET_TYPE;
+ packet.packetType = getPacketTypeId();
packet.dataString = new String[] { "thx update packet for tick " + ticksExisted };
@@ -498,4 +499,8 @@ public String packetToString(Packet230ModLoader p)
return s.toString();
}
+
+ abstract int getPacketTypeId();
+
+ abstract ThxEntityHelper createHelper();
}
View
162 project/src-thx/common/net/minecraft/src/ThxEntityHelicopterBase.java
@@ -1,9 +1,12 @@
package net.minecraft.src;
+import java.util.ArrayList;
import java.util.List;
public abstract class ThxEntityHelicopterBase extends ThxEntity implements IClientDriven
{
+ List followers = new ArrayList();
+
int rocketCount;
float MAX_HEALTH = 160f;
@@ -45,7 +48,6 @@
float missileDelay;
final float MISSILE_DELAY = 6f;
- boolean hasFiredRocket;
float rocketDelay;
final float ROCKET_DELAY = .3f; // only applies to drones, pilot rocket rate controlled by interact
final int FULL_ROCKET_COUNT = 12;
@@ -60,18 +62,33 @@
// enemy AI helicopter or friend?
public ThxEntityHelicopter targetHelicopter;
public boolean isTargetHelicopterFriendly;
+ public boolean isDroneArmed;
Vector3 deltaPosToTarget = new Vector3();
+ ThxEntityMissile lastMissileFired;
+
public ThxEntityHelicopterBase(World world)
{
super(world);
setSize(1.8f, 2f);
- //yOffset = .8f; // avoid getting stuck in ground upon spawn
- yOffset = .7f;
+ yOffset = .8f; // avoid getting stuck in ground upon spawn, but looks high
+ //yOffset = .7f;
- NET_PACKET_TYPE = 75;
+ helper = createHelper();
+ }
+
+ public ThxEntityHelicopterBase(World world, double x, double y, double z, float yaw)
+ {
+ this(world);
+ setPositionAndRotation(x, y + yOffset, z, yaw, 0f);
+ }
+
+ @Override
+ public int getPacketTypeId()
+ {
+ return 75;
}
@Override
@@ -79,8 +96,6 @@ public void onUpdate()
{
super.onUpdate();
- hasFiredRocket = false;
-
// decrement cooldown timers
missileDelay -= deltaTime;
rocketDelay -= deltaTime;
@@ -109,7 +124,7 @@ else if (targetHelicopter != null)
updateMotion(false);
}
- if (handleCollisions())
+ if (handleCollisions()) // true if collided with other entity or environment
{
helper.addChatMessageToPilot("Damage: " + (int)(damage * 100 / MAX_HEALTH) + "%");
}
@@ -120,7 +135,6 @@ else if (targetHelicopter != null)
boolean flaming = true;
worldObj.newExplosion(this, posX, posY, posZ, power, flaming);
- //if (riddenByEntity != null) riddenByEntity.mountEntity(this); // unmount
if (riddenByEntity != null) pilotExit();
dropItemWithOffset(ThxItemHelicopter.shiftedId, 1, 0);
@@ -129,7 +143,13 @@ else if (targetHelicopter != null)
}
// auto-heal:
- if (damage > 0f) damage -= deltaTime; // heal rate: 1 pt / sec
+ if (isBurning()) damage += deltaTime * 5f; // damage from fire
+ else if (damage > 0f) damage -= deltaTime; // heal rate: 1 pt / sec
+
+ if (damage / MAX_HEALTH > .9f && ticksExisted % 20 == 0)
+ {
+ helper.addChatMessageToPilot("Damage: " + (int)(damage * 100 / MAX_HEALTH) + "%");
+ }
}
@Override
@@ -160,14 +180,18 @@ void fireRocket()
if (!worldObj.isRemote)
{
- ThxEntityRocket newRocket = new ThxEntityRocket(this, posX + offsetX, posY + offsetY, posZ + offsetZ, motionX * MOMENTUM, motionY * MOMENTUM, motionZ * MOMENTUM, yaw, pitch);
// pilot is owner to get xp, if no pilot (ai) then helicopter is owner
- newRocket.owner = riddenByEntity != null ? riddenByEntity : this;
+ Entity newOwner = riddenByEntity != null ? riddenByEntity : this;
+ ThxEntityRocket newRocket = new ThxEntityRocket(newOwner, posX + offsetX, posY + offsetY, posZ + offsetZ, motionX * MOMENTUM, motionY * MOMENTUM, motionZ * MOMENTUM, yaw, pitch);
worldObj.spawnEntityInWorld(newRocket);
+
+ for (Object followerItem : followers)
+ {
+ ThxEntityHelicopter follower = (ThxEntityHelicopter) followerItem;
+ if (follower.isDroneArmed) follower.fireRocket();
+ }
}
- hasFiredRocket = true;
-
if (rocketCount == FULL_ROCKET_COUNT)
{
reload();
@@ -182,9 +206,17 @@ void reload()
void fireMissile()
{
- log("firing missile");
+ if (missileDelay > 0f)
+ {
+ if (lastMissileFired != null && !lastMissileFired.isDead)
+ {
+ log("remote detonating missile");
+ lastMissileFired.detonate();
+ }
+ return;
+ }
- if (missileDelay > 0f) return;
+ log("firing missile");
missileDelay = MISSILE_DELAY;
float offX = (fwd.x * 2.5f) + (up.x * -.5f);
@@ -199,9 +231,17 @@ void fireMissile()
if (!worldObj.isRemote)
{
- ThxEntityMissile newMissile = new ThxEntityMissile(worldObj, posX + offX, posY + offY, posZ + offZ, motionX * MOMENTUM, motionY * MOMENTUM, motionZ * MOMENTUM, yaw, pitch);
- newMissile.owner = riddenByEntity != null ? riddenByEntity : this;
+ // pilot is owner to get xp, if no pilot (ai) then helicopter is owner
+ Entity newOwner = riddenByEntity != null ? riddenByEntity : this;
+ ThxEntityMissile newMissile = new ThxEntityMissile(newOwner, posX + offX, posY + offY, posZ + offZ, motionX * MOMENTUM, motionY * MOMENTUM, motionZ * MOMENTUM, yaw, pitch);
+ lastMissileFired = newMissile;
worldObj.spawnEntityInWorld(newMissile);
+
+ for (Object followerItem : followers)
+ {
+ ThxEntityHelicopter follower = (ThxEntityHelicopter) followerItem;
+ //too much, rockets only? follower.fireMissile();
+ }
}
}
@@ -279,7 +319,8 @@ void updateMotion(boolean altitudeLock)
thrust.x = -fwd.x * accel;
thrust.z = -fwd.z * accel;
- // also adjust y in addition to ascend/descend to simulate diving
+ // also adjust y in addition to ascend/descend to simulate diving
+ //thrust.y += -fwd.y * accel * .3f;
thrust.y += -fwd.y * accel;
}
@@ -424,7 +465,7 @@ public void updateRiderPosition()
// this will tell the default impl in Entity.updateRidden()
// that no adjustment need be made to the pilot's yaw or pitch
// as a direct result of riding this helicopter entity.
- // rather, we let the player rotate the pilot and the helicopter follows
+ // rather, we let the player rotate the pilot and the helicopter follows
// TODO: add "free look" zone wherecontrol within limited arc
prevRotationYaw = rotationYaw;
prevRotationPitch = rotationPitch;
@@ -484,17 +525,15 @@ void onUpdateDrone()
thd = deltaPosToTarget.length();
if (isTargetHelicopterFriendly)
- {
- if (targetHelicopter.hasFiredRocket)
- {
- fireRocket();
+ {
// TODO: defend targer helicopter somehow?
- }
+ }
else // not friendly, attack target
{
if (thd < 20f && thd > 5f && Math.abs(targetHelicopter.posY - posY) < 2.0)
- {
- if (damage > .8 * MAX_HEALTH) fireMissile();
+ {
+ // extra checks here on fire delays to avoid methods which do log
+ if (damage > .6 * MAX_HEALTH && missileDelay < 0f) fireMissile();
else if (rocketDelay < 0f) fireRocket();
}
}
@@ -572,7 +611,7 @@ else if (posY - 2f > targetHelicopter.posY)
}
void onUpdateVacant()
- {
+ {
isActive = false; // skip sending update packet to client, use standard mc packets
//((ThxModel) helper.model).visible = true; // needed?
@@ -654,43 +693,74 @@ void attackedByThxEntity(ThxEntity attackingEntity)
//targetHelicopter = (ThxEntityHelicopter) attackingEntity;
//return;
}
-
+
// activate/adjust AI for drone helicopter hit by another helicopter
if (riddenByEntity == null && attackingEntity instanceof ThxEntityHelicopter)
{
log("attacked by " + attackingEntity + " with pilot: " + attackingEntity.riddenByEntity);
-
+
if (targetHelicopter == null) // first attack by another helo, begin tracking as friendly
{
- targetHelicopter = (ThxEntityHelicopter) attackingEntity;
+ targetHelicopter = (ThxEntityHelicopter) attackingEntity;
+ targetHelicopter.followers.add(this);
+
+ isTargetHelicopterFriendly = true;
isDroneArmed = false;
worldObj.playSoundAtEntity(this, "random.fuse", 1f, 1f); // activation sound
log("new targetHelicopter: " + targetHelicopter);
- }
+ }
else if (targetHelicopter.equals(attackingEntity)) // already tracking
- {
+ {
if (isTargetHelicopterFriendly) // friendly fire
- {
- // deactivate ai
- //log("deactivate ai, forgetting targetHelicopter: " + targetHelicopter);
- //targetHelicopter = null;
- //return;
-
- isTargetHelicopterFriendly = false;
- missileDelay = 10f; // initial missile delay
- rocketDelay = 5f; // initial rocket delay
-
- worldObj.playSoundAtEntity(this, "random.fuse", 1f, 1f); // activation sound
-
+ {
+ if (!isDroneArmed)
+ {
+ isDroneArmed = true; // now armed, still friendly, earn xp!
+ owner = targetHelicopter.owner;
+
+ worldObj.playSoundAtEntity(this, "random.fuse", 1f, 1f); // activation sound
+ }
+ else
+ {
+ isTargetHelicopterFriendly = false;
+
+ targetHelicopter.followers.remove(this);
+
+ owner = this; // no more xp
+
+ missileDelay = 10f; // initial missile delay
+ rocketDelay = 5f; // initial rocket delay
+
+ worldObj.playSoundAtEntity(this, "random.fuse", 1f, 1f); // activation sound
}
}
else
- {
- log("hit by enemy targetHelicopter: " + targetHelicopter);
+ {
+ // enemy hit us again! surrender, change to friendly if almost dead
+ if (damage / MAX_HEALTH > .9f && !isBurning())
+ {
+ isTargetHelicopterFriendly = true;
+ isDroneArmed = false;
}
}
+ }
+ else
+ {
+ // hit by a helicopter other than the one we are following, so attack it
+
+ // prevTargetHelicopter = targetHelicopter; // TODO: switch back to original target if friendly?
+
+ targetHelicopter.followers.remove(this);
+ targetHelicopter = (ThxEntityHelicopter) attackingEntity;
+
+ isTargetHelicopterFriendly = false;
+
+ worldObj.playSoundAtEntity(this, "random.fuse", 1f, 1f); // activation sound
+
+ log("new enemy targetHelicopter: " + targetHelicopter);
+
}
}
}
View
162 project/src-thx/common/net/minecraft/src/ThxEntityMissileBase.java
@@ -1,138 +1,64 @@
package net.minecraft.src;
-public abstract class ThxEntityMissileBase extends ThxEntity
-{
- final float MAX_ACCEL = 0.60f;
- final float MAX_VELOCITY = 0.50f;
- final float GRAVITY = 0.005f;
+import java.util.List;
+import java.util.Random;
- final int MAX_AGE_TICKS = 100; //600; // there are 20 ticks in a second
-
- final float EXHAUST_DELAY = .04f;
-
- float exhaustTimer = 0f;
-
- boolean launched;
-
- Vector3 thrust = new Vector3();
-
- public ThxEntityHelicopter targetHelicopter;
-
- abstract ThxEntityHelper createHelper();
-
- public ThxEntityMissileBase(World world)
+public abstract class ThxEntityMissileBase extends ThxEntityProjectile
+{
+ public ThxEntityMissileBase(World world)
{
super(world);
-
- helper = createHelper();
-
- setSize(0.25f, 0.25f);
-
- NET_PACKET_TYPE = 77;
}
- public ThxEntityMissileBase(World world, double x, double y, double z, double dx, double dy, double dz, float yaw, float pitch)
+ public ThxEntityMissileBase(Entity owner, double x, double y, double z, double dx, double dy, double dz, float yaw, float pitch)
{
- this(world);
-
- setPositionAndRotation(x, y, z, yaw, pitch);
-
- updateRotation();
- updateVectors();
-
- log("fwd: " + fwd + ", side: " + side + ", up: " + up);
-
- // initial thrust + owner "momentum"
- thrust.x = (float)(fwd.x * MAX_ACCEL + dx);
- thrust.y = (float)(fwd.y * MAX_ACCEL + dy);
- thrust.z = (float)(fwd.z * MAX_ACCEL + dz);
-
- motionX = thrust.x;
- motionY = thrust.y;
- motionZ = thrust.z;
+ super(owner, x, y, z, dx, dy, dz, yaw, pitch);
}
-
- /*
- // client can override to play launch sound, other effects
+
+ @Override
+ public int getPacketTypeId()
+ {
+ return 77;
+ }
+
+ @Override
+ void createParticles()
+ {
+ worldObj.spawnParticle("smoke", posX, posY, posZ, 0.0, 0.0, 0.0);
+ worldObj.spawnParticle("largesmoke", posX, posY, posZ, 0.0, 0.0, 0.0);
+ }
+
+ @Override
void onLaunch()
{
- log("onLaunch()");
+ worldObj.playSoundAtEntity(this, "mob.ghast.fireball", 1f, 1f);
}
- */
@Override
- public void onUpdate()
+ float getAcceleration()
{
- super.onUpdate();
-
- // guide missile to target helicopter
- Vector3 toTarget = new Vector3();
- if (targetHelicopter != null)
- {
- toTarget.set((float)(targetHelicopter.posX - posX), (float)(targetHelicopter.posY - posY), (float)(targetHelicopter.posZ - posZ));
- }
- toTarget.normalize();
- toTarget = toTarget.scale(.05f);
-
- // gravity pull
- motionY -= GRAVITY * deltaTime;
-
- // following is a cheap check but note that it doesn't
- // allow for any way to slow or change course once max'ed
- if (vel.lengthSquared() < MAX_VELOCITY * MAX_VELOCITY)
- {
- motionX += thrust.x * deltaTime + toTarget.x;
- motionY += thrust.y * deltaTime + toTarget.y;
- motionZ += thrust.z * deltaTime + toTarget.z;
- }
- Vector3 motion = new Vector3((float)motionX, (float)motionY, (float)motionZ);
-
- moveEntity(motionX, motionY, motionZ); // this will update posX, posY, posZ
+ return .52f;
+ }
+
+ @Override
+ void strikeEntity(Entity entity)
+ {
+ int attackStrength = 12; // about 2 hearts for other player without armor??;
+ entity.attackEntityFrom(new EntityDamageSource("player", owner), attackStrength);
- // set yaw and pitch to match movement
- setHeading:
- {
- //float f = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
- //prevRotationYaw = rotationYaw = (float)((Math.atan2(motionX, motionZ) * 180D) / 3.1415927410125732D);
- //prevRotationPitch = rotationPitch = (float)((Math.atan2(motionY, f) * 180D) / 3.1415927410125732D);
+ entity.setFire(10); // direct hit, burn for 10 seconds
+ }
+
+ @Override
+ void detonate()
+ {
+ doSplashDamage(3.0, 6); // 1 heart if within range, see explosion impl for more precise way
- //float f = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
- //rotationYaw = (float)(((Math.atan2(motionX, motionZ) * 180.0) + 90.0) / 3.1415927410125732D);
- //rotationPitch = (float)((Math.atan2(motionY, f) * 180.0) / 3.1415927410125732D);
- }
-
-
- float dx = (float)(posX - prevPosX);
- float dy = (float)(posY - prevPosY);
- float dz = (float)(posZ - prevPosZ);
- Vector3 dPos = new Vector3(dx, dy, dz);
-
- // if movement was blocked by hitting something,
- // then dPos will be less than motion
- Vector3 courseChange = Vector3.subtract(dPos, motion, null);
- if (courseChange.lengthSquared() > .001 || ticksExisted > MAX_AGE_TICKS)
- {
- float yaw = rotationYaw;
- float pitch = rotationPitch + 5f;
-
- /*
- EntityChicken newChicken = new EntityChicken(worldObj);
- newChicken.setPositionAndRotation(posX, posY, posZ, yaw, pitch);
- worldObj.spawnEntityInWorld(newChicken);
- setEntityDead(); // otherwise, creates many many chickens!
- return;
- */
+ float power = 1.1f;
+ boolean withFire = false;
+ worldObj.newExplosion(this, posX, posY, posZ, power, withFire);
- /*
- float power = 2f;
- boolean flaming = false;
- worldObj.newExplosion(this, posX, posY, posZ, power, flaming);
- */
-
- float power = .9f;
- boolean flaming = true;
- worldObj.newExplosion(this, posX, posY, posZ, power, flaming);
- setDead(); // call on both client and server?
- }
+ setDead();
}
}
+
View
195 project/src-thx/common/net/minecraft/src/ThxEntityProjectile.java
@@ -0,0 +1,195 @@
+package net.minecraft.src;
+
+import java.util.List;
+import java.util.Random;
+
+public abstract class ThxEntityProjectile extends ThxEntity
+{
+ boolean enteredWater;
+ boolean launched;
+
+ public ThxEntityProjectile(World world)
+ {
+ super(world);
+
+ helper = createHelper();
+
+ //setSize(0.25F, 0.25F);
+ setSize(.5f, .5f);
+ }
+
+ public ThxEntityProjectile(Entity owner, double x, double y, double z, double dx, double dy, double dz, float yaw, float pitch)
+ {
+ this(owner.worldObj);
+
+ this.owner = owner;
+
+ setPositionAndRotation(x, y, z, yaw, pitch);
+
+ float acceleration = getAcceleration();
+
+ updateRotation();
+ updateVectors();
+
+ motionX = fwd.x * acceleration + dx;
+ motionY = fwd.y * acceleration + dy;
+ motionZ = fwd.z * acceleration + dz;
+
+ isImmuneToFire();
+ }
+
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (owner == null) // should always have owner, but sometimes doesn't during respawn/restart etc
+ {
+ setDead();
+ return;
+ }
+
+ if (ticksExisted > 300) // 15 second lifespan
+ {
+ detonate();
+ return;
+ }
+
+ if (!launched)
+ {
+ launched = true;
+ onLaunch();
+ }
+
+ createParticles();
+
+ Vec3D posStart = Vec3D.createVector(posX, posY, posZ);
+ Vec3D posEnd = Vec3D.createVector(posX + motionX, posY + motionY, posZ + motionZ);
+
+ MovingObjectPosition movingobjectposition = worldObj.rayTraceBlocks(posStart, posEnd);
+ if(movingobjectposition != null)
+ {
+ posEnd = Vec3D.createVector(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
+ }
+
+ setPosition(posEnd.xCoord, posEnd.yCoord, posEnd.zCoord);
+
+ if(!enteredWater && isInWater())
+ {
+ enteredWater = true;
+
+ motionX *= .7f;
+ motionY *= .7f;
+ motionZ *= .7f;
+
+ worldObj.playSoundAtEntity(this, "random.splash", 1f, 1f);
+ for(int l = 0; l < 4; l++)
+ {
+ float f3 = 0.25F;
+ worldObj.spawnParticle("bubble", posX - motionX * (double)f3, posY - motionY * (double)f3, posZ - motionZ * (double)f3, motionX, motionY, motionZ);
+ }
+ }
+
+ // check for nearby entities
+ Entity entity = null;
+ double closest = 1.0;
+
+ List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(1.0D, 1.0D, 1.0D));
+ for (int i = 0; i < list.size(); i++)
+ {
+ Entity nextEntity = (Entity) list.get(i);
+ if (nextEntity == null) continue;
+ if (!nextEntity.canBeCollidedWith()) continue;
+
+ if (nextEntity.equals(owner)) continue;
+
+ if (owner == null) log(this + " owner is null");
+
+ if (owner.equals(nextEntity.riddenByEntity) || owner.equals(nextEntity))
+ {
+ log("skipping self");
+ continue;
+ }
+
+ float f4 = 0.3F;
+ AxisAlignedBB axisalignedbb = nextEntity.boundingBox.expand(f4, f4, f4);
+ MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(posStart, posEnd);
+
+ if (movingobjectposition1 == null) continue;
+
+ double distanceToEntity = posStart.distanceTo(movingobjectposition1.hitVec);
+ if (distanceToEntity < closest)
+ {
+ entity = nextEntity; // remember closest entity
+ closest = distanceToEntity;
+ }
+ }
+
+ if (entity != null)
+ {
+ // we hit an entity!
+ movingobjectposition = new MovingObjectPosition(entity);
+
+ if (owner == null || owner.equals(entity.riddenByEntity) || owner.equals(entity))
+ {
+ log(owner + " ignoring hit from own rocket");
+ }
+ else
+ {
+ strikeEntity(entity);
+
+ detonate();
+ return;
+ }
+ }
+
+ if (movingobjectposition != null) // we hit something besides an entity
+ {
+ int i = MathHelper.floor_double(posX);
+ int j = MathHelper.floor_double(posY - 0.2 -(double)yOffset);
+ int k = MathHelper.floor_double(posZ);
+ int blockId = worldObj.getBlockId(i, j, k);
+ if (blockId > 0)
+ {
+ // kick up some debris if we hit a block, but only works for top surface
+ for (int k1 = 0; k1 < 4; k1++)
+ {
+ worldObj.spawnParticle((new StringBuilder()).append("tilecrack_").append(blockId).toString(), posX + ((double)rand.nextFloat() - 0.5) * (double)width, boundingBox.minY + 0.1, posZ + ((double)rand.nextFloat() - 0.5) * (double)width, 1.0 + ((double)rand.nextFloat() - 0.5), 1.0 + ((double)rand.nextFloat() - 0.5), 1.0 + ((double)rand.nextFloat() - 0.5));
+ }
+ }
+ else
+ {
+ // create some non-block debris instead
+ for (int k1 = 0; k1 < 4; k1++)
+ {
+ worldObj.spawnParticle("snowballpoof", posX + ((double)rand.nextFloat() - 0.5), boundingBox.minY + 0.1, posZ + ((double)rand.nextFloat() - 0.5), 1.0 + ((double)rand.nextFloat() - 0.5), 1.0 + ((double)rand.nextFloat() - 0.5), 1.0 + ((double)rand.nextFloat() - 0.5));
+ }
+ }
+
+ detonate();
+ return;
+ }
+ }
+
+ void doSplashDamage(double splashSize, int damage)
+ {
+ List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(splashSize, splashSize, splashSize));
+ for (int i = 0; i < list.size(); i++)
+ {
+ Entity entity = (Entity) list.get(i);
+ if (!entity.canBeCollidedWith()) continue;
+
+ entity.attackEntityFrom(new EntityDamageSource("projectile splash damage", owner), damage); // splash damage is same as rocket hit
+ }
+ }
+
+ abstract float getAcceleration();
+
+ abstract void onLaunch();
+
+ abstract void createParticles();
+
+ abstract void strikeEntity(Entity entity);
+
+ abstract void detonate();
+}
+
View
227 project/src-thx/common/net/minecraft/src/ThxEntityRocketBase.java
@@ -3,220 +3,59 @@
import java.util.List;
import java.util.Random;
-public abstract class ThxEntityRocketBase extends ThxEntity
+public abstract class ThxEntityRocketBase extends ThxEntityProjectile
{
- boolean enteredWater;
- boolean launched;
-
- final float exhaustDelay = .01f;
- float exhaustTimer = 0f;
-
- abstract ThxEntityHelper createHelper();
-
public ThxEntityRocketBase(World world)
{
super(world);
-
- helper = createHelper();
-
- setSize(0.25F, 0.25F);
-
- NET_PACKET_TYPE = 76;
}
public ThxEntityRocketBase(Entity owner, double x, double y, double z, double dx, double dy, double dz, float yaw, float pitch)
{
- this(owner.worldObj);
-
- this.owner = owner;
-
- setPositionAndRotation(x, y, z, yaw, pitch);
-
- //float acceleration = .7f;
- float acceleration = .6f;
-
- motionX = -MathHelper.sin((rotationYaw / 180F) * 3.141593F) * MathHelper.cos((rotationPitch / 180F) * 3.141593F) * acceleration;
- motionZ = MathHelper.cos((rotationYaw / 180F) * 3.141593F) * MathHelper.cos((rotationPitch / 180F) * 3.141593F) * acceleration;
- motionY = -MathHelper.sin((rotationPitch / 180F) * 3.141593F) * acceleration;
-
- motionX += dx;
- motionY += dy;
- motionZ += dz;
-
- setHeading(motionX, motionY, motionZ, 1.5f, 1.0f);
+ super(owner, x, y, z, dx, dy, dz, yaw, pitch);
}
-
- public void setHeading(double d, double d1, double d2, float f, float f1)
+
+ @Override
+ public int getPacketTypeId()
{
- float f2 = MathHelper.sqrt_double(d * d + d1 * d1 + d2 * d2);
- d /= f2;
- d1 /= f2;
- d2 /= f2;
- d += rand.nextGaussian() * 0.0074999998323619366D * (double)f1;
- d1 += rand.nextGaussian() * 0.0074999998323619366D * (double)f1;
- d2 += rand.nextGaussian() * 0.0074999998323619366D * (double)f1;
- d *= f;
- d1 *= f;
- d2 *= f;
- motionX = d;
- motionY = d1;
- motionZ = d2;
- //float f3 = MathHelper.sqrt_double(d * d + d2 * d2);
- //prevRotationYaw = rotationYaw = (float)((Math.atan2(d, d2) * 180D) / 3.1415927410125732D);
- //prevRotationPitch = rotationPitch = (float)((Math.atan2(d1, f3) * 180D) / 3.1415927410125732D);
+ return 76;
}
-
- public void setVelocity(double d, double d1, double d2)
+
+ @Override
+ void strikeEntity(Entity entity)
+ {
+ int attackStrength = 6;
+ entity.attackEntityFrom(new EntityDamageSource("player", owner), attackStrength);
+ }
+
+ @Override
+ void createParticles()
{
- motionX = d;
- motionY = d1;
- motionZ = d2;
- /*
- if(prevRotationPitch == 0.0F && prevRotationYaw == 0.0F)
- {
- float f = MathHelper.sqrt_double(d * d + d2 * d2);
- prevRotationYaw = rotationYaw = (float)((Math.atan2(d, d2) * 180D) / 3.1415927410125732D);
- prevRotationPitch = rotationPitch = (float)((Math.atan2(d1, f) * 180D) / 3.1415927410125732D);
- }
- */
+ worldObj.spawnParticle("smoke", posX, posY, posZ, 0.0, 0.0, 0.0);
}
@Override
- public boolean canBeCollidedWith()
+ void onLaunch()
{
- return !isDead;
- //return false;
+ worldObj.playSoundAtEntity(this, "random.fizz", 1f, 1f);
}
-
- public void onUpdate()
+
+ @Override
+ float getAcceleration()
{
- if (ticksExisted > 500)
- {
- setDead();
- return;
- }
-
- super.onUpdate();
-
- if (!launched)
- {
- launched = true;
- worldObj.playSoundAtEntity(this, "random.fizz", 1f, 1f);
- }
-
- exhaustTimer -= deltaTime;
- if (exhaustTimer < 0f)
- {
- exhaustTimer = exhaustDelay;
- worldObj.spawnParticle("smoke", posX, posY, posZ, 0.0, 0.0, 0.0);
- }
-
- Vec3D posStart = Vec3D.createVector(posX, posY, posZ);
- Vec3D posEnd = Vec3D.createVector(posX + motionX, posY + motionY, posZ + motionZ);
- MovingObjectPosition movingobjectposition = worldObj.rayTraceBlocks(posStart, posEnd);
-
- if(movingobjectposition != null)
- {
- posEnd = Vec3D.createVector(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
- }
- Entity entity = null;
- double closest = .0;
- List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D));
- for(int i1 = 0; i1 < list.size(); i1++)
- {
- Entity nextEntity = (Entity)list.get(i1);
- if (nextEntity == null) continue;
- if(!nextEntity.canBeCollidedWith()) continue;
- if (nextEntity == owner) // && field_20049_i < 50)
- {
- continue;
- }
- float f4 = 0.3F;
- AxisAlignedBB axisalignedbb = nextEntity.boundingBox.expand(f4, f4, f4);
- MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(posStart, posEnd);
- if(movingobjectposition1 == null)
- {
- continue;
- }
- double d1 = posStart.distanceTo(movingobjectposition1.hitVec);
- if (d1 < closest || closest == .0)
- {
- entity = nextEntity; // remember closest entity
- closest = d1;
- }
- }
-
- if(entity != null)
- {
- movingobjectposition = new MovingObjectPosition(entity);
- }
- if(movingobjectposition != null)
- {
- // we hit an entity!
- //if(movingobjectposition.entityHit != null && !worldObj.isRemote)
- if(movingobjectposition.entityHit != null) //&& !worldObj.isRemote) // allow client side event
- {
- log("rocket hit entity " + movingobjectposition.entityHit);
- if (owner == null || owner.equals(movingobjectposition.entityHit.riddenByEntity) || owner.equals(movingobjectposition.entityHit))
- {
- log(owner + " ignoring hit from own rocket");
- }
- else
- {
- int attackStrength = 6;
- movingobjectposition.entityHit.attackEntityFrom(new EntityDamageSource("player", owner), attackStrength);
- }
- }
-
- // for hit markers
- //worldObj.spawnParticle("flame", posX, posY, posZ, 0.0D, 0.0D, 0.0D);
- worldObj.playSoundAtEntity(this, "random.explode", .7f, .5f + (float) Math.random() * .2f);
- //worldObj.playSoundAtEntity(this, "random.explode", .3f, 1f);
-
- int i = MathHelper.floor_double(posX);
- int j = MathHelper.floor_double(posY - 0.2 -(double)yOffset);
- int k = MathHelper.floor_double(posZ);
- int blockId = worldObj.getBlockId(i, j, k);
- if (blockId > 0)
- {
- // kick up some debris if we hit a block, but only works for top surface
- for (int k1 = 0; k1 < 2; k1++)
- {
- worldObj.spawnParticle((new StringBuilder()).append("tilecrack_").append(blockId).toString(), posX + ((double)rand.nextFloat() - 0.5) * (double)width, boundingBox.minY + 0.1, posZ + ((double)rand.nextFloat() - 0.5) * (double)width, 1.0 + ((double)rand.nextFloat() - 0.5), 1.0 + ((double)rand.nextFloat() - 0.5), 1.0 + ((double)rand.nextFloat() - 0.5));
- }
- }
- else
- {
- // create some non-block debris instead
- for (int k1 = 0; k1 < 2; k1++)
- {
- //worldObj.spawnParticle("flame", posX, posY, posZ, 0.0, 0.0, 0.0);
- worldObj.spawnParticle("snowballpoof", posX + ((double)rand.nextFloat() - 0.5), boundingBox.minY + 0.1, posZ + ((double)rand.nextFloat() - 0.5), 1.0 + ((double)rand.nextFloat() - 0.5), 1.0 + ((double)rand.nextFloat() - 0.5), 1.0 + ((double)rand.nextFloat() - 0.5));
- }
- }
-
- if (!worldObj.isRemote) setDead();
+ //return 1.2f;
+ return 1.2f;
+ }
+
+ @Override
+ void detonate()
+ {
+ doSplashDamage(1.0, 2); // very small splash damage
- return;
- }
-
- posX += motionX;
- posY += motionY;
- posZ += motionZ;
+ // no explosion, just the sound
+ worldObj.playSoundAtEntity(this, "random.explode", .7f, .5f + (float) Math.random() * .2f);
- setPosition(posX, posY, posZ);
-
- if(!enteredWater && inWater)
- {
- enteredWater = true;
-
- worldObj.playSoundAtEntity(this, "random.splash", 1f, 1f);
- for(int l = 0; l < 4; l++)
- {
- float f3 = 0.25F;
- worldObj.spawnParticle("bubble", posX - motionX * (double)f3, posY - motionY * (double)f3, posZ - motionZ * (double)f3, motionX, motionY, motionZ);
- }
- }
+ setDead();
}
}
View
3  project/src-thx/server/net/minecraft/src/EntityTrackerEntry.java
@@ -106,12 +106,11 @@ public void updatePlayerList(List par1List)
Packet packet = ((IClientDriven) trackedEntity).getUpdatePacket();
for (Object player : trackedPlayers)
{
- // send update packet to all clients except pilot
+ // send update packet to all clients except pilot, if there is one
if (player.equals(trackedEntity.riddenByEntity)) continue;
((EntityPlayerMP)player).playerNetServerHandler.sendPacket(packet);
}
-
// used by updatePlayerEntity for spawn/despawn trigger
encodedPosX = MathHelper.floor_double(trackedEntity.posX * 32D);
encodedPosY = MathHelper.floor_double(trackedEntity.posY * 32D);
View
11 project/src-thx/server/net/minecraft/src/ThxConfig.java
@@ -8,6 +8,17 @@
public class ThxConfig extends ThxConfigBase
{
+ ThxConfig()
+ {
+ loadProperties();
+ }
+
+ @Override
+ String getFilename()
+ {
+ return "mods/mod_thx_options.cfg";
+ }
+
@Override
boolean loadDefaults(Properties props)
{
View
10 project/src-thx/server/net/minecraft/src/ThxEntityHelicopter.java
@@ -8,13 +8,17 @@
public ThxEntityHelicopter(World world)
{
super(world);
- helper = new ThxEntityHelperServer(this);
}
public ThxEntityHelicopter(World world, double x, double y, double z, float yaw)
{
- this(world);
- setPositionAndRotation(x, y + yOffset, z, yaw, 0f);
+ super(world, x, y, z, yaw);
+ }
+
+ @Override
+ ThxEntityHelper createHelper()
+ {
+ return new ThxEntityHelperServer(this);
}
@Override
View
4 project/src-thx/server/net/minecraft/src/ThxEntityMissile.java
@@ -7,9 +7,9 @@ public ThxEntityMissile(World world)
super(world);
}
- public ThxEntityMissile(World world, double x, double y, double z, double dx, double dy, double dz, float yaw, float pitch)
+ public ThxEntityMissile(Entity owner, double x, double y, double z, double dx, double dy, double dz, float yaw, float pitch)
{
- super(world, x, y, z, dx, dy, dz, yaw, pitch);
+ super(owner, x, y, z, dx, dy, dz, yaw, pitch);
}
@Override
View
9 project/src-thx/server/net/minecraft/src/ThxEntityRocket.java
@@ -1,8 +1,5 @@
package net.minecraft.src;
-import java.util.List;
-import java.util.Random;
-
public class ThxEntityRocket extends ThxEntityRocketBase implements ISpawnable
{
public ThxEntityRocket(World world)
@@ -16,12 +13,6 @@ public ThxEntityRocket(Entity owner, double x, double y, double z, double dx, do
}
@Override
- public void onUpdate()
- {
- super.onUpdate();
- }
-
- @Override
ThxEntityHelper createHelper()
{
return new ThxEntityHelperServer(this);
View
8 project/src-thx/server/net/minecraft/src/mod_Thx.java
@@ -37,7 +37,8 @@ public mod_Thx()
logger.warning("log warning test");
*/
- log("mod_Thx() called");
+ //log("mod_Thx() called");
+ System.out.println("mod_Thx() called");
config = new ThxConfig();
@@ -120,15 +121,12 @@ public void load()
public String getVersion()
{
// log("getVersion called");
- return "Minecraft THX Helicopter Mod - mod_thx-mc125_v017";
+ return "Minecraft THX Helicopter Mod - mod_thx-mc125_v018";
}
@Override
public void handlePacket(Packet230ModLoader packet, EntityPlayerMP player)
{
- // log("Received packet type " + packet.packetType + " from player " + player);
- // log("player.ridingEntity: " + player.ridingEntity); // TODO: coming up null
-
if (player.ridingEntity instanceof IClientDriven)
{
// try calling applyUpdatePacket(packet);
View
17 project_client/.classpath 100755 → 100644
@@ -1,11 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src-thx_common"/>
- <classpathentry kind="src" path="src-thx_client"/>
+ <classpathentry kind="src" path="thx/src-thx/client"/>
+ <classpathentry kind="src" path="thx/src-thx/common"/>
+ <classpathentry kind="src" path="mc_ref/src/minecraft"/>
+ <classpathentry kind="lib" path="mcp/bin/jinput.jar"/>
+ <classpathentry kind="lib" path="mcp/bin/lwjgl_util.jar"/>
+ <classpathentry kind="lib" path="mcp/bin/lwjgl.jar">
+ <attributes>
+ <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="project_client/mcp/bin/natives"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="lib" path="mcp/bin/minecraft.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="C:/Dropbox/minecraft/workspace_git_mod_thx/project/lib/jinput.jar"/>
- <classpathentry kind="lib" path="C:/Dropbox/minecraft/workspace_git_mod_thx/project/lib/lwjgl.jar"/>
- <classpathentry kind="lib" path="C:/Dropbox/minecraft/workspace_git_mod_thx/project/lib/lwjgl_util.jar"/>
- <classpathentry kind="lib" path="C:/Dropbox/minecraft/reference_jars/mc_125/minecraft-dev125-mlmp-lib.jar" sourcepath="C:/Dropbox/minecraft/reference_jars/mc_125/minecraft-dev125-mlmp-src.zip"/>
<classpathentry kind="output" path="temp"/>
</classpath>
View
23 project_client/.project 100755 → 100644
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>xmc_thx_mod_client</name>
+ <name>project_client</name>
<comment></comment>
<projects>
</projects>
@@ -16,18 +16,31 @@
</natures>
<linkedResources>
<link>
- <name>src-thx_client</name>
+ <name>mc_ref</name>
<type>2</type>
- <locationURI>THX_HOME/src-thx/client</locationURI>
+ <locationURI>MC_HOME</locationURI>
</link>
<link>
- <name>src-thx_common</name>
+ <name>mcp</name>
<type>2</type>
- <locationURI>THX_HOME/src-thx/common</locationURI>
+ <locationURI>MCP_HOME/jars</locationURI>
+ </link>
+ <link>
+ <name>thx</name>
+ <type>2</type>
+ <locationURI>THX_HOME</locationURI>
</link>
</linkedResources>
<variableList>
<variable>
+ <name>MCP_HOME</name>
+ <value>file:/C:/Dropbox/minecraft/mcp62-125</value>
+ </variable>
+ <variable>
+ <name>MC_HOME</name>
+ <value>file:/C:/Dropbox/minecraft/reference_jars/mc_125</value>
+ </variable>
+ <variable>
<name>THX_HOME</name>
<value>file:/C:/Dropbox/minecraft/workspace_git_mod_thx/project</value>
</variable>
View
0  project_client/build.xml 100755 → 100644
File mode changed
View
17 project_client/project_client_debug.launch
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/project_client/mc_ref/src/minecraft/Start.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="${workspace_loc:/project_client/debug.log}"/>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="Start"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="project_client"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xincgc -Xmx1024M -Xms1024M"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:project_client/mcp}"/>
+</launchConfiguration>
View
7 project_server/.classpath 100755 → 100644
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src-thx_common"/>
- <classpathentry kind="src" path="src-thx_server"/>
+ <classpathentry kind="src" path="thx/src-thx/server"/>
+ <classpathentry kind="src" path="thx/src-thx/common"/>
+ <classpathentry excluding="net/minecraft/src/EntityTrackerEntry.java" kind="src" path="mc_ref/src/minecraft_server"/>
+ <classpathentry kind="lib" path="mcp/minecraft_server.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="C:/Dropbox/minecraft/reference_jars/mc_125/minecraft_server-dev125-mlmp-lib.jar" sourcepath="C:/Dropbox/minecraft/reference_jars/mc_125/minecraft_server-dev125-mlmp-src.zip"/>
<classpathentry kind="output" path="temp"/>
</classpath>
View
23 project_server/.project 100755 → 100644
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>xmc_thx_mod_server</name>
+ <name>project_server</name>
<comment></comment>
<projects>
</projects>
@@ -16,18 +16,31 @@