Jump to content

Choonster

Moderators
  • Posts

    5160
  • Joined

  • Last visited

  • Days Won

    76

Everything posted by Choonster

  1. You need to make Gradle compile your code as UTF-8 by adding this to build.gradle: tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
  2. The method that the OP is using will work if the block has a bounding box smaller than a full block. An offset of 0.01 on each side is enough to allow entities (including items) to collide with the block. Make sure you're actually overriding Block#onEntityCollidedWithBlock(World, BlockPos, IBlockState, Entity) (called when any entity collides with the block) and not Block#onEntityCollidedWithBlock(World, BlockPos, Entity) (called when an entity that returns true from Entity#canTriggerWalking walks on top the block). This basic demonstration spams the log when an item collides with the block.
  3. Use the setRaining , setRainTime , setThundering and setThunderTime methods of WorldInfo ( World#getWorldInfo will return the World 's WorldInfo instance). This should be done on the server, the clients will be automatically notified of the change.
  4. Yes that's exactly what I meant. Is this already implemented in Forge? Because it could make things a lot easier if you have many, many state properties. (However, I still prefer code) Yes, it's implemented. You can see the code behind the example in the docs here and the blockstates file and item/block models here. I created a model similar to a BuildCraft pipe using this system here.
  5. One of Ars Magica 2's potions is configured with the same ID as RotaryCraft's Freeze potion (ID 35). Edit the potion IDs in the config file of either mod so they don't conflict. If you can get a client running with the same mods (after fixing any potion ID conflicts from Reika's mods), NEI can tell you which potion IDs are being used and which are free: open your inventory, then go to Options -> Tools -> Data Dumps and click "Dump" next to "Potions".
  6. In the obfuscated (non-development) environment, there's no field called locationSkin ; instead it has the SRG name field_110312_d . FML's ObfuscationReflectionHelper#setPrivateValue allows you to pass both the deobfuscated (MCP) and obfuscated (SRG) names of the field to set the value of. Either use it directly or adapt the logic to your class. Make sure you only reference client-only classes like Minecraft and AbstractClientPlayer from client-side code (i.e. only register your event handler in your client proxy). Edit: The SRG name of AbstractClientPlayer#locationSkin in 1.7.10 is actually field_110312_d . field_178865_e is the SRG name of NetworkPlayerInfo#locationSkin field in 1.8.
  7. Looking at the changelog, it was added in 1.7.10-10.13.2.1256 and 1.8-11.14.0.1257.
  8. getAccessTransformerClass should return the full name of your class (e.g. com.yourname.yourmod.AccessTransformer ), not just the class name. You should currently be getting an error in the log for your access transformer class. Do you really need everything in Entity to be public?
  9. You shouldn't need to touch CraftingManager if all you're doing is creating a custom recipe type. Just implement the IRecipe interface and add instances of your recipe class using GameRegistry.addRecipe(IRecipe) .
  10. Your models must not have included the resource domain (your mod ID) in their texture paths. i.e. use modid:items/TextureName instead of items/TextureName.
  11. Could you step through the code in a debugger and figure out which methods are returning null ? For the getPlayerInfo reflection call, it must be Class#getDeclaredMethod returning null (unless getPlayerInfo itself is throwing the exception). I don't know what your ManagerReflection.setField method looks like. It should be noted that ReflectionHelper calls setAccessible(true) on Method s and Field s before using them, you should probably do this too. Edit: Your current code will only work in the development environment, since there's no NetworkPlayerInfo#locationSkin field in the obfuscated client (where it uses its SRG name instead).
  12. It's certainly possible to change the cape in 1.8 (see my code here and here), I imagine it's possible to change the skin in the same way.
  13. registerModEntity prefixes the entity's name with your mod ID followed by a period, so the full name of your mob is "<yourmodid>.TutorialMob" .
  14. Post the error (like shadowfacts told you to) and your model classes (like diesieben07 told you to). It's hard to find a solution when we don't know what the problem is.
  15. What are you checking and when? The sided proxy system may be what you need.
  16. I didn't say anything about BiomeDictionary . You should still call BiomeDictionary.registerBiomeType for your biomes. BiomeDictionary.registerAllBiomes does absolutely nothing except log a warning that it was called. This was changed in September 2013, so any tutorial that tells you to call it is very outdated. Do you call BiomeManager.addBiome for your biomes? This is what allows biomes to spawn in the Overworld. If you're not calling that anywhere, it could be that you're using duplicate biome IDs.
  17. Lily Pad placement is handled in ItemLilyPad#onItemRightClick .
  18. If you don't call BiomeManager.addBiome for your biome, it shouldn't be used anywhere except your dimension.
  19. getArmorModel is a method of Item in 1.7.10 (though for some reason it's only called if the Item is an instance of ItemArmor ). It expects a ModelBiped , though; so you'd either have to convert your models to Java models or create an adapter class that extends ModelBiped but renders an OBJ model. I don't know much about the rendering system, so I can't help much more than that.
  20. The exception tells you exactly what went wrong: your TileEntityPin class doesn't have a mapping. You need to register it with GameRegistry.registerTileEntity . Side note: Package names should be all lowercase.
  21. Your code looks correct. I'm not too sure what would cause missing textures/models without an error in the log. Could you post one of your models?
  22. Main already calls the proxy method for each phase (preInit, init and postInit). OP: Could you post your RenderRegister class? Please use [ code ] tags (without spaces) or post your code on Gist/Pastebin.
  23. Potion s in 1.8 are almost exactly the same as in 1.7.10, except that they now have a ResourceLocation identifier used by the /effect command.
  24. There's an FAQ here and some other links here.
  25. Cast the entity instance to EntityGuardian and call the isElder method on it.
×
×
  • Create New...

Important Information

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