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

Merge pull request #402 from Poslovitch/391-395-fix

Blockstates must be explicitly updated as of 1.12.1
This commit is contained in:
TheBusyBiscuit 2017-08-21 18:28:31 +02:00 committed by GitHub
commit 91150e53a6
3 changed files with 7 additions and 6 deletions

View File

@ -200,7 +200,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
b.setData((byte) 1);
Skull skull = (Skull) b.getState();
skull.setRotation(BlockFace.NORTH);
skull.update();
skull.update(true, false);
}
@Override
@ -297,7 +297,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
BlockFace dir = directions.get(rotIndex);
Skull skull = (Skull) b.getState();
skull.setRotation(dir);
skull.update();
skull.update(true, false);
BlockStorage.addBlockInfo(b, "rotation", dir.toString());
break;
}
@ -307,7 +307,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
BlockFace dir = directions.get(rotIndex);
Skull skull = (Skull) b.getState();
skull.setRotation(dir);
skull.update();
skull.update(true, false);
BlockStorage.addBlockInfo(b, "rotation", dir.toString());
break;
}
@ -690,7 +690,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
Skull skull = (Skull) block.getState();
skull.setRotation(face);
skull.update();
skull.update(true, false);
CustomSkull.setSkull(block, CustomSkull.getTexture(getItem()));
b.setType(Material.AIR);
BlockStorage.moveBlockInfo(b, block);
@ -723,7 +723,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
Skull skull = (Skull) block.getState();
skull.setRotation(face);
skull.update();
skull.update(true, false);
CustomSkull.setSkull(block, CustomSkull.getTexture(getItem()));
b.setType(Material.AIR);
BlockStorage.moveBlockInfo(b, block);

View File

@ -32,7 +32,7 @@ public class EnhancedFurnace extends SlimefunItem {
if (((Furnace) b.getState()).getCookTime() > 0) {
((Furnace) b.getState()).setCookTime((short) (((Furnace) b.getState()).getCookTime() + getSpeed() * 10));
}
b.getState().update();
b.getState().update(true, false);
} catch(NullPointerException x) {
}
}

View File

@ -2715,6 +2715,7 @@ public class SlimefunSetup {
}
if (type != null) {
((CreatureSpawner) e.getBlock().getState()).setSpawnedType(type);
e.getBlock().getState().update(true, false);
}
return true;
}