tutorial:dimensions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:dimension [2020/02/21 15:59] – The Dimension class earthcomputer | tutorial:dimensions [2023/09/24 18:56] (current) – Use new minecraft wiki mattidragon | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Creating a Dimension [WIP] ====== | + | FIXME //**In versions 1.16 and beyond, dimensions can be defined in data packs: More information about custom dimensions via JSON can be found in the [[https:// |
+ | |||
+ | ====== Minecraft 1.16 and later ====== | ||
+ | |||
+ | The information below applies to Minecraft 1.15 and earlier. | ||
+ | |||
+ | However, you must still create a portal using fabric, [[tutorial: | ||
+ | |||
+ | An example that also shows some of the fabric-api specific code can be found in the [[https:// | ||
+ | |||
+ | ====== Creating a Dimension [WIP] (1.15 and earlier) | ||
Creating your own dimension is an advanced topic. This tutorial assumes you have already read through the previous tutorials on world generation, and have other basic knowledge such as how to create your own blocks. | Creating your own dimension is an advanced topic. This tutorial assumes you have already read through the previous tutorials on world generation, and have other basic knowledge such as how to create your own blocks. | ||
Line 26: | Line 36: | ||
} | } | ||
</ | </ | ||
- | The '' | + | The '' |
=== The Dimension class === | === The Dimension class === | ||
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
- | public class BeeDimension { | + | public class BeeDimension |
private static final Vec3d FOG_COLOR = new Vec3d(0.54, 0.44, 0.16); | private static final Vec3d FOG_COLOR = new Vec3d(0.54, 0.44, 0.16); | ||
| | ||
- | public | + | public |
// The third argument indicates how visually bright light level 0 is, with 0 being no extra brightness and 1 being like night vision. | // The third argument indicates how visually bright light level 0 is, with 0 being no extra brightness and 1 being like night vision. | ||
// The overworld and the end set this to 0, and the Nether sets this to 0.1. We want our dimension to be a bit brighter. | // The overworld and the end set this to 0, and the Nether sets this to 0.1. We want our dimension to be a bit brighter. | ||
Line 63: | Line 73: | ||
| | ||
@Override | @Override | ||
- | public float getSkyAngle(long | + | public float getSkyAngle(long |
+ | // Returns a sky angle ranging between 0 and 1. | ||
+ | // This is a very simple implementation that approximates the overworld sky angle, but is easier to understand. | ||
+ | // In the overworld, the sky does not quite move at a constant rate, see the OverworldDimension code for details. | ||
final int dayLength = 24000; | final int dayLength = 24000; | ||
- | | + | |
+ | return MathHelper.fractionalPart(daysPassed - 0.25); | ||
} | } | ||
| | ||
Line 97: | Line 111: | ||
} | } | ||
</ | </ | ||
- | |||
- | === Travelling between dimensions [TODO] === | ||
=== Creating a ChunkGenerator [TODO] === | === Creating a ChunkGenerator [TODO] === |
tutorial/dimensions.1582300745.txt.gz · Last modified: 2020/02/21 15:59 by earthcomputer