Jump to content

Leviathan143

Forge Modder
  • Posts

    211
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Leviathan143

  1. Global entity ids are deprecated, use registerModEntity instead; ids for mod entities only have to be unique within the mod, rather than globally. What line is line 43, and is the NPE client-side or server-side?
  2. In a class that extends IRenderHandler. If you are replacing WorldProviderEnd with your own WorldProvider override WorldProvider#getSkyRenderer(). If you aren't, use WorldProvider#setSkyRenderer() to change the sky renderer when necessary. Do you have any prior coding experience, Java or otherwise?
  3. If your mod doesn't work on a dedicated server, you've likely used Client only Classes or methods in code that is run on the server. If it doesn't work server-side, you've probably setup your proxies incorrectly.
  4. Extend BlockBreakable and pass false in as the second parameter. That might work, just looking at Glass code... That is not what ignoreSimilarity does, it's use is related to occlusion culling of sides. @OP Have you overriden Block#getBlockLayer()?
  5. Don't bother obtaining the source or decompiling. Updating a mod from 1.5.2 to 1.10.2 will be difficult, it's a jump of five major versions. It will be much easier to build a new mod with the same features from scratch.
  6. "x" is a string, 'x' is a char. Also the last argument of GameRegistry#addRecipe() is varargs.
  7. Use the PotionEffect constructor that has the args Potion potionIn, int durationIn, int amplifierIn, boolean ambientIn, boolean showParticlesIn ambientIn is true if the effect is caused by a beacon.
  8. Read the code, we do that. https://github.com/TeamWizardry/Wizardry/blob/master/src/main/java/com/teamwizardry/wizardry/api/capability/WizardryCapabilityProvider.java#L31
  9. Post the whole thing.
  10. Are you sure it's exactly the same error as the intial one? Post a new log.
  11. Have you set a default state for BlockTwigs?
  12. You are doing it wrong then, show that code.
  13. You never assign a value to IWorldGenTwigs#state, so it is null and Java throws an NPE when it is referenced. While not the cause of the problem IWorldGenTwigs should be called WorldGenTwigs, as it is a class, not an interface.
  14. 1. Add the mod jar to your project build path. Since 1.8.9 Forge automatically deobfuscates mods in the dev workspace, so you don't need a special dev version of the mod. You'll also need to tell gradle where the jar is, the easiest way of doing this is to place the jar in <mod folder>/libs(NOT <mod folder>/build/libs). 2. Use an instanceof check as normal, but first check that the mod is loaded with Loader#isModLoaded(modid).
  15. if (worldObj.getBlockState(null) == Blocks.COAL_BLOCK.getDefaultState() You are literally passing null into a method, so of course you are getting an NPE.
  16. You need to enable the universal bucket with FluidRegistry#enableUniversalBucket() before Preinit- the recommended way to do this is to call FluidRegistry#enableUniversalBucket() in a static initialisation block in your mod class. This is noted in the Javadocs for FluidRegistry#addBucketForFluid; make a habit of reading the javadocs, as they often contain useful or important information
  17. You really could have written this better. While I don't believe people should be banned for attempting to use a feature of Forge(I'd really like to know the reason behind Lex's apparent hatred of coremods), your response is not acceptable behaviour. We are all civilised people here, we can have a discussion about coremods without resorting to insults.
  18. public static Block CACHE_WALL = new BlockCacheWall().setRegistryName("cache_wall"); GameRegistry.register(cache_wall); Java is case sensitive.
  19. It is possible, but not using instanceof. What you need to do is check that the Classes are equal(Use .class or .getClass to get the classes), make sure you only do this if CustomNPCs is loaded.
  20. You should prefix unlocalised names with your modid, Forge does not do this. Registry names automatically have the modid prefixed to the passed name. Just a question, does forge even care about Unlocalized names any more? Aren't they just used to localize the name in game? Yes, unlocalised names are only used to localise strings in-game, however they can still conflict. For example,
  21. You should prefix unlocalised names with your modid, Forge does not do this. Registry names automatically have the modid prefixed to the passed name.
  22. That is not the problem at all, it's just fine the way it is. The type of a field annotated with @SidedProxy must be part of the type hierarchy of both proxies, your suggestion would break the proxies further. The actual problem is that the proxies are abstract, so they cannot be instantiated.
  23. Actually I did not though I makes sense that there is those sound mighty useful, though I have never had to do anything like that before. But is it possible to register GuiOpenEvent only client side and have it work? Yes, any eventhandler can be registered on both sides or just one. The subscribed events do have to be fired on that particular side of course.
  24. Botania Unofficial uses the animation system for the Mana Pump and the Corporea Crystal Cube, so you can use it as an example to assist in figuring things out. It's git repo can be found here.
  25. It doesn't seem to like that, claiming that TileEntityCardboardBox() is not a TileEntity, and it's trying to get me to change the return type. which is false. It won't let me override without the Block# notation either. Block#createTileEntity() is notation for the method called createTileEntity in the class Block . It has parameters, but I didn't specify them as it has no overloads(methods with the same name but different parameters). If you type a method name in a class and press the autocomplete keybind(Ctrl+Space in Eclipse), your IDE will display all methods with that name that you can override.
×
×
  • Create New...

Important Information

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