Jump to content

Need help to build a dimension like a SuperFlat World


Fel486

Recommended Posts

Hello, guys. I've created a new dimension for my server extending from WorldProvider, but no blocks are being generated. So I noticed I need a ChunkGenerator for generate anything I want, such like blocks and structures.

 

I'd like to have a simple example of code that generates a simple map just like SuperFlat World in Minecraft (like on the attachment picture) or some tip on how to start placing blocks or structures.

 

My Dimension and Biome are already registered and works, but most of time I teleported to the dimension it won't load the map, I guess because there's no content.

 

My code: https://pastebin.com/Yt1mEUdL

 

flatworld.png

Link to comment
Share on other sites

Thank you, now it's a little better to understand.

 

But I'm getting an error while generating chunks.

 

The Code + Exception are on this link:  https://pastebin.com/cNuKjyE0

 

java.lang.NullPointerException: null

    at net.minecraft.world.Teleporter.placeInExistingPortal(Teleporter.java:136) ~[Teleporter.class:?]

    at net.minecraft.world.Teleporter.placeInPortal(Teleporter.java:39) ~[Teleporter.class:?]

    at net.minecraft.world.Teleporter.placeEntity(Teleporter.java:443) ~[Teleporter.class:?]

    at net.minecraft.server.management.PlayerList.transferEntityToWorld(PlayerList.java:762) ~[PlayerList.class:?]

    at net.minecraft.server.management.PlayerList.transferPlayerToDimension(PlayerList.java:662) ~[PlayerList.class:?]

    at net.minecraft.entity.player.EntityPlayerMP.changeDimension(EntityPlayerMP.java:745) ~[EntityPlayerMP.class:?]

    at net.minecraft.entity.Entity.changeDimension(Entity.java:2911) ~[Entity.class:?]

    at com.felzend.commands.SwitchWorldCommand.execute(SwitchWorldCommand.java:32) ~[SwitchWorldCommand.class:?]

    at net.minecraft.command.CommandHandler.tryExecute(CommandHandler.java:126) [CommandHandler.class:?]

    at net.minecraft.command.CommandHandler.executeCommand(CommandHandler.java:98) [CommandHandler.class:?]

    at net.minecraft.network.NetHandlerPlayServer.handleSlashCommand(NetHandlerPlayServer.java:1003) [NetHandlerPlayServer.class:?]

    at net.minecraft.network.NetHandlerPlayServer.processChatMessage(NetHandlerPlayServer.java:979) [NetHandlerPlayServer.class:?]

    at net.minecraft.network.play.client.CPacketChatMessage.processPacket(CPacketChatMessage.java:47) [CPacketChatMessage.class:?]

    at net.minecraft.network.play.client.CPacketChatMessage.processPacket(CPacketChatMessage.java:8) [CPacketChatMessage.class:?]

    at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) [PacketThreadUtil$1.class:?]

    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_251]

Edited by Fel486
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • So, ive seen this issue before, and i've deleted the forge-client.toml file already, because the part in other issues closely related to this, but this seems to be new to me. everytime it loads everything in the forge menu, it then says loading minecraft, and as it gets to the home page, it crashes, and it states this in the crash report. "the game crashed while rendering overlay. Error: java.lang.ExceptionInInitializerError: null" 
    • So I tried to search the issue but came up with nothing, the most I could get was some people having a mod location between the colon and the word "failed" but I seem to have nothing there. I am also making a modpack of my own, and tips are appreciated!
    • Heres a updated version of my github https://github.com/THEKINGSKULL01/TSOTD0.0.30Forge1.20.1
    • When i go to the forge website to download any of the choices of versions I am unable to download anything. It just says that I am unable to reach this website for some reason.
    • hi everyone how can i make this script smoother or make them delay    @SubscribeEvent(       priority = EventPriority.HIGH    )    public void renderCrosshair(RenderGameOverlayEvent event) {       if(mc.gameSettings.guiScale == 2) {       Minecraft minecraft = Minecraft.getMinecraft();       if(event.type == ElementType.CROSSHAIRS && isGunInHand(minecraft.thePlayer)) {          event.setCanceled(true);          Icon crosshairIcon = ClientProxy.iconRegistry.crosshairIcon;          double scale = 6.0F + getScaleByMotion(minecraft.thePlayer);          if(FlansModClient.currentScope == null)          scale = 45.0F + getScaleByMotion(minecraft.thePlayer);                    GL11.glPushAttrib(16384);          GL11.glPushMatrix();          GL11.glEnable(3042);          OpenGlHelper.glBlendFunc(775, 769, 1, 0);          GL11.glEnable(3008);          GL11.glColor3d(1.0D, 1.0D, 1.0D);          GL11.glTranslated((double)(event.resolution.getScaledWidth() / 2), (double)(event.resolution.getScaledHeight() / 2), 0.0D);          GL11.glPushMatrix();          ClientProxy.iconRegistry.bindSheet();          GL11.glRotated(90.0D, 0.0D, 0.0D, 2.0D);          ClientProxy.iconRegistry.renderIcon(crosshairIcon, -1.9D, (double)(-scale) + 0.1D);          GL11.glRotated(90.0D, 0.0D, 0.0D, 1.0D);          ClientProxy.iconRegistry.renderIcon(crosshairIcon, -3.0D, (double)(-scale) - 0.1D);          GL11.glRotated(90.0D, 0.0D, 0.0D, 1.0D);          ClientProxy.iconRegistry.renderIcon(crosshairIcon, -3.0D, (double)(-scale) + 0.9D);                    if(FlansModClient.currentScope == null)                        {          GL11.glRotated(90.0D, 0.0D, 0.0D, 1.0D);          ClientProxy.iconRegistry.renderIcon(crosshairIcon, -2.1D, (double)(-scale) + 0.9D);          }                    else if (scale >= 6.5F)          {          GL11.glRotated(90.0D, 0.0D, 0.0D, 1.0D);          ClientProxy.iconRegistry.renderIcon(crosshairIcon, -2.1D, (double)(-scale) + 0.9D);          }                    GL11.glPopMatrix();          GL11.glPopMatrix();          GL11.glPopAttrib();          minecraft.getTextureManager().bindTexture(Gui.icons);       }       }    }
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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