mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 11:45:51 +00:00
Allow Androids movement in CAVE_AIR
This commit is contained in:
parent
3619c4bc9e
commit
d85a51ed87
@ -104,7 +104,6 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
|
|||||||
public ProgrammableAndroid(Category category, ItemStack item, String name, RecipeType recipeType, ItemStack[] recipe) {
|
public ProgrammableAndroid(Category category, ItemStack item, String name, RecipeType recipeType, ItemStack[] recipe) {
|
||||||
super(category, item, name, recipeType, recipe);
|
super(category, item, name, recipeType, recipe);
|
||||||
|
|
||||||
|
|
||||||
if (getTier() == 1) {
|
if (getTier() == 1) {
|
||||||
registerFuel(new MachineFuel(80, new ItemStack(Material.COAL)));
|
registerFuel(new MachineFuel(80, new ItemStack(Material.COAL)));
|
||||||
registerFuel(new MachineFuel(80, new ItemStack(Material.CHARCOAL)));
|
registerFuel(new MachineFuel(80, new ItemStack(Material.CHARCOAL)));
|
||||||
@ -287,7 +286,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
|
|||||||
ScriptPart part = ScriptPart.valueOf(script[index]);
|
ScriptPart part = ScriptPart.valueOf(script[index]);
|
||||||
|
|
||||||
if (getAndroidType().isType(part.getRequiredType())) {
|
if (getAndroidType().isType(part.getRequiredType())) {
|
||||||
switch(part) {
|
switch (part) {
|
||||||
case GO_DOWN: {
|
case GO_DOWN: {
|
||||||
try {
|
try {
|
||||||
BlockFace face = BlockFace.valueOf(BlockStorage.getLocationInfo(b.getLocation(), "rotation"));
|
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 {
|
private void move(Block b, BlockFace face, Block block) throws Exception {
|
||||||
if (block.getY() < 0 || block.getY() > block.getWorld().getMaxHeight()) return;
|
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);
|
block.setType(Material.PLAYER_HEAD);
|
||||||
Rotatable blockData = (Rotatable) block.getBlockData();
|
Rotatable blockData = (Rotatable) block.getBlockData();
|
||||||
blockData.setRotation(face);
|
blockData.setRotation(face);
|
||||||
|
Loading…
Reference in New Issue
Block a user