Jump to content

Mitchellbrine

Forge Modder
  • Posts

    193
  • Joined

  • Last visited

Everything posted by Mitchellbrine

  1. Nothing is wrong with making a resource pack. I was just wondering what the 1.9 equivalent of the LanguageRegistry.instance().loadLocalization is. If it's resource packs, awesome, I'll get on that!
  2. Back in the 1.7 days and prior (a long time ago, I know), there used to be a way to load an external lang file, with its map of translations, into the game. For example, I would have a file in the config folder that would be labeled and (just for clarity to the end user) given the extension .lang. Using the line LanguageRegistry.instance().loadLocalization(file.toURI().toURL(),"en_US",false); // I understand that it's a sloppy line, but you get the gist of the use of the loadLocalization function I could load a file of translations into the en_US language in the game. Is there a contemporary equivalent that I could use in order to achieve the same result? If not, how would I go about doing this? Would I need to create a new ResourcePack and load that in? Thanks in advance!
  3. Calm down! There should be a level.dat_old file. It can be used as a replacement for level.dat iirc.
  4. You shouldn't be needing to look in the classes. And you should be able to search in your IDE. - - - And you register the entity like ANY other entity. Because, SURPRISE, it's an entity. EntityRegistry.registerModEntity is the method you should look into, I believe. Hope that helps!
  5. Use GameRegistry.findItem, but make sure the mod is loaded first. You can do this with a soft or hard dependency.
  6. You can use it in core mods before the preInit event is EVER fired.
  7. Um... Nope.AVI. I mean, it's correct, but you can just use public static Logger logger = LogManager.getLogger("MyMod"); and be able to access the logger before the preInit.
  8. There's a way to turn it on in the logger, but I'll be damned if I remember. You need to enable that debug in the logger, if you're going to log debug messages.
  9. Yep, the most deceiving name for a method. It would be better to name isRemote that, but tradition has kept isRemote the same.
  10. Apparently, isClientWorld() returns the opposite of world.isRemote, so that means it's on the server. So maybe, it isn't both sides, but it isn't the client if isClientWorld returns the opposite of world.isRemote.
  11. if (world.isRemote) { // Welcome to the client } else { // Welcome to the server }
  12. He wants a gui, not something rendering over in the ingame GUI. He could use that, but he wants to have a gui.
  13. That code's only going to work in the overworld. Dimension/WorldServer 0 is the overworld, so be forewarned, it won't work in the nether/end/any other dimension.
  14. You can always create a gui that does not require a container. You only need to return null for your server element. (Probably wrong about that, but I'm pretty sure that's okay to do).
  15. To add on: 20 ticks equals a second. (I'll let you do the math for minute and hour, because that's simple math) 24000 ticks equals a Minecraft day (which is 20 minutes IRL). And so on, and so forth. Just so you know the conversions.
  16. No no no, that's NOT what I was saying. You need to learn Java properly. THEN take a look at the Minecraft code and Forge code and make mods. It'll all make sense, once you do so.
  17. Oh and "activeIcon" and "blockIcon" are private IIcon fields you set in registerIcons and access/return in getIcon
  18. Those parameters allow you to check the block access for a tile entity at the coordinates, so you can do: TileEntity te = blockAccess.getTileEntity(x,y,z); You can check if it's an instance of your tile entity and if so, cast it and then you can use the boolean and if it is active you return activeIcon; else at the end of the getIcon method (after everything), you would return blockIcon; - - - You will need to register those icons in the registerIcons method first, but after that, it should work. Hope that helps!
  19. I'd say register the two icons first and with public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) check for the tile entity (where I'd put the boolean), and if it is active, use the active icon. - - - Optionally, you can pull "a furnace" and create two separate blocks with different icons, but I'd try the former way first. Hope that helps!
  20. Yeah, there's a lot wrong with this code. 1. Don't make TE arrays/instances inside an ITEM class. 2. If you break the tile entity block, it removes the tile entity. 2.5. I mean, use the obfuscated method to break it, so #2 actually happens. 3. That list is going to say it's not wrenchable, unless the block is the first one on the list. 4. Don't make the field "private boolean wrenchable" if you're doing it per item in hand, not class. Use NBT.
  21. It looks like it should be working. I compared it to my code and it looks fine. Hmmm, maybe try getting rid/commenting out these: private static final int X0 = 0; private static final int Y0 = 15; private static final int X1 = 5; private static final int Y1 = 5; @Override public void drawBackground(int i) { GL11.glColor4f(1, 1, 1, 1); } static { API.setGuiOffset(GuiFusionFurnace.class, -x(0), -y(0)); } protected static int x(int x) { return x + X0 - X1; } protected static int y(int y) { return y + Y0 - Y1; } and see what happens. If anything, I think it *might* be the offset but I don't know. The code seems fine to me.
  22. What the IProxy? It's just his way of doing things. You just need 2 classes, the common proxy (or server proxy) and the client proxy, which extends the common proxy. That's all. You don't need any fancy interfaces, just use the common proxy. IProxy is just a waste of space. Granted, very little space, but it's still a waste of space.
×
×
  • Create New...

Important Information

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