mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-20 15:20:25 +00:00
work on loom stuff
This commit is contained in:
@@ -30,7 +30,6 @@ import com.dfsek.terra.config.lang.LangUtil;
|
||||
import com.dfsek.terra.config.lang.Language;
|
||||
import com.dfsek.terra.config.pack.ConfigPack;
|
||||
import com.dfsek.terra.fabric.inventory.FabricItemHandle;
|
||||
import com.dfsek.terra.fabric.mixin.BiomeEffectsAccessor;
|
||||
import com.dfsek.terra.fabric.mixin.GeneratorTypeAccessor;
|
||||
import com.dfsek.terra.fabric.world.FabricBiome;
|
||||
import com.dfsek.terra.fabric.world.FabricTree;
|
||||
@@ -236,20 +235,15 @@ public class TerraFabricPlugin implements TerraPlugin, ModInitializer {
|
||||
generationSettings.surfaceBuilder(SurfaceBuilder.DEFAULT.withConfig(new TernarySurfaceConfig(Blocks.GRASS_BLOCK.getDefaultState(), Blocks.DIRT.getDefaultState(), Blocks.GRAVEL.getDefaultState()))); // It needs a surfacebuilder, even though we dont use it.
|
||||
generationSettings.feature(GenerationStep.Feature.VEGETAL_DECORATION, POPULATOR_CONFIGURED_FEATURE);
|
||||
|
||||
BiomeEffectsAccessor biomeEffectsAccessor = (BiomeEffectsAccessor) vanilla.getEffects();
|
||||
|
||||
BiomeEffects.Builder effects = new BiomeEffects.Builder()
|
||||
.waterColor(biomeEffectsAccessor.getWaterColor())
|
||||
.waterFogColor(biomeEffectsAccessor.getWaterFogColor())
|
||||
.fogColor(biomeEffectsAccessor.getFogColor())
|
||||
.skyColor(biomeEffectsAccessor.getSkyColor())
|
||||
.grassColorModifier(biomeEffectsAccessor.getGrassColorModifier());
|
||||
if(biomeEffectsAccessor.getGrassColor().isPresent()) {
|
||||
effects.grassColor(biomeEffectsAccessor.getGrassColor().get());
|
||||
}
|
||||
if(biomeEffectsAccessor.getFoliageColor().isPresent()) {
|
||||
effects.foliageColor(biomeEffectsAccessor.getFoliageColor().get());
|
||||
}
|
||||
.waterColor(vanilla.getEffects().waterColor)
|
||||
.waterFogColor(vanilla.getEffects().waterFogColor)
|
||||
.fogColor(vanilla.getEffects().fogColor)
|
||||
.skyColor(vanilla.getEffects().skyColor)
|
||||
.grassColorModifier(vanilla.getEffects().grassColorModifier);
|
||||
vanilla.getEffects().grassColor.ifPresent(effects::grassColor);
|
||||
vanilla.getEffects().foliageColor.ifPresent(effects::foliageColor);
|
||||
|
||||
return (new Biome.Builder())
|
||||
.precipitation(vanilla.getPrecipitation())
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.dfsek.terra.fabric.mixin;
|
||||
|
||||
import net.minecraft.world.biome.BiomeEffects;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Mixin(BiomeEffects.class)
|
||||
public interface BiomeEffectsAccessor {
|
||||
@Accessor
|
||||
int getFogColor();
|
||||
|
||||
@Accessor
|
||||
int getWaterColor();
|
||||
|
||||
@Accessor
|
||||
int getWaterFogColor();
|
||||
|
||||
@Accessor
|
||||
int getSkyColor();
|
||||
|
||||
@Accessor
|
||||
Optional<Integer> getFoliageColor();
|
||||
|
||||
@Accessor
|
||||
Optional<Integer> getGrassColor();
|
||||
|
||||
@Accessor
|
||||
BiomeEffects.GrassColorModifier getGrassColorModifier();
|
||||
}
|
||||
@@ -15,9 +15,6 @@ public interface GeneratorTypeAccessor {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Accessor
|
||||
Text getTranslationKey();
|
||||
|
||||
@Mutable
|
||||
@Accessor
|
||||
void setTranslationKey(Text translationKey);
|
||||
|
||||
@@ -6,4 +6,14 @@ accessible field net/minecraft/server/world/ServerWorld worldProperties Lnet/min
|
||||
|
||||
accessible method net/minecraft/world/MobSpawnerLogic getEntityId ()Lnet/minecraft/util/Identifier;
|
||||
|
||||
accessible field net/minecraft/state/State PROPERTY_MAP_PRINTER Ljava/util/function/Function;
|
||||
accessible field net/minecraft/state/State PROPERTY_MAP_PRINTER Ljava/util/function/Function;
|
||||
|
||||
|
||||
accessible field net/minecraft/world/biome/BiomeEffects fogColor I
|
||||
accessible field net/minecraft/world/biome/BiomeEffects waterColor I
|
||||
accessible field net/minecraft/world/biome/BiomeEffects waterFogColor I
|
||||
accessible field net/minecraft/world/biome/BiomeEffects skyColor I
|
||||
|
||||
accessible field net/minecraft/world/biome/BiomeEffects foliageColor Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/biome/BiomeEffects grassColor Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/biome/BiomeEffects grassColorModifier Lnet/minecraft/world/biome/BiomeEffects$GrassColorModifier;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"package": "com.dfsek.terra.fabric.mixin",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"mixins": [
|
||||
"BiomeEffectsAccessor"
|
||||
],
|
||||
"client": [
|
||||
"GeneratorTypeAccessor"
|
||||
|
||||
Reference in New Issue
Block a user