[BLIND] Add block-info for MC 1.10.

This commit is contained in:
asofold 2016-06-09 13:27:43 +02:00
parent f12aa93454
commit 3cdfa4b971
3 changed files with 42 additions and 2 deletions

View File

@ -0,0 +1,40 @@
package fr.neatmonster.nocheatplus.compat.blocks.init.vanilla;
import org.bukkit.Material;
import fr.neatmonster.nocheatplus.compat.blocks.BlockPropertiesSetup;
import fr.neatmonster.nocheatplus.compat.blocks.init.BlockInit;
import fr.neatmonster.nocheatplus.config.WorldConfigProvider;
import fr.neatmonster.nocheatplus.logging.StaticLog;
/**
* Blocks for Minecraft 1.10.
*
* @author asofold
*
*/
public class BlocksMC1_10 implements BlockPropertiesSetup {
public BlocksMC1_10() {
BlockInit.assertMaterialNameMatch(213, "MAGMA");
BlockInit.assertMaterialNameMatch(216, "BONE_BLOCK");
BlockInit.assertMaterialNameMatch(217, "STRUCTURE_VOID");
}
@Override
public void setupBlockProperties(WorldConfigProvider<?> worldConfigProvider) {
// 213 MAGMA
BlockInit.setAs(213, Material.STONE_PLATE);
// 214 NETHER_WART_BLOCK
BlockInit.setAs(214, Material.SKULL);
// 215 RED_NETHER_BRICK
BlockInit.setAs(215, Material.NETHER_BRICK);
// 216 BONE_BLOCK
BlockInit.setAs(216, Material.COBBLESTONE);
// 217 STRUCTURE_VOID
BlockInit.setAs(217, 255); // Like STRUCTURE_BLOCK.
StaticLog.logInfo("Added block-info for Minecraft 1.10 blocks.");
}
}

View File

@ -22,8 +22,6 @@ public class BlocksMC1_9 implements BlockPropertiesSetup {
@Override
public void setupBlockProperties(WorldConfigProvider<?> worldConfigProvider) {
// TODO: Actual similarly fast/slow breaking blocks ?
final long ground = BlockProperties.F_GROUND;
final BlockProps instant = BlockProperties.instantType;
@ -81,6 +79,7 @@ public class BlocksMC1_9 implements BlockPropertiesSetup {
BlockInit.setAs(255, Material.BEDROCK);
// Special case activation.
// TODO: Is this the right place?
BlockProperties.setSpecialCaseTrapDoorAboveLadder(true);
StaticLog.logInfo("Added block-info for Minecraft 1.9 blocks.");

View File

@ -20,6 +20,7 @@ public class VanillaBlocksFactory {
setups.add(new BlocksMC1_7_2());
setups.add(new BlocksMC1_8());
setups.add(new BlocksMC1_9());
setups.add(new BlocksMC1_10());
}
catch(Throwable t){}
for (final BlockPropertiesSetup setup : setups){