Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • New Dimension 1.3.2 Help
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 1
Mattredsox

New Dimension 1.3.2 Help

By Mattredsox, August 31, 2012 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Mattredsox    1

Mattredsox

Mattredsox    1

  • Stone Miner
  • Mattredsox
  • Forge Modder
  • 1
  • 53 posts
Posted August 31, 2012

Hey all! I am making a mod and it adds a new dimension. I have been looking for a tutorial on how to do this with the new Forge 4.x (1.3.2).

 

If anyone could point me towards a tutorial or source to a mod that adds a new dimension I would really appreciate it.

 

I have been debating on decompiling Twilight Forest to see how they did it, but I don't want to worry about complex code that is obfuscated.

 

Thanks!

  • Quote

Share this post


Link to post
Share on other sites

laifsjo    0

laifsjo

laifsjo    0

  • Stone Miner
  • laifsjo
  • Members
  • 0
  • 50 posts
Posted August 31, 2012

In your @Mod file, in your load method, you can start with registering your dimension:

 

DimensionManager.registerProviderType(DimensionID 1 = overworld 0 = nether -1 = end or something, YourWorldProvider.class, shouldAlwaysbeLoaded true/false);

DimensionManager.registerDimension(DimensionID, DimensionID);

 

For your worldprovider class just copy worldproviderhell and change a few things, you also have to make a new chunkprovider, worldchunkmanager, your portal block, how it starts, your teleporter. i think that's it. Just see in the already existing files how minecraft did it, and in your portalblock class,  in the onEntityCollidedWithBlock method use this:

var6.timeUntilPortal = 10;

var6.mcServer.getConfigurationManager().transferPlayerToDimension(var6, DimensionID, new YourTeleporter());

For teleporting to your dimension. I think that should work for you

  • Quote

Share this post


Link to post
Share on other sites

Viper283    9

Viper283

Viper283    9

  • Creeper Killer
  • Viper283
  • Forge Modder
  • 9
  • 118 posts
Posted August 31, 2012

thanks i'll use that method insead of DimensionAPI as it doesn't work very well atm

  • Quote

Share this post


Link to post
Share on other sites

Viper283    9

Viper283

Viper283    9

  • Creeper Killer
  • Viper283
  • Forge Modder
  • 9
  • 118 posts
Posted August 31, 2012

In your @Mod file, in your load method, you can start with registering your dimension:

 

DimensionManager.registerProviderType(DimensionID 1 = overworld 0 = nether -1 = end or something, YourWorldProvider.class, shouldAlwaysbeLoaded true/false);

DimensionManager.registerDimension(DimensionID, DimensionID);

 

For your worldprovider class just copy worldproviderhell and change a few things, you also have to make a new chunkprovider, worldchunkmanager, your portal block, how it starts, your teleporter. i think that's it. Just see in the already existing files how minecraft did it, and in your portalblock class,  in the onEntityCollidedWithBlock method use this:

var6.timeUntilPortal = 10;

var6.mcServer.getConfigurationManager().transferPlayerToDimension(var6, DimensionID, new YourTeleporter());

For teleporting to your dimension. I think that should work for you

i copied the BlockPortal class renamed it and changed the blocks to mine but i can't find the var6 your talking about.

 

public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) {
    if(par5Entity.ridingEntity == null && par5Entity.riddenByEntity == null) {
        par5Entity.setInPortal();
    }
}

  • Quote

Share this post


Link to post
Share on other sites

Mattredsox    1

Mattredsox

Mattredsox    1

  • Stone Miner
  • Mattredsox
  • Forge Modder
  • 1
  • 53 posts
Posted August 31, 2012

Thank you laifsjo! I will try what you said when I get home from school tonight!

  • Quote

Share this post


Link to post
Share on other sites

LexManos    1519

LexManos

LexManos    1519

  • Reality Controller
  • LexManos
  • Forge Code God
  • 1519
  • 8571 posts
Posted August 31, 2012
DimensionManager.registerProviderType(DimensionID 1 = overworld 0 = nether -1 = end or something, YourWorldProvider.class, shouldAlwaysbeLoaded true/false);

What...

DimensionManager.registerDimension(DimensionID, DimensionID);

What...

 

  • Quote

Share this post


Link to post
Share on other sites

Viper283    9

Viper283

Viper283    9

  • Creeper Killer
  • Viper283
  • Forge Modder
  • 9
  • 118 posts
Posted August 31, 2012

What do i put in my onEntityCollidedWithBlock because there is not a 'var6' anywhere in that method

  • Quote

Share this post


Link to post
Share on other sites

Viper283    9

Viper283

Viper283    9

  • Creeper Killer
  • Viper283
  • Forge Modder
  • 9
  • 118 posts
Posted September 1, 2012

Found the 'var6' he was on about, it was EntityPlayer and MinecraftServer, you can't use the methods he's on about because they are not static, i would make them static but i do not want to edit base files. does anyone know a different way to make it use my teleporter class and not the default one

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • DaemonUmbra
      Forge 1.12.2 wont start

      By DaemonUmbra · Posted just now

      How long have you waited after starting the game?
    • DaemonUmbra
      jopt-simple-4.5.jar file differ from what was expected

      By DaemonUmbra · Posted 1 minute ago

    • DaemonUmbra
      Missing line break after ModID in the mods menu

      By DaemonUmbra · Posted 3 minutes ago

      This is intended, not a bug
    • matt1999rd
      [1-14-newer] how to make a button with a specified texture ?

      By matt1999rd · Posted 15 minutes ago

      well that is right I have check the wrong class file... but it is not the point I have got a question now : can I open multiple screen with button inside and that we can clicked on the button inside the blockbecause that the solution I choose for my problem
    • maxssho13
      Make Certain Players Invisible

      By maxssho13 · Posted 38 minutes ago

      Nevermind, after hours of research I got it myself.
  • Topics

    • sondreooos
      15
      Forge 1.12.2 wont start

      By sondreooos
      Started Yesterday at 08:44 PM

    • CelloKit
      1
      jopt-simple-4.5.jar file differ from what was expected

      By CelloKit
      Started 7 hours ago

    • matorassan
      1
      Missing line break after ModID in the mods menu

      By matorassan
      Started 10 hours ago

    • matt1999rd
      11
      [1-14-newer] how to make a button with a specified texture ?

      By matt1999rd
      Started Yesterday at 04:04 PM

    • maxssho13
      1
      Make Certain Players Invisible

      By maxssho13
      Started 3 hours ago

  • Who's Online (See full list)

    • Yanny7
    • DaemonUmbra
    • Alpvax
    • LorenzoPapi
    • Aeriona
    • Lea9ue
    • geekles
    • KolonilGamer
    • JMAS
    • matt1999rd
    • blotz9
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • New Dimension 1.3.2 Help
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community