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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. https://english.stackexchange.com/questions/95624/use-of-or-inclusive-or-exclusive
  2. Uh... if(tile.hasCapability(CapabilityEnergy.ENERGY, orientation)) return true; Let me dive into that... orientation.getOpposite() if(tile.hasCapability(CapabilityEnergy.ENERGY, orientation)) return true; Let me dive into that... orientation.getOpposite() if(tile.hasCapability(CapabilityEnergy.ENERGY, orientation)) return true; Let me dive into that... orientation.getOpposite() if(tile.hasCapability(CapabilityEnergy.ENERGY, orientation)) return true; Let me dive into that... orientation.getOpposite() if(tile.hasCapability(CapabilityEnergy.ENERGY, orientation)) return true; Let me dive into that... orientation.getOpposite() if(tile.hasCapability(CapabilityEnergy.ENERGY, orientation)) return true;
  3. *Looks for code* *Fails to find code* *Hits "back" on browser*
  4. What I said is perfectly grammatically correct. You haven't done [A or B] You haven't done either of [A or B] And if you'd done any research at all into what threw that error, you would have figured out what you needed to do on your own. public int getMetaFromState(IBlockState state) { if (state.getPropertyKeys().isEmpty()) { return 0; } else { throw new IllegalArgumentException("Don't know how to convert " + state + " back into data..."); } }
  5. Do not implement ITileEntityProvider, it is not needed. hasTileEntity and createTileEntity are in the Block class, override those. You also haven't supplied a getMetaFromState or getStateFromMeta methods.
  6. Seriously? One defines an object, one defines an array...
  7. Ah, that's the multipart system, not the submodel system. Now then: From the minecraft wiki: "multipart": [ From your file: "multipart": { HMM
  8. Yes. As to your error, glancing at your json file... I am not sure where you even got that syntax. Here's the documentation, and aside from the example file using literal integers instead of strings (like it should), its correct. http://mcforge.readthedocs.io/en/latest/blockstates/forgeBlockstates/#sub-models
  9. Caused by: net.minecraftforge.fml.common.LoaderException: java.lang.ClassNotFoundException: com.memoankara.spawner.proxy.ClientProxy Post your code. And please use code blocks and spoiler tags.
  10. BlockFence has this already. As for your JSON file, hit up https://jsonlint.com/, Your file has errors. If you're using Eclipse, download the JSON Editor Plugin from the Eclipse marketplace (Help -> Eclipse Marketplace, it's the second result searching for "json") If you're using IntelliJ I am not sure.
  11. Extended State is just a fancy way of storing arbitrary data in a state property. Liquids use it to store the height of each vertex based on the amount of liquid in neighbor blocks. You have six directions and each one can either be connected or not. That's six boolean properties. Use each one to dictate the presence or absence of a submodel.
  12. It isn't. Its only called when the chunk is re-rendered, which is only whenever a block in that chunk changes state.
  13. getActualState() You have booleans for each direction, then in getActualState you return a state property that has the connected directions be true. Look at the fence or cobblestone wall.
  14. Forge block states are inherently single-property at a time and Forge automatically combines them. Using submodels is the best way to go about doing this.
  15. Try comparing it with mine: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/api/internal/CommonContainer.java#L35
  16. 1.7.10 is no longer supported here.
  17. That's an interface. You need to look at the classes that implement it. The snippet I showed was from ShapedRecipes. Right click on IRecipe and then in the context menu, click "open type hierarchy." Edit: Forge is also assuming a max width of 3: public static final int MAX_CRAFT_GRID_WIDTH = 3; public static final int MAX_CRAFT_GRID_HEIGHT = 3; @Override public boolean matches(@Nonnull InventoryCrafting inv, @Nonnull World world) { for (int x = 0; x <= MAX_CRAFT_GRID_WIDTH - width; x++) { for (int y = 0; y <= MAX_CRAFT_GRID_HEIGHT - height; ++y) { if (checkMatch(inv, x, y, false)) { return true; } if (mirrored && checkMatch(inv, x, y, true)) { return true; } } } return false; }
  18. https://github.com/ResaloliPT/ExtrasInMinecraft/blob/master/src/main/java/com/resaloli/eim/content/crafting/CraftingManagerDCT.java#L34 Vanilla IRecipe implementations assume a 3x3 grid: /** * Used to check if a recipe matches current crafting inventory */ public boolean matches(InventoryCrafting inv, World worldIn) { for (int i = 0; i <= 3 - this.recipeWidth; ++i) { for (int j = 0; j <= 3 - this.recipeHeight; ++j) { if (this.checkMatch(inv, i, j, true)) { return true; } if (this.checkMatch(inv, i, j, false)) { return true; } } } return false; }
  19. If a modder should do something, then it should throw warnings when they don't. If there's no error or warning, then it's assumed to be correct. I'm not going to bother with the string concatenation that isn't required just because you said I should even though it'll just get split into two strings again.
  20. Seems to me like Forge should apply object holders after each registry event. Is there a similar problem between Register<Block> and Register<Item>?
  21. Why they're checking all registered entities, I don't know. I'll give you that, because I agree, it seems odd.
  22. Uh, Lex. You don't have to. setRegistryName already handles it. Line 9: 1. public final T setRegistryName(String name) 2. { 3. if (getRegistryName() != null) 4. throw new IllegalStateException("Attempted to set registry name with existing registry name! New: " + name + " Old: " + getRegistryName()); 5. int index = name.lastIndexOf(':'); 6. String oldPrefix = index == -1 ? "" : name.substring(0, index); 7. name = index == -1 ? name : name.substring(index + 1); 8. ModContainer mc = Loader.instance().activeModContainer(); 9. String prefix = mc == null || (mc instanceof InjectedModContainer && ((InjectedModContainer)mc).wrappedContainer instanceof FMLContainer) ? "minecraft" : mc.getModId().toLowerCase(); 10. if (!oldPrefix.equals(prefix) && oldPrefix.length() > 0) 11. { 12. FMLLog.bigWarning("Dangerous alternative prefix `{}` for name `{}`, expected `{}` invalid registry invocation/invalid name?", oldPrefix, name, prefix); 13. prefix = oldPrefix; 14. } 15. this.registryName = new ResourceLocation(prefix, name); 16. return (T)this; 17. } Unless you're telling us that you're going to make it not do that, throw warnings, or similar.
  23. D7, I am pretty sure that checks "is this entity 'minecraft:creeper'?" but does not check "is this entity a class that is (or extends) EntityCreeper?" (because of mod-added creepers). The OP wants to detect all mobs, not a specific one.

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.