Jump to content

Choonster

Moderators
  • Posts

    5161
  • Joined

  • Last visited

  • Days Won

    76

Everything posted by Choonster

  1. You can have 27 (or more) states in a single Block if you store them somewhere other than the metadata, just override Block#getActualState to return the state based on information stored in a TileEntity or derived from the world (e.g. how many blocks are adjacent to this one and where they are in relation to it). You can tell each element of a model which part of a texture to render with the "uv" property (see the wiki for more details), but this would require making 27 individual models with different UV coordinates. If all the blocks are the same shape (or some of them are), you can make a single model and specify a different texture file for each state using Forge's blockstates format. You could probably mess around with dynamically-generated models or textures, but I think this is the simplest way to do it.
  2. This PR from bs2609 should fix the issue if it's merged.
  3. Forge doesn't support Java 9, you need to use Java 8.
  4. ItemStackHandler#onContentsChanged is called when the contents of an ItemStackHandler change, you can extend ItemStackHandler (possibly in an anonymous class inside your TileEntity) and override this to do you what you need.
  5. Since this commit for 1.12. It was then done by Vanilla in 1.12.1.
  6. You need to tell Forge to only load and register the class on a specific side by passing a Side argument to the @EventBusSubscriber annotation. You can see an example of this here.
  7. Gradle ran out of memory, you need to give it more.
  8. Your post is unreadable on the dark theme, you should use the Tx button to remove the formatting from it. You need to tell ForgeGradle to reobfuscate the shadow JAR, you can see how I do this here.
  9. Does this happen without OptiFine?
  10. I'm not going to write the code for you. Was there a specific part you didn't understand?
  11. Check if the event's IChunkGenerator is an instance of ChunkGeneratorOverworld, then use reflection to access the ChunkGeneratorOverworld#settings field.
  12. Since all of these fields are final, you'll probably need to use the registry override system to replace the Vanilla biomes with your own. Create an instance of the appropriate Biome class (e.g. BiomePlains) with a BiomeProperties that has the desired properties, set its registry name to the same as the Vanilla one (e.g. minecraft:plains) and then register it with IForgeRegistry#register. Since there's already a Biome registered for that name, your instance will override the Vanilla one. Do this in RegistryEvent.Register<Biome>.
  13. The debug info overlay is rendered by GuiOverlayDebug and GuiIngameForge.GuiOverlayDebugForge.
  14. Then you can look for the MCP mapping CSV files in the Gradle cache (~/.gradle or %USERPROFILE%\.gradle); these map SRG names to MCP names. I don't have the full path with me, but look for de/oceanlabs/mcp.
  15. Those are SRG (obfuscated) names. You can use MCPBot to find the corresponding MCP (deobfuscated) names.
  16. Which version of Minecraft are you using? EnumFacing.getDirectionFromEntityLiving was added in 1.11; in 1.10.2 and earlier the equivalent method was BlockPistonBase.getFacingFromEntity. When you want to implement a feature (e.g. set a block's facing based on the placer), you should look for places in the Vanilla or Forge code where similar features are implemented (e.g. pistons).
  17. Open the EnumFacing enum in your IDE and look for the method with the parameters and return type that matches EnumFacing.getDirectionFromEntityLiving. What is its name?
  18. I don't think this is possible. There was a PR to add support for this, but it was never merged because it was so large.
  19. This is incorrect. Despite the name, the method actually has a EntityLivingBase parameter. If you look at the EnumFacing enum in your IDE, what's the name of the method that takes a BlockPos and EntityLivingBase and returns an EnumFacing? It should be one of the last methods, just before the static initialiser block and the start of the EnumFacing.Axis enum. MCPBot tells me that the method is known by its SRG name (func_190914_a) in older MCP mappings.
  20. Forge's registries are already stored in the ForgeRegistries class and you can use GameRegistry.findRegistry to find any other registry. There's no need to store the registry from the registry event for later use.
  21. If you look at the CommandLocate class in your IDE, you'll see that it is.
  22. You're using Java 9, which isn't supported by Forge. You need to use Java 8 instead.
  23. You're using Java 9, which isn't supported by Forge. You need to use Java 8 instead.
  24. Use the TX button (fifth from the right) to clear formatting or use Ctrl-Shift-V to paste as plain text.
  25. You probably could do that. Depending on exactly how your mod works, it may be easier to simply maintain a list of block positions and search that.
×
×
  • Create New...

Important Information

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