• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Properties类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraftforge.common.property.Properties的典型用法代码示例。如果您正苦于以下问题:Java Properties类的具体用法?Java Properties怎么用?Java Properties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Properties类属于net.minecraftforge.common.property包,在下文中一共展示了Properties类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getQuads

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public List<BakedQuad> getQuads(IBlockState blockState, EnumFacing side, long rand)
{
    if (side != null) return ImmutableList.of();
    if (quads == null)
    {
        quads = buildQuads(this.state);
    }
    if (blockState instanceof IExtendedBlockState)
    {
        IExtendedBlockState exState = (IExtendedBlockState) blockState;
        if (exState.getUnlistedNames().contains(Properties.AnimationProperty))
        {

            IModelState newState = exState.getValue(Properties.AnimationProperty);
            if (newState != null)
            {
                newState = new ModelStateComposition(this.state, newState);
                return buildQuads(newState);
            }
        }
    }
    return quads;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:25,代码来源:OBJModel.java


示例2: renderTileEntityFast

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public void renderTileEntityFast(TileEntityFan te, double x, double y, double z, float partialTicks, int destroyStage, float alpha, BufferBuilder renderer) {
	if (blockRenderer == null) blockRenderer = Minecraft.getMinecraft().getBlockRendererDispatcher();

	final BlockPos pos = te.getPos();
	final IBlockAccess world = MinecraftForgeClient.getRegionRenderCache(te.getWorld(), pos);
	IBlockState state = world.getBlockState(pos);

	if (state.getPropertyKeys().contains(Properties.StaticProperty)) {
		state = state.withProperty(Properties.StaticProperty, false);
	}

	if (state instanceof IExtendedBlockState) {
		state = state.getBlock().getExtendedState(state, world, pos);

		IExtendedBlockState exState = ((IExtendedBlockState)state).withProperty(EvalModelState.PROPERTY, te.getTesrRenderState(partialTicks));
		final IBakedModel model = blockRenderer.getBlockModelShapes().getModelForState(exState.getClean());
		renderer.setTranslation(x - pos.getX(), y - pos.getY(), z - pos.getZ());
		blockRenderer.getBlockModelRenderer().renderModel(world, model, exState, pos, renderer, false);
		renderer.setTranslation(0, 0, 0);
	}
}
 
开发者ID:OpenMods,项目名称:OpenBlocks,代码行数:23,代码来源:TileEntityFanRenderer.java


示例3: renderTileEntityFast

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
public void renderTileEntityFast(T te, double x, double y, double z, float partialTick, int breakStage, VertexBuffer renderer)
{
    if(!te.hasCapability(CapabilityAnimation.ANIMATION_CAPABILITY, null))
    {
        return;
    }
    if(blockRenderer == null) blockRenderer = Minecraft.getMinecraft().getBlockRendererDispatcher();
    BlockPos pos = te.getPos();
    IBlockAccess world = MinecraftForgeClient.getRegionRenderCache(te.getWorld(), pos);
    IBlockState state = world.getBlockState(pos);
    if(state.getPropertyNames().contains(Properties.StaticProperty))
    {
        state = state.withProperty(Properties.StaticProperty, false);
    }
    if(state instanceof IExtendedBlockState)
    {
        IExtendedBlockState exState = (IExtendedBlockState)state;
        if(exState.getUnlistedNames().contains(Properties.AnimationProperty))
        {
            float time = Animation.getWorldTime(getWorld(), partialTick);
            Pair<IModelState, Iterable<Event>> pair = te.getCapability(CapabilityAnimation.ANIMATION_CAPABILITY, null).apply(time);
            handleEvents(te, time, pair.getRight());

            // TODO: caching?
            IBakedModel model = blockRenderer.getBlockModelShapes().getModelForState(exState.getClean());
            exState = exState.withProperty(Properties.AnimationProperty, pair.getLeft());

            renderer.setTranslation(x - pos.getX(), y - pos.getY(), z - pos.getZ());

            blockRenderer.getBlockModelRenderer().renderModel(world, model, exState, pos, renderer, false);
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:34,代码来源:AnimationTESR.java


示例4: getExtendedState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public IBlockState getExtendedState(final IBlockState state, final IBlockAccess world, final BlockPos pos)
{
    if (this.checkWorldTile(world, pos))
    {
        final TileSolarMirror tile = this.getWorldTile(world, pos);
        return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty, tile.state);
    }
    return state;
}
 
开发者ID:OPMCorp,项目名称:Qbar,代码行数:11,代码来源:BlockSolarMirror.java


示例5: getExtendedState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public IBlockState getExtendedState(final IBlockState state, final IBlockAccess world, final BlockPos pos)
{
    if (this.checkWorldTile(world, pos))
    {
        final TileLiquidBoiler tile = this.getWorldTile(world, pos);
        return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty, tile.state);
    }
    return state;
}
 
开发者ID:OPMCorp,项目名称:Qbar,代码行数:11,代码来源:BlockLiquidBoiler.java


示例6: getExtendedState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public IBlockState getExtendedState(final IBlockState state, final IBlockAccess world, final BlockPos pos)
{
    if (this.checkWorldTile(world, pos))
    {
        final TileTank tile = this.getWorldTile(world, pos);
        if (tile.getTier() != 0)
            return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty, tile.state);
    }
    return state;
}
 
开发者ID:OPMCorp,项目名称:Qbar,代码行数:12,代码来源:BlockTank.java


示例7: getExtendedState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public IBlockState getExtendedState(final IBlockState state, final IBlockAccess world, final BlockPos pos)
{
    if (this.checkWorldTile(world, pos))
        return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty,
                this.getWorldTile(world, pos).state);
    return state;
}
 
开发者ID:OPMCorp,项目名称:Qbar,代码行数:9,代码来源:BlockExtractor.java


示例8: createBlockState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public BlockStateContainer createBlockState()
{
    return new ExtendedBlockState(this,
            new IProperty[]{BlockMultiblockBase.MULTIBLOCK_GAG, BlockMultiblockBase.FACING},
            new IUnlistedProperty[]{Properties.AnimationProperty});
}
 
开发者ID:OPMCorp,项目名称:Qbar,代码行数:8,代码来源:BlockMultiblockBase.java


示例9: getExtendedState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) {
	if (world.getTileEntity(pos) != null && world.getTileEntity(pos) instanceof TileEntitySpellWovenTable) {
		TileEntitySpellWovenTable te = (TileEntitySpellWovenTable) world.getTileEntity(pos);
		if (te.transform != TRSRTransformation.identity())
			return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty, te.transform);
	}
	return state;
}
 
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:10,代码来源:BlockSpellWovenTable.java


示例10: getExtendedState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) {
	if(world.getTileEntity(pos) != null && world.getTileEntity(pos) instanceof TileRoutedPipe) {
		TileRoutedPipe te = (TileRoutedPipe)world.getTileEntity(pos);
		te.checkConnections(world, pos);
		ArrayList<String> check = te.checkConnections(world, pos);
		if(!hidden.equals(check)) {
			hidden.clear();
			hidden.addAll(check);
		}
		return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty, this.state);
	}
	return state;
}
 
开发者ID:Bitterholz,项目名称:LP2,代码行数:15,代码来源:PipeRouted.java


示例11: getExtendedState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) {
	if(world.getTileEntity(pos) != null && world.getTileEntity(pos) instanceof TileChassisMkI) {
		TileChassisMkI te = (TileChassisMkI)world.getTileEntity(pos);
		ArrayList<String> check = te.checkConnections(world, pos);
		if(!hidden.equals(check)) {
			hidden.clear();
			hidden.addAll(check);
		}
		return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty, this.state);
	}
	return state;
}
 
开发者ID:Bitterholz,项目名称:LP2,代码行数:14,代码来源:PipeChassisMkI.java


示例12: getExtendedState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) {
	if(world.getTileEntity(pos) != null && world.getTileEntity(pos) instanceof TileBlockingPipe) {
		TileBlockingPipe te = (TileBlockingPipe)world.getTileEntity(pos);
		ArrayList<String> check = te.checkConnections(world, pos);
		if(!hidden.equals(check)) {
			hidden.clear();
			hidden.addAll(check);
		}
		return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty, this.state);
	}
	return state;
}
 
开发者ID:Bitterholz,项目名称:LP2,代码行数:14,代码来源:PipeBlocking.java


示例13: getExtendedState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) {
	if(world.getTileEntity(pos) != null && world.getTileEntity(pos) instanceof TileBasicPipe) {
		TileBasicPipe te = (TileBasicPipe)world.getTileEntity(pos);
		ArrayList<String> check = te.checkConnections(world, pos);
		if(!hidden.equals(check)) {
			hidden.clear();
			hidden.addAll(check);
		}
		return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty, this.state);
	}
	return state;
}
 
开发者ID:Bitterholz,项目名称:LP2,代码行数:14,代码来源:PipeBasic.java


示例14: renderTileEntityFast

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public void renderTileEntityFast(TileEntityPaintMixer te, double x, double y, double z, float partialTick, int breakStage, float alpha, BufferBuilder renderer) {
	if (te.hasPaint()) {
		if (!te.hasCapability(CapabilityAnimation.ANIMATION_CAPABILITY, null)) { return; }
		if (blockRenderer == null) blockRenderer = Minecraft.getMinecraft().getBlockRendererDispatcher();

		final BlockPos pos = te.getPos();
		final IBlockAccess world = MinecraftForgeClient.getRegionRenderCache(te.getWorld(), pos);
		IBlockState state = world.getBlockState(pos);

		if (state.getPropertyKeys().contains(Properties.StaticProperty)) {
			state = state.withProperty(Properties.StaticProperty, false);
		}

		if (state instanceof IExtendedBlockState) {
			state = state.getBlock().getExtendedState(state, world, pos); // difference between this and AnimationTESR

			IExtendedBlockState exState = (IExtendedBlockState)state;
			if (exState.getUnlistedNames().contains(Properties.AnimationProperty)) {
				float time = Animation.getWorldTime(getWorld(), partialTick);
				Pair<IModelState, Iterable<Event>> pair = te.getCapability(CapabilityAnimation.ANIMATION_CAPABILITY, null).apply(time);

				IBakedModel model = blockRenderer.getBlockModelShapes().getModelForState(exState.getClean());
				exState = exState.withProperty(Properties.AnimationProperty, pair.getLeft());

				renderer.setTranslation(x - pos.getX(), y - pos.getY(), z - pos.getZ());

				blockRenderer.getBlockModelRenderer().renderModel(world, model, exState, pos, renderer, false);
			}
		}
	}
}
 
开发者ID:OpenMods,项目名称:OpenBlocks,代码行数:33,代码来源:TileEntityPaintMixerRenderer.java


示例15: createBlockState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
protected BlockStateContainer createBlockState() {
	// 1.8.9 Hack, crashes otherwise
	return new ExtendedBlockState(this,
			new IProperty[] { getPropertyOrientation(), BlockLiquid.LEVEL, Properties.StaticProperty },
			new IUnlistedProperty[] { EvalModelState.PROPERTY });
}
 
开发者ID:OpenMods,项目名称:OpenBlocks,代码行数:8,代码来源:BlockSprinkler.java


示例16: createBlockState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
protected BlockStateContainer createBlockState() {
	return new ExtendedBlockState(this, new IProperty[]{State.ACTIVE}, new IUnlistedProperty[]{Properties.AnimationProperty});
}
 
开发者ID:ArekkuusuJerii,项目名称:Solar,代码行数:5,代码来源:BlockPhenomena.java


示例17: createBlockState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
protected BlockStateContainer createBlockState()
{
    return new ExtendedBlockState(this, new IProperty[]{BlockExtractor.FACING, BlockExtractor.FILTER},
            new IUnlistedProperty[]{Properties.AnimationProperty});
}
 
开发者ID:OPMCorp,项目名称:Qbar,代码行数:7,代码来源:BlockExtractor.java


示例18: getGhostState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
public IBlockState getGhostState(final IBlockState state, final VisibilityModelState visibilityState)
{
    return ((IExtendedBlockState) state).withProperty(Properties.AnimationProperty, visibilityState);
}
 
开发者ID:OPMCorp,项目名称:Qbar,代码行数:5,代码来源:BlockMultiblockBase.java


示例19: createBlockState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public BlockStateContainer createBlockState() {
	return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[] { Properties.AnimationProperty });
}
 
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:5,代码来源:BlockSpellWovenTable.java


示例20: createBlockState

import net.minecraftforge.common.property.Properties; //导入依赖的package包/类
@Override
public BlockStateContainer createBlockState() {
	return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[] {Properties.AnimationProperty});
}
 
开发者ID:Bitterholz,项目名称:LP2,代码行数:5,代码来源:PipeRouted.java



注:本文中的net.minecraftforge.common.property.Properties类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MatrixDcMotorController类代码示例发布时间:2022-05-22
下一篇:
Java ElementsCollection类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap