1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Allow Androids movement in CAVE_AIR

This commit is contained in:
SoSeDiK 2019-03-26 22:24:50 +02:00
parent 3619c4bc9e
commit d85a51ed87

View File

@ -104,7 +104,6 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
public ProgrammableAndroid(Category category, ItemStack item, String name, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, name, recipeType, recipe);
if (getTier() == 1) {
registerFuel(new MachineFuel(80, new ItemStack(Material.COAL)));
registerFuel(new MachineFuel(80, new ItemStack(Material.CHARCOAL)));
@ -287,7 +286,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
ScriptPart part = ScriptPart.valueOf(script[index]);
if (getAndroidType().isType(part.getRequiredType())) {
switch(part) {
switch (part) {
case GO_DOWN: {
try {
BlockFace face = BlockFace.valueOf(BlockStorage.getLocationInfo(b.getLocation(), "rotation"));
@ -711,7 +710,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
private void move(Block b, BlockFace face, Block block) throws Exception {
if (block.getY() < 0 || block.getY() > block.getWorld().getMaxHeight()) return;
if (block.getType() == Material.AIR) {
if (block.getType() == Material.AIR || block.getType() == Material.CAVE_AIR) {
block.setType(Material.PLAYER_HEAD);
Rotatable blockData = (Rotatable) block.getBlockData();
blockData.setRotation(face);
@ -1508,4 +1507,4 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
return list;
}
}
}