Everything posted by Draco18s
-
[1.12.x/1.11.x] [SOLVED] Block connections (Collision, JSON)
https://english.stackexchange.com/questions/95624/use-of-or-inclusive-or-exclusive
-
[1.12.x/1.11.x] [SOLVED] hasCapability NPE
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;
-
[1.12.x/1.11.x] [SOLVED] hasCapability NPE
*Looks for code* *Fails to find code* *Hits "back" on browser*
-
[1.12.x/1.11.x] [SOLVED] Block connections (Collision, JSON)
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..."); } }
-
[1.12.x/1.11.x] [SOLVED] Block connections (Collision, JSON)
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.
-
[1.12.x/1.11.x] [SOLVED] Block connections (Collision, JSON)
Seriously? One defines an object, one defines an array...
-
[1.12.x/1.11.x] [SOLVED] Block connections (Collision, JSON)
Ah, that's the multipart system, not the submodel system. Now then: From the minecraft wiki: "multipart": [ From your file: "multipart": { HMM
-
[1.12.x/1.11.x] [SOLVED] Block connections (Collision, JSON)
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
-
#@!@# Game crashed! Crash report saved to: #@!@# C:\Users\user\Desktop\MOD\.\crash-reports\crash-2017-10-02_20.37.22-client.txt
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.
-
[1.12.x/1.11.x] [SOLVED] Block connections (Collision, JSON)
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.
-
[1.12.x/1.11.x] [SOLVED] Block connections (Collision, JSON)
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.
-
Best option for rendering a modular block?
It isn't. Its only called when the chunk is re-rendered, which is only whenever a block in that chunk changes state.
-
[1.12.x/1.11.x] [SOLVED] Block connections (Collision, JSON)
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.
-
[1.12.x/1.11.x] [SOLVED] Block connections (Collision, JSON)
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.
-
[1.10.2] Problems with container slots and shift click
Try comparing it with mine: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/api/internal/CommonContainer.java#L35
-
[1.7.10] A good approach for a backup mod
1.7.10 is no longer supported here.
-
[1.11.2] stack.stackSize is private now?
Also, grow() and shrink()
-
[1.12.1] Crafting Manager not Working properly
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; }
-
[1.12.1] Crafting Manager not Working properly
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; }
-
[1.10.2] How to check if there is room in the player inventory
block.getDrops() much?
-
[1.12] Help registering a block
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.
-
Accessing Registry Entries in Registry Events
Seems to me like Forge should apply object holders after each registry event. Is there a similar problem between Register<Block> and Register<Item>?
-
Get a list of every entity registered and know if it is a mob?
Why they're checking all registered entities, I don't know. I'll give you that, because I agree, it seems odd.
-
[1.12] Help registering a block
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.
-
Get a list of every entity registered and know if it is a mob?
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.
IPS spam blocked by CleanTalk.