Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/28/17 in all areas

  1. Cool. Could you also tell me a bit where you copied the original code from? As Draco pointed out your "a" variable gets slightly out of hand. This is most likely because of your 3 loops: for(int j = 0; j < 5; j++) { for(int k = 0; k < 5; k++) { ... for (int n = 0; n < 33; n++) { This can actually get you up to 5 x 5 x 33 = 825 pretty quickly. It's likely you want int j = 0; j < 4 , int k = 0; k < 4, int n = 0; n < 32 which should index the heightmap up to 512 = 4 x 4 x 32 . Exception helps you out by pointing: java.lang.ArrayIndexOutOfBoundsException: 513 at harry.harrysmod.world.dimension.NormalTerrainGen.generateHeightmap(NormalTerrainGen.java:160) So it's likely value 513 for the indexing variable "a" is the ofender while previous values (e.g. 512) were not, hence my idea of limiting it to 512.
    1 point
  2. Try using an enum. You get a button that cycles. @Config.Comment("Enumerated Values") public static LATIN latin = LATIN.BETA; public enum LATIN { ALPHA, BETA, GAMMA; }
    1 point
  3. I'm not certain but the combat tracker might be up to date on the client side. Each entity living base child class has a combat tracker that indicates what is attacking and what the damage source is. So you can call the getCombatTracker() on the player entity and then get further info such as the damage source and attacker. I guess you'd do it in the Player tick event. Also, if you can't figure out an easier way, you can have the server side send a custom packet to the client with the info you need.
    1 point
  4. Or maybe I just fucked up typing the [ /spoiler] earlier. But I could have avoided posting this thread if there was a post preview function
    1 point
  5. I tried to do the same thing but the only way I could find to do it is to replace the MapGenVillage with my own. Would be great if someone had another solution.
    1 point
  6. Basically a button that is on a screen (image attached) like the one show that auto restarts the game that you click when you fix the issue.
    1 point
  7. Your side check is the wrong way round, you should call openGui only when !worldIn.isRemote.
    1 point
  8. In previous versions of Minecraft, it was possible to create a handler for ItemTooltipEvent in common code without crashing the dedicated server as long as you didn't reference any client-only classes. In 1.12, ItemTooltipEvent now references the client-only ITooltipFlag, which crashes the dedicated server with a ClassNotFoundException when you create a handler for the event in common code (unless you mark the handler method as client-only). I suggest moving the event to a client package or at least mentioning that it's client-only in the doc comment.
    1 point
×
×
  • Create New...

Important Information

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