Permalink
Browse files

1.2.4 Update (still using dzHooksManager, modloader Packet250 handler…

… doesn't provide the needed functionality!
  • Loading branch information...
1 parent a551488 commit 4a365b2fa9ad1152f99ebbe4e1e41f544c64fa60 @GuntherDW committed Mar 24, 2012
Showing with 33 additions and 33 deletions.
  1. +8 −8 src/SnowBallRecipe.java
  2. +14 −14 src/SnowBallShapedRecipe.java
  3. +11 −11 src/mod_SnowBalls.java
View
@@ -23,31 +23,31 @@
*/
public class SnowBallRecipe {
- private List<aai> ingredients;
- private aai result;
+ private List<aan> ingredients;
+ private aan result;
- public SnowBallRecipe(aai result, List<aai> ingredients) {
+ public SnowBallRecipe(aan result, List<aan> ingredients) {
this.ingredients = ingredients;
this.result = result;
}
- public List<aai> getIngredients() {
+ public List<aan> getIngredients() {
return ingredients;
}
- public void setIngredients(List<aai> ingredients) {
+ public void setIngredients(List<aan> ingredients) {
this.ingredients = ingredients;
}
- public aai getResult() {
+ public aan getResult() {
return result;
}
- public void setResult(aai result) {
+ public void setResult(aan result) {
this.result = result;
}
- public void addIngredient(aai ingredient) {
+ public void addIngredient(aan ingredient) {
if (ingredient != null && ingredient.c > 0 && ingredient.c < 1024)
this.ingredients.add(ingredient);
}
@@ -27,52 +27,52 @@
public class SnowBallShapedRecipe {
// private List<iz> ingredients;
- private Map<Integer, aai> ingredients;
- private aai result;
+ private Map<Integer, aan> ingredients;
+ private aan result;
- public SnowBallShapedRecipe(aai result) {
+ public SnowBallShapedRecipe(aan result) {
this.result = result;
- this.ingredients = new HashMap<Integer, aai>();
+ this.ingredients = new HashMap<Integer, aan>();
}
- public SnowBallShapedRecipe(aai result, Map<Integer, aai> ingredients) {
+ public SnowBallShapedRecipe(aan result, Map<Integer, aan> ingredients) {
this.result = result;
this.ingredients = ingredients;
}
- public SnowBallShapedRecipe(aai result, List<aai> ing) {
+ public SnowBallShapedRecipe(aan result, List<aan> ing) {
this.result = result;
- this.ingredients = new HashMap<Integer, aai>();
+ this.ingredients = new HashMap<Integer, aan>();
for (int x = 0; x < 9; x++) {
if (ing.get(x) != null) {
ingredients.put(x, ing.get(x));
}
}
}
- public aai getResult() {
+ public aan getResult() {
return result;
}
- public void setResult(aai result) {
+ public void setResult(aan result) {
this.result = result;
}
- public Map<Integer, aai> getIngredients() {
+ public Map<Integer, aan> getIngredients() {
return ingredients;
}
- public void setIngredients(Map<Integer, aai> ingredients) {
+ public void setIngredients(Map<Integer, aan> ingredients) {
this.ingredients = ingredients;
}
- public void setIngredientSpot(int spot, aai ingredient) {
+ public void setIngredientSpot(int spot, aan ingredient) {
if (spot >= 0 && spot < 9) {
this.ingredients.put(spot, ingredient);
}
}
- public aai getIngredientSpot(int spot) {
+ public aan getIngredientSpot(int spot) {
if (this.ingredients.containsKey(spot)) {
return this.ingredients.get(spot);
} else {
@@ -92,7 +92,7 @@ public aai getIngredientSpot(int spot) {
int ingcount = 0;
- for (aai ing : ingredients.values()) {
+ for (aan ing : ingredients.values()) {
if (!ings.contains(ing.c)) {
ings.add(ing.c);
char c = 'A';
View
@@ -58,7 +58,7 @@ public mod_SnowBalls() {
@Override
public String getVersion() {
- return "v0.7 for f1.2.3 SUIv2 GuntherDW, sk89q, lawhran";
+ return "v0.7 for f1.2.4 SUIv2 GuntherDW, sk89q, lawhran";
}
@Override
@@ -87,7 +87,7 @@ private void setItemMaxStack(Integer itemId, int maxstack) {
if (DEBUG)
log("§6" + itemId + " : " + maxstack);
try {
- ym.e[itemId].f(maxstack);
+ yr.e[itemId].f(maxstack);
} catch (ArrayIndexOutOfBoundsException ex) {
return;
}
@@ -154,9 +154,9 @@ private boolean addRecipe(String result, String[] args, boolean inject) {
inject = true;
Integer Iid, Idmg, Iam;
Integer tid, tdmg, tam;
- List<aai> recipe = new ArrayList<aai>();
- aai ResultItemStack = null;
- aai tempstack = null;
+ List<aan> recipe = new ArrayList<aan>();
+ aan ResultItemStack = null;
+ aan tempstack = null;
String[] res = result.split(":");
Integer type = null;
String resu = "";
@@ -178,7 +178,7 @@ private boolean addRecipe(String result, String[] args, boolean inject) {
Iid = Integer.parseInt(resultitem[0]);
Idmg = Integer.parseInt(resultitem[1]);
Iam = Integer.parseInt(resultitem[2]);
- ResultItemStack = new aai(Iid, Iam, Idmg);
+ ResultItemStack = new aan(Iid, Iam, Idmg);
// System.out.println("Adding recipe for "+Iam+" "+ResultItemStack.l());
/**
* 0 or nothing (older format) : ShapeLess recipe
@@ -190,7 +190,7 @@ private boolean addRecipe(String result, String[] args, boolean inject) {
tid = Integer.parseInt(ra[0]);
tdmg = ra.length > 1 ? Integer.parseInt(ra[1]) : 0;
tam = ra.length > 2 ? Integer.parseInt(ra[2]) : 1;
- tempstack = new aai(tid, tam, tdmg);
+ tempstack = new aan(tid, tam, tdmg);
recipe.add(tempstack);
}
SnowBallRecipe sr = new SnowBallRecipe(ResultItemStack, recipe);
@@ -207,7 +207,7 @@ private boolean addRecipe(String result, String[] args, boolean inject) {
tid = Integer.parseInt(ra[0]);
tdmg = ra.length > 1 ? Integer.parseInt(ra[1]) : 0;
tam = ra.length > 2 ? Integer.parseInt(ra[2]) : 1;
- tempstack = new aai(tid, tam, tdmg);
+ tempstack = new aan(tid, tam, tdmg);
if (pos < 9) {
shr.setIngredientSpot(pos, tempstack);
}
@@ -268,7 +268,7 @@ public void onEvent(ChatEvent chatEvent) {
}
} */
- public void receivePacket(eb var1) {
+ public void receivePacket(ee var1) {
Set<String> recipeLines = new HashSet<String>();
String recipeLine = "";
for (byte b1 : var1.c) {
@@ -288,8 +288,8 @@ public void receivePacket(eb var1) {
}
}
- public eb getRegisterPacket() {
- eb registerPacket = new eb();
+ public ee getRegisterPacket() {
+ ee registerPacket = new ee();
registerPacket.a = snowballsPluginMessageChannel;
registerPacket.c = new byte[1];
registerPacket.c[0] = (byte) 26;

0 comments on commit 4a365b2

Please sign in to comment.