本文整理汇总了Java中team.chisel.api.carving.CarvingUtils类的典型用法代码示例。如果您正苦于以下问题:Java CarvingUtils类的具体用法?Java CarvingUtils怎么用?Java CarvingUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CarvingUtils类属于team.chisel.api.carving包,在下文中一共展示了CarvingUtils类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createModel
import team.chisel.api.carving.CarvingUtils; //导入依赖的package包/类
@Override
public ModelQuadruped createModel(ItemStack itemStack, EntityLivingBase entity)
{
transforms.defineParts();
final ICarvingVariation variation = CarvingUtils.getChiselRegistry().getVariation(itemStack);
final BlockPos position = entity.getPosition();
final World world = entity.getEntityWorld();
final ModelQuadruped quadrupedModel = new ModelSheep1();
transforms.getBodyPartDefinition().ifPresent(definition -> quadrupedModel.body = getChiselBodyModelRenderer(variation, definition, world, position));
transforms.getHeadPartDefinition().ifPresent(definition -> quadrupedModel.head = getChiselBodyModelRenderer(variation, definition, world, position));
transforms.getLeg1PartDefinition().ifPresent(definition -> quadrupedModel.leg1 = getChiselBodyModelRenderer(variation, definition, world, position));
transforms.getLeg2PartDefinition().ifPresent(definition -> quadrupedModel.leg2 = getChiselBodyModelRenderer(variation, definition, world, position));
transforms.getLeg3PartDefinition().ifPresent(definition -> quadrupedModel.leg3 = getChiselBodyModelRenderer(variation, definition, world, position));
transforms.getLeg4PartDefinition().ifPresent(definition -> quadrupedModel.leg4 = getChiselBodyModelRenderer(variation, definition, world, position));
return quadrupedModel;
}
示例2: onShearMadnessRegisterVariations
import team.chisel.api.carving.CarvingUtils; //导入依赖的package包/类
@SubscribeEvent(priority = EventPriority.LOWEST)
@Optional.Method(modid = "shearmadness")
@SideOnly(Side.CLIENT)
public static void onShearMadnessRegisterVariations(RegisterShearMadnessVariationEvent event) {
final IVariationRegistry registry = event.getRegistry();
//Java 8 Style Registration
registry.registerVariation(
itemStack -> CarvingUtils.getChiselRegistry().getVariation(itemStack) != null,
new DefaultChiselModelMaker()
);
}
示例3: mainRegistry
import team.chisel.api.carving.CarvingUtils; //导入依赖的package包/类
/** Register the carving stuff */
public static void mainRegistry() {
try {
// add new groups
CarvingUtils.getChiselRegistry().addGroup(new CarvingGroup("thunder", new CarvingVariationList(
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.THUNDER),
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.THUNDER_BRICK),
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.THUNDER_BRICK_CHISELED),
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.THUNDER_BRICK_FANCY),
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.THUNDER_BRICK_FANCY_2)
)));
CarvingUtils.getChiselRegistry().addGroup(new CarvingGroup("demon", new CarvingVariationList(
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.DEMON),
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.DEMON_BRICK),
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.DEMON_BRICK_CHISELED),
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.DEMON_BRICK_FANCY),
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.DEMON_BRICK_FANCY_2)
)));
CarvingUtils.getChiselRegistry().addGroup(new CarvingGroup("under", new CarvingVariationList(
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.UNDER),
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.UNDER_BRICK),
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.UNDER_BRICK_CHISELED),
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.UNDER_BRICK_FANCY),
new CarvingVariation(LCBlocks.stoneBlock, BlockStone.UNDER_BRICK_FANCY_2)
)));
CarvingUtils.getChiselRegistry().addGroup(new CarvingGroup("lamp", new CarvingVariationList(
new CarvingVariation(LCBlocks.lightBlock, BlockLight.UNDER_LAMP_FANCY),
new CarvingVariation(LCBlocks.lightBlock, BlockLight.UNDER_LAMP_FANCY_2),
new CarvingVariation(LCBlocks.lightBlock, BlockLight.UNDER_LAMP_FANCY_3)
)));
// add blocks to existing groups
if(LCConfig.chiselCorruptStone) {
CarvingUtils.getChiselRegistry().addVariation("stonebrick", new CarvingVariation(LCBlocks.corruptStone, 0));
}
Log.logger.info("Chisel integration complete.");
} catch(Exception e) {
Log.logger.error("Chisel integration failed!");
e.printStackTrace();
}
}