Everything posted by Izzy Axel
-
[1.7.10] Dimension Help
This is odd, it IS spawning both, but the biome indicator on F3 never says anything but plains. Nevermind, fixed it. Now, the other issue I've been having is removing the vanilla generation. I overrode ChunkProviderGenerate#populate in my class that extends ChunkProviderGenerate and implements IChunkProvider, and changed it to: @Override public void populate(IChunkProvider chunkProvider, int x, int z) { BlockFalling.fallInstantly = true; int k = x * 16; int l = z * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16); this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long)x * i1 + (long)z * j1 ^ this.worldObj.getSeed()); MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(chunkProvider, worldObj, rand, x, z, false)); biomegenbase.decorate(this.worldObj, this.rand, k, l); MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(chunkProvider, worldObj, rand, x, z, false)); BlockFalling.fallInstantly = false; } And of course specified it in my custom WorldType, but all the features omitted still generate.
-
[1.7.10] Dimension Help
I rewrote everything but the biomes, now it loads and I can get into the dimension, but I'm still having a few issues. Most importantly, only one biome is generating, when I added 2 to my WorldChunkManager. I still have to add other things back in one at a time, so that's the only question for now. WorldChunkManager
-
[1.7.10] Dimension Help
Ok...that was caused by setting canRespawnHere to true, but that still doesn't allow the world to load: [18:21:01] [server thread/ERROR]: Encountered an unexpected exception net.minecraft.util.ReportedException: Exception ticking world at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:698) ~[MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) ~[MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) ~[integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] Caused by: java.lang.NullPointerException at net.minecraft.world.WorldServer.tick(WorldServer.java:152) ~[WorldServer.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:692) ~[MinecraftServer.class:?] ... 4 more [18:21:01] [server thread/ERROR]: This crash report has been saved to: D:\Modding\ArcaneArtificing\eclipse\.\crash-reports\crash-2015-04-26_18.21.01-server.txt [18:21:01] [server thread/INFO]: Stopping server [18:21:01] [server thread/INFO]: Saving players [18:21:01] [server thread/INFO]: Saving worlds [18:21:01] [server thread/INFO]: Saving chunks for level 'New World'/Overworld [18:21:01] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ---- // You're mean. Time: 4/26/15 6:21 PM Description: Exception ticking world java.lang.NullPointerException: Exception ticking world at net.minecraft.world.WorldServer.tick(WorldServer.java:152) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:692) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.world.WorldServer.tick(WorldServer.java:152) -- Affected level -- Details: Level name: New World All players: 0 total; [] Chunk stats: ServerChunkCache: 0 Drop: 0 Level seed: 8396146677921698012 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (0,0,0), Chunk: (at 0,0,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 0 game time, 0 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: ~~ERROR~~ NullPointerException: null Stacktrace: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:692) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
-
[1.7.10] Dimension Help
I tried this before and got a crash on loading too: Description: Exception initializing level java.lang.NullPointerException: Exception initializing level at net.minecraft.world.WorldServer.createSpawnPosition(WorldServer.java:774) at net.minecraft.world.WorldServer.initialize(WorldServer.java:757) at net.minecraft.world.World.<init>(World.java:296) at net.minecraft.world.WorldServer.<init>(WorldServer.java:102) at net.minecraft.world.WorldServerMulti.<init>(WorldServerMulti.java:14) at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:66) at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.world.WorldServer.createSpawnPosition(WorldServer.java:774) at net.minecraft.world.WorldServer.initialize(WorldServer.java:757) -- Affected level -- Details: Level name: New World All players: 0 total; [] Chunk stats: ServerChunkCache: 0 Drop: 0 Level seed: -3547335517618857771 Level generator: ID 00 - default, ver 1. Features enabled: true Level generator options: Level spawn location: World: (0,0,0), Chunk: (at 0,0,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 0 game time, 0 day time Level dimension: 0 Level storage version: 0x04ABD - Anvil Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true Stacktrace: at net.minecraft.world.World.<init>(World.java:296) at net.minecraft.world.WorldServer.<init>(WorldServer.java:102) at net.minecraft.world.WorldServerMulti.<init>(WorldServerMulti.java:14) at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:66) at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) I did: public AAWorldProvider() { this.dimensionId = Reference.DIMID; this.hasNoSky = false; this.isHellWorld = false; this.worldObj = MinecraftServer.getServer().getEntityWorld(); }
-
[1.7.10] Dimension Help
There are a few things I'm having trouble with: First, something is causing a crash when you try to create a new world, it crashes with: [17:12:29] [server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@6149c883) [17:12:29] [server thread/ERROR]: Encountered an unexpected exception java.lang.NullPointerException at izzyaxel.arcaneartificing.main.dimension.AAWorldProvider.createChunkGenerator(AAWorldProvider.java:56) ~[AAWorldProvider.class:?] at net.minecraft.world.WorldServer.createChunkProvider(WorldServer.java:693) ~[WorldServer.class:?] at net.minecraft.world.World.<init>(World.java:281) ~[World.class:?] at net.minecraft.world.WorldServer.<init>(WorldServer.java:102) ~[WorldServer.class:?] at net.minecraft.world.WorldServerMulti.<init>(WorldServerMulti.java:14) ~[WorldServerMulti.class:?] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:66) ~[integratedServer.class:?] at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) ~[integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] Which is the return in this function: @Override public IChunkProvider createChunkGenerator() { return new AAChunkProvider(worldObj, worldObj.getSeed(), false); } Main WorldProvider ChunkProvider There are other issues but I want to see how fixing this affects them first.
-
[1.7.10] -SOLVED- Check for Ingame
Is there a method of checking if the player is not on the main menu without using inGameHasFocus, because that returns false when the inventory, chat, and pause menu on servers is up. I need this because I'm checking conditions for playing my own music, which will crash the game if you're on the main menu.
-
[1.8] [SOLVED] Disabling Custom Ore Generation Using Configs
= is assignment, == is comparison, and there's no need for explicit comparison with booleans, you can just do: if(ConfigurationHandler.enableGeneration) This checks if the boolean is true.
-
Checking if sound is playing && ISound[srsly noone?]
Alrighty, updated the Gist: Adding Custom Music v2
-
Checking if sound is playing && ISound[srsly noone?]
So, how do you get the obfuscated names?
-
Checking if sound is playing && ISound[srsly noone?]
And here we are, in total: Adding Custom Music
-
Checking if sound is playing && ISound[srsly noone?]
Ok, this post was getting messy, there's no reason to show the totally incorrect things I tried, so here's what works: SoundManager mng = ReflectionHelper.getPrivateValue(SoundHandler.class, Minecraft.getMinecraft().getSoundHandler(), "sndManager"); Map playingSounds = ReflectionHelper.getPrivateValue(SoundManager.class, mng, "playingSounds"); Iterator it = playingSounds.keySet().iterator(); while(it.hasNext()) { PositionedSound ps = (PositionedSound)playingSounds.get(it.next()); ResourceLocation reloc = ReflectionHelper.getPrivateValue(PositionedSound.class, ps, "field_147664_a"); if("music.game".equals(reloc.getResourcePath())) { Minecraft.getMinecraft().getSoundHandler().stopSound(ps); System.out.println("stopped music"); break; } }
-
[1.7.10]Arriving in Dimension Event/Fading GUI Elements Out
Did it manually: int Blue = 220; int Green = 220; int Red = 220; int Alpha = 255; int color = Blue + (Green << + (Red << 16) + (Alpha << 24); And then to automate: Alpha = (int)(cardTime * (255.0F/120.0F));
-
[1.7.10]Arriving in Dimension Event/Fading GUI Elements Out
Didn't work, still doesn't fade. I'm guessing I need to make my own FontRenderer and override all the drawString methods to fix this, since glColor4f is set inside the vanilla methods.
-
[1.7.10]Arriving in Dimension Event/Fading GUI Elements Out
Yeah: HUD Edit: Ok, now the modal rect fades properly but the string doesn't :I @SubscribeEvent public void onRender(RenderGameOverlayEvent event) { if(event.isCancelable() || event.type != RenderGameOverlayEvent.ElementType.HOTBAR) { return; } if(arrived) { EntityPlayer player = Minecraft.getMinecraft().thePlayer; DLFileHandler.readConfig(); this.cardName = DLFileHandler.queryDimName(player.dimension); int cardBorder = 2; int cardOffset = 6; int cardWidth = 84; int cardHeight = 14; int color = 0xdcdcdc; int stringWidth = mc.fontRenderer.getStringWidth(cardName); --this.cardTime; if(this.cardTime >= 81) { GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.renderEngine.bindTexture(cardTexture); this.drawTexturedModalRect(cardOffset, cardOffset, 0, 0, cardWidth, cardHeight); this.mc.fontRenderer.drawStringWithShadow(cardName, (((cardWidth - cardBorder - cardOffset) / 2) + 1) - (stringWidth / 3), 9, color); } if(this.cardTime < 81) { GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1.0F, 1.0F, 1.0F, (float)this.cardTime / 80); this.mc.renderEngine.bindTexture(cardTexture); this.drawTexturedModalRect(cardOffset, cardOffset, 0, 0, cardWidth, cardHeight); this.mc.fontRenderer.drawStringWithShadow(cardName, (((cardWidth - cardBorder - cardOffset) / 2) + 1) - (stringWidth / 3), 9, color); } if(cardTime < 1) { this.cardTime = this.cardTimeMax; arrived = false; } } }
-
[1.7.10]Arriving in Dimension Event/Fading GUI Elements Out
Alright, the only thing left is the blending...it's just not doing what I'm expecting due to my lack of knowledge of OGL, it's not automating at all. EntityPlayer player = Minecraft.getMinecraft().thePlayer; DLFileHandler.readConfig(); this.cardName = DLFileHandler.queryDimName(player.dimension); GL11.glDisable(GL11.GL_LIGHTING); this.mc.renderEngine.bindTexture(cardTexture); int cardBorder = 2; int cardOffset = 6; int cardWidth = 84; int cardHeight = 14; int color = 0xdcdcdc; this.drawTexturedModalRect(cardOffset, cardOffset, 0, 0, cardWidth, cardHeight); int stringWidth = mc.fontRenderer.getStringWidth(cardName); this.mc.fontRenderer.drawStringWithShadow(cardName, (((cardWidth - cardBorder - cardOffset) / 2) + 1) - (stringWidth / 3), 9, color); --this.cardTime; if(cardTime < 80) { GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR); GL11.glColor4f(0.5F, 0.5F, 0.5F, (float)this.cardTime / 80); } if(cardTime < 1) { cardTime = cardTimeMax; arrived = false; } This does nothing, it still just abruptly disappears, and there's no blending going on.
-
[1.7.10]Arriving in Dimension Event/Fading GUI Elements Out
How do you "hook" a player arriving in a dimension? How would you continually fade a HUD element out? I assume this requires OpenGL, which I'm not very familiar with. HUD
-
Checking if sound is playing && ISound[srsly noone?]
So it's just not possible to add your own music properly, you can't check if vanilla songs are playing, so you always run the risk of playing your music over the vanilla tracks.
-
Checking if sound is playing && ISound[srsly noone?]
Doesn't music via resource packs replace the vanilla music?
-
[1.7.10] Getting Translated Block Name
Yet, it's not. I have both because the second one's left over from the first tutorial I read on the setup.
-
[1.7.10] Getting Translated Block Name
IntelliJ, I add idea { module { inheritOutputDirs = true } } sourceSets { main { output.resourcesDir = output.classesDir } } to the end of the build.gradle, import it, run setupDecompWorkspace inside IntelliJ, then run gradlew gIR from a command prompt. PS I should also note, it's giving me translated names for some blocks, and not others in the dev workspace, like sand and dirt are never translated, but grass and leaves are.
-
[1.7.10] Getting Translated Block Name
Any block the player right clicks on. Like I said though, it was only failing to translate in the dev workspace, it works fine after it's built.
-
[1.7.10] Getting Translated Block Name
src\main\resources\assets\filltool\lang\en_US.lang itemGroup.FillTab=Fill Tool item.fillTool.name=Fill Tool I don't see how my lang file is the issue here, shouldn't that be an issue with Minecraft's lang file since we're talking about vanilla blocks? Woah that's weird, yeah guess there is some issue in the dev workspace, I just put it on my server, and it translates fine
-
[1.7.10] Getting Translated Block Name
Im still getting names like tile.sand.name with getLocalizedName(), with or without the StatCollector.translateToLocal.
-
[1.7.10] Getting Translated Block Name
So, in addInformation, I'm trying to get a block's translated name. This is what I've been trying: list.add(StatCollector.translateToLocal("Bound Block: " + StatCollector.translateToLocal(Block.getBlockById(stack.stackTagCompound.getInteger(tagID)).getUnlocalizedName()))); But this is still returning tile.xxx.name, and getLocalizeName just subtracts the ".name". What is the correct method for doing this?
-
[1.7.10]Particle render problems
It's on layer 3.
IPS spam blocked by CleanTalk.