dimension override, custom sky, skybox objects, custom world gen started

This commit is contained in:
Halbear
2026-07-23 00:03:55 +01:00
parent 72cc539b0c
commit ec63c2540f
87 changed files with 4326 additions and 31 deletions
+2
View File
@@ -38,3 +38,5 @@ run/
**/src/generated/**/.cache/
repo/
!**/src/**/repo/
/console.txt
/Assets/
+9
View File
@@ -0,0 +1,9 @@
{
"variants": {
"": [
{
"model": "ageofthegods:block/limestone/limestone1", "weight": 3
}
]
}
}
+15
View File
@@ -0,0 +1,15 @@
{
"variants": {
"": [
{
"model": "ageofthegods:block/limestone/limestone_grass", "weight": 3
},
{
"model": "ageofthegods:block/limestone/limestone_grass2", "weight": 3
},
{
"model": "ageofthegods:block/limestone/limestone_grass3", "weight": 3
}
]
}
}
+12
View File
@@ -0,0 +1,12 @@
{
"variants": {
"": [
{
"model": "ageofthegods:block/shale/shale1", "weight": 1
},
{
"model": "ageofthegods:block/shale/shale2", "weight": 1
}
]
}
}
+15
View File
@@ -0,0 +1,15 @@
{
"variants": {
"": [
{
"model": "ageofthegods:block/shale/shale_grass", "weight": 1
},
{
"model": "ageofthegods:block/shale/shale_grass2", "weight": 1
},
{
"model": "ageofthegods:block/shale/shale_grass3", "weight": 1
}
]
}
}
@@ -0,0 +1,8 @@
{
"amplitudes": [
1.0,
1.0,
1.0
],
"firstOctave": 0
}
File diff suppressed because it is too large Load Diff
@@ -1,8 +1,12 @@
package net.halbear.aotg;
import net.halbear.aotg.registries.ModBiomes;
import net.halbear.aotg.utility.DataGenerators.AgeOfTheGodsDataGeneration;
import net.minecraft.client.Minecraft;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.dimension.DimensionType;
import net.minecraft.world.level.levelgen.WorldGenSettings;
import net.neoforged.bus.api.Event;
import org.slf4j.Logger;
import com.mojang.logging.LogUtils;
@@ -34,38 +38,29 @@ import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredItem;
import net.neoforged.neoforge.registries.DeferredRegister;
import static net.halbear.aotg.registries.ModBiomes.BIOMES;
import static net.halbear.aotg.registries.ModBlocks.*;
import static net.halbear.aotg.registries.ModItems.*;
// The value here should match an entry in the META-INF/neoforge.mods.toml file
@Mod(AgeoftheGods.MODID)
public class AgeoftheGods {
// Define mod id in a common place for everything to reference
public static final String MODID = "ageofthegods";
// Directly reference a slf4j logger
public static final Logger LOGGER = LogUtils.getLogger();
// Create a Deferred Register to hold Blocks which will all be registered under the "ageofthegods" namespace
public static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks(MODID);
// Create a Deferred Register to hold Items which will all be registered under the "ageofthegods" namespace
public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(MODID);
// Create a Deferred Register to hold CreativeModeTabs which will all be registered under the "ageofthegods" namespace
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, MODID);
// Creates a new Block with the id "ageofthegods:example_block", combining the namespace and path
public static final DeferredBlock<Block> EXAMPLE_BLOCK = BLOCKS.registerSimpleBlock("example_block", p -> p.mapColor(MapColor.STONE));
// Creates a new BlockItem with the id "ageofthegods:example_block", combining the namespace and path
public static final DeferredItem<BlockItem> EXAMPLE_BLOCK_ITEM = ITEMS.registerSimpleBlockItem("example_block", EXAMPLE_BLOCK);
// Creates a new food item with the id "ageofthegods:example_id", nutrition 1 and saturation 2
public static final DeferredItem<Item> EXAMPLE_ITEM = ITEMS.registerSimpleItem("example_item", p -> p.food(new FoodProperties.Builder()
.alwaysEdible().nutrition(1).saturationModifier(2f).build()));
// Creates a creative tab with the id "ageofthegods:example_tab" for the example item, that is placed after the combat tab
public static final DeferredHolder<CreativeModeTab, CreativeModeTab> EXAMPLE_TAB = CREATIVE_MODE_TABS.register("example_tab", () -> CreativeModeTab.builder()
.title(Component.translatable("itemGroup.ageofthegods")) //The language key for the title of your CreativeModeTab
.withTabsBefore(CreativeModeTabs.COMBAT)
.icon(() -> EXAMPLE_ITEM.get().getDefaultInstance())
.icon(() -> LIMESTONE_BLOCK.get().asItem().getDefaultInstance())
.displayItems((parameters, output) -> {
output.accept(EXAMPLE_ITEM.get()); // Add the example item to the tab. For your own tabs, this method is preferred over the event
output.accept(LIMESTONE_ITEM.get());
output.accept(SHALE_ITEM.get());
output.accept(SHALE_GRASS_ITEM.get());
output.accept(LIMESTONE_GRASS_ITEM.get());
}).build());
// The constructor for the mod class is the first code that is run when your mod is loaded.
@@ -73,15 +68,12 @@ public class AgeoftheGods {
public AgeoftheGods(IEventBus modEventBus, ModContainer modContainer) {
// Register the commonSetup method for modloading
modEventBus.addListener(this::commonSetup);
// Register the Deferred Register to the mod event bus so blocks get registered
BLOCKS.register(modEventBus);
// Register the Deferred Register to the mod event bus so items get registered
ITEMS.register(modEventBus);
// Register the Deferred Register to the mod event bus so tabs get registered
CREATIVE_MODE_TABS.register(modEventBus);
BIOMES.register(modEventBus);
// Register ourselves for server and other game events we are interested in.
// Note that this is necessary if and only if we want *this* class (AgeoftheGods) to respond directly to events.
// Do not add this line if there are no @SubscribeEvent-annotated functions in this class, like onServerStarting() below.
@@ -109,9 +101,7 @@ public class AgeoftheGods {
// Add the example block item to the building blocks tab
private void addCreative(BuildCreativeModeTabContentsEvent event) {
if (event.getTabKey() == CreativeModeTabs.BUILDING_BLOCKS) {
event.accept(EXAMPLE_BLOCK_ITEM);
}
}
// You can use SubscribeEvent and let the Event Bus discover methods to call
@@ -0,0 +1,70 @@
package net.halbear.aotg.custom.WorldGen;
import net.halbear.aotg.AgeoftheGods;
import net.halbear.aotg.registries.ModBlocks;
import net.halbear.aotg.utility.DataGenerators.AgeOfTheGodsDataGeneration;
import net.minecraft.core.RegistrySetBuilder;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.worldgen.BootstrapContext;
import net.minecraft.data.worldgen.SurfaceRuleData;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.levelgen.NoiseGeneratorSettings;
import net.minecraft.world.level.levelgen.Noises;
import net.minecraft.world.level.levelgen.SurfaceRules;
import net.minecraft.world.level.levelgen.placement.CaveSurface;
public class ModNoiseSettings {
public static SurfaceRules.RuleSource makeRules(BootstrapContext<NoiseGeneratorSettings> context) {
ResourceKey<net.minecraft.world.level.biome.Biome> garrigueKey =
ResourceKey.create(Registries.BIOME, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "garrigue"));
ResourceKey<net.minecraft.world.level.biome.Biome> maquisKey =
ResourceKey.create(Registries.BIOME, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "maquis_shrubland"));
SurfaceRules.ConditionSource isGarrigueGrassPatch = SurfaceRules.noiseCondition(Noises.POWDER_SNOW, 0.0);
SurfaceRules.ConditionSource isMaquisGrassPatch = SurfaceRules.noiseCondition(AgeOfTheGodsDataGeneration.TINY_PATCHY_NOISE, 0.0);
SurfaceRules.RuleSource garrigueSurface = SurfaceRules.sequence(
SurfaceRules.ifTrue(
SurfaceRules.stoneDepthCheck(0, false, 0, CaveSurface.FLOOR),
SurfaceRules.ifTrue(
isGarrigueGrassPatch,
SurfaceRules.state(ModBlocks.LIMESTONE_GRASS_BLOCK.get().defaultBlockState())
)
),
SurfaceRules.ifTrue(
SurfaceRules.stoneDepthCheck(0, false, 0, CaveSurface.FLOOR),
SurfaceRules.state(ModBlocks.LIMESTONE_BLOCK.get().defaultBlockState())
),
SurfaceRules.ifTrue(SurfaceRules.stoneDepthCheck(4, false, 0, CaveSurface.FLOOR),
SurfaceRules.state(ModBlocks.LIMESTONE_BLOCK.get().defaultBlockState()))
);
SurfaceRules.RuleSource maquisSurface = SurfaceRules.sequence(
SurfaceRules.ifTrue(
SurfaceRules.stoneDepthCheck(0, false, 0, CaveSurface.FLOOR),
SurfaceRules.ifTrue(
isMaquisGrassPatch,
SurfaceRules.state(ModBlocks.SHALE_GRASS_BLOCK.get().defaultBlockState())
)
),
SurfaceRules.ifTrue(
SurfaceRules.stoneDepthCheck(0, false, 0, CaveSurface.FLOOR),
SurfaceRules.state(ModBlocks.SHALE_BLOCK.get().defaultBlockState())
),
SurfaceRules.ifTrue(SurfaceRules.stoneDepthCheck(4, false, 0, CaveSurface.FLOOR),
SurfaceRules.state(ModBlocks.SHALE_BLOCK.get().defaultBlockState()))
);
return SurfaceRules.sequence(
SurfaceRules.ifTrue(SurfaceRules.isBiome(garrigueKey), garrigueSurface),
SurfaceRules.ifTrue(SurfaceRules.isBiome(maquisKey), maquisSurface),
SurfaceRuleData.overworld()
);
}
}
@@ -0,0 +1,20 @@
package net.halbear.aotg.custom.blocks;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.util.TriState;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
public class RockCoveredGrassBlock extends Block {
public RockCoveredGrassBlock(Properties properties) {
super(properties);
}
@Override
public TriState canSustainPlant(BlockState state, BlockGetter world, BlockPos pos, Direction facing, BlockState plantstate) {
return TriState.TRUE;
}
}
@@ -3,15 +3,20 @@ package net.halbear.aotg.registries;
import net.halbear.aotg.AgeoftheGods;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.worldgen.BootstrapContext;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.biome.BiomeGenerationSettings;
import net.minecraft.world.level.biome.BiomeSpecialEffects;
import net.minecraft.world.level.biome.MobSpawnSettings;
import net.neoforged.neoforge.registries.DeferredRegister;
import java.util.Collection;
import java.util.Optional;
public class ModBiomes {
public static final DeferredRegister<Biome> BIOMES = DeferredRegister.create(
Registries.BIOME,
AgeoftheGods.MODID
);
public static final ResourceKey<Biome> MAQUIS_SHRUBLAND = ResourceKey.create(Registries.BIOME, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "maquis_shrubland"));
public static final ResourceKey<Biome> GARRIGUE = ResourceKey.create(Registries.BIOME, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "garrigue"));
}
@@ -1,4 +1,60 @@
package net.halbear.aotg.registries;
import net.halbear.aotg.AgeoftheGods;
import net.halbear.aotg.custom.blocks.RockCoveredGrassBlock;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.neoforged.neoforge.registries.DeferredBlock;
import net.neoforged.neoforge.registries.DeferredRegister;
import java.util.function.Function;
public class ModBlocks {
public static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks(AgeoftheGods.MODID);
public static final DeferredBlock<Block> LIMESTONE_BLOCK = RegisterBlock("limestone_block",
properties -> new RockCoveredGrassBlock(properties.strength(1.5f)
.requiresCorrectToolForDrops()
.explosionResistance(6.0f)
.sound(SoundType.STONE)
.lightLevel(state -> 0)
));
public static final DeferredBlock<Block> LIMESTONE_GRASS_BLOCK = RegisterBlock("limestone_grass_block",
properties -> new RockCoveredGrassBlock(properties.strength(1.5f)
.requiresCorrectToolForDrops()
.explosionResistance(6.0f)
.sound(SoundType.GRASS)
.lightLevel(state -> 0)
));
public static final DeferredBlock<Block> SHALE_BLOCK = RegisterBlock("shale_block",
properties -> new RockCoveredGrassBlock(properties.strength(1.5f)
.requiresCorrectToolForDrops()
.explosionResistance(6.0f)
.sound(SoundType.STONE)
.lightLevel(state -> 0)
));
public static final DeferredBlock<Block> SHALE_GRASS_BLOCK = RegisterBlock("shale_grass_block",
properties -> new RockCoveredGrassBlock(properties.strength(1.5f)
.requiresCorrectToolForDrops()
.explosionResistance(6.0f)
.sound(SoundType.GRASS)
.lightLevel(state -> 0)
));
private static <T extends Block> DeferredBlock<T> RegisterBlock(String Name, Function<BlockBehaviour.Properties, T> function){
DeferredBlock<T> newBlock = BLOCKS.registerBlock(Name, function);
// RegisterBlockItem(Name, newBlock);
return newBlock;
}
private static <T extends Block> void RegisterBlockItem(String Name, DeferredBlock<T> block){
ModItems.ITEMS.registerItem(Name, p -> new BlockItem(block.get(), p.useBlockDescriptionPrefix()));
}
}
@@ -1,4 +1,17 @@
package net.halbear.aotg.registries;
import net.halbear.aotg.AgeoftheGods;
import net.minecraft.world.item.BlockItem;
import net.neoforged.neoforge.registries.DeferredItem;
import net.neoforged.neoforge.registries.DeferredRegister;
import static net.halbear.aotg.registries.ModBlocks.*;
public class ModItems {
public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(AgeoftheGods.MODID);
public static final DeferredItem<BlockItem> LIMESTONE_ITEM = ITEMS.registerSimpleBlockItem("limestone_block", LIMESTONE_BLOCK);
public static final DeferredItem<BlockItem> SHALE_ITEM = ITEMS.registerSimpleBlockItem("shale_block", SHALE_BLOCK);
public static final DeferredItem<BlockItem> SHALE_GRASS_ITEM = ITEMS.registerSimpleBlockItem("shale_grass_block", SHALE_GRASS_BLOCK);
public static final DeferredItem<BlockItem> LIMESTONE_GRASS_ITEM = ITEMS.registerSimpleBlockItem("limestone_grass_block", LIMESTONE_GRASS_BLOCK);
}
@@ -0,0 +1,171 @@
package net.halbear.aotg.rendering.skybox;
import com.mojang.blaze3d.buffers.GpuBuffer;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.*;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.api.distmarker.OnlyIn;
import org.joml.Vector3f;
import org.joml.Vector4f;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static net.halbear.aotg.rendering.skybox.SkyBoxRendering.getDayAlpha;
import static net.halbear.aotg.rendering.skybox.SkyBoxRendering.getNightAlpha;
public class DistantSkyObject {
public static Map<Double, GpuBuffer> SkyObjectMeshMap = new HashMap<>();
public static Map<String, DistantSkyObject> SkyObjectRegistry = new HashMap<>();
public static Map<ResourceKey, List<String>> ObjectsMappedToDimension = new HashMap<>();
public static float DayAlpha = 1.0f;
public static float NightAlpha = 0.0f;
public static void TickUpdate(ResourceKey Dimension){
Minecraft minecraft = Minecraft.getInstance();
long time = minecraft.level != null ? minecraft.level.getOverworldClockTime() % 24000 : 0;
DayAlpha = getDayAlpha(time);
NightAlpha = getNightAlpha(time);
List<DistantSkyObject> objects = GetAllObjectsInDimenstion(Dimension);
for(int i = 0; i < objects.size(); i++){
objects.get(i).TickUpdate();
}
}
public static List<DistantSkyObject> GetAllObjectsInDimenstion(ResourceKey Dimension){
List<String> Keys = ObjectsMappedToDimension.get(Dimension);
if(Keys == null || Keys.isEmpty()) return new ArrayList<DistantSkyObject>();
List<DistantSkyObject> objectsInDimentsion = new ArrayList<>();
for(int i = 0; i < Keys.size(); i++){
if(SkyObjectRegistry.containsKey(Keys.get(i)))objectsInDimentsion.add(SkyObjectRegistry.get(Keys.get(i)));
}
return objectsInDimentsion;
}
@FunctionalInterface
public interface Action {
void execute();
}
private static GpuBuffer CreateMeshBuffer(double AspectRatio, float MeshScale, String ObjectName) {
VertexFormat format = DefaultVertexFormat.POSITION_TEX;
float Multipler = (float)AspectRatio;
try (ByteBufferBuilder byteBufferBuilder = ByteBufferBuilder.exactlySized(4 * format.getVertexSize())) {
BufferBuilder bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, format);
bufferBuilder.addVertex( MeshScale * Multipler, 0.0F, MeshScale).setUv(0.0F, 0.0F);
bufferBuilder.addVertex( -MeshScale * Multipler, 0.0F, MeshScale).setUv(1.0F, 0.0F);
bufferBuilder.addVertex( -MeshScale * Multipler, 0.0F, -MeshScale).setUv( 1.0F, 1.0F);
bufferBuilder.addVertex( MeshScale * Multipler, 0.0F, -MeshScale).setUv( 0.0F, 1.0F);
try (MeshData mesh = bufferBuilder.buildOrThrow()) {
return RenderSystem.getDevice().createBuffer(() -> "Age of the Gods " + ObjectName +" Pass", 32, mesh.vertexBuffer());
}
}
}
private Identifier textureID;
private double aspectRatio;
private float HAngle;
private float VAngle;
private final String Name;
private float NextHAngleAddition = 0;
private float NextVAngleAddition = 0;
private float PartialHAngle = HAngle;
private float PartialVAngle = VAngle;
private final Vector3f Translate;
private final Vector3f Scale;
private final Vector4f ColourModifiers;
private Action ExecuteOnTick = new Action() {
@Override
public void execute() {
}
};
public DistantSkyObject AddToDimension(ResourceKey Dimension){
if(!ObjectsMappedToDimension.containsKey(Dimension)){
ObjectsMappedToDimension.put(Dimension, new ArrayList<String>());
}
ObjectsMappedToDimension.get(Dimension).add(Name);
return this;
}
public DistantSkyObject RemoveFromDimension(ResourceKey Dimension){
if(ObjectsMappedToDimension.containsKey(Dimension)){
ObjectsMappedToDimension.get(Dimension).remove(Name);
}
return this;
}
public DistantSkyObject TickUpdate(){
HAngle += NextHAngleAddition;
NextHAngleAddition = 0;
VAngle += NextVAngleAddition;
NextVAngleAddition = 0;
ExecuteOnTick.execute();
return this;
}
public DistantSkyObject PartialTick(double PartialTick){
PartialHAngle = HAngle + (NextHAngleAddition * Math.clamp((float) PartialTick, 0, 1));
PartialVAngle = VAngle + (NextVAngleAddition * Math.clamp((float) PartialTick, 0, 1));
return this;
}
public DistantSkyObject OverrideTickFunction(Action newAction){
ExecuteOnTick = newAction;
return this;
}
public DistantSkyObject GenerateBufferIfNonExistant(){
if(!SkyObjectMeshMap.containsKey(aspectRatio)){
GpuBuffer newMeshBuffer = CreateMeshBuffer(aspectRatio, 1f, Name);
SkyObjectMeshMap.put(aspectRatio, newMeshBuffer);
}
return this;
}
public GpuBuffer GetMeshBuffer(){
GenerateBufferIfNonExistant();
return SkyObjectMeshMap.get(aspectRatio);
}
public DistantSkyObject(String Name, Identifier TextureID, double AspectRatio, float HorizontalAngleRad, float VerticalAngleRad, Vector3f Translate, Vector3f Scale, Vector4f ColourModifiers){
this.Name = Name;
if(!SkyObjectRegistry.containsKey(Name)) SkyObjectRegistry.put(Name, this);
this.Translate = Translate;
this.Scale = Scale;
this.ColourModifiers = ColourModifiers;
this.textureID = TextureID;
this.aspectRatio = AspectRatio;
this.HAngle = HorizontalAngleRad;
this.VAngle = VerticalAngleRad;
PartialHAngle = HAngle;
PartialVAngle = VAngle;
}
public void AddVerticalDegrees(float degrees){
float Angle = GetVerticalAngleDegrees();
Angle = (Angle + degrees) % 360;
VAngle = (float)Math.toRadians(Angle);
}
public void AddHorizontalDegrees(float degrees){
float Angle = GetHorizontalAngleDegrees();
Angle = (Angle + degrees) % 360;
HAngle = (float)Math.toRadians(Angle);
}
public Vector4f GetColourModifiers(){return ColourModifiers;}
public Vector3f GetScale(){return Scale;}
public Vector3f GetTranslate(){return Translate;}
public String GetName(){return Name;}
public double GetAspectRatio(){return aspectRatio;}
public Identifier GetTextureID(){return textureID;}
public float GetHorizontalAngleDegrees(){return (float)Math.toDegrees(HAngle);}
public float GetHorizontalAngle(){return PartialHAngle;}
public float GetRawHorizontalAngle(){return HAngle;}
public float GetVerticalAngleDegrees(){return (float)Math.toDegrees(VAngle);}
public float GetVerticalAngle(){return PartialVAngle;}
public float GetRawVerticalAngle(){return VAngle;}
}
@@ -0,0 +1,273 @@
package net.halbear.aotg.rendering.skybox;
import com.mojang.blaze3d.buffers.GpuBuffer;
import com.mojang.blaze3d.buffers.GpuBufferSlice;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import com.mojang.blaze3d.systems.RenderPass;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.textures.GpuSampler;
import com.mojang.blaze3d.textures.GpuTextureView;
import com.mojang.blaze3d.vertex.*;
import com.mojang.math.Axis;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderPipelines;
import net.minecraft.client.renderer.state.level.SkyRenderState;
import net.minecraft.client.renderer.texture.AbstractTexture;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.client.event.RenderLevelStageEvent;
import org.joml.Matrix4f;
import org.joml.Matrix4fStack;
import org.joml.Vector3f;
import org.joml.Vector4f;
import java.util.List;
import java.util.OptionalDouble;
import java.util.OptionalInt;
@EventBusSubscriber(Dist.CLIENT)
public class SkyBoxRendering {
public static RenderPipeline CUSTOM_SKYBOX_PIPELINE;
private static GpuBuffer sunBuffer;
private static GpuBuffer moonBuffer;
private static GpuBuffer skyboxBuffer;
private static final ResourceKey OVERWORLD = ResourceKey.create(Registries.DIMENSION, Identifier.parse("minecraft:overworld"));
private static final Identifier OVERWORLD_DAY_SKYBOX = Identifier.parse("ageofthegods:textures/skybox/skyboxcubemapday.png");
private static final Identifier OVERWORLD_DUSK_SKYBOX = Identifier.parse("ageofthegods:textures/skybox/cubemaptransitionskybox.png");
private static final Identifier OVERWORLD_NIGHT_SKYBOX = Identifier.parse("ageofthegods:textures/skybox/cubemapnightskybox.png");
private static final Identifier OVERWORLD_SUN = Identifier.parse("ageofthegods:textures/suntexture.png");
private static final Identifier OVERWORLD_MOON = Identifier.parse("ageofthegods:textures/moontexture.png");
static{
Identifier[] clouds = new Identifier[]{
Identifier.parse("ageofthegods:textures/cloud2.png"),
Identifier.parse("ageofthegods:textures/cloud3.png"),
Identifier.parse("ageofthegods:textures/smallcloud1.png"),
Identifier.parse("ageofthegods:textures/smallcloud2.png"),
Identifier.parse("ageofthegods:textures/smallcloud3.png"),
};
double[] aspectRatios = new double[]{1.5625,1,1,1,3.71875};
DistantSkyObject newObject;
for(int i = 0; i < 128; i++){
int Index = (int)Math.min(clouds.length * Math.random(), clouds.length - 1);
String name = "Cloud"+ i;
float Speed = 0.05f + 0.1f *(float)Math.random();
DistantSkyObject.Action TickUpdateAction = new DistantSkyObject.Action() {
@Override
public void execute() {
DistantSkyObject object = DistantSkyObject.SkyObjectRegistry.get(name);
object.AddHorizontalDegrees(Speed);
float DayAlpha = DistantSkyObject.DayAlpha;
float NightAlpha = DistantSkyObject.NightAlpha;
object.GetColourModifiers().set(0.75 + (DayAlpha * 0.25f) - (NightAlpha * 0.65f),0.35 + (DayAlpha * 0.65f) - (NightAlpha * 0.25f),0.25 + (DayAlpha * 0.75f) - (NightAlpha * 0.1f),1);
}
};
float Scale = 2f + (float)Math.random() * 12;
newObject = new DistantSkyObject(name, clouds[Index], aspectRatios[Index], //Object ID, texture, mesh aspect ratio
(float)Math.toRadians(360*Math.random()),(float)Math.toRadians(-130F + (60 * Math.random())), // horizontal angle, vertical angle
new Vector3f(0,100,0),new Vector3f(Scale,-1,Scale),new Vector4f(1,1,1,1)) // translation, scale, colour modifiers
.AddToDimension(OVERWORLD)
.OverrideTickFunction(TickUpdateAction); // this plays on client tick update, thats how the clouds move rn
}
}
private static void initBuffers() {
if (sunBuffer == null)
sunBuffer = buildCelestialBuffer(SunScale, "Sun");
if (moonBuffer == null)
moonBuffer = buildCelestialBuffer(MoonScale, "Moon");
if (skyboxBuffer == null)
skyboxBuffer = buildSkyboxBuffer();
}
@SubscribeEvent
public static void renderSky(RenderLevelStageEvent.AfterSky event) {
Minecraft minecraft = Minecraft.getInstance();
if (minecraft.player == null)
return;
if (minecraft.player.level().dimension() == OVERWORLD) {
renderCustomSkybox(event, OVERWORLD_DAY_SKYBOX,OVERWORLD_NIGHT_SKYBOX, OVERWORLD_DUSK_SKYBOX);
renderCustomSun(event, OVERWORLD_SUN);
renderCustomMoon(event, OVERWORLD_MOON);
}
List<DistantSkyObject> SkyObjects = DistantSkyObject.GetAllObjectsInDimenstion(minecraft.player.level().dimension());
if(!SkyObjects.isEmpty()){
for (DistantSkyObject object : SkyObjects) {
object.PartialTick(minecraft.getDeltaTracker().getGameTimeDeltaPartialTick(false));
render2DObjectInSkybox(event, object.GetTextureID(), object.GetName(),object.GetHorizontalAngle(),object.GetVerticalAngle(),object.GetTranslate(),object.GetScale(),object.GetColourModifiers(),object.GetMeshBuffer(), CUSTOM_SKYBOX_PIPELINE);
}
}
}
private static void addSkyboxFace(BufferBuilder bufferBuilder, float x1, float y1, float z1, float u1, float v1, float x2, float y2, float z2, float u2, float v2, float x3, float y3, float z3, float u3, float v3, float x4, float y4, float z4,
float u4, float v4, int colour) {
bufferBuilder.addVertex(x1, y1, z1).setUv(u1, v1).setColor(colour);
bufferBuilder.addVertex(x2, y2, z2).setUv(u2, v2).setColor(colour);
bufferBuilder.addVertex(x3, y3, z3).setUv(u3, v3).setColor(colour);
bufferBuilder.addVertex(x4, y4, z4).setUv(u4, v4).setColor(colour);
}
public static void render2DObjectInSkybox(RenderLevelStageEvent.AfterSky event, Identifier textureId, String Name, float HorizontalRotationRad, float VerticalRotationRad, Vector3f Translate, Vector3f Scale, Vector4f colourModulator, GpuBuffer meshBuffer, RenderPipeline pipeline) {
initBuffers();
Minecraft minecraft = Minecraft.getInstance();
PoseStack poseStack = event.getPoseStack();
SkyRenderState state = event.getLevelRenderState().skyRenderState;
poseStack.pushPose();
poseStack.mulPose(Axis.YP.rotation(HorizontalRotationRad));
poseStack.mulPose(Axis.XP.rotation(VerticalRotationRad));
Matrix4fStack modelViewStack = RenderSystem.getModelViewStack();
modelViewStack.pushMatrix();
modelViewStack.mul(poseStack.last().pose());
modelViewStack.translate(Translate);
modelViewStack.scale(Scale);
GpuBufferSlice dynamicTransforms = RenderSystem.getDynamicUniforms().writeTransform(modelViewStack, colourModulator, new Vector3f(), new Matrix4f());
GpuTextureView colour = minecraft.getMainRenderTarget().getColorTextureView();
GpuTextureView depth = minecraft.getMainRenderTarget().getDepthTextureView();
GpuBuffer indexBuffer = RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS).getBuffer(6);
AbstractTexture texture = minecraft.getTextureManager().getTexture(textureId);
try (RenderPass renderPass = RenderSystem.getDevice().createCommandEncoder().createRenderPass(() -> "Age of the Gods Skybox Object [" + Name + "]", colour, OptionalInt.empty(), depth, OptionalDouble.empty())) {
renderPass.setPipeline(pipeline);
RenderSystem.bindDefaultUniforms(renderPass);
renderPass.setUniform("DynamicTransforms", dynamicTransforms);
renderPass.bindTexture("Sampler0", texture.getTextureView(), texture.getSampler());
renderPass.setVertexBuffer(0, meshBuffer);
renderPass.setIndexBuffer(indexBuffer, RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS).type());
renderPass.drawIndexed(0, 0, 6, 1);
}
modelViewStack.popMatrix();
poseStack.popPose();
}
public static void renderCustomSun(RenderLevelStageEvent.AfterSky event, Identifier textureId) {
initBuffers();
SkyRenderState state = event.getLevelRenderState().skyRenderState;
render2DObjectInSkybox(event, textureId, "Sun",(float)Math.toRadians(-90F),state.sunAngle,new Vector3f(0,100.0f,0),new Vector3f(30.0F,-1.0F,30.0F),new Vector4f(1f,1f,1f,state.rainBrightness), sunBuffer,RenderPipelines.CELESTIAL);
}
public static void renderCustomMoon(RenderLevelStageEvent.AfterSky event, Identifier textureId) {
initBuffers();
SkyRenderState state = event.getLevelRenderState().skyRenderState;
render2DObjectInSkybox(event, textureId, "Moon",(float)Math.toRadians(-90F),state.moonAngle,new Vector3f(0,100.0f,0),new Vector3f(30.0F,-1.0F,30.0F),new Vector4f(1f,1f,1f,1f), moonBuffer,RenderPipelines.CELESTIAL);
}
public static float getNightAlpha(long dayTime) {
long time = dayTime % 24000;
if (time >= 13000) {
if (time < 15000) return (float) (time-13000) / 2000.0F;
if (time > 22000) return 1.0F - ((float)(time - 22000) / 2000.0F);
return 1.0F;
}
return 0.0F;
}
public static float getDayAlpha(long dayTime) {
long time = dayTime % 24000;
if (time >= 0 && time < 13000) {
if (time < 2000) return (float) time / 2000.0F;
if (time > 11000) return 1.0F - ((float)(time - 11000) / 2000.0F);
return 1.0F;
}
return 0.0F;
}
public static void renderCustomSkybox(RenderLevelStageEvent.AfterSky event, Identifier daytextureId, Identifier nighttextureid, Identifier dusktextureid) {
initBuffers();
Minecraft minecraft = Minecraft.getInstance();
long time = minecraft.level != null ? minecraft.level.getOverworldClockTime() % 24000 : 0;
float dayAlpha = getDayAlpha(time);
float nightAlpha = getNightAlpha(time);
PoseStack poseStack = event.getPoseStack();
Matrix4fStack modelViewStack = RenderSystem.getModelViewStack();
modelViewStack.pushMatrix();
modelViewStack.mul(poseStack.last().pose());
GpuTextureView colour = minecraft.getMainRenderTarget().getColorTextureView();
GpuTextureView depth = minecraft.getMainRenderTarget().getDepthTextureView();
GpuBuffer indexBuffer = RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS).getBuffer(36);
GpuBufferSlice dynamicTransforms = RenderSystem.getDynamicUniforms().writeTransform(modelViewStack, new Vector4f(1.0F, 1.0F, 1.0F, 1.0F), new Vector3f(), new Matrix4f());
AbstractTexture texture = minecraft.getTextureManager().getTexture(dusktextureid);
try (RenderPass renderPass = RenderSystem.getDevice().createCommandEncoder().createRenderPass(() -> "Age of the Gods Dusk Skybox", colour, OptionalInt.empty(), depth, OptionalDouble.empty())) {
renderPass.setPipeline(RenderPipelines.END_SKY);
RenderSystem.bindDefaultUniforms(renderPass);
renderPass.setUniform("DynamicTransforms", dynamicTransforms);
renderPass.bindTexture("Sampler0", texture.getTextureView(), texture.getSampler());
renderPass.setVertexBuffer(0, skyboxBuffer);
renderPass.setIndexBuffer(indexBuffer, RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS).type());
renderPass.drawIndexed(0, 0, 36, 1);
}
dynamicTransforms = RenderSystem.getDynamicUniforms().writeTransform(modelViewStack, new Vector4f(1.0F, 1.0F, 1.0F, dayAlpha), new Vector3f(), new Matrix4f());
texture = minecraft.getTextureManager().getTexture(daytextureId);
try (RenderPass renderPass = RenderSystem.getDevice().createCommandEncoder().createRenderPass(() -> "Age of the Gods Day Skybox", colour, OptionalInt.empty(), depth, OptionalDouble.empty())) {
renderPass.setPipeline(RenderPipelines.END_SKY);
RenderSystem.bindDefaultUniforms(renderPass);
renderPass.setUniform("DynamicTransforms", dynamicTransforms);
renderPass.bindTexture("Sampler0", texture.getTextureView(), texture.getSampler());
renderPass.setVertexBuffer(0, skyboxBuffer);
renderPass.setIndexBuffer(indexBuffer, RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS).type());
renderPass.drawIndexed(0, 0, 36, 1);
}
dynamicTransforms = RenderSystem.getDynamicUniforms().writeTransform(modelViewStack, new Vector4f(1.0F, 1.0F, 1.0F, nightAlpha), new Vector3f(), new Matrix4f());
texture = minecraft.getTextureManager().getTexture(nighttextureid);
try (RenderPass renderPass = RenderSystem.getDevice().createCommandEncoder().createRenderPass(() -> "Age of the Gods Night Skybox", colour, OptionalInt.empty(), depth, OptionalDouble.empty())) {
renderPass.setPipeline(RenderPipelines.END_SKY);
RenderSystem.bindDefaultUniforms(renderPass);
renderPass.setUniform("DynamicTransforms", dynamicTransforms);
renderPass.bindTexture("Sampler0", texture.getTextureView(), texture.getSampler());
renderPass.setVertexBuffer(0, skyboxBuffer);
renderPass.setIndexBuffer(indexBuffer, RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS).type());
renderPass.drawIndexed(0, 0, 36, 1);
}
modelViewStack.popMatrix();
}
public static float MoonScale = 0.75f;
public static float SunScale = 0.75f;
private static GpuBuffer buildCelestialBuffer(float CelestialScale, String CelestialObjectName) {
VertexFormat format = DefaultVertexFormat.POSITION_TEX;
try (ByteBufferBuilder byteBufferBuilder = ByteBufferBuilder.exactlySized(4 * format.getVertexSize())) {
BufferBuilder bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, format);
bufferBuilder.addVertex( -CelestialScale, 0.0F, -CelestialScale).setUv(0.0F, 0.0F);
bufferBuilder.addVertex( CelestialScale, 0.0F, -CelestialScale).setUv(1.0F, 0.0F);
bufferBuilder.addVertex( CelestialScale, 0.0F, CelestialScale).setUv( 1.0F, 1.0F);
bufferBuilder.addVertex( -CelestialScale, 0.0F, CelestialScale).setUv( 0.0F, 1.0F);
try (MeshData mesh = bufferBuilder.buildOrThrow()) {
return RenderSystem.getDevice().createBuffer(() -> "Age of the Gods " + CelestialObjectName +" Pass", 32, mesh.vertexBuffer());
}
}
}
private static GpuBuffer buildSkyboxBuffer() {
VertexFormat format = DefaultVertexFormat.POSITION_TEX_COLOR;
try (ByteBufferBuilder byteBufferBuilder = ByteBufferBuilder.exactlySized(24 * format.getVertexSize())) {
BufferBuilder bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, format);
float distance = 100.0F;
float size = 100.0F;
int colour = 0xFFFFFFFF;
addSkyboxFace(bufferBuilder, -size, distance, -size, 1.0F / 4.0F, 1.0F / 3.0F, size, distance, -size, 2.0F / 4.0F, 1.0F / 3.0F, size, distance, size, 2.0F / 4.0F, 0.0F, -size, distance, size, 1.0F / 4.0F, 0.0F, colour);
addSkyboxFace(bufferBuilder, -size, -distance, -size, 1.0F / 4.0F, 2.0F / 3.0F, -size, -distance, size, 1.0F / 4.0F, 3.0F / 3.0F, size, -distance, size, 2.0F / 4.0F, 3.0F / 3.0F, size, -distance, -size, 2.0F / 4.0F, 2.0F / 3.0F, colour);
addSkyboxFace(bufferBuilder, -distance, -size, size, 0.0F, 2.0F / 3.0F, -distance, -size, -size, 1.0F / 4.0F, 2.0F / 3.0F, -distance, size, -size, 1.0F / 4.0F, 1.0F / 3.0F, -distance, size, size, 0.0F, 1.0F / 3.0F, colour);
addSkyboxFace(bufferBuilder, -size, -size, -distance, 1.0F / 4.0F, 2.0F / 3.0F, size, -size, -distance, 2.0F / 4.0F, 2.0F / 3.0F, size, size, -distance, 2.0F / 4.0F, 1.0F / 3.0F, -size, size, -distance, 1.0F / 4.0F, 1.0F / 3.0F, colour);
addSkyboxFace(bufferBuilder, distance, -size, -size, 2.0F / 4.0F, 2.0F / 3.0F, distance, -size, size, 3.0F / 4.0F, 2.0F / 3.0F, distance, size, size, 3.0F / 4.0F, 1.0F / 3.0F, distance, size, -size, 2.0F / 4.0F, 1.0F / 3.0F, colour);
addSkyboxFace(bufferBuilder, size, -size, distance, 3.0F / 4.0F, 2.0F / 3.0F, -size, -size, distance, 4.0F / 4.0F, 2.0F / 3.0F, -size, size, distance, 4.0F / 4.0F, 1.0F / 3.0F, size, size, distance, 3.0F / 4.0F, 1.0F / 3.0F, colour);
try (MeshData meshData = bufferBuilder.buildOrThrow()) {
return RenderSystem.getDevice().createBuffer(() -> "Age of the Gods Skybox", 40, meshData.vertexBuffer());
}
}
}
}
@@ -1,4 +1,21 @@
package net.halbear.aotg.utility;
import net.halbear.aotg.AgeoftheGods;
import net.halbear.aotg.rendering.skybox.DistantSkyObject;
import net.minecraft.client.Minecraft;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.client.event.ClientTickEvent;
@EventBusSubscriber(modid = AgeoftheGods.MODID, value = Dist.CLIENT)
public class ClientEventHandler {
@SubscribeEvent
public static void onClientTick(ClientTickEvent.Pre event) {
Minecraft mc = Minecraft.getInstance();
if (mc.level != null && mc.player != null) {
DistantSkyObject.TickUpdate(mc.level.dimension());
}
}
}
@@ -0,0 +1,32 @@
package net.halbear.aotg.utility.DataGenerators;
import net.halbear.aotg.AgeoftheGods;
import net.halbear.aotg.registries.ModBlocks;
import net.halbear.aotg.registries.ModItems;
import net.minecraft.client.data.models.BlockModelGenerators;
import net.minecraft.client.data.models.ItemModelGenerators;
import net.minecraft.client.data.models.ModelProvider;
import net.minecraft.client.data.models.MultiVariant;
import net.minecraft.client.data.models.blockstates.MultiVariantGenerator;
import net.minecraft.client.data.models.model.ModelTemplate;
import net.minecraft.client.data.models.model.ModelTemplates;
import net.minecraft.client.data.models.model.TextureMapping;
import net.minecraft.client.data.models.model.TextureSlot;
import net.minecraft.client.renderer.Sheets;
import net.minecraft.client.renderer.block.dispatch.Variant;
import net.minecraft.client.resources.model.sprite.Material;
import net.minecraft.data.PackOutput;
import net.minecraft.resources.Identifier;
import net.minecraft.world.level.block.Block;
public class AOTGModelProvider extends ModelProvider {
public AOTGModelProvider(PackOutput output){super(output, AgeoftheGods.MODID);}
@Override
protected void registerModels(BlockModelGenerators BlockModels, ItemModelGenerators itemModels){
// BlockModels.createTrivialCube(ModBlocks.LIMESTONE_BLOCK.get());
// BlockModels.createTrivialCube(ModBlocks.LIMESTONE_GRASS_BLOCK.get());
// BlockModels.createTrivialCube(ModBlocks.SHALE_BLOCK.get());
// BlockModels.createTrivialCube(ModBlocks.SHALE_GRASS_BLOCK.get());
}
}
@@ -0,0 +1,81 @@
package net.halbear.aotg.utility.DataGenerators;
import net.halbear.aotg.AgeoftheGods;
import net.halbear.aotg.custom.WorldGen.ModNoiseSettings;
import net.minecraft.core.HolderGetter;
import net.minecraft.core.RegistrySetBuilder;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.DataGenerator;
import net.minecraft.data.PackOutput;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.levelgen.DensityFunction;
import net.minecraft.world.level.levelgen.NoiseGeneratorSettings;
import net.minecraft.world.level.levelgen.synth.NormalNoise;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.common.data.DatapackBuiltinEntriesProvider;
import net.neoforged.neoforge.data.event.GatherDataEvent;
import java.util.Set;
import static net.halbear.aotg.AgeoftheGods.LOGGER;
import static net.halbear.aotg.AgeoftheGods.MODID;
@EventBusSubscriber(modid = MODID)
public class AgeOfTheGodsDataGeneration {
public static final ResourceKey<net.minecraft.world.level.levelgen.synth.NormalNoise.NoiseParameters> TINY_PATCHY_NOISE =
ResourceKey.create(Registries.NOISE, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "tiny_patchy_noise"));
@SubscribeEvent
public static void gatherData(GatherDataEvent.Client event) {
LOGGER.info("gatherData event");
RegistrySetBuilder builder = new RegistrySetBuilder().
add(Registries.NOISE, context -> {
context.register(TINY_PATCHY_NOISE, new net.minecraft.world.level.levelgen.synth.NormalNoise.NoiseParameters(
0,
1.0, 1.0, 1.0
));
}).add(Registries.NOISE_SETTINGS, context -> {
HolderGetter<DensityFunction> densityFunctions = context.lookup(Registries.DENSITY_FUNCTION);
HolderGetter<NormalNoise.NoiseParameters> noiseParameters = context.lookup(Registries.NOISE);
NoiseGeneratorSettings vanillaSettings = NoiseGeneratorSettings.overworld(context, false, false);
context.register(
ResourceKey.create(Registries.NOISE_SETTINGS, Identifier.withDefaultNamespace("overworld")),
new NoiseGeneratorSettings(
vanillaSettings.noiseSettings(),
Blocks.STONE.defaultBlockState(),
Blocks.WATER.defaultBlockState(),
vanillaSettings.noiseRouter(),
ModNoiseSettings.makeRules(context),
vanillaSettings.spawnTarget(),
63,
false,
true,
true,
false
)
);
});
LOGGER.info("World Gen something or other");
event.createProvider(output -> new DatapackBuiltinEntriesProvider(
output,
event.getLookupProvider(),
builder,
Set.of("minecraft", AgeoftheGods.MODID)
));
}
@SubscribeEvent
public static void GatherClientData(GatherDataEvent.Client event){
LOGGER.info("GatherClientData event");
DataGenerator generator = event.getGenerator();
PackOutput output = generator.getPackOutput();
// generator.addProvider(true, new AOTGModelProvider(output));
}
}
@@ -0,0 +1,26 @@
package net.halbear.aotg.utility.Mixin;
import net.minecraft.client.Camera;
import net.minecraft.client.CameraType;
import net.minecraft.client.DeltaTracker;
import net.minecraft.client.Minecraft;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.BlockGetter;
import org.joml.Vector3f;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(Camera.class)
public abstract class CameraMixin {
//@Inject(method = {"update"}, at = @At(value = "TAIL"),cancellable = true, remap = true)
//private void update(DeltaTracker deltaTracker, CallbackInfo ci){
//
//}
//@Shadow(aliases = {"move", "func_216782_a"})
//protected abstract void movePosition(double p_216782_1_, double p_216782_3_, double p_216782_5_);
// @Shadow(aliases = {"getMaxZoom", "func_216779_a"}) protected abstract double calcCameraDistance(double p_216779_1_);
}
@@ -1,4 +1,100 @@
package net.halbear.aotg.utility;
import com.mojang.blaze3d.pipeline.BlendFunction;
import com.mojang.blaze3d.pipeline.ColorTargetState;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import com.mojang.blaze3d.vertex.DefaultVertexFormat;
import com.mojang.blaze3d.vertex.VertexFormat;
import com.mojang.serialization.MapCodec;
import net.halbear.aotg.AgeoftheGods;
import net.halbear.aotg.registries.ModBlocks;
import net.halbear.aotg.rendering.skybox.SkyBoxRendering;
import net.minecraft.client.color.block.BlockTintSource;
import net.minecraft.client.color.item.GrassColorSource;
import net.minecraft.client.color.item.ItemTintSource;
import net.minecraft.client.color.item.ItemTintSources;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.renderer.BiomeColors;
import net.minecraft.client.renderer.RenderPipelines;
import net.minecraft.client.renderer.block.BlockAndTintGetter;
import net.minecraft.core.BlockPos;
import net.minecraft.resources.Identifier;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.GrassColor;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.EventBus;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.client.event.RegisterColorHandlersEvent;
import net.neoforged.neoforge.client.event.RegisterColorHandlersEvent.BlockTintSources;
import net.neoforged.neoforge.client.event.RegisterRenderPipelinesEvent;
import org.jetbrains.annotations.NotNull;
import javax.annotation.Nullable;
import java.util.List;
import static net.minecraft.client.renderer.RenderPipelines.MATRICES_PROJECTION_SNIPPET;
@EventBusSubscriber(modid = AgeoftheGods.MODID, value = Dist.CLIENT)
public class ModEventHandler {
@SubscribeEvent
public static void onRegisterPipelines(RegisterRenderPipelinesEvent event) {
SkyBoxRendering.CUSTOM_SKYBOX_PIPELINE = RenderPipeline.builder(new RenderPipeline.Snippet[]{MATRICES_PROJECTION_SNIPPET})
.withLocation(Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "pipeline/custom_skybox"))
.withVertexShader(Identifier.withDefaultNamespace("core/position_tex"))
.withFragmentShader(Identifier.withDefaultNamespace("core/position_tex"))
.withSampler("Sampler0")
.withCull(false)
.withColorTargetState(new ColorTargetState(BlendFunction.TRANSLUCENT)).withVertexFormat(DefaultVertexFormat.POSITION_TEX, VertexFormat.Mode.QUADS).build();
event.registerPipeline(SkyBoxRendering.CUSTOM_SKYBOX_PIPELINE);
System.out.println("Age of the Gods pipeline Registered");
}
public static void BlockTint(RegisterColorHandlersEvent.BlockTintSources event, Block block) {
event.register(
List.of(new BlockTintSource() {
@Override
public int color(BlockState state) {
return 0xFFFFFFFF;
}
@Override
public int colorInWorld(BlockState state, BlockAndTintGetter level, BlockPos pos) {
return BiomeColors.getAverageGrassColor(level, pos);
}
}),
block
);
}
@SubscribeEvent
public static void registerBlockTint(RegisterColorHandlersEvent.BlockTintSources event) {
BlockTint(event, ModBlocks.LIMESTONE_GRASS_BLOCK.get());
BlockTint(event, ModBlocks.SHALE_GRASS_BLOCK.get());
}
@SubscribeEvent
public static void registerItemTint(RegisterColorHandlersEvent.ItemTintSources event) {
event.register( ModBlocks.LIMESTONE_GRASS_BLOCK.getId(),
(new CustomItemGrassTint().type()) );
event.register( ModBlocks.SHALE_GRASS_BLOCK.getId(),
(new CustomItemGrassTint().type()) );
}
private static class CustomItemGrassTint implements ItemTintSource {
@Override
public int calculate(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity) {
return GrassColor.get(0.5D, 1.0D); // Classic vanilla inventory grass green
}
@Override
public @NotNull MapCodec<? extends ItemTintSource> type() {
return MapCodec.unit(this);
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"required": true,
"package": "net.halbear.aotg.mixin",
"package": "net.halbear.aotg.utility.Mixin",
"compatibilityLevel": "JAVA_25",
"mixins": [],
"injectors": {
+103
View File
@@ -0,0 +1,103 @@
{
"sea_level": 128,
"disable_mob_generation": false,
"aquifers_enabled": true,
"ore_veins_enabled": true,
"legacy_random_source": false,
"default_block": { "Name": "minecraft:stone" },
"default_fluid": { "Name": "minecraft:water", "Properties": { "level": "0" } },
"noise": {
"min_y": -64,
"height": 512,
"size_horizontal": 1,
"size_vertical": 2
},
"noise_router": {
"barrier": 0.0,
"fluid_level_floodedness": 0.0,
"fluid_level_spread": 0.0,
"lava": 0.0,
"temperature": "minecraft:overworld/temperature",
"vegetation": "minecraft:overworld/vegetation",
"continents": "minecraft:overworld/continents",
"erosion": "minecraft:overworld/erosion",
"depth": "minecraft:overworld/depth",
"ridges": "minecraft:overworld/ridges",
"initial_density_without_jaggedness": "minecraft:overworld/initial_density_without_jaggedness",
"final_density": "minecraft:overworld/final_density",
"vein_toggle": 0.0,
"vein_ridged": 0.0,
"vein_gap": 0.0,
"preliminary_surface_level": "minecraft:overworld/preliminary_surface_level"
},
"spawn_target": [],
"surface_rule": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:biome",
"biome_is": [ "ageofthegods:garrigue" ]
},
"then_run": {
"type": "minecraft:condition",
"if_true": { "type": "minecraft:y_above", "anchor": { "absolute": 129 }, "surface_depth_multiplier": 0, "add_stone_depth": false },
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": { "type": "minecraft:stone_depth", "offset": 0, "add_surface_depth": false, "secondary_depth_range": 0, "surface_type": "floor" },
"then_run": { "type": "minecraft:block", "result_state": { "Name": "ageofthegods:limestone_grass_block" } }
},
{
"type": "minecraft:block",
"result_state": { "Name": "ageofthegods:limestone_block" }
}
]
}
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:biome",
"biome_is": [ "ageofthegods:maquis_shrubland" ]
},
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": { "type": "minecraft:stone_depth", "offset": 0, "add_surface_depth": false, "secondary_depth_range": 0, "surface_type": "floor" },
"then_run": { "type": "minecraft:block", "result_state": { "Name": "ageofthegods:shale_grass_block" } }
},
{
"type": "minecraft:block",
"result_state": { "Name": "ageofthegods:shale_block" }
}
]
}
},
{
"type": "minecraft:condition",
"if_true": { "type": "minecraft:y_above", "anchor": { "absolute": 129 }, "surface_depth_multiplier": 0, "add_stone_depth": false },
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": { "type": "minecraft:stone_depth", "offset": 0, "add_surface_depth": false, "secondary_depth_range": 0, "surface_type": "floor" },
"then_run": { "type": "minecraft:block", "result_state": { "Name": "minecraft:grass_block" } }
},
{
"type": "minecraft:block",
"result_state": { "Name": "minecraft:dirt" }
}
]
}
}
]
}
}
@@ -0,0 +1,9 @@
{
"variants": {
"": [
{
"model": "ageofthegods:block/limestone/limestone1", "weight": 3
}
]
}
}
@@ -0,0 +1,15 @@
{
"variants": {
"": [
{
"model": "ageofthegods:block/limestone/limestone_grass", "weight": 3
},
{
"model": "ageofthegods:block/limestone/limestone_grass2", "weight": 3
},
{
"model": "ageofthegods:block/limestone/limestone_grass3", "weight": 3
}
]
}
}
@@ -0,0 +1,12 @@
{
"variants": {
"": [
{
"model": "ageofthegods:block/shale/shale1", "weight": 1
},
{
"model": "ageofthegods:block/shale/shale2", "weight": 1
}
]
}
}
@@ -0,0 +1,15 @@
{
"variants": {
"": [
{
"model": "ageofthegods:block/shale/shale_grass", "weight": 1
},
{
"model": "ageofthegods:block/shale/shale_grass2", "weight": 1
},
{
"model": "ageofthegods:block/shale/shale_grass3", "weight": 1
}
]
}
}
@@ -0,0 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "ageofthegods:block/limestone/limestone"
}
}
@@ -0,0 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "ageofthegods:block/limestone/limestone2"
}
}
@@ -0,0 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "ageofthegods:block/limestone/limestone3"
}
}
@@ -0,0 +1,34 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "ageofthegods:block/limestone/limestonegrassside",
"bottom": "ageofthegods:block/limestone/limestone",
"top": "ageofthegods:block/grass/grasstopgrey",
"side": "ageofthegods:block/limestone/limestonegrassside",
"overlay": "ageofthegods:block/grass/grasssideoverlay"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"down": { "texture": "#bottom", "cullface": "down" },
"up": { "texture": "#top", "cullface": "up", "tintindex": 0 },
"north": { "texture": "#side", "cullface": "north" },
"south": { "texture": "#side", "cullface": "south" },
"west": { "texture": "#side", "cullface": "west" },
"east": { "texture": "#side", "cullface": "east" }
}
},
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"north": { "texture": "#overlay", "cullface": "north", "tintindex": 0 },
"south": { "texture": "#overlay", "cullface": "south", "tintindex": 0 },
"west": { "texture": "#overlay", "cullface": "west", "tintindex": 0 },
"east": { "texture": "#overlay", "cullface": "east", "tintindex": 0 }
}
}
]
}
@@ -0,0 +1,34 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "ageofthegods:block/limestone/limestonegrassside",
"bottom": "ageofthegods:block/limestone/limestone",
"top": "ageofthegods:block/grass/grasstopgrey2",
"side": "ageofthegods:block/limestone/limestonegrassside",
"overlay": "ageofthegods:block/grass/grasssideoverlay"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"down": { "texture": "#bottom", "cullface": "down" },
"up": { "texture": "#top", "cullface": "up", "tintindex": 0 },
"north": { "texture": "#side", "cullface": "north" },
"south": { "texture": "#side", "cullface": "south" },
"west": { "texture": "#side", "cullface": "west" },
"east": { "texture": "#side", "cullface": "east" }
}
},
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"north": { "texture": "#overlay", "cullface": "north", "tintindex": 0 },
"south": { "texture": "#overlay", "cullface": "south", "tintindex": 0 },
"west": { "texture": "#overlay", "cullface": "west", "tintindex": 0 },
"east": { "texture": "#overlay", "cullface": "east", "tintindex": 0 }
}
}
]
}
@@ -0,0 +1,34 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "ageofthegods:block/limestone/limestonegrassside",
"bottom": "ageofthegods:block/limestone/limestone",
"top": "ageofthegods:block/grass/grasstopgrey3",
"side": "ageofthegods:block/limestone/limestonegrassside",
"overlay": "ageofthegods:block/grass/grasssideoverlay"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"down": { "texture": "#bottom", "cullface": "down" },
"up": { "texture": "#top", "cullface": "up", "tintindex": 0 },
"north": { "texture": "#side", "cullface": "north" },
"south": { "texture": "#side", "cullface": "south" },
"west": { "texture": "#side", "cullface": "west" },
"east": { "texture": "#side", "cullface": "east" }
}
},
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"north": { "texture": "#overlay", "cullface": "north", "tintindex": 0 },
"south": { "texture": "#overlay", "cullface": "south", "tintindex": 0 },
"west": { "texture": "#overlay", "cullface": "west", "tintindex": 0 },
"east": { "texture": "#overlay", "cullface": "east", "tintindex": 0 }
}
}
]
}
@@ -0,0 +1,12 @@
{
"parent": "block/cube",
"textures": {
"down": "ageofthegods:block/shale/shaletop1",
"up": "ageofthegods:block/shale/shaletop1",
"north": "ageofthegods:block/shale/shaleside",
"east": "ageofthegods:block/shale/shaleside",
"south": "ageofthegods:block/shale/shaleside",
"west": "ageofthegods:block/shale/shaleside",
"particle": "ageofthegods:block/shale/shaleside"
}
}
@@ -0,0 +1,12 @@
{
"parent": "block/cube",
"textures": {
"down": "ageofthegods:block/shale/shaletop2",
"up": "ageofthegods:block/shale/shaletop2",
"north": "ageofthegods:block/shale/shaleside",
"east": "ageofthegods:block/shale/shaleside",
"south": "ageofthegods:block/shale/shaleside",
"west": "ageofthegods:block/shale/shaleside",
"particle": "ageofthegods:block/shale/shaleside"
}
}
@@ -0,0 +1,34 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "ageofthegods:block/shale/shalegrassside",
"bottom": "ageofthegods:block/shale/shaletop1",
"top": "ageofthegods:block/grass/grasstopgrey",
"side": "ageofthegods:block/shale/shalegrassside",
"overlay": "ageofthegods:block/grass/grasssideoverlay"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"down": { "texture": "#bottom", "cullface": "down" },
"up": { "texture": "#top", "cullface": "up", "tintindex": 0 },
"north": { "texture": "#side", "cullface": "north" },
"south": { "texture": "#side", "cullface": "south" },
"west": { "texture": "#side", "cullface": "west" },
"east": { "texture": "#side", "cullface": "east" }
}
},
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"north": { "texture": "#overlay", "cullface": "north", "tintindex": 0 },
"south": { "texture": "#overlay", "cullface": "south", "tintindex": 0 },
"west": { "texture": "#overlay", "cullface": "west", "tintindex": 0 },
"east": { "texture": "#overlay", "cullface": "east", "tintindex": 0 }
}
}
]
}
@@ -0,0 +1,34 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "ageofthegods:block/shale/shalegrassside",
"bottom": "ageofthegods:block/shale/shaletop1",
"top": "ageofthegods:block/grass/grasstopgrey2",
"side": "ageofthegods:block/shale/shalegrassside",
"overlay": "ageofthegods:block/grass/grasssideoverlay"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"down": { "texture": "#bottom", "cullface": "down" },
"up": { "texture": "#top", "cullface": "up", "tintindex": 0 },
"north": { "texture": "#side", "cullface": "north" },
"south": { "texture": "#side", "cullface": "south" },
"west": { "texture": "#side", "cullface": "west" },
"east": { "texture": "#side", "cullface": "east" }
}
},
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"north": { "texture": "#overlay", "cullface": "north", "tintindex": 0 },
"south": { "texture": "#overlay", "cullface": "south", "tintindex": 0 },
"west": { "texture": "#overlay", "cullface": "west", "tintindex": 0 },
"east": { "texture": "#overlay", "cullface": "east", "tintindex": 0 }
}
}
]
}
@@ -0,0 +1,34 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "ageofthegods:block/shale/shalegrassside",
"bottom": "ageofthegods:block/shale/shaletop1",
"top": "ageofthegods:block/grass/grasstopgrey3",
"side": "ageofthegods:block/shale/shalegrassside",
"overlay": "ageofthegods:block/shale/shalegrassoverlayl"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"down": { "texture": "#bottom", "cullface": "down" },
"up": { "texture": "#top", "cullface": "up", "tintindex": 0 },
"north": { "texture": "#side", "cullface": "north" },
"south": { "texture": "#side", "cullface": "south" },
"west": { "texture": "#side", "cullface": "west" },
"east": { "texture": "#side", "cullface": "east" }
}
},
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"north": { "texture": "#overlay", "cullface": "north", "tintindex": 0 },
"south": { "texture": "#overlay", "cullface": "south", "tintindex": 0 },
"west": { "texture": "#overlay", "cullface": "west", "tintindex": 0 },
"east": { "texture": "#overlay", "cullface": "east", "tintindex": 0 }
}
}
]
}
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "ageofthegods:block/limestone_block"
}
}
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "ageofthegods:block/shale_block"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1000 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

@@ -0,0 +1,64 @@
{
"has_precipitation": true,
"temperature": 0.7,
"downfall": 0.8,
"temperature_modifier": "none",
"effects": {
"water_color": 4311792,
"grass_color": 13162858,
"foliage_color": 9226315,
"ambient_loop_sound": "minecraft:ambient.cave",
"mood_sound": {
"sound": "minecraft:ambient.cave",
"tick_delay": 6000,
"block_search_extent": 8,
"offset": 2.0
}
},
"attributes": {
"minecraft:visual/sky_color": 8906751,
"minecraft:visual/fog_color": 16777215,
"minecraft:visual/water_fog_color": 329011
},
"carvers": [
"minecraft:cave",
"minecraft:canyon"
],
"features": [
[],
[ "minecraft:lake_lava_underground", "minecraft:lake_lava_surface" ],
[ "minecraft:amethyst_geode" ],
[],
[],
[],
[
"minecraft:ore_dirt",
"minecraft:ore_coal_upper",
"minecraft:ore_coal_lower",
"minecraft:ore_iron_upper",
"minecraft:ore_iron_middle",
"minecraft:ore_iron_small",
"minecraft:ore_diamond"
],
[],
[],
[ "minecraft:patch_grass_plain", "minecraft:brown_mushroom_normal" ],
[ ]
],
"creature_spawn_probability": 0.07,
"spawners": {
"monster": [
{ "type": "minecraft:spider", "weight": 100, "minCount": 4, "maxCount": 4 },
{ "type": "minecraft:zombie", "weight": 95, "minCount": 4, "maxCount": 4 }
],
"creature": [
{ "type": "minecraft:wolf", "weight": 5, "minCount": 4, "maxCount": 4 }
],
"ambient": [],
"water_creature": [],
"underground_water_creature": [],
"water_ambient": [],
"axolotls": []
},
"spawn_costs": {}
}
@@ -0,0 +1,67 @@
{
"has_precipitation": true,
"temperature": 0.3,
"downfall": 0.8,
"temperature_modifier": "none",
"effects": {
"sky_color": 8906751,
"fog_color": 3060735,
"water_color": 4311792,
"water_fog_color": 4311792,
"grass_color": 16444553,
"foliage_color": 9429794,
"ambient_loop_sound": "minecraft:ambient.cave",
"mood_sound": {
"sound": "minecraft:ambient.cave",
"tick_delay": 6000,
"block_search_extent": 8,
"offset": 2.0
}
},
"attributes": {
"minecraft:visual/sky_color": 8906751,
"minecraft:visual/fog_color": 16777215,
"minecraft:visual/water_fog_color": 329011
},
"carvers": [
"minecraft:cave",
"minecraft:canyon"
],
"features": [
[],
[ "minecraft:lake_lava_underground", "minecraft:lake_lava_surface" ],
[ "minecraft:amethyst_geode" ],
[],
[],
[],
[
"minecraft:ore_dirt",
"minecraft:ore_coal_upper",
"minecraft:ore_coal_lower",
"minecraft:ore_iron_upper",
"minecraft:ore_iron_middle",
"minecraft:ore_iron_small",
"minecraft:ore_diamond"
],
[],
[],
[ "minecraft:patch_grass_plain", "minecraft:brown_mushroom_normal" ],
[ ]
],
"creature_spawn_probability": 0.07,
"spawners": {
"monster": [
{ "type": "minecraft:spider", "weight": 100, "minCount": 4, "maxCount": 4 },
{ "type": "minecraft:zombie", "weight": 95, "minCount": 4, "maxCount": 4 }
],
"creature": [
{ "type": "minecraft:wolf", "weight": 5, "minCount": 4, "maxCount": 4 }
],
"ambient": [],
"water_creature": [],
"underground_water_creature": [],
"water_ambient": [],
"axolotls": []
},
"spawn_costs": {}
}
@@ -0,0 +1,36 @@
{
"type": "minecraft:overworld",
"generator": {
"type": "minecraft:noise",
"settings": "minecraft:overworld",
"biome_source": {
"type": "minecraft:multi_noise",
"biomes": [
{
"biome": "ageofthegods:garrigue",
"parameters": {
"temperature": [-1.0, -0.1],
"humidity": [-1.0, 1.0],
"continentalness": [-1.2, 1.0],
"erosion": [-1.0, 1.0],
"weirdness": [-1.0, 1.0],
"depth": 0.0,
"offset": 0.0
}
},
{
"biome": "ageofthegods:maquis_shrubland",
"parameters": {
"temperature": [0.1, 1.0],
"humidity": [-1.0, 1.0],
"continentalness": [-1.2, 1.0],
"erosion": [-1.0, 1.0],
"weirdness": [-1.0, 1.0],
"depth": 0.0,
"offset": 0.0
}
}
]
}
}
}
@@ -0,0 +1,43 @@
{
"attributes": {
"minecraft:audio/background_music": {
"creative": {
"max_delay": 24000,
"min_delay": 12000,
"sound": "minecraft:music.creative"
},
"default": {
"max_delay": 24000,
"min_delay": 12000,
"sound": "minecraft:music.game"
}
},
"minecraft:gameplay/eyeblossom_open": true,
"minecraft:gameplay/creaking_active": true,
"minecraft:visual/cloud_height": 240,
"minecraft:visual/cloud_color": "#ccffffff",
"minecraft:visual/ambient_light_color": "#0a0a0a",
"minecraft:gameplay/can_start_raid": true,
"minecraft:gameplay/respawn_anchor_works": false
},
"default_clock": "minecraft:overworld",
"timelines": "#minecraft:in_overworld",
"ambient_light": 0.0,
"bed_works": true,
"coordinate_scale": 1.0,
"effects": "minecraft:overworld",
"has_ceiling": false,
"has_raids": true,
"has_skylight": true,
"height": 512,
"infiniburn": "#minecraft:infiniburn_overworld",
"logical_height": 512,
"min_y": -64,
"monster_spawn_light_level": 0,
"monster_spawn_block_light_limit": 0,
"natural": true,
"piglin_safe": false,
"respawn_anchor_works": false,
"ultrawarm": false,
"has_ender_dragon_fight": false
}
@@ -0,0 +1,9 @@
{
"replace": false,
"values": [
"ageofthegods:limestone_grass_block",
"ageofthegods:limestone_block",
"ageofthegods:shale_grass_block",
"ageofthegods:shale_block"
]
}
+7
View File
@@ -0,0 +1,7 @@
{
"pack": {
"min_format": 100.0,
"max_format": 101.1,
"description": ""
}
}