Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

CreativeMD

Members
  • Posts

    99
  • Joined

  • Last visited

Everything posted by CreativeMD

  1. Thank you very very much. That was rather easy Yes i really need that.
  2. 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
  3. 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.
  4. 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).
  5. 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
  6. Maybe add those two methods to your Block class. @Override public boolean isOpaqueCube() { return false; } @Override public boolean isNormalCube() { return false; }
  7. 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
  8. 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
  9. I could use these files 'notch-mcp.srg', but this would consume a way to much time for a startup.
  10. You mean i should use SRG names and map it to mcp names. Not my favorite, but a better way than before.
  11. 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; }
  12. 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?
  13. Fixed it , i missed a zip of my mod. Thanks for helping me out.
  14. Thanks, works fine on client side, but server gets a duplicating error . Is there a way to fix this?
  15. I tried to combine core and normal mod in one class: @Mod(modid = CraftingManagerMod.modid, name = CraftingManagerMod.name, version = CraftingManagerMod.version) public class CraftingManagerMod extends DummyModContainer{ public CraftingManagerMod() { super(new ModMetadata()); ModMetadata meta = getMetadata(); meta.modId = CraftingManagerMod.modid + "core"; meta.name = CraftingManagerMod.name + " Core"; meta.version = CraftingManagerMod.version; //String.format("%d.%d.%d.%d", majorVersion, minorVersion, revisionVersion, buildVersion); meta.credits = "CreativeMD"; meta.authorList = Arrays.asList("CreativeMD"); meta.description = ""; meta.url = ""; meta.updateUrl = ""; meta.screenshots = new String[0]; meta.logoFile = ""; } ... but this only worked out on server side . This sucks ...
  16. Yes, but ... the core mod stuff is sooooo small. About 20 lines, creating a new mod/ file for this seems so ... Isn't there a way to combine this?
  17. Hello, is there a way to have a core and a normal mod in one file, otherwise i would have to upload two different files for one mod . If i use a "zip" file the normal mod is loading, if i name it to a "jar" file the coremod get's loaded. Is there a way to load both?
  18. After i implement it, how do i have to change my code?
  19. I'm confused, i don't think that i could use srg name ("funcxxxx") instead of ("s_") do transform the class. MethodNode m = methods.next(); if ((m.name.equals(targetMethodName) && m.desc.equals("()V"))) Therefore i need the notch names ...
  20. So is there a way to get the notch names? Also i couldn't get the srg names as well, the only thing i found was mapping func_xxxxxx to onUpdate(), but not the other way round. Did i something wrong?
  21. Hm, what are SRG names? I used the file 'notch-mcp.srg' in he past here is one extract: MD: adw/s_ ()V net/minecraft/entity/item/EntityItem/onUpdate ()V so i would have to replace onUpdate with s_, that's how i did it in the past.
  22. I don't know the name, but i used names like a, ai or something like that, but i thought i could use this class "map" these names. Obviously this is not possible .
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.