Skip to content

Commit

Permalink
Added neat little json file for data-generated planets
Browse files Browse the repository at this point in the history
  • Loading branch information
JunePrimavera committed Sep 1, 2023
1 parent d2f0e50 commit eb85057
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/io/github/teampropulsive/Propulsive.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder;
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
import net.fabricmc.fabric.api.resource.SimpleSynchronousResourceReloadListener;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.entity.EntityDimensions;
import net.minecraft.entity.EntityType;
Expand All @@ -19,13 +21,18 @@
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.resource.Resource;
import net.minecraft.resource.ResourceManager;
import net.minecraft.resource.ResourceType;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
import net.minecraft.world.gen.GenerationStep;
import net.minecraft.world.gen.feature.PlacedFeature;
import qouteall.q_misc_util.my_util.Vec2d;

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;


Expand Down Expand Up @@ -63,6 +70,8 @@ public void onInitialize() {

// Ores
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.UNDERGROUND_ORES, ALUMINUM_ORE_PLACED_KEY);


}

// Dimensions
Expand Down
22 changes: 22 additions & 0 deletions src/main/resources/data/propulsive/templates/earth.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"type": "propulsive:terrestrial",
"model": "propulsive:models/planet/earth",
"texture": "propulsive:textures/planet/earth",
"icon": "propulsive:textures/gui/planet/earth",
"surface": {
"gravity": 1.0,
"space_cutoff": 128,
"atmosphere_composition": [
"propulsive:gas/hydrogen",
"propulsive:gas/oxygen"
],
"dimension": "minecraft:overworld"
},
"parent": "propulsive:planet/sun",
"orbital_radius": 16,
"orbital_velocity": 16,
"yaw_spin": 16,
"roll_spin": 16,
"spin_speed": 16
}

0 comments on commit eb85057

Please sign in to comment.