-
Posts
5161 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
[1.12.2] Get texture from texture map
Choonster replied to That_Martin_Guy's topic in Modder Support
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. -
Forge doesn't support Java 9, you need to use Java 8.
-
[Solved] Item added/removed ItemHandler Capabilty check
Choonster replied to MinecraftMart's topic in Modder Support
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.- 1 reply
-
- 1
-
Since this commit for 1.12. It was then done by Vanilla in 1.12.1.
-
Gradle ran out of memory, you need to give it more.
-
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.
-
Forge 1.12.2-14.23.2.2611 Will Not Start!
Choonster replied to TobyMinceraft's topic in Support & Bug Reports
Does this happen without OptiFine? -
[1.12] Biome Temperature Adjustment - Please code assist
Choonster replied to Sopwith's topic in Modder Support
I'm not going to write the code for you. Was there a specific part you didn't understand? -
[1.12] Modifying a Vanilla World Generation Feature
Choonster replied to FilthyNoob's topic in Modder Support
Check if the event's IChunkGenerator is an instance of ChunkGeneratorOverworld, then use reflection to access the ChunkGeneratorOverworld#settings field. -
[1.12] Biome Temperature Adjustment - Please code assist
Choonster replied to Sopwith's topic in Modder Support
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>. -
Get 4 way cardinal direction of any entity
Choonster replied to ptolemy2002's topic in Modder Support
The debug info overlay is rendered by GuiOverlayDebug and GuiIngameForge.GuiOverlayDebugForge. -
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).
-
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?
-
[1.12.2] Changing the enchantment glint color
Choonster replied to Cospaia's topic in Modder Support
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. -
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.
-
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.
-
How does the findNearestStructure function work?
Choonster replied to Calous's topic in Modder Support
If you look at the CommandLocate class in your IDE, you'll see that it is. -
[SOLVED] Trouble Running Forge Server
Choonster replied to impromptutriplet's topic in Support & Bug Reports
You're using Java 9, which isn't supported by Forge. You need to use Java 8 instead. -
Use the TX button (fifth from the right) to clear formatting or use Ctrl-Shift-V to paste as plain text.
-
How does the findNearestStructure function work?
Choonster replied to Calous's topic in Modder Support
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.