Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

BenignBanana

Forge Modder
  • Joined

  • Last visited

Everything posted by BenignBanana

  1. No one know about this? I can implement a custom model bakery using CCLib but I'd prefer to use BlockState JSONs.
  2. That does it. I also just realised why they're flipped. Minecraft uses a top-left origin system and Maya uses bottom-left. Derp.
  3. Hey everyone, this one isn't a huge deal since I can just flip the texture, but I feel like this has a root cause that might be a problem. For some reason, when rendering my OBJ in minecraft the UVs are exactly opposite of what they are in Maya. This leads to either upside down textures or the wrong textures being rendered for blocks with a stitched texture sheet. What could be causing this and is there a fix other than flipping the texture (which is a very meh workaround)?
  4. Hey everyone, yesterday I was asking for a way to pass more info to the BlockState file (which I figured out and it's working nicely), but I was wondering if it's possible to use face culling on custom OBJ models loaded in the BlockState JSON. My models are separated into 6 poly surfaces for each of the block sides, but how do I actually tell the game which surfaces should be culled based on the surrounding blocks? Is there a naming convention or do I need to specify it somewhere (either in the JSON or in code)? I plan on using custom models for just about everything in my mod so I definitely want to use face culling for performance. Hope someone here knows more, I admit I'm not very familiar with rendering in Forge, especially post 1.8.
  5. I see now, I was mistaking the actual state with the extended state, which can only be used through TileEntities. This seems like exactly what I need. Thanks for the help
  6. Hmm, so after looking at fences (and glass panes since they behave a bit differently) I'm not sure I can use that system. Is there any way to check for multiple sides at once in that? Even then the JSON would become quite verbose if I have to check all 18 possible configurations. Any ideas on how to do this more elegantly?
  7. Yes it does, but I'll take a look at the vanilla fence to see how that's handled. If I need any more help I'll just post again. To be honest I completely forgot vanilla changes blocks based on neighbors too
  8. Hey everyone, I was trying to implement connected models for a multiblock structure I'm adding using the BlockStates JSON. It looks quite nice and is simple enough, but the facing (2 bits) plus the multiblock part enum (6 values/3 bits) is just one bit too much for the block meta. Is there any way to supply state information to the BlockStates system other than metadata? Here's the JSON for reference: { "forge_marker": 1, "variants": { "normal": [ {} ], "inventory": [ {} ], "mb_part": { "single": { "model": "kaidencraft:boiler/single.obj" }, "end": { "model": "kaidencraft:boiler/end.obj" }, "corner": { "model": "kaidencraft:boiler/corner.obj" }, "edge": { "model": "kaidencraft:boiler/edge.obj" }, "center": { "model": "kaidencraft:boiler/edge.obj" } }, "facing": { "north": {}, "south": { "y": 180 }, "west": { "y": 270 }, "east": { "y": 90 } } }, "defaults": { "textures": { "#initialShadingGroup": "kaidencraft:texture" } } } I don't have part 6 (hidden) in there since this one is single layered. I'd appreciate any input, I know I can handle this with custom renderers but as you can see the BlockState way is quite nice so I'd prefer that.
  9. I have a single setup, but the issue was magically fixed literally overnight. No idea what cause the logs to fail to generate, nor do I have any idea what repaired it. Either way they're working now so I'm good
  10. That's odd, it's working just fine for me. Are you using Eclipse or IntelliJ? I know in IntelliJ sometimes gradle gets a bit desynced so you have to manually refresh it from the Gradle tool window. I've never worked with gradle in eclipse so if you're using that I doubt I could help you much
  11. Since I'm using a multi module project (in IntelliJ, but this should apply equally to Eclipse), I thought I'd chime in. I'd recommend putting them into subdirectories as subprojects in one main gradle root. So you have your root with a common build.gradle, and a settings.gradle with just include 'Mod1', 'Mod2' and then have a separate build.gradle in each mod folder. This allows you to trigger a full build/setupDecompWorkspace for all mods at once, along with making dependencies much easier. You can put all common dependencies and repositories in the root's build.gradle. And of course you can still trigger builds etc for each individual mod.
  12. I'd wager GameRegistry.findRegistry(Item.class).getValues() and then randomise out of that list. Haven't tested it but the compiler isn't throwing any errors.
  13. Hey everyone, ever since I switched from forge 1.10 to 1.11 the log files stopped being generated. The only file inside the logs folder is latest.log (which is just the console log), but I don't have the fml-client-latest.log which has all the debug and lower stuff in it. I tried starting the server and the log there generates just fine. My run configurations are identical apart from the start class. Does anyone have an idea what might be wrong?
  14. Hey everyone, I wanted to change the default Minecraft window size when I'm debugging my mod since it defaults to 720p (which is tiny on my 4K monitor). However the overrideWidth/Height options in the options.txt don't seem to work (they work fine in vanilla). Does forge somehow override this setting? And if so how can I compel it to start with a higher window size? Having to resize the window every time I restart the client is getting rather cumbersome. Cheers in advance
  15. Yes, the variable values I posted in the OP are taken from a breakpoint at the drawRect call.
  16. It's an OpenModsLib BaseComponent (which extends Gui). It's being called from a GuiContainer.
  17. Still haven't found a solution bump
  18. Does no one have any idea? I'm really getting frustrated at the fact that I can't fix this problem
  19. Hi guys, I have a problem with rendering a GUI and I've exhausted all debugging options I can think of, so i thought someone here might have an idea. The problem is that I'm trying to render a dynamically sized tank, but Minecraft isn't displaying anything (not even the super simple drawRect rectangle). This is the relevant code: @Override public void render(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) { //Gray Background drawRect(offsetX + x, offsetY + y, offsetX + x + width, offsetY + y + height, Colors.DARK_GRAY); //Fluid Level if(fluid != null) { } minecraft.getTextureManager().bindTexture(Textures.Gui.MACHINE_ELEMENTS); //Foreground //right side int xStart = width - 3; int newHeight = height - 2; for(int i = 0; i < newHeight / 2; i++) { drawTexturedModalRect(offsetX + x + xStart, offsetY + y + 1 + (newHeight % 2) + (i * 2), 1, 7, 3, 2); } //top border xStart = width - 4; drawTexturedModalRect(offsetX + x + xStart, offsetY + y, 0, 6, 4, 1); for(int i = 0; i < xStart; i++) { drawTexturedModalRect(offsetX + x + i, offsetY + y, 0, 6, 1, 1); } //bottom border drawTexturedModalRect(offsetX + x, offsetY + y + height - 1, 0, 9, 4, 1); for(int i = 4; i < xStart + 4; i++) { drawTexturedModalRect(offsetX + x + i, offsetY + y + height - 1, 1, 9, 1, 1); } //left border if(newHeight % 2 != 0) drawTexturedModalRect(offsetX + x, offsetY + y + 1, 0, 7, 1, 1); for(int i = 0; i < newHeight / 2; i++) { drawTexturedModalRect(offsetX + x, offsetY + y + 1 + (newHeight % 2) + (i * 2), 0, 7, 1, 2); } } You can find the full project here: https://github.com/Todkommt/Mass-Effect-Ships-Mod And this is the only usage of this class (GuiComponentFluidGauge.java): GuiDeuteriumExtractor.java Theres also this extremely similar component that works perfectly fine: GuiComponentEnergyGauge.java Some extra debug info: The coordinates are translated to the space of a root object (so x = 63 means 63 from the top left corner of the gui screen, not the minecraft window) offsetX = 0 offsetY = 0 x = 63 y = 8 width = 14 height = 42 Colors.DARK_GRAY = 0x8B8B8B zLevel = 0 Any help would be greatly appreciated =)
  20. Man am I glad I left the E-Mail notifications on instead of giving up on this. That worked! You're a lifesaver! Also, it's irrelevant now but wrapper is the anonymous type in the TESR, it's used to render a block guide (I copied the code from OpenBlocks' guide).
  21. That's quite unfortunate. Is there any way to fix this problem or do I just have to use a different way of rendering this and/or use a simpler model?
  22. Ah, draco, I seem to see you in every thread that I find when googleing forge-related problems =) Anyways, if you're talking about the model, I don't think it has any transparent parts. I extracted it from the Mass Effect 3 game files, but I had the same problem with a default sphere generated in Maya with a white Texture. If you're talking about transparent blocks, all multiblock parts apart from the base are transparent (for obvious reasons).
  23. Hi guys, I'm working on a somewhat complex Mod Project right now and I want to use a custom single model for my multiblock structure. Everything worked fine for a while, until i started noticing massive glitches in the rendering of the models. Here are some screenshots: This is how the model is supposed to look: As you can see, the back of the model is rendering over the front (or in picture 2, the second model is rendering over the first). These are the main relevant files, the rest can be found on my https://github.com/Todkommt/Mass-Effect-Ships-Mod: Any help would be greatly appreciated. I'd look into this myself, but I have no experience with OpenGL or 3D Programming in general, so I cant really figure out whats going on. Thank you in advance.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.