本文整理了Java中net.minecraft.block.Block.setResistance()
方法的一些代码示例,展示了Block.setResistance()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.setResistance()
方法的具体详情如下:
包路径:net.minecraft.block.Block
类名称:Block
方法名:setResistance
暂无
代码示例来源:origin: Vazkii/Quark
@Override
public void preInit(FMLPreInitializationEvent event) {
ImmutableSet.of(Blocks.WHITE_SHULKER_BOX, Blocks.ORANGE_SHULKER_BOX, Blocks.MAGENTA_SHULKER_BOX, Blocks.LIGHT_BLUE_SHULKER_BOX,
Blocks.YELLOW_SHULKER_BOX, Blocks.LIME_SHULKER_BOX, Blocks.PINK_SHULKER_BOX, Blocks.GRAY_SHULKER_BOX,
Blocks.SILVER_SHULKER_BOX, Blocks.CYAN_SHULKER_BOX, Blocks.PURPLE_SHULKER_BOX, Blocks.BLUE_SHULKER_BOX,
Blocks.BROWN_SHULKER_BOX, Blocks.GREEN_SHULKER_BOX, Blocks.RED_SHULKER_BOX, Blocks.BLACK_SHULKER_BOX)
.forEach((b) -> b.setResistance(2000));
}
代码示例来源:origin: PrinceOfAmber/Cyclic
public BlockUncrafting() {
super(Material.IRON, ForgeGuiHandler.GUI_INDEX_UNCRAFTING);
this.setHardness(3.0F).setResistance(5.0F);
this.setSoundType(SoundType.METAL);
}
代码示例来源:origin: PrinceOfAmber/Cyclic
public BlockStructureBuilder() {
super(Material.IRON, ForgeGuiHandler.GUI_INDEX_BUILDER);
this.setHardness(3.0F).setResistance(5.0F);
this.setSoundType(SoundType.METAL);
}
代码示例来源:origin: PrinceOfAmber/Cyclic
public BlockForester() {
super(Material.IRON, ForgeGuiHandler.GUI_INDEX_FORESTER);
this.setHardness(3.0F).setResistance(5.0F);
this.setSoundType(SoundType.METAL);
}
代码示例来源:origin: PrinceOfAmber/Cyclic
public BlockMinerSmart() {
super(Material.IRON, ForgeGuiHandler.GUI_INDEX_SMARTMINER);
this.setHardness(3.0F).setResistance(5.0F);
this.setSoundType(SoundType.METAL);
}
代码示例来源:origin: CyclopsMC/EvilCraft
@Override
protected IConfigurable initSubInstance() {
Block block = new ConfigurableBlock(this, Material.ROCK) {
@Override
public SoundType getSoundType() {
return SoundType.STONE;
}
}.setHardness(1.5F).setResistance(10.0F);
block.setHarvestLevel("pickaxe", 0);
return (ConfigurableBlock) block;
}
代码示例来源:origin: SleepyTrousers/EnderIO
private static Block create(@Nonnull IModObject modObject, @Nonnull Material material, @Nonnull SoundType sound, @Nonnull Block... paintables) {
BlockPaintedSlab.BlockPaintedHalfSlab halfSlab = new BlockPaintedSlab.BlockPaintedHalfSlab(modObject, material, sound);
halfSlab.setHardness(2.0F).setResistance(5.0F);
halfSlab.init(modObject);
MachineRecipeRegistry.instance.registerRecipe(MachineRecipeRegistry.PAINTER, new BasicPainterTemplate<BlockPaintedSlab>(halfSlab, paintables));
return halfSlab;
}
代码示例来源:origin: SleepyTrousers/EnderIO
private static Block create_double(@Nonnull IModObject modObject, @Nonnull Material material, @Nonnull SoundType sound) {
if (modObject instanceof ModObject) {
final ModObject halfSlabObject = ModObject.values()[((ModObject) modObject).ordinal() - 1];
BlockPaintedSlab.BlockPaintedHalfSlab halfSlabBlock = (BlockPaintedSlab.BlockPaintedHalfSlab) halfSlabObject.getBlockNN();
BlockPaintedSlab.BlockPaintedDoubleSlab doubleSlab = new BlockPaintedSlab.BlockPaintedDoubleSlab(modObject, material, halfSlabBlock, sound);
doubleSlab.setHardness(2.0F).setResistance(5.0F);
doubleSlab.init(modObject);
return doubleSlab;
} else {
throw new RuntimeException("Bad block initialization, " + modObject + " is not a ModObject!");
}
}
代码示例来源:origin: TerraFirmaCraft/TerraFirmaCraft
public BlockBookshelfTFC(Tree wood)
{
super(Material.WOOD);
if (MAP.put(wood, this) != null) throw new IllegalStateException("There can only be one.");
this.wood = wood;
setSoundType(SoundType.WOOD);
setHardness(2.0F).setResistance(5.0F);
setHarvestLevel("axe", 0);
OreDictionaryHelper.register(this, "bookshelf");
Blocks.FIRE.setFireInfo(this, 30, 20);
}
代码示例来源:origin: PrinceOfAmber/Cyclic
public BlockMiner() {
super(Material.IRON);
this.setHardness(3.0F).setResistance(5.0F);
this.setSoundType(SoundType.METAL);
this.setGuiId(ForgeGuiHandler.GUI_INDEX_BLOCKMINER);
}
代码示例来源:origin: PrinceOfAmber/Cyclic
public BlockAnvilAuto(@Nonnull Block center) {
super(Material.ANVIL);
this.setSoundType(SoundType.ANVIL);
super.setGuiId(ForgeGuiHandler.GUI_INDEX_ANVIL);
this.setHardness(3.0F).setResistance(3.0F);
this.setTranslucent();
this.center = center;
}
代码示例来源:origin: PrinceOfAmber/Cyclic
public BlockXpPylon() {
super(Material.ROCK, ForgeGuiHandler.GUI_INDEX_XP);
this.setHardness(3.0F).setResistance(5.0F);
this.setSoundType(SoundType.GLASS);
this.setTranslucent();
}
代码示例来源:origin: PrinceOfAmber/Cyclic
public BlockVectorPlate() {
super(Material.IRON);//,
this.setHardness(3.0F).setResistance(5.0F);
this.setSoundType(SoundType.METAL);
this.setGuiId(ForgeGuiHandler.GUI_INDEX_VECTOR);
}
代码示例来源:origin: TerraFirmaCraft/TerraFirmaCraft
public BlockWorkbenchTFC(Tree wood)
{
super();
if (MAP.put(wood, this) != null) throw new IllegalStateException("There can only be one.");
this.wood = wood;
setSoundType(SoundType.WOOD);
setHardness(2.0F).setResistance(5.0F);
setHarvestLevel("axe", 0);
OreDictionaryHelper.register(this, "workbench");
Blocks.FIRE.setFireInfo(this, 5, 20);
}
代码示例来源:origin: TeamLapen/Vampirism
public BlockCursedEarth() {
super(name, Material.GROUND);
this.setHardness(0.5F).setResistance(2.0F).setHarvestLevel("shovel", 0);
setSoundType(SoundType.GROUND);
}
代码示例来源:origin: SleepyTrousers/EnderIO
public static BlockPaintedFenceGate create(@Nonnull IModObject modObject) {
BlockPaintedFenceGate result = new BlockPaintedFenceGate(modObject, BlockPlanks.EnumType.OAK);
result.setHardness(2.0F).setResistance(5.0F);
result.init(modObject);
MachineRecipeRegistry.instance.registerRecipe(MachineRecipeRegistry.PAINTER, new BasicPainterTemplate<BlockPaintedFenceGate>(result, Blocks.OAK_FENCE_GATE,
Blocks.ACACIA_FENCE_GATE, Blocks.SPRUCE_FENCE_GATE, Blocks.BIRCH_FENCE_GATE, Blocks.JUNGLE_FENCE_GATE, Blocks.DARK_OAK_FENCE_GATE));
return result;
}
代码示例来源:origin: SleepyTrousers/EnderIO
public static BlockPaintedFence create_stone(@Nonnull IModObject modObject) {
BlockPaintedFence stoneFence = new BlockPaintedFence(modObject, Material.ROCK, MapColor.NETHERRACK, SoundType.STONE);
stoneFence.setHardness(2.0F).setResistance(10.0F);
stoneFence.init(modObject);
MachineRecipeRegistry.instance.registerRecipe(MachineRecipeRegistry.PAINTER,
new BasicPainterTemplate<BlockPaintedFence>(stoneFence, Blocks.NETHER_BRICK_FENCE));
return stoneFence;
}
代码示例来源:origin: PrinceOfAmber/Cyclic
public BlockEnchanter() {
super(Material.ROCK);
super.setGuiId(ForgeGuiHandler.GUI_INDEX_ENCHANTER);
this.setHardness(3.0F).setResistance(5.0F);
this.setSoundType(SoundType.GLASS);
this.setTranslucent();
}
代码示例来源:origin: PrinceOfAmber/Cyclic
public BlockAnvilMagma() {
super(Material.ANVIL);
this.setSoundType(SoundType.ANVIL);
super.setGuiId(ForgeGuiHandler.GUI_INDEX_ANVILMAGMA);
this.setHardness(3.0F).setResistance(3.0F);
this.setTranslucent();
}
代码示例来源:origin: SleepyTrousers/EnderIO
public static BlockPaintedFence create(@Nonnull IModObject modObject) {
BlockPaintedFence woodFence = new BlockPaintedFence(modObject, Material.WOOD, BlockPlanks.EnumType.OAK.getMapColor(), SoundType.WOOD);
woodFence.setHardness(2.0F).setResistance(5.0F);
woodFence.init(modObject);
MachineRecipeRegistry.instance.registerRecipe(MachineRecipeRegistry.PAINTER, new BasicPainterTemplate<BlockPaintedFence>(woodFence, Blocks.OAK_FENCE,
Blocks.ACACIA_FENCE, Blocks.SPRUCE_FENCE, Blocks.BIRCH_FENCE, Blocks.JUNGLE_FENCE, Blocks.DARK_OAK_FENCE));
return woodFence;
}
内容来源于网络,如有侵权,请联系作者删除!