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

Java GroupObject类代码示例

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

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



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

示例1: getModel

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
@Override
protected Collection<GroupObject> getModel(Block block, int metadata) {
  List<GroupObject> result = new ArrayList<GroupObject>();
  if (renderFrameInItem(block, metadata)) {
    result.addAll(super.getModel(block, metadata));
  }
  String controllerName = getControllerInItemName(block, metadata);
  if (controllerName != null) {
    result.add(controller.get(controllerName + "Active"));
  }
  if (renderAllTanksInItem(block, metadata)) {
    for (GroupObject groupObject : tanks) {
      result.add(groupObject);
    }
  } else if (renderOneTankInItem(block, metadata)) {
    result.add(tanks[TankSlot.FRONT_LEFT.ordinal()]);
  }
  return result;
}
 
开发者ID:HenryLoenwind,项目名称:EnderIOAddons,代码行数:20,代码来源:RendererFrameworkMachine.java


示例2: renderInventoryBlock

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
  setFacingDir(ForgeDirection.SOUTH);
  TechneUtil.vt = this.vt;
  IIcon icon = getModelIcon(block, metadata);
  Tessellator.instance.startDrawingQuads();
  Tessellator.instance.setColorOpaque_F(1, 1, 1);
  Tessellator.instance.addTranslation(0, -0.47f, 0);
  for (GroupObject go : getModel(block, metadata)) {
    if (go instanceof GroupObjectWithIcon) {
      TechneUtil.renderWithIcon(go, ((GroupObjectWithIcon) go).getControllerTexture(), renderer.overrideBlockTexture, Tessellator.instance, null, 0, 0,
          0, vt, true);
    } else {
      TechneUtil.renderWithIcon(go, icon, renderer.overrideBlockTexture, Tessellator.instance, null, 0, 0, 0, vt, true);
    }
  }
  Tessellator.instance.addTranslation(0, 0.47f, 0);
  Tessellator.instance.draw();
  TechneUtil.vt = null;
}
 
开发者ID:HenryLoenwind,项目名称:EnderIOAddons,代码行数:21,代码来源:TechneMachineRenderer.java


示例3: renderWorldBlock

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
	Tessellator tes = Tessellator.instance;
	IIcon icon = renderer.hasOverrideBlockTexture() ? renderer.overrideBlockTexture : block.getIcon(0, 0);
	tes.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
	tes.setColorOpaque_F(1, 1, 1);
	tes.addTranslation(x, y, z + 1);
	for (GroupObject go : model.groupObjects) {
		for (Face f : go.faces) {
			Vertex n = f.faceNormal;
			tes.setNormal(n.x, n.y, n.z);
			for (int i = 0; i < f.vertices.length; i++) {
				Vertex vert = f.vertices[i];
				TextureCoordinate t = f.textureCoordinates[i];
				if (!renderer.hasOverrideBlockTexture()) {
					tes.addVertexWithUV(vert.x, vert.y, vert.z, icon.getInterpolatedU(t.u * 16), icon.getInterpolatedV(t.v * 16));
				} else {
					tes.addVertexWithUV(vert.x, vert.y, vert.z, icon.getInterpolatedU((t.u * 64) % 16), icon.getInterpolatedV((t.v * 64) % 16));
				}
			}
		}
	}
	tes.addTranslation(-x, -y, -z - 1);
	return true;
}
 
开发者ID:Chisel-2,项目名称:Chisel-2,代码行数:26,代码来源:RenderAutoChisel.java


示例4: loadObjModelParts

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
public static Collection<CustomPartedModel> loadObjModelParts(WavefrontObject obj) {
    List<CustomPartedModel> ret = new ArrayList();
    for(GroupObject go : obj.groupObjects) {
        ret.add(new CustomPartedModel(obj, go.name));
    }
    return ret;
}
 
开发者ID:LambdaInnovation,项目名称:LambdaLib,代码行数:8,代码来源:PartedModelHelper.java


示例5: bakeModel

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
/**
 * Use this to convert TechneModel to it's static representation
 */
@SuppressWarnings("unchecked")
public static Map<String, GroupObject> bakeModel(TechneModel model, float scale, Matrix4f m, boolean rotateYFirst) {
  Map<String, ModelRenderer> parts = (Map<String, ModelRenderer>) ObfuscationReflectionHelper.getPrivateValue(TechneModel.class, model, "parts");
  Map<String, GroupObject> res = Maps.newHashMap();

  for (Map.Entry<String, ModelRenderer> e : parts.entrySet()) {
    GroupObject obj = bakeModel(e.getValue(), model, scale, m, rotateYFirst).get(0);
    res.put(e.getKey(), obj);
  }

  return res;
}
 
开发者ID:SleepyTrousers,项目名称:EnderCore,代码行数:16,代码来源:TechneUtil.java


示例6: renderInventoryBlock

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
public static void renderInventoryBlock(Collection<GroupObject> model, IIcon icon, Block block, int metadata, RenderBlocks rb) {
  tes.startDrawingQuads();
  tes.setColorOpaque_F(1, 1, 1);
  tes.addTranslation(0, -0.47f, 0);
  renderWithIcon(model, icon, rb.overrideBlockTexture, tes, vt);
  tes.addTranslation(0, 0.47f, 0);
  tes.draw();
  resetVT();
}
 
开发者ID:SleepyTrousers,项目名称:EnderCore,代码行数:10,代码来源:TechneUtil.java


示例7: renderWorldBlock

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
public static boolean renderWorldBlock(Collection<GroupObject> model, IIcon icon, IBlockAccess world, int x, int y, int z, Block block, RenderBlocks rb) {
  if (icon == null) {
    return false;
  }
  tes.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
  tes.setColorOpaque_F(1, 1, 1);
  tes.addTranslation(x + .5F, y + 0.0375f, z + .5F);
  renderWithIcon(model, icon, rb.overrideBlockTexture, tes, world, x, y, z, vt);
  tes.addTranslation(-x - .5F, -y - 0.0375f, -z - .5F);
  resetVT();
  return true;
}
 
开发者ID:SleepyTrousers,项目名称:EnderCore,代码行数:13,代码来源:TechneUtil.java


示例8: RendererIHopper

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
public RendererIHopper(@Nonnull RendererFrameworkMachine frameRenderer) {
  this.frameRenderer = frameRenderer;
  GroupObject controllerActive = new GroupObjectWithIcon(frameRenderer.getControllerPart(5), BlockIHopper.getBlock());
  GroupObject controllerPassive = new GroupObjectWithIcon(frameRenderer.getControllerPart(6), BlockIHopper.getBlock());

  frameRenderer.registerController(BlockIHopper.getBlock().getControllerModelName(),
      controllerActive, controllerPassive);
}
 
开发者ID:HenryLoenwind,项目名称:EnderIOAddons,代码行数:9,代码来源:RendererIHopper.java


示例9: RendererCobbleworks

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
public RendererCobbleworks(@Nonnull RendererFrameworkMachine frameRenderer) {
  this.frameRenderer = frameRenderer;
  GroupObject controllerActive = new GroupObjectWithIcon(frameRenderer.getControllerPart(1), BlockCobbleworks.getBlock());
  GroupObject controllerPassive = new GroupObjectWithIcon(frameRenderer.getControllerPart(2), BlockCobbleworks.getBlock());

  frameRenderer.registerController(BlockCobbleworks.getBlock().getControllerModelName(),
      controllerActive, controllerPassive);
}
 
开发者ID:HenryLoenwind,项目名称:EnderIOAddons,代码行数:9,代码来源:RendererCobbleworks.java


示例10: RendererWaterworks

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
public RendererWaterworks(@Nonnull RendererFrameworkMachine frameRenderer) {
  this.frameRenderer = frameRenderer;
  GroupObject controllerActive = new GroupObjectWithIcon(frameRenderer.getControllerPart(3), BlockWaterworks.getBlock());
  GroupObject controllerPassive = new GroupObjectWithIcon(frameRenderer.getControllerPart(2), BlockWaterworks.getBlock());

  frameRenderer.registerController(BlockWaterworks.getBlock().getControllerModelName(),
      controllerActive, controllerPassive);
}
 
开发者ID:HenryLoenwind,项目名称:EnderIOAddons,代码行数:9,代码来源:RendererWaterworks.java


示例11: RendererTcom

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
public RendererTcom(@Nonnull RendererFrameworkMachine frameRenderer) {
  this.frameRenderer = frameRenderer;
  @SuppressWarnings("null")
  GroupObject controllerPassive = new GroupObjectWithIcon(frameRenderer.getControllerPart(4), BlockTcom.blockTcom);

  frameRenderer.registerController(BlockTcom.blockTcom.getControllerModelName(), controllerPassive, controllerPassive);
}
 
开发者ID:HenryLoenwind,项目名称:EnderIOAddons,代码行数:8,代码来源:RendererTcom.java


示例12: renderWorldBlock

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
  T te = (T) world.getTileEntity(x, y, z);
  if (te != null) {
    setFacingDir(te.getFacingDir());
    overlay.setTile(te);
  }

  TechneUtil.vt = this.vt;
  IIcon icon = getModelIcon(world, x, y, z, block);
  Tessellator.instance.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
  Tessellator.instance.setColorOpaque_F(1, 1, 1);
  Tessellator.instance.addTranslation(x + .5F, y + 0.0375f, z + .5F);
  for (GroupObject go : getModel(world, x, y, z)) {
    if (go instanceof GroupObjectWithIcon) {
      TechneUtil.renderWithIcon(go, ((GroupObjectWithIcon) go).getControllerTexture(), renderer.overrideBlockTexture, Tessellator.instance, world, x, y,
          z, vt, true);
    } else {
      TechneUtil.renderWithIcon(go, icon, renderer.overrideBlockTexture, Tessellator.instance, world, x, y, z, vt, true);
    }
  }
  Tessellator.instance.addTranslation(-x - .5F, -y - 0.0375f, -z - .5F);
  TechneUtil.vt = null;

  if (renderer.overrideBlockTexture == null) {
    ccr.renderBlock(world, block, x, y, z, overlay);
  }

  return true;
}
 
开发者ID:HenryLoenwind,项目名称:EnderIOAddons,代码行数:32,代码来源:TechneMachineRenderer.java


示例13: TechneModelRenderer

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
public TechneModelRenderer(Map<String, GroupObject> model, int renderId) {
  this(model, renderId, null);
}
 
开发者ID:SleepyTrousers,项目名称:EnderCore,代码行数:4,代码来源:TechneModelRenderer.java


示例14: getModel

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
protected Collection<GroupObject> getModel(Block block, int metadata) {
  return model.values();
}
 
开发者ID:SleepyTrousers,项目名称:EnderCore,代码行数:4,代码来源:TechneModelRenderer.java


示例15: getModel

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
public static Map<String, GroupObject> getModel(String modid, String modelPath) {
  TechneModel tm = (TechneModel) modelLoader.loadInstance(new ResourceLocation(modid.toLowerCase(Locale.US), modelPath + ".tcn"));
  return TechneUtil.bakeModel(tm, 1f / 16, new Matrix4f().scale(new Vector3f(-1, -1, 1)));
}
 
开发者ID:SleepyTrousers,项目名称:EnderCore,代码行数:5,代码来源:TechneUtil.java


示例16: getModelAll

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
public static Collection<GroupObject> getModelAll(String modid, String modelPath) {
  TechneModel tm = (TechneModel) modelLoader.loadInstance(new ResourceLocation(modid.toLowerCase(Locale.US), modelPath + ".tcn"));
  return TechneUtil.bakeModel(tm, 1f / 16, new Matrix4f().scale(new Vector3f(-1, -1, 1))).values();
}
 
开发者ID:SleepyTrousers,项目名称:EnderCore,代码行数:5,代码来源:TechneUtil.java


示例17: renderWithIcon

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
public static void renderWithIcon(Collection<GroupObject> model, IIcon icon, IIcon override, Tessellator tes) {
  renderWithIcon(model, icon, override, tes, null);
}
 
开发者ID:SleepyTrousers,项目名称:EnderCore,代码行数:4,代码来源:TechneUtil.java


示例18: GroupObjectWithIcon

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
public GroupObjectWithIcon(GroupObject go, @Nonnull ITextureProvider textureProvider) {
  this.name = go.name;
  this.glDrawingMode = go.glDrawingMode;
  this.faces = go.faces;
  this.textureProvider = textureProvider;
}
 
开发者ID:HenryLoenwind,项目名称:EnderIOAddons,代码行数:7,代码来源:GroupObjectWithIcon.java


示例19: extractModelPart

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
@Nullable
public GroupObject extractModelPart(@Nonnull String name) {
  return model.remove(name);
}
 
开发者ID:HenryLoenwind,项目名称:EnderIOAddons,代码行数:5,代码来源:RendererFrameworkMachine.java


示例20: getControllerPart

import net.minecraftforge.client.model.obj.GroupObject; //导入依赖的package包/类
@Nullable
public GroupObject getControllerPart(int id) {
  return contr[id - 1];
}
 
开发者ID:HenryLoenwind,项目名称:EnderIOAddons,代码行数:5,代码来源:RendererFrameworkMachine.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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