Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/12/20 in all areas

  1. Make a json for it. If you want to add to preexisting biomes and dimensions use BiomeLoadingEvent and BiomeManager iirc. Hasn't really changed. Abstracts classes more for reordering characters in different languages and add a MatrixStack parameter everywhere. There is definitely a blit in the mappings. AbstractGui holds them all. This is not something to complain about. There are only so many people who create mappings and then have to have someone else verify until we have a more complete version of MMS.
    1 point
  2. Hi, I am trying to create a Mod which can show "Ghost-Items" in the world and cover them with a colored glowing effect. NOTICE: clientside only! Here you can see how the "Ghost-Items" are generated: ghostEntity = new EntityItem(mc.player.getEntityWorld(), 0, 70, 0, new ItemStack(Blocks.COBBLESTONE)); To render the Ghost-Items, I created a custom renderer which can render the Ghost-Item at a specific location in the world: (based on RenderEntityItem.class) public void doRender(EntityItem entity, double xPos, double yPos, double zPos, float entityYaw, float partialTicks) { ItemStack itemstack = entity.getItem(); // Noetig damit Item keine Defaulttextur bekommt bindEntityTexture(entity); GlStateManager.enableRescaleNormal(); GlStateManager.alphaFunc(516, 0.1F); GlStateManager.enableBlend(); RenderHelper.enableStandardItemLighting(); GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); GlStateManager.pushMatrix(); IBakedModel ibakedmodel = itemRenderer.getItemModelWithOverrides(itemstack, entity.world, (EntityLivingBase) null); boolean forceGlowing = true; if (forceGlowing) { // FORCE ENTITY GLOWING GlStateManager.enableColorMaterial(); GlStateManager.enableOutlineMode(this.getTeamColor(entity)); } Minecraft mc = Minecraft.getMinecraft(); float playerX = (float) (mc.player.lastTickPosX + (mc.player.posX - mc.player.lastTickPosX) * partialTicks); float playerY = (float) (mc.player.lastTickPosY + (mc.player.posY - mc.player.lastTickPosY) * partialTicks); float playerZ = (float) (mc.player.lastTickPosZ + (mc.player.posZ - mc.player.lastTickPosZ) * partialTicks); float dx = (float) (xPos - playerX); float dy = (float) (yPos - playerY); float dz = (float) (zPos - playerZ); GlStateManager.translate(dx, dy, dz); // Groesse aendern! wenn auskommentiert, wird voller Block gerendert ibakedmodel.getItemCameraTransforms().applyTransform(ItemCameraTransforms.TransformType.GROUND); // Item Rendern itemRenderer.renderItem(itemstack, ibakedmodel); if (forceGlowing) { // FORCE ENTITY GLOWING GlStateManager.disableOutlineMode(); GlStateManager.disableColorMaterial(); } GlStateManager.popMatrix(); GlStateManager.disableRescaleNormal(); GlStateManager.disableBlend(); } To add the colored glowing effect, I created a custom team and added the Ghost-Item Scoreboard scoreboard = mc.player.getWorldScoreboard(); if(scoreboard != null){ if(scoreboard.getTeam("Test1") == null){ System.out.println("create Team"); scoreboard.createTeam("Test1"); scoreboard.getTeam("Test1").setColor(TextFormatting.GOLD); ghostEntity = new EntityItem(mc.player.getEntityWorld(), 0, 70, 0, new ItemStack(Blocks.COBBLESTONE)); ghostEntity.setGlowing(true); scoreboard.addPlayerToTeam(ghostEntity.getCachedUniqueIdString(), "Test1"); } } The problem is, that if the glowing effect is enabled, the whole Ghost-Item is rendered white. Picture 1: Ghost-Item at a specific location in the world without glowing effect: CLICK Picture 2: Ghost-Item at a specific location in the world with glowing effect: CLICK How can I fix this? The teamcolor is e.g GOLD. Thank you for your help.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.