master
Soper Aylamo 2021-05-22 18:11:20 -04:00
parent 05e0f30896
commit f5dbf42d01
2 changed files with 23 additions and 18 deletions

View File

@ -13,7 +13,9 @@ import java.util.Random;
*/
public class Mortar {
/**The block that represents this mortar.*/
/**
* The block that represents this mortar.
*/
private final Block block;
/**
@ -51,6 +53,11 @@ public class Mortar {
Nameable brewingStandMortar = (Nameable) mortar.getState();
String mortarName = brewingStandMortar.getCustomName();
if(block.hasMetadata("direction_x")){
// float x = block.getMetadata("direction_x").;
// float TODO: figure out metadata
}
if(mortarName.equals(BASIC_MORTAR_NAME)){
failMultiplier = 25;
jamChance = .4;

View File

@ -103,23 +103,21 @@ public class Shell {
for(int i = 0; i < shellStats.length(); i++){
if(shellStats.charAt(i) == ','){
commaCount++;
switch(commaCount) {
case 1: //Parsing explosive power
if(commaCount == 1){ //Parsing explosive power
explosivePower = Float.parseFloat(shellStats.substring(0, i));
lastCommaIndex = i;
break;
case 2: //Parsing penetration value
}
else if(commaCount == 2){ //Parsing penetration value
penetration = Integer.parseInt(shellStats.substring(lastCommaIndex + 1, i));
lastCommaIndex = i;
break;
case 3: //Parsing incendiary type
}
else if(commaCount == 3){ //Parsing incendiary type
incendiaryType = Boolean.parseBoolean(shellStats.substring(lastCommaIndex + 1, i));
lastCommaIndex = i;
break;
case 4: //Parsing base velocity and fail chance
}
else if(commaCount == 4){ //Parsing base velocity and fail chance
baseVelocity = Double.parseDouble(shellStats.substring(lastCommaIndex + 1, i));
failChance = Double.parseDouble(shellStats.substring(i + 1));
break;
}
}
}