BlockPedestal.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:ZeldaSwordSkills 作者:
@Override
@SideOnly(Side.CLIENT)
public IStateMapper getCustomStateMap() {
    // can't use this because meta 8 needs to be remapped to 7:
    // return (new StateMap.Builder()).addPropertiesToIgnore(UNLOCKED).build();
    return new StateMapperBase() {
        @Override
        protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
            String resource = getUnlocalizedName();
            resource = resource.substring(resource.lastIndexOf(".") + 1) + "#" + PENDANTS.getName() + "=";
            int pendants = ((Boolean) state.getValue(UNLOCKED)).booleanValue() ? ALL_PENDANTS : ((Integer) state.getValue(PENDANTS)).intValue();
            return new ModelResourceLocation(ModInfo.ID + ":" + resource + pendants);
        }
    };
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号