Advertisement
jayhillx

Dimensions

Nov 4th, 2023
766
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.26 KB | None | 0 0
  1. package com.mod.core.init;
  2.  
  3. import net.minecraft.core.registries.Registries;
  4. import net.minecraft.data.worldgen.BootstapContext;
  5. import net.minecraft.resources.ResourceKey;
  6. import net.minecraft.tags.BlockTags;
  7. import net.minecraft.util.valueproviders.UniformInt;
  8. import net.minecraft.world.level.dimension.BuiltinDimensionTypes;
  9. import net.minecraft.world.level.dimension.DimensionType;
  10.  
  11. import java.util.OptionalLong;
  12.  
  13. import static com.dreamlands.core.mod.createKey;
  14.  
  15. public class Dimensions {
  16.  
  17.     public static final ResourceKey<DimensionType> DIMENSION1 = createKey(Registries.DIMENSION_TYPE, "dimension1");
  18.     public static final ResourceKey<DimensionType> DIMENSION2 = createKey(Registries.DIMENSION_TYPE, "dimension2");
  19.  
  20.     public static void bootstrap(BootstapContext<DimensionType> context) {
  21.         context.register(DIMENSION1, createDimension());
  22.         context.register(DIMENSION2, createDimension());
  23.     }
  24.  
  25.     private static DimensionType createDimension() {
  26.         return new DimensionType(OptionalLong.empty(), true, false, false, false, 1.0D, false, false, -64, 384, 384, BlockTags.INFINIBURN_OVERWORLD, BuiltinDimensionTypes.OVERWORLD_EFFECTS, 0.0F, new DimensionType.MonsterSettings(false, true, UniformInt.of(0, 7), 0));
  27.     }
  28.    
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement