Jump to content

CreativeMD

Members
  • Posts

    100
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

CreativeMD's Achievements

Creeper Killer

Creeper Killer (4/8)

3

Reputation

  1. It feels quite weird. I think it would be really confusing for people to treat 1.19.2 and 1.19.3 as separate versions. On the other hand from a programming perspective it makes a lot of sense. I wish all modders could just update to 1.19.3 asap and we forget about 1.19.2. There are quite some changes, but it is doable.
  2. Thank you very very much. That was rather easy Yes i really need that.
  3. Hey, is there a way to have a normal and a core mod in one file? Unfortunately the core mod isn't allowed to have "eventhandlers", so as soon as i try to register my packet/gui systems it will crash. So i have to have a normal mod handling those things. It works in my dev (eclipse) environment only. Seems like forge does not load the "normal" @Mod if there is a core mod already. Is there a way to fix this or add a mod manually? Thanks in advance In Regards CreativeMD
  4. F***, oh my ... the mistake is sooo simple and easy. Just take a closer look at this here: GlStateManager.scale(scale, scale, 0); and can you see the mistake? one little line can ruin everything :blank: :blank: z scaling zero will result in a plane, which will of course mess up the lighting. I changed it to GlStateManager.scale(scale, scale, 1); and everything works just fine.
  5. One of your problems is caused by id duplicates. // Input Slot addSlotToContainer(new CompressorSlot(this.tileEntity, 0, 49, 18)); // Output Slot addSlotToContainer(new CompressorSlot(this.tileEntity, 1, 106, 18)); slot id 0 and 1 are already taken by your player inventory. You have to change it above 36 (if i'm not mistaken).
  6. Should , but it doesn't Due to a gui-api the rendering is done by different controls and so on. I copied every necessary code and included the methods itself: Style style = getStyle(); Vec3d centerOffset = getCenterOffset(); GlStateManager.pushMatrix(); GlStateManager.translate(posX+centerOffset.xCoord, posY+centerOffset.yCoord, 0); GlStateManager.rotate(rotation, 0, 0, 1); GlStateManager.translate(-centerOffset.xCoord, -centerOffset.yCoord, 0); GlStateManager.scale(scale, scale, 0); renderBackground(helper, style); int spaceUsed = getContentOffset(); GlStateManager.translate(marginWidth, marginWidth, 0); GL11.glEnable(GL11.GL_STENCIL_TEST); GL11.glStencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_KEEP); GL11.glStencilFunc(GL11.GL_EQUAL, 0x1, 0x1); renderContent(helper, style, width-spaceUsed*2, height-spaceUsed*2, relativeMaximumRect);{ float scale = getScaleFactor(); int xOffset = getOffsetX(); int yOffset = getOffsetY(); Rect newRect = relativeMaximumRect.mergeRects(getRect()); lastRenderedHeight = 0; for (int i = controls.size()-1; i >= 0; i--) { GuiControl control = controls.get(i); if(control.visible && control.isVisibleInsideRect(-xOffset, -yOffset, width, height, scale)) { GL11.glEnable(GL11.GL_STENCIL_TEST); prepareContentStencil(helper, relativeMaximumRect); GL11.glStencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_KEEP); GL11.glStencilFunc(GL11.GL_EQUAL, 0x1, 0x1); GlStateManager.pushMatrix(); GlStateManager.translate(xOffset, yOffset, 0); control.renderControl(helper, scale, newRect.getOffsetRect(xOffset, yOffset));{ Style style = getStyle(); Vec3d centerOffset = getCenterOffset(); GlStateManager.pushMatrix(); GlStateManager.translate(posX+centerOffset.xCoord, posY+centerOffset.yCoord, 0); GlStateManager.rotate(rotation, 0, 0, 1); GlStateManager.translate(-centerOffset.xCoord, -centerOffset.yCoord, 0); //GlStateManager.translate(x, y, 0); GlStateManager.scale(scale, scale, 0); renderBackground(helper, style); int spaceUsed = getContentOffset(); GlStateManager.translate(marginWidth, marginWidth, 0); GL11.glEnable(GL11.GL_STENCIL_TEST); GL11.glStencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_KEEP); GL11.glStencilFunc(GL11.GL_EQUAL, 0x1, 0x1); renderContent(helper, style, width-spaceUsed*2, height-spaceUsed*2, relativeMaximumRect);{ super.renderContent(helper, style, width, height);{ if(shouldDrawTitle()) helper.drawStringWithShadow(caption, 0, 0, width, height, getColor(), getAdditionalSize()); } GlStateManager.pushMatrix(); GlStateManager.translate(width/2-(helper.getStringWidth(caption)+getAdditionalSize())/2, height/2-avatarSize/2, 0); avatar.handleRendering(helper, avatarSize, avatarSize); //Rendering of the itemstack is done here { GuiRenderHelper.instance.drawItemStack(stack, 0, 0, avatarSize, avatarSize); } GlStateManager.popMatrix(); } GL11.glDisable(GL11.GL_STENCIL_TEST); GlStateManager.translate(-spaceUsed, -spaceUsed, 0); renderForeground(helper, style); GlStateManager.popMatrix(); } GlStateManager.popMatrix(); GL11.glDisable(GL11.GL_STENCIL_TEST); } lastRenderedHeight = (int) Math.max(lastRenderedHeight, (control.posY+control.height)*scale); } renderContent(helper, style, width, height); } GL11.glDisable(GL11.GL_STENCIL_TEST); GlStateManager.translate(-spaceUsed, -spaceUsed, 0); renderForeground(helper, style); GlStateManager.popMatrix(); Outside of this code itemstack renderer rendering works without any issue. Example code: GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_STENCIL_TEST); GL11.glStencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_KEEP); GL11.glStencilFunc(GL11.GL_EQUAL, 0x1, 0x1); GuiControl.defaultStyle.getBorder(layers.get(i)).renderStyle(GuiRenderHelper.instance, 100, 100); GuiControl.defaultStyle.getBackground(layers.get(i)).renderStyle(10, 10, GuiRenderHelper.instance, 80, 80); GuiRenderHelper.instance.font.drawStringWithShadow("Hey", 20, 20, ColorUtils.WHITE); GuiRenderHelper.instance.drawItemStack(new ItemStack(Blocks.REDSTONE_TORCH), 8, 8, 16, 16); GuiRenderHelper.instance.drawItemStack(new ItemStack(Blocks.FURNACE), 8, 48, 16, 16); GL11.glDisable(GL11.GL_STENCIL_TEST); GlStateManager.popMatrix(); To be honest, i have no idea would could cause an issue like that
  7. Maybe add those two methods to your Block class. @Override public boolean isOpaqueCube() { return false; } @Override public boolean isNormalCube() { return false; }
  8. Hey there, as i tried to port my InGameConfigManager to 1.9.4 i ran into a problem. Item rendering isn't working as it should. This isn't the first time i ran into that problem. So i tried to fix it. Unfortunately, without any success. I have tried various things to setup OpenGL properly in order to correct the lighting effect. GlStateManager.enableRescaleNormal(); GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); RenderHelper.enableGUIStandardItemLighting(); After a lot of pain and headaches, i eventually found out, if i add this line GlStateManager.loadIdentity(); it will make all itemstacks disappear, but once i remove it again it will fix the non lighting issue, although it's still not as it should be. Although i have been modding Minecraft for several years now, i have no idea what is causing this issue. It's seems like i'm missing something to setup OpenGL properly to rendering an itemstack in the correct way. So i would be very happy, if someone can help me out. In Regards CreativeMD
  9. Hello, i want to update my mod from 1.7.10 to 1.9. Therefore i have to port my old transformer, but i ran into some problems. I couldn't find the "conf" directory where all transformed names are listed inside some files ("notch-mcp.srg", "mcp-srg.srg" and so on). Is there a new way of doing it or has the path of the directory changed? Thanks in advance - CreativeMD
  10. I could use these files 'notch-mcp.srg', but this would consume a way to much time for a startup.
  11. You mean i should use SRG names and map it to mcp names. Not my favorite, but a better way than before.
  12. I recommed to use an empty texture. Using NBT: @Override @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) //Only called for hand held items { if(stack.stackTagCompound != null && stack.stackTagCompound.getBoolean("isInvisible")) return Empty_Texture; else return Normal_Texture; } @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { if(stack.stackTagCompound == null) { stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound.setBoolean("isInvisible", True); }else{ stack.stackTagCompound = null; } return stack; }
  13. After a little break, i continued working on it and failed I'm using "@IFMLLoadingPlugin.SortingIndex(1001)" but there is no way i can map an methodname like "interactFirst" to something like "func....". I tried everything but couldn't find anything which could help me doing it. FMLDeobfuscatingRemapper is saving these names in "rawFieldMaps", but there is no way i could access them, also it's only saving the SRG names. So i don't know if this class is able to find the SRG name for a given MCP name. Could someone help me out?
  14. Fixed it , i missed a zip of my mod. Thanks for helping me out.
×
×
  • Create New...

Important Information

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