Jump to content

Eternaldoom

Forge Modder
  • Posts

    592
  • Joined

  • Last visited

Everything posted by Eternaldoom

  1. First of all, you should put your code between code tags. 50 might be too big, I think the max ore size is 32. Are there any error messages? BTW, for your generation not to appear in the nether you need to break the switch statement after generateNether() .
  2. Set the server to offline mode in server.properties
  3. Post the AI class
  4. Post your entire main class. It doesn't look like you are registering the renderer.
  5. I've never used an API for a mod, but it should be like using any other API. Just download the jar, go to your build path settings, and click "add external jars". As for how to use the particular API, it probably has Javadocs.
  6. Alternatively, can I download a server resource pack before connecting to the server?
  7. Yep, getProperties is the actual damage reduction, damageArmor is how the item gets damaged, and getArmorDisplay is he display bar. Here's an example of how to use it.
  8. Is it just the armor bar rendering, or does the armor not function? If it's just the bar, you can try implementing ISpecialArmor to customize it.
  9. Hi, I am creating a mod that allows users to add content (blocks and items) in resource packs. If the client joins the server and the server has a different content pack, they are kicked with the message "fatally missing blocks and items". Is there a way I can tell the player to download the content pack? Is there a handshake event I should use?
  10. So far, I have the following code for my IResourcePack: public class ResourceLoader implements IResourcePack { public static final Set defaultResourceDomains = ImmutableSet.of("jsoncontent"); private final Map amap; public ResourceLoader(Map par) { this.amap = par; } @Override public InputStream getInputStream(ResourceLocation location) throws IOException { InputStream var2 = this.getResourceStream(location); if (var2 != null) { return var2; } else { InputStream var3 = this.getStream(location); if (var3 != null) { return var3; } else { throw new FileNotFoundException(location.getResourcePath()); } } } public InputStream getStream(ResourceLocation location) throws IOException { File var2 = (File)this.amap.get(location.toString()); return var2 != null && var2.isFile() ? new FileInputStream(var2) : null; } private InputStream getResourceStream(ResourceLocation location) { return ResourceLoader.class.getResourceAsStream("assets/" + location.getResourcePath()); } @Override public boolean resourceExists(ResourceLocation location) { return this.getResourceStream(location) != null || this.amap.containsKey(location.toString()); } @Override public Set getResourceDomains() { return defaultResourceDomains; } @Override public IMetadataSection getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException { return null; } @Override public BufferedImage getPackImage() throws IOException { return ImageIO.read(ResourceLoader.class.getResourceAsStream("/" + (new ResourceLocation("pack.png")).getResourcePath())); } @Override public String getPackName() { return "Default"; } } I know how to use reflection to set the field value, but what should I use for the map instance? And will my current code for the IResourcePack work? Sequituri, I understand that, and I plan to post tutorials on how to use the mod and have strict crash report guidelines.
  11. Hi, I am creating a mod that allows users to create content (blocks and items) in a JSON file. Since they shouldn't have to open up the mod jar in order to add resources, I need to find a way to load textures and localization from an outside folder. Any idea how to do this? Thanks!
  12. world.setBlock(x, y, z, Blocks.chest, random.nextInt(5)+2, 2)
  13. That's cool, can you post the code?
  14. First of all, just extend the vanilla RenderArrow class; it's easier. Have a look here. Second of all, does it render the arrow shape, just not the texture, or is it a white box?
  15. You can only have 16 subblocks, so you could do two machines for the same ID, but not more.
  16. @SubscribeEvent public void armorBonus(PlayerTickEvent evt){ }
  17. Set allowFlying and isFlying to false if the player is not in creative. I don't know if the method will be called though if you have taken off the armor. Maybe you'll have to use an event
  18. I think he means when the item is taken from a creative tab and placed in the hotbar/survival inventory.
  19. The crash is because you haven't assigned a value to f_world. Why are you trying to set metadata in getIcon?
  20. You aren't registering a renderer.
  21. Before worldObj.createExplosion, put if(!this.worldObj.isRemote)
  22. Look up a forge sound tutorial. You need .ogg sound files and a sounds.json file to make the game recognize them.
  23. What do you mean? Actually play sounds? Add chat messages to players chats?
  24. Register it with FMLCommonHandler.instance().bus().register() since its an FML event. Also, you don't need to check it evt.player is an instance of EntityPlayer since it always is.
×
×
  • Create New...

Important Information

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