mirror of
https://github.com/XevianLight/Aphelion.git
synced 2026-05-11 01:50:56 +01:00
RocketEntity added. Uses RocketRenderer and RocketStructure to render blocks. RocketStructure supports volumes up to 128^3.
This commit is contained in:
21
src/main/java/net/xevianlight/aphelion/planet/Planet.java
Normal file
21
src/main/java/net/xevianlight/aphelion/planet/Planet.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package net.xevianlight.aphelion.planet;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.xevianlight.aphelion.util.registries.ModRegistries;
|
||||
|
||||
public record Planet(
|
||||
ResourceKey<Level> dimension,
|
||||
double orbitDistance,
|
||||
ResourceKey<StarSystem> system
|
||||
) {
|
||||
public static final Codec<Planet> CODEC = RecordCodecBuilder.create(inst -> inst.group(
|
||||
ResourceKey.codec(Registries.DIMENSION).fieldOf("dimension").forGetter(Planet::dimension),
|
||||
Codec.DOUBLE.fieldOf("orbit_distance").forGetter(Planet::orbitDistance),
|
||||
ResourceKey.codec(ModRegistries.STAR_SYSTEM).fieldOf("star_system").forGetter(Planet::system)
|
||||
|
||||
).apply(inst, Planet::new));
|
||||
}
|
||||
Reference in New Issue
Block a user