Everything posted by Choonster
-
[1.10] RegisterEntityRenderingHandler
You can't make a mod without knowing basic concepts like how to implement interfaces. If you don't register a renderer for your entity, Minecraft will use the one registered for its super class.
-
My capabilities REFUSE to work. 5 devs checked it and all failed to find a clue.
Just like your capabilities, you're registering your packets in CommonProxy#preInit but ClientProxy overrides this and never calls the super method. Packets need to be registered on both sides, so do this from your @Mod class instead of your proxy classes.
-
[1.10] RegisterEntityRenderingHandler
That's not valid Java, a class name isn't a value. You must have a solid understanding of Java and OO programming in general before you can make a mod. You need to create an instance of a class (named or anonymous) that implements IRenderFactory and pass it to RenderingRegistry.registerEntityRenderingHandler . This class must override IRenderFactory#createRenderFor to create and return the RenderFireball instance using the provided RenderManager instance.
-
My capabilities REFUSE to work. 5 devs checked it and all failed to find a clue.
Capability registration must happen on both sides, so do it from your @Mod class instead of your proxy classes.
-
[1.8.9] Creating a txt file, and accessing with a command.
From the description of this section:
-
[1.10] RegisterEntityRenderingHandler
Use your IDE to find classes that extend Render , or look at the RenderManager constructor to see where vanilla creates its Render instances. If your entity extends EntityFireball and should render like the vanilla fireball, use RenderFireball .
-
[1.10] RegisterEntityRenderingHandler
Use RenderingRegistry.registerEntityRenderingHandler(Class<T>, IRenderFactory<? super T>) in preInit. IRenderFactory has a single method that takes the RenderManager instance as an argument and creates and returns the instance of your Render class. You can implement it using a named or anonymous class (Java 6/7), a lambda or a constructor method reference (Java . You can find links to several tutorials here. McJty has a tutorial on mobs here. You can see how I register the IRenderFactory for an entity in my mod here. Edit: Removed unintentional smiley.
-
My capabilities REFUSE to work. 5 devs checked it and all failed to find a clue.
I think Lex meant "Why would your capability already be on the player in AttachCapabilityEvent.Entity ?"
-
[solved] Creating custom world type
The WorldType constructor automatically inserts the WorldType into the WorldType.WORLD_TYPES array (used by the GUI). Are you ever referencing the ApocalypseWorldType class anywhere to allow it to be loaded?
-
[1.10.2] Making a render pass be full-bright
You can technically use a TESR to render items by registering it with ForgeHooksClient.registerTESRItemStack , but this is deprecated and marked for removal as soon as possible. Apart from that, you have to use the model system.
-
[1.10.2] Making a render pass be full-bright
I don't think it's possible to do this with the builtin/generated model (or models that extend it like item/generated ), since the quads are automatically generated for each texture layer rather than specified in the model itself. You'll probably need to create a clone of ItemLayerModel (the IModel used for builtin/generated ) and its IBakedModel / ICustomModelLoader that has the option of generating unshaded (fullbright) quads for each texture layer. Although this is called shade in the model format, it's controlled by the BakedQuad#applyDiffuseLighting field in the code. To control which layers are rendered unshaded, you could either hardcode it for that particular item's needs (i.e. layer 0 is shaded, layer 1 is unshaded) or make your IModel implement IModelCustomData and specify this using Forge's blockstates format (which can also be used for items, despite the name). To make a block render as fullbright I had to make it emit light in addition to setting shade to false in the model; I'm not sure if shade is all you need for an item model. You could also request that something like this be added to Forge, though I believe the rendering guy (Fry) is currently away. There's also no guarantee that the request will be accepted or implemented immediately.
-
[Solved] [1.8.9] Item with multiple textures
I would recommend always posting solutions so people can find them in the future even if you're no longer reading/responding here.
-
[SOLVED]Getting the ID of Custom Enchantments
Like other singletons, Enchantment IDs are automatically assigned and can change between saves. Do not use IDs, pass the Enchantment instance to your constructor.
-
[SOLVED]Getting the ID of Custom Enchantments
You don't need to get the ID yourself. Use ItemStack#addEnchantment to add an Enchantment to an ItemStack . Make sure you've registered your Enchantment with GameRegistry.register .
-
Blockstate file for texture variants?
Your blockstates file has a syntax error. Edit: The error is in the blockstates file, not the block model as I originally said.
-
Failure to decomplie MC
ok sorry to bug you more you have helped me alot, I dont have gradle.properties in my .gradle file is there anywhere i can get it, if not how can i create it You need to create it yourself. It's a plain text file, so use a text editor or your IDE.
-
Compiling: No JAR build/only .class
The build Gradle task outputs the JAR to build/libs. Are you sure it's not working?
-
Unable to set property PropertyDirection
You need to override Block#createBlockState to create a BlockStateContainer with your property.
-
What am I supposed to name my texture files?
The item model you've specified doesn't exist. If an exception occurs when loading the item model, Forge will try to load the model specified by the corresponding variant of a blockstates file. I have a more detailed explanation of the model loading process here.
-
[Solved]Error With setupDecompworkspace at recompile phase [Gradle/Eclipse]
Just like the OP, you've set JAVA_HOME to the JRE path instead of the JDK path.
-
My mod isn't loading a block variant properly.
The model files you specified don't exist. Side note: I'd recommend using Forge's blockstates format or Vanilla's multipart blockstates format. These both allow you to combine models conditionally, eliminating the need to manually create a model for every possible combination of connections. I use Forge's blockstates format for a BuildCraft-style pipe model here. Vanilla uses the multipart blockstates format for Redstone and Fences, among other things.
-
How to alter a vanilla BiomeDecorator?
Forge does indeed force BiomeEvent.CreateDecorator to be fired in postInit for every registered Biome 's BiomeDecorator if it's an instance of DeferredBiomeDecorator ; I missed this before. As far as I can see, modifying the BiomeDecorator returned by BiomeEvent.CreateDecorator#getNewBiomeDecorator should work. You shouldn't need to call BiomeEvent.CreateDecorator#setNewBiomeDecorator with the BiomeDecorator returned by BiomeEvent.CreateDecorator#getNewBiomeDecorator , these methods are backed by the same field.
-
[1.8] [Solved] crash onImpact splash potion
Entity#getBoundingBox always returns null unless the Entity subclass has overridden it (only EntityBoat and EntityMincraft override it to return a non- null value in vanilla).
-
[1.8.9] Conflicting positions for SP and MP
You can't use the Minecraft class in common code, it's client-only. You're already provided the World as an argument of your Item#onItemRightClick and Item#onItemUse overrides, use this instead of trying to get it from the integrated server. Item s are singletons, you can't store per-item data in fields of your Item class. You need to store this data in the ItemStack using metadata, NBT or capabilities as appropriate. Always annotate override methods with @Override so you get a compilation error if they don't actually override a super method. Why are you using Vec3 s to store block positions? Just use BlockPos . You can find the official documentation for the capability system here. Forge itself has several capability examples, look at the usages of CapabilityManager.register in your IDE. There's also a test mod here. I have some examples here: API, implementation
-
[1.9] GetCurrentArmor: works in 1.8, not 1.9. What do I use now?
You should always be developing for the most recent version of Forge. This is the only version that receives new features and bug fixes. 1.10.2 is 99% backwards compatible with 1.9.4, so most 1.9.4 mods will work in 1.10.2.
IPS spam blocked by CleanTalk.