-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a6da81
commit cce63e7
Showing
6 changed files
with
168 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/main/java/me/outspending/biomesapi/CustomBiomeRegistry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
124 changes: 124 additions & 0 deletions
124
src/main/java/me/outspending/biomesapi/biome/CustomBiomeImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
package me.outspending.biomesapi.biome; | ||
|
||
import me.outspending.biomesapi.BiomeResourceKey; | ||
import me.outspending.biomesapi.BiomeSettings; | ||
import me.outspending.biomesapi.ParticleRenderer; | ||
import me.outspending.biomesapi.annotations.AsOf; | ||
import net.minecraft.resources.ResourceLocation; | ||
import org.bukkit.NamespacedKey; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
@AsOf("0.0.2") | ||
public final class CustomBiomeImpl implements CustomBiome { | ||
|
||
// Required Settings | ||
private final BiomeResourceKey resourceKey; | ||
private final BiomeSettings settings; | ||
|
||
// Required Colors | ||
private final int fogColor; | ||
private final int waterColor; | ||
private final int waterFogColor; | ||
private final int skyColor; | ||
|
||
// Optional Colors | ||
private int foliageColor = 0; | ||
private int grassColor = 0; | ||
|
||
// Optional Settings | ||
private ParticleRenderer particleRenderer; | ||
|
||
@AsOf("0.0.2") | ||
public CustomBiomeImpl( | ||
@NotNull BiomeResourceKey resourceKey, | ||
@NotNull BiomeSettings settings, | ||
|
||
int fogColor, | ||
int waterColor, | ||
int waterFogColor, | ||
int skyColor, | ||
|
||
@NotNull ParticleRenderer particleRenderer | ||
) { | ||
this.resourceKey = resourceKey; | ||
this.settings = settings; | ||
this.particleRenderer = particleRenderer; | ||
|
||
this.fogColor = fogColor; | ||
this.waterColor = waterColor; | ||
this.waterFogColor = waterFogColor; | ||
this.skyColor = skyColor; | ||
} | ||
|
||
@AsOf("0.0.2") | ||
public CustomBiomeImpl( | ||
@NotNull BiomeResourceKey resourceKey, | ||
@NotNull BiomeSettings settings, | ||
|
||
int fogColor, | ||
int waterColor, | ||
int waterFogColor, | ||
int skyColor, | ||
int foliageColor, | ||
int grassColor, | ||
|
||
@NotNull ParticleRenderer particleRenderer | ||
) { | ||
this(resourceKey, settings, fogColor, waterColor, waterFogColor, skyColor, particleRenderer); | ||
this.foliageColor = foliageColor; | ||
this.grassColor = grassColor; | ||
} | ||
|
||
@Override | ||
public @NotNull NamespacedKey toNamespacedKey() { | ||
ResourceLocation resourceLocation = resourceKey.resourceLocation(); | ||
return new NamespacedKey(resourceLocation.getNamespace(), resourceLocation.getPath()); | ||
} | ||
|
||
@Override | ||
public @NotNull BiomeResourceKey getResourceKey() { | ||
return this.resourceKey; | ||
} | ||
|
||
@Override | ||
public @NotNull BiomeSettings getSettings() { | ||
return this.settings; | ||
} | ||
|
||
@Override | ||
public int getFogColor() { | ||
return fogColor; | ||
} | ||
|
||
@Override | ||
public int getWaterColor() { | ||
return waterColor; | ||
} | ||
|
||
@Override | ||
public int getWaterFogColor() { | ||
return waterFogColor; | ||
} | ||
|
||
@Override | ||
public int getSkyColor() { | ||
return skyColor; | ||
} | ||
|
||
@Override | ||
public int getFoliageColor() { | ||
return foliageColor; | ||
} | ||
|
||
@Override | ||
public int getGrassColor() { | ||
return grassColor; | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public ParticleRenderer getParticleRenderer() { | ||
return particleRenderer; | ||
} | ||
|
||
} |