Permalink
Browse files

Fixed a server side crash.

  • Loading branch information...
Ri5ux committed Nov 12, 2018
1 parent 4a8497c commit fdf223d432618918e78b4b445d8a84d7d6790bcb
@@ -70,7 +70,6 @@ public void init(FMLInitializationEvent event)
dimensions().init(event);
materials().init(event);
world().init(event);
biomeColors().init(event);
interfaces().init(event);
events().init(event);
commands().init(event);
@@ -84,6 +83,7 @@ public void init(FMLInitializationEvent event)
public void initClient(FMLInitializationEvent event)
{
renderers().init(event);
biomeColors().init(event);
}
@Mod.EventHandler
@@ -136,6 +136,7 @@ public static BlockHandler blocks()
return blocks == null ? blocks = new BlockHandler() : blocks;
}
@SideOnly(Side.CLIENT)
public static BiomeColorHandler biomeColors()
{
return BiomeColorHandler.instance;
@@ -26,15 +26,15 @@
public class Settings implements IPreInitEvent, IFlexibleConfiguration
{
public static final Settings instance = new Settings();
public static final Settings instance = new Settings();
private Configuration configuration;
private final ArrayList<ConfigSetting> allSettings = new ArrayList<ConfigSetting>();
private final ArrayList<ConfigSetting> allSettings = new ArrayList<ConfigSetting>();
private final String CATEGORY_OTHER = "general";
private final String CATEGORY_BIOMES = "biomes";
private final String CATEGORY_SPAWNING = "spawning";
private final String CATEGORY_OTHER = "general";
private final String CATEGORY_BIOMES = "biomes";
private final String CATEGORY_SPAWNING = "spawning";
private ConfigSetting explosionsEnabled;
private ConfigSetting plasmaCannonExplosions;
private ConfigSetting updaterEnabled;
@@ -134,11 +134,14 @@ public void pre(FMLPreInitializationEvent evt)
overworldSpawnsEnabled = new ConfigSettingBoolean(this, configuration.get(CATEGORY_SPAWNING, "overworld_spawning", true, "If disabled, no mobs from this mod will spawn in the overworld.")).setRequiresRestart();
autoSpawnsEnabled = new ConfigSettingBoolean(this, configuration.get(CATEGORY_SPAWNING, "auto_spawning", true, "If disabled, no mobs from this mod will spawn.")).setRequiresRestart();
evolvedXenomorphSpawns = new ConfigSettingBoolean(this, configuration.get(CATEGORY_SPAWNING, "mature_spawns", true, "If disabled, no mature alien states will spawn naturally.")).setRequiresRestart();
System.out.println("Listing Overworld Biome IDs for configuration settings...");
for (Biome b : EntityHandler.getOverworldBiomeList())
if (FMLCommonHandler.instance().getSide() == Side.CLIENT)
{
MDX.log().info(b.getBiomeName() + " : " + b.getRegistryName());
System.out.println("Listing Overworld Biome IDs for configuration settings...");
for (Biome b : EntityHandler.getOverworldBiomeList())
{
MDX.log().info(b.getBiomeName() + " : " + b.getRegistryName());
}
}
spawnsAlien = new ConfigSettingBiomeList(this, configuration.get(CATEGORY_SPAWNING, "alien_biomes", ConfigSettingBiomeList.biomeIdListForConfig(EntityHandler.DEFAULT_ALIEN_SPAWNS), "List of biomes for aliens to spawn in.")).setRequiresRestart();
@@ -157,7 +160,7 @@ public Configuration getConfig()
{
return configuration;
}
public boolean areOverworldSpawnsEnabled()
{
return (Boolean) overworldSpawnsEnabled.value();
@@ -217,35 +220,35 @@ public float globalSoundVolume()
{
return (float) ((Integer) this.globalSoundVolume.value()) / 100F;
}
public boolean isHalloweenEventEnabled()
{
Date date = new Date();
LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
return (localDate.getMonthValue() == 10 && localDate.getDayOfMonth() >= 28 || localDate.getMonthValue() == 11 && localDate.getDayOfMonth() <= 3);
}
public ConfigSettingBiomeList getSpawnsAlien()
{
return (ConfigSettingBiomeList) spawnsAlien;
}
public ConfigSettingBiomeList getSpawnsAquaticAlien()
{
return (ConfigSettingBiomeList) spawnsAquaticAlien;
}
public ConfigSettingBiomeList getSpawnsMarine()
{
return (ConfigSettingBiomeList) spawnsMarine;
}
public ConfigSettingBiomeList getSpawnsPredator()
{
return (ConfigSettingBiomeList) spawnsPredator;
}
public ConfigSettingBiomeList getSpawnsVarda()
{
return (ConfigSettingBiomeList) spawnsVarda;
@@ -1,8 +1,5 @@
package org.avp.client.render;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Date;
import java.util.Random;
import javax.annotation.Nullable;
@@ -14,17 +14,15 @@
public void render(TileEntityGroundFern tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
OpenGL.pushMatrix();
{
OpenGL.translate(x + 0.5F, y, z + 0.5F);
OpenGL.scale(tile.getPlantSize().getScale(), tile.getPlantSize().getScale(), tile.getPlantSize().getScale());
OpenGL.translate(tile.getOffset().x, 1.455F, tile.getOffset().z);
OpenGL.enable(GL12.GL_RESCALE_NORMAL);
OpenGL.rotate(180F, 1, 0, 0);
OpenGL.rotate(tile);
OpenGL.color(tile.getPlantColor().r(), tile.getPlantColor().g(), tile.getPlantColor().b());
AliensVsPredator.resources().models().GROUND_FERN.draw(tile);
OpenGL.color(1F, 1F, 1F);
}
OpenGL.translate(x + 0.5F, y, z + 0.5F);
OpenGL.scale(tile.getPlantSize().getScale(), tile.getPlantSize().getScale(), tile.getPlantSize().getScale());
OpenGL.translate(tile.getOffset().x, 1.455F, tile.getOffset().z);
OpenGL.enable(GL12.GL_RESCALE_NORMAL);
OpenGL.rotate(180F, 1, 0, 0);
OpenGL.rotate(tile);
OpenGL.color(tile.getPlantColor().r(), tile.getPlantColor().g(), tile.getPlantColor().b());
AliensVsPredator.resources().models().GROUND_FERN.draw(tile);
OpenGL.color(1F, 1F, 1F);
OpenGL.popMatrix();
}
}

0 comments on commit fdf223d

Please sign in to comment.