Jump to content

[Solved] 1.12.2 Dimension creation


Setrion

Recommended Posts

Hey guys, i need some help
for a few weeks i'm working on a dimension for my mod

I failed badly before i found some code of Twilight Forest's dimension creation (i know, copying code is not really helpful, but i want to learn how to create dimension, edit them & decorate them like i want to)
The code now is "error-free" but if i enter the dimension i get the following crash

[13:18:23] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Preparing start region for level 0
[13:18:24] [Server thread/INFO] [FML]: Unloading dimension 7
[13:18:24] [Server thread/INFO] [FML]: Unloading dimension -1
[13:18:24] [Server thread/INFO] [FML]: Unloading dimension 1
[13:18:24] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer]: Changing view distance to 12, from 10
[13:18:45] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2
[13:18:45] [Netty Server IO #1/INFO] [FML]: Client protocol version 2
[13:18:45] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 7 mods : minecraft@1.12.2,ichunutil@7.1.4,tabula@7.0.0,FML@8.0.99.99,forge@14.23.4.2705,mcp@9.42,koratio@1.12.2-0.0.0.33-alpha
[13:18:45] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established
[13:18:45] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
[13:18:45] [Server thread/INFO] [FML]: Loading dimension 7 (Koratio) (net.minecraft.server.integrated.IntegratedServer@110c273c)
[13:18:45] [Server thread/INFO] [net.minecraft.server.management.PlayerList]: Setrion[local:E:0b0c2528] logged in with entity id 95 at (-1227.0, 55.0, -301.0)
[13:18:45] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Setrion joined the game
[13:18:45] [Server thread/ERROR] [net.minecraft.server.MinecraftServer]: Encountered an unexpected exception
net.minecraft.util.ReportedException: Exception generating new chunk
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:212) ~[NetworkSystem.class:?]
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:865) ~[MinecraftServer.class:?]
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743) ~[MinecraftServer.class:?]
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) ~[IntegratedServer.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592) [MinecraftServer.class:?]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_181]
Caused by: java.lang.NullPointerException
	at net.minecraft.world.biome.BiomeProvider.getBiomesForGeneration(BiomeProvider.java:97) ~[BiomeProvider.class:?]
	at com.setrion.koratio.world.dimension.fantasia.FantasiaBiomeProvider.getBiomesForGeneration(FantasiaBiomeProvider.java:79) ~[FantasiaBiomeProvider.class:?]
	at com.setrion.koratio.world.dimension.fantasia.FantasiaBiomeProvider.getBiomesForGeneration(FantasiaBiomeProvider.java:70) ~[FantasiaBiomeProvider.class:?]
	at com.setrion.koratio.world.dimension.fantasia.ChunkGeneratorFantasia.setBlocksInChunk(ChunkGeneratorFantasia.java:80) ~[ChunkGeneratorFantasia.class:?]
	at com.setrion.koratio.world.dimension.fantasia.ChunkGeneratorFantasia.generateChunk(ChunkGeneratorFantasia.java:69) ~[ChunkGeneratorFantasia.class:?]
	at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:155) ~[ChunkProviderServer.class:?]
	at net.minecraft.world.World.getChunkFromChunkCoords(World.java:361) ~[World.class:?]
	at net.minecraft.world.World.spawnEntity(World.java:1314) ~[World.class:?]
	at net.minecraft.world.WorldServer.spawnEntity(WorldServer.java:1121) ~[WorldServer.class:?]
	at net.minecraft.server.management.PlayerList.playerLoggedIn(PlayerList.java:398) ~[PlayerList.class:?]
	at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:175) ~[PlayerList.class:?]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:259) ~[NetworkDispatcher.class:?]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:72) ~[NetworkDispatcher.class:?]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:208) ~[NetworkDispatcher$1.class:?]
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307) ~[NetworkManager.class:?]
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197) ~[NetworkSystem.class:?]
	... 5 more
[13:18:45] [Server thread/ERROR] [net.minecraft.server.MinecraftServer]: This crash report has been saved to: C:\Users\Horet\Desktop\Koratio 1.12\run\.\crash-reports\crash-2018-09-08_13.18.45-server.txt
[13:18:45] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Stopping server
[13:18:45] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving players
[13:18:45] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving worlds
[13:18:45] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving chunks for level 'Koratio'/overworld
[13:18:45] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving chunks for level 'Koratio'/fantasia
[13:18:45] [Server thread/INFO] [FML]: Unloading dimension 0
[13:18:45] [Server thread/INFO] [FML]: Unloading dimension 7
[13:18:45] [Server thread/INFO] [FML]: Applying holder lookups
[13:18:45] [Server thread/INFO] [FML]: Holder lookups applied
[13:18:45] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
[13:18:46] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: ---- Minecraft Crash Report ----
// Daisy, daisy...

Time: 9/8/18 1:18 PM
Description: Exception generating new chunk

java.lang.NullPointerException: Exception generating new chunk
	at net.minecraft.world.biome.BiomeProvider.getBiomesForGeneration(BiomeProvider.java:97)
	at com.setrion.koratio.world.dimension.fantasia.FantasiaBiomeProvider.getBiomesForGeneration(FantasiaBiomeProvider.java:79)
	at com.setrion.koratio.world.dimension.fantasia.FantasiaBiomeProvider.getBiomesForGeneration(FantasiaBiomeProvider.java:70)
	at com.setrion.koratio.world.dimension.fantasia.ChunkGeneratorFantasia.setBlocksInChunk(ChunkGeneratorFantasia.java:80)
	at com.setrion.koratio.world.dimension.fantasia.ChunkGeneratorFantasia.generateChunk(ChunkGeneratorFantasia.java:69)
	at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:155)
	at net.minecraft.world.World.getChunkFromChunkCoords(World.java:361)
	at net.minecraft.world.World.spawnEntity(World.java:1314)
	at net.minecraft.world.WorldServer.spawnEntity(WorldServer.java:1121)
	at net.minecraft.server.management.PlayerList.playerLoggedIn(PlayerList.java:398)
	at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:175)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:259)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:72)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:208)
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307)
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:865)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592)
	at java.lang.Thread.run(Unknown Source)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
	at net.minecraft.world.biome.BiomeProvider.getBiomesForGeneration(BiomeProvider.java:97)
	at com.setrion.koratio.world.dimension.fantasia.FantasiaBiomeProvider.getBiomesForGeneration(FantasiaBiomeProvider.java:79)
	at com.setrion.koratio.world.dimension.fantasia.FantasiaBiomeProvider.getBiomesForGeneration(FantasiaBiomeProvider.java:70)
	at com.setrion.koratio.world.dimension.fantasia.ChunkGeneratorFantasia.setBlocksInChunk(ChunkGeneratorFantasia.java:80)
	at com.setrion.koratio.world.dimension.fantasia.ChunkGeneratorFantasia.generateChunk(ChunkGeneratorFantasia.java:69)

-- Chunk to be generated --
Details:
	Location: -77,-19
	Position hash: -77309411405
	Generator: com.setrion.koratio.world.dimension.fantasia.ChunkGeneratorFantasia@77f4b33c
Stacktrace:
	at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:155)
	at net.minecraft.world.World.getChunkFromChunkCoords(World.java:361)
	at net.minecraft.world.World.spawnEntity(World.java:1314)
	at net.minecraft.world.WorldServer.spawnEntity(WorldServer.java:1121)
	at net.minecraft.server.management.PlayerList.playerLoggedIn(PlayerList.java:398)
	at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:175)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:259)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:72)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:208)
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307)

-- Ticking connection --
Details:
	Connection: net.minecraft.network.NetworkManager@1c660a73
Stacktrace:
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:865)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592)
	at java.lang.Thread.run(Unknown Source)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_181, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 7551264392 bytes (7201 MB) / 8476557312 bytes (8083 MB) up to 8476557312 bytes (8083 MB)
	JVM Flags: 3 total; -Xincgc -Xmx8192M -Xms8192M
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.42 Powered by Forge 14.23.4.2705 7 mods loaded, 7 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State     | ID        | Version               | Source                           | Signature |
	|:--------- |:--------- |:--------------------- |:-------------------------------- |:--------- |
	| UCHIJAAAA | minecraft | 1.12.2                | minecraft.jar                    | None      |
	| UCHIJAAAA | mcp       | 9.42                  | minecraft.jar                    | None      |
	| UCHIJAAAA | FML       | 8.0.99.99             | forgeSrc-1.12.2-14.23.4.2705.jar | None      |
	| UCHIJAAAA | forge     | 14.23.4.2705          | forgeSrc-1.12.2-14.23.4.2705.jar | None      |
	| UCHIJAAAA | koratio   | 1.12.2-0.0.0.33-alpha | bin                              | None      |
	| UCHIJAAAA | ichunutil | 7.1.4                 | iChunUtil-1.12.2-7.1.4.jar       | None      |
	| UCHIJAAAA | tabula    | 7.0.0                 | Tabula-1.12.2-7.0.0.jar          | None      |

	Loaded coremods (and transformers): 
	GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
	Profiler Position: N/A (disabled)
	Player Count: 1 / 8; [EntityPlayerMP['Setrion'/95, l='Koratio', x=-1227.00, y=55.00, z=-301.00]]
	Type: Integrated Server (map_client.txt)
	Is Modded: Definitely; Client brand changed to 'fml,forge'
[13:18:46] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2018-09-08_13.18.45-server.txt
[13:18:46] [Client Shutdown Thread/INFO] [net.minecraft.server.MinecraftServer]: Stopping server
[13:18:46] [Client Shutdown Thread/INFO] [net.minecraft.server.MinecraftServer]: Saving players

Can someone help me? Working with dimensions really kills my mind..

Edited by Setrion
Link to comment
Share on other sites

1 minute ago, Setrion said:

Can someone help me?

Not without your code. Please post it to github.

 

1 minute ago, Setrion said:

Working with dimensions really kills my mind..

Either you have been working on it for a while and are tired/need coffee/sleep/or other caffeine source OR you are not ready to tackle creating a Dimension yet.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

24 minutes ago, Setrion said:

Okay here's the code (i uploaded just the "world" files now, cause they're the only files i work with in dimensional stuff)

Your error is caused by calling the super on this line. The error is ultimately caused by BiomeProvider#genBiomes not being instantiated. Since it is a private value you have two options. Reflection or copying the code from BiomeProvider into your class for functionality.

Edited by Animefan8888
Typo

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Did you mean i can copy the complete BiomeProvider code to my class & change some things?
will this work?
i tried to learn how to create dimensions but can't find any helpful pages
i know how to create SingleBiomeDimensions but one with all biomes i want it to have is not the same

Link to comment
Share on other sites

6 minutes ago, Setrion said:

Did you mean i can copy the complete BiomeProvider code to my class & change some things?
will this work?

Define will this work. And you can copy the complete code, or you could copy portions of the code, which would make more sense. OR you could use reflection and set the variable to your variable.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

10 minutes ago, Setrion said:

Tried to set the variable from the "BiomeProvider" file - not working cause it's not visible

Take a minute and look up Reflection, maybe?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

1 hour ago, Setrion said:

Okay i tried to do it like the "BiomeProvider" file does, the variable setting thing, but this don't work
i guess it's simple & you know how to, but i should learn something by this
i really don't have any plan how to fix my problem
 

Reflection in java allows you to access private fields and even change final fields. This will allow you to set the genBiomes field in the BiomeProvider instance. Use ReflectionUtil(its a class) to access the field and set it equal to your classes genBiomes field.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

I did, but now the Log tells me that:

[17:00:04] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:init:103]: java.lang.IllegalAccessException: Class com.setrion.koratio.world.dimension.fantasia.FantasiaBiomeProvider can not access a member of class net.minecraft.world.biome.BiomeProvider with modifiers "protected"
[17:00:04] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:init:103]: 	at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
[17:00:04] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:init:103]: 	at java.lang.Class.newInstance(Unknown Source)
[17:00:04] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:init:103]: 	at com.setrion.koratio.world.dimension.fantasia.FantasiaBiomeProvider.makeLayers(FantasiaBiomeProvider.java:74)
[17:00:04] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:init:103]: 	at com.setrion.koratio.world.dimension.fantasia.FantasiaBiomeProvider.<init>(FantasiaBiomeProvider.java:44)
[17:00:04] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:init:103]: 	at com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider.init(FantasiaWorldProvider.java:91)
[17:00:04] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:init:103]: 	at net.minecraft.world.WorldProvider.setWorld(WorldProvider.java:54)
[17:00:04] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:init:103]: 	at net.minecraft.world.WorldServer.<init>(WorldServer.java:122)
[17:00:04] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:init:103]: 	at net.minecraft.world.WorldServerMulti.<init>(WorldServerMulti.java:18)
[17:00:04] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:init:103]: 	at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:127)
[17:00:04] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:init:103]: 	at net.minecraft.server.integrated.IntegratedServer.init(IntegratedServer.java:160)
[17:00:04] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:init:103]: 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:552)
[17:00:04] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:init:103]: 	at java.lang.Thread.run(Unknown Source)
[17:00:04] [Server thread/INFO] [FML]: Loading dimension 7 (New World) (net.minecraft.server.integrated.IntegratedServer@3c63e969)
[17:00:04] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@3c63e969)
[17:00:04] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@3c63e969)
[17:00:04] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Preparing start region for level 0
[17:00:05] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:getBiomeProvider:82]: java.lang.IllegalAccessException: Class com.setrion.koratio.world.dimension.fantasia.FantasiaBiomeProvider can not access a member of class net.minecraft.world.biome.BiomeProvider with modifiers "protected"
[17:00:05] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:getBiomeProvider:82]: 	at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
[17:00:05] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:getBiomeProvider:82]: 	at java.lang.Class.newInstance(Unknown Source)
[17:00:05] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:getBiomeProvider:82]: 	at com.setrion.koratio.world.dimension.fantasia.FantasiaBiomeProvider.makeLayers(FantasiaBiomeProvider.java:74)
[17:00:05] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:getBiomeProvider:82]: 	at com.setrion.koratio.world.dimension.fantasia.FantasiaBiomeProvider.<init>(FantasiaBiomeProvider.java:44)
[17:00:05] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:getBiomeProvider:82]: 	at com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider.getBiomeProvider(FantasiaWorldProvider.java:70)
[17:00:05] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:getBiomeProvider:82]: 	at net.minecraft.world.WorldServer.tick(WorldServer.java:195)
[17:00:05] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:getBiomeProvider:82]: 	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:831)
[17:00:05] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:getBiomeProvider:82]: 	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743)
[17:00:05] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:getBiomeProvider:82]: 	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
[17:00:05] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:getBiomeProvider:82]: 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592)
[17:00:05] [Server thread/INFO] [STDERR]: [com.setrion.koratio.world.dimension.fantasia.FantasiaWorldProvider:getBiomeProvider:82]: 	at java.lang.Thread.run(Unknown Source)
[17:00:05] [Server thread/ERROR] [net.minecraft.server.MinecraftServer]: Encountered an unexpected exception

 The things i did was that:

 

ReflectionUtil.setFieldValue(BiomeProvider.class.getField("genBiomes"), BiomeProvider.class.newInstance(), biomes);

 

Link to comment
Share on other sites

Its a protected field. You need to call SetAccessible(true).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

35 minutes ago, Setrion said:

BiomeProvider.class.newInstance()

I am also pretty sure this will not work. You need an existing instance of BiomeProvider, not the one randomly created out of nowhere.

 

35 minutes ago, Setrion said:

BiomeProvider.class.getField("genBiomes")

And this needs an SRG name too or it won't work outside of dev environment. And it needs to be static and final. Field lookups are expensive.

Edited by V0idWa1k3r
Link to comment
Share on other sites

You can find the .csv files that contain a mapping of SRG-MCP names in %username%/gradle/caches/minecraft/de/oceanlabs/mcp/mcp_snapshot/[date]. Or at least that's where I look them up, this changed a lot between versions so I might be incorrect. Please correct me if I am.

Or you can use MCPBot. Although I've never used it it should be as simple as joining the channel and typing a command.

Link to comment
Share on other sites

Okay it is working, thanks very much :)
Now i got the problem, that no monsters in this world are spawning.

I can spawn them with eggs, so the difficulty can't be the problem
They're in the spawnable-monsters list of the Biomes, so they should spawn, i think

is there a thing i must do, to spawn my monsters in my dimension?
The animals i made are spawning correctly, just the monsters don't
 

Edited by Setrion
definitions
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
    • It is an issue with quark - update it to this build: https://www.curseforge.com/minecraft/mc-mods/quark/files/3642325
    • Remove Instant Massive Structures Mod from your server     Add new crash-reports with sites like https://paste.ee/  
    • Update your drivers: https://www.amd.com/en/support/graphics/amd-radeon-r9-series/amd-radeon-r9-200-series/amd-radeon-r9-280x
  • Topics

×
×
  • Create New...

Important Information

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