I'm relatively new to advanced modding in Minecraft. I know how to create blocks, items, biomes, crops, and food. I really want to add a new dimension to my mod, but I have no clue how. Does anyone have any 1.8+ tutorials on how to create a dimension? Or does anyone know how to create a dimension?
That's what your teleporter class is for. Make some way to go back and forth. If you have a portal, you need a Portal block that calls your teleporter class.
Transfer players from one dimension to another with this:
I have an example of how I use that here. It was updated from 1.8 code, so I don't think you need to cast to EntityPlayerMP at all -- I forgot to take that out though. Don't worry about it unless some methods are unavailable.
Anyway, look at that class and pass it your custom Teleporter so it works correctly.
My method was specifically written to only allow players to use the Teleporter. If you have a portal block, you will most likely want to allow other Entity teleportation.
Rollback Post to RevisionRollBack
Click this banner for a list of illegal mod distributors -- only download from legal sites!
That's what your teleporter class is for. Make some way to go back and forth. If you have a portal, you need a Portal block that calls your teleporter class.
Transfer players from one dimension to another with this:
I have an example of how I use that here. It was updated from 1.8 code, so I don't think you need to cast to EntityPlayerMP at all -- I forgot to take that out though. Don't worry about it unless some methods are unavailable.
Anyway, look at that class and pass it your custom Teleporter so it works correctly.
My method was specifically written to only allow players to use the Teleporter. If you have a portal block, you will most likely want to allow other Entity teleportation.
I made an item to use as a teleporter. Hereis the code for it. The item semi-works. When I right click it, the game goes to the "downloading terrain" screen and just sits there. I waited about ten minutes to see if the game would load, but nothing happens. Hereis the game log for when I try to use my teleporter. I can supply my other code if needed.
Changed transferPlayerToDimension to use 3 arguments, but player.getServer throws an error saying "the method getServer() is undefined for the type EntityPlayer"
Changed transferPlayerToDimension to use 3 arguments, but player.getServer throws an error saying "the method getServer() is undefined for the type EntityPlayer"
Entity#getServer was added in 1.9. Use MinecraftServer.getServer in 1.8.9.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Doing that now causes .getPlayerList() to throw an error.
The 1.8.9 name of that method is MinecraftServer#getConfigurationManager. Most of the renames in 1.9 are documented here.
Side note: I'd recommend updating to 1.9 or 1.9.4.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
How big were the code changes in 1.9? Will I have to re-write my entire mod?
Not as big as the changes from 1.7.10 to 1.8. Some things were renamed, a few things were removed.
Most methods related to player interaction have new signatures with an EnumHand argument.
To give you a rough idea, this commit was the initial 1.9 update for my mod.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
So not too bad then. The only major things that would concern me are the changes to BlockState. Which would be better, 1.9 or 1.9.4?
Block states didn't change that much. The BlockState class was renamed to BlockStateContainer and IBlockState now extends IBlockProperties, which is just a wrapper around various Block methods.
I'd recommend using 1.9.4 since it's being actively developed.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Block states didn't change that much. The BlockState class was renamed to BlockStateContainer and IBlockState now extends IBlockProperties, which is just a wrapper around various Block methods.
I'd recommend using 1.9.4 since it's being actively developed.
I know they didn't change much. I meant that those changes would be the main ones I would have to deal with. So updating won't be a big deal fore me. I'll get a 1.9.4 workspace set up now.
Block states didn't change that much. The BlockState class was renamed to BlockStateContainer and IBlockState now extends IBlockProperties, which is just a wrapper around various Block methods.
I'd recommend using 1.9.4 since it's being actively developed.
Do you know what BiomeGenBase was changed to in 1.9.4? I can't seem to find anything on it.
What about .setBiomeName?
I noticed that GameRegistry.registerBlock and GameRegistry.registerItem are deprecated in 1.9, what is the new method for registering blocks and items?
Do you know what BiomeGenBase was changed to in 1.9.4? I can't seem to find anything on it.
BiomeGenBase was renamed to Biome. The issue tracker I linked earlier also documents most of the renames in 1.9.4.
What about .setBiomeName?
The biome name is set from the BiomeProperties you pass to the Biome constructor now.
I noticed that GameRegistry.registerBlock and GameRegistry.registerItem are deprecated in 1.9, what is the new method for registering blocks and items?
Read the doc comments of the deprecated methods.
For every IForgeRegistryEntry implementation (e.g. Block, Item, Biome): create the object, set its registry name with the setRegistryName method and then register it with GameRegistry.register in preInit.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
BiomeGenBase was renamed to Biome. The issue tracker I linked earlier also documents most of the renames in 1.9.4.
The biome name is set from the BiomeProperties you pass to the Biome constructor now.
Read the doc comments of the deprecated methods.
For every IForgeRegistryEntry implementation (e.g. Block, Item, Biome): create the object, set its registry name with the setRegistryName method and then register it with GameRegistry.register in preInit.
I've updated most of my code to 1.9.4. There are still a few issues I have to work out but they shouldn't be too hard. The only major thing that I'm having trouble with is models. Everytime I attempt to load the game it crashes. The crash reportpoints to my model registry. This is my block rendering class.
java.lang.NullPointerException: Initializing game
at net.minecraftforge.client.model.ModelLoader.setCustomModelResourceLocation(ModelLoader.java:1068)
at com.wither.withermod.blocks.BlockRender.registerBlock(BlockRender.java:17)
at com.wither.withermod.ClientProxy.PreInit(ClientProxy.java:28)
at com.wither.withermod.Main.PreInit(Main.java:33)
You tried to register a model for a null Item. This is because GameRegistry.register no longer creates or registers an ItemBlock for your Block, you need to do that yourself.
You can see how I do this while supporting custom ItemBlock classes here.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
You tried to register a model for a null Item. This is because GameRegistry.register no longer creates or registers an ItemBlock for your Block, you need to do that yourself.
You can see how I do this while supporting custom ItemBlock classes here.
Got it working, thank you. Two last questions, what was changed with axes in 1.9? I couldn't find anything about a change, but when I try to load the game it crashes. 2. My ModItemFood class throws an error on the onFoodEaten method. What was changed in that method?
I'm relatively new to advanced modding in Minecraft. I know how to create blocks, items, biomes, crops, and food. I really want to add a new dimension to my mod, but I have no clue how. Does anyone have any 1.8+ tutorials on how to create a dimension? Or does anyone know how to create a dimension?
I've done it myself a few weeks ago, try looking at it. (GitHub)
You'll basically need a ChunkProvider, a ChunkManager, a WorldProvider and a Teleporter class.
Register them in your init method like this. Call it from your CommonProxy class.
So I created all the necessary class files and wrote all the code I needed. The dimension registers in-game, but I can't figure out how to get to it.
That's what your teleporter class is for. Make some way to go back and forth. If you have a portal, you need a Portal block that calls your teleporter class.
Transfer players from one dimension to another with this:
I have an example of how I use that here. It was updated from 1.8 code, so I don't think you need to cast to EntityPlayerMP at all -- I forgot to take that out though. Don't worry about it unless some methods are unavailable.
Anyway, look at that class and pass it your custom Teleporter so it works correctly.
My method was specifically written to only allow players to use the Teleporter. If you have a portal block, you will most likely want to allow other Entity teleportation.
I made an item to use as a teleporter. Hereis the code for it. The item semi-works. When I right click it, the game goes to the "downloading terrain" screen and just sits there. I waited about ten minutes to see if the game would load, but nothing happens. Hereis the game log for when I try to use my teleporter. I can supply my other code if needed.
You need to use transferPlayerToDimension with 3 arguments, not just one.
Changed transferPlayerToDimension to use 3 arguments, but player.getServer throws an error saying "the method getServer() is undefined for the type EntityPlayer"
Entity#getServer was added in 1.9. Use MinecraftServer.getServer in 1.8.9.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Doing that now causes .getPlayerList() to throw an error.
The 1.8.9 name of that method is MinecraftServer#getConfigurationManager. Most of the renames in 1.9 are documented here.
Side note: I'd recommend updating to 1.9 or 1.9.4.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
How big were the code changes in 1.9? Will I have to re-write my entire mod?
Not as big as the changes from 1.7.10 to 1.8. Some things were renamed, a few things were removed.
Most methods related to player interaction have new signatures with an EnumHand argument.
To give you a rough idea, this commit was the initial 1.9 update for my mod.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
So not too bad then. The only major things that would concern me are the changes to BlockState. Which would be better, 1.9 or 1.9.4?
Block states didn't change that much. The BlockState class was renamed to BlockStateContainer and IBlockState now extends IBlockProperties, which is just a wrapper around various Block methods.
I'd recommend using 1.9.4 since it's being actively developed.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I know they didn't change much. I meant that those changes would be the main ones I would have to deal with. So updating won't be a big deal fore me. I'll get a 1.9.4 workspace set up now.
Do you know what BiomeGenBase was changed to in 1.9.4? I can't seem to find anything on it.
What about .setBiomeName?
I noticed that GameRegistry.registerBlock and GameRegistry.registerItem are deprecated in 1.9, what is the new method for registering blocks and items?
BiomeGenBase was renamed to Biome. The issue tracker I linked earlier also documents most of the renames in 1.9.4.
The biome name is set from the BiomeProperties you pass to the Biome constructor now.
Read the doc comments of the deprecated methods.
For every IForgeRegistryEntry implementation (e.g. Block, Item, Biome): create the object, set its registry name with the setRegistryName method and then register it with GameRegistry.register in preInit.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I've updated most of my code to 1.9.4. There are still a few issues I have to work out but they shouldn't be too hard. The only major thing that I'm having trouble with is models. Everytime I attempt to load the game it crashes. The crash reportpoints to my model registry. This is my block rendering class.
You tried to register a model for a null Item. This is because GameRegistry.register no longer creates or registers an ItemBlock for your Block, you need to do that yourself.
You can see how I do this while supporting custom ItemBlock classes here.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Got it working, thank you. Two last questions, what was changed with axes in 1.9? I couldn't find anything about a change, but when I try to load the game it crashes. 2. My ModItemFood class throws an error on the onFoodEaten method. What was changed in that method?