Skip to content

Commit daec471

Browse files
moved terasology classes
1 parent 2442d19 commit daec471

File tree

7 files changed

+23
-308
lines changed

7 files changed

+23
-308
lines changed

.classpath

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
<classpathentry kind="src" path="test"/>
55
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
66
<classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?project=modapi&amp;ivyXmlPath=ivy.xml&amp;confs=*"/>
7-
<classpathentry combineaccessrules="false" kind="src" path="/Terasology"/>
87
<classpathentry kind="output" path="bin"/>
98
</classpath>

src/org/ironchefpython/modapi/EventFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.ironchefpython.modapi;
22

3-
import java.util.Map;
3+
44

55

66

src/org/ironchefpython/modapi/ModManager.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
import org.ironchefpython.modapi.error.InvalidComponentRegistration;
77
import org.ironchefpython.modapi.error.InvalidEventRegistration;
88
import org.ironchefpython.modapi.error.UnregisteredEventException;
9-
import org.mockengine.*;
10-
119

1210

1311
public class ModManager {

src/org/mockengine/DynamicComponent.java

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/org/mockengine/DynamicEntitySystemFactory.java

Lines changed: 0 additions & 143 deletions
This file was deleted.

src/org/mockengine/DynamicSystem.java

Lines changed: 0 additions & 84 deletions
This file was deleted.

test/org/ironchefpython/rhinodemo/HealthTest.java

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
import org.ironchefpython.modapi.*;
44

55
import org.junit.Test;
6-
import org.mockengine.DynamicComponent;
7-
import org.mockengine.DynamicComponent.Getter;
8-
import org.mockengine.DynamicComponent.Constructor;
9-
import org.mockengine.DynamicEntitySystemFactory;
10-
import org.mockengine.DynamicSystem;
116

127

138

@@ -28,28 +23,28 @@ public void mockTest() throws Exception {
2823
mm.runScript(HealthTest.class.getResourceAsStream("health.js"), "health.js");
2924

3025
// Create a factory that turns prototypes into Terasology Classes
31-
DynamicEntitySystemFactory componentFactory = new DynamicEntitySystemFactory(mm);
32-
33-
// Create the HealthComponent class
34-
Class<? extends DynamicComponent> HealthComponent = componentFactory.getComponent("Health");
35-
36-
// Create a Constructor object that makes a new HealthComponent
37-
Constructor ctr = new Constructor(HealthComponent, Number.class, Number.class, Number.class);
38-
39-
// Create a new HealthComponent instance
40-
DynamicComponent o = ctr.newInstance(1,2,3);
41-
42-
// Create a getter for a HealthComponent property
43-
Getter getRatio = o.new Getter(HealthComponent, "ratio");
44-
45-
// Get the value for the property "ratio" on the instance o
46-
Number ratio = (Number) getRatio.get(o);
47-
48-
System.out.println(ratio);
49-
50-
51-
DynamicSystem healthSystem = componentFactory.getSystem("Health");
52-
26+
// DynamicEntitySystemFactory componentFactory = new DynamicEntitySystemFactory(mm);
27+
//
28+
// // Create the HealthComponent class
29+
// Class<? extends DynamicComponent> HealthComponent = componentFactory.getComponent("Health");
30+
//
31+
// // Create a Constructor object that makes a new HealthComponent
32+
// Constructor ctr = new Constructor(HealthComponent, Number.class, Number.class, Number.class);
33+
//
34+
// // Create a new HealthComponent instance
35+
// DynamicComponent o = ctr.newInstance(1,2,3);
36+
//
37+
// // Create a getter for a HealthComponent property
38+
// Getter getRatio = o.new Getter(HealthComponent, "ratio");
39+
//
40+
// // Get the value for the property "ratio" on the instance o
41+
// Number ratio = (Number) getRatio.get(o);
42+
//
43+
// System.out.println(ratio);
44+
//
45+
//
46+
// DynamicSystem healthSystem = componentFactory.getSystem("Health");
47+
//
5348
}
5449

5550
}

0 commit comments

Comments
 (0)