Skip to content

Commit 0fce2c1

Browse files
author
afroraydude
committed
@afroraydude fixed the biomeManager
1 parent 928dc0b commit 0fce2c1

File tree

5 files changed

+120
-3
lines changed

5 files changed

+120
-3
lines changed

common/com/emc/emc.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
import cpw.mods.fml.common.network.NetworkMod;
3030
import cpw.mods.fml.common.registry.GameRegistry;
3131

32-
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
33-
@Mod(modid = emcLib.ID, name = emcLib.NAME, version = emcLib.VERSION)
32+
//@NetworkMod(clientSideRequired = true, serverSideRequired = false)
33+
//@Mod(modid = emcLib.ID, name = emcLib.NAME, version = emcLib.VERSION)
3434

3535
public class emc {
3636

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
// Date: 8/29/2013 10:58:46 PM
2+
// Template version 1.1
3+
// Java generated by Techne
4+
// Keep in mind that you still need to fill in some blanks
5+
// - ZeuX
6+
7+
8+
9+
10+
11+
12+
package com.nexized.cross.entity.model;
13+
14+
import net.minecraft.client.model.ModelBase;
15+
import net.minecraft.client.model.ModelRenderer;
16+
import net.minecraft.entity.Entity;
17+
18+
public class ModelTESTTESTTEST extends ModelBase
19+
{
20+
//fields
21+
ModelRenderer head;
22+
ModelRenderer body;
23+
ModelRenderer rightarm;
24+
ModelRenderer leftarm;
25+
ModelRenderer rightleg;
26+
ModelRenderer leftleg;
27+
28+
public ModelTESTTESTTEST()
29+
{
30+
textureWidth = 64;
31+
textureHeight = 32;
32+
33+
head = new ModelRenderer(this, 0, 0);
34+
head.addBox(-4F, -8F, -4F, 8, 8, 8);
35+
head.setRotationPoint(0F, 0F, 0F);
36+
head.setTextureSize(64, 32);
37+
head.mirror = true;
38+
setRotation(head, 0F, 0F, 0F);
39+
body = new ModelRenderer(this, 16, 16);
40+
body.addBox(-4F, 0F, -2F, 8, 12, 4);
41+
body.setRotationPoint(0F, 0F, 0F);
42+
body.setTextureSize(64, 32);
43+
body.mirror = true;
44+
setRotation(body, 0F, 0F, 0F);
45+
rightarm = new ModelRenderer(this, 40, 16);
46+
rightarm.addBox(-3F, -2F, -2F, 4, 12, 4);
47+
rightarm.setRotationPoint(-5F, 2F, 0F);
48+
rightarm.setTextureSize(64, 32);
49+
rightarm.mirror = true;
50+
setRotation(rightarm, 0F, 0F, 0F);
51+
leftarm = new ModelRenderer(this, 40, 16);
52+
leftarm.addBox(-1F, -2F, -2F, 4, 12, 4);
53+
leftarm.setRotationPoint(5F, 2F, 0F);
54+
leftarm.setTextureSize(64, 32);
55+
leftarm.mirror = true;
56+
setRotation(leftarm, 0F, 0F, 0F);
57+
rightleg = new ModelRenderer(this, 0, 16);
58+
rightleg.addBox(-2F, 0F, -2F, 4, 12, 4);
59+
rightleg.setRotationPoint(-2F, 12F, 0F);
60+
rightleg.setTextureSize(64, 32);
61+
rightleg.mirror = true;
62+
setRotation(rightleg, 0F, 0F, 0F);
63+
leftleg = new ModelRenderer(this, 0, 16);
64+
leftleg.addBox(-2F, 0F, -2F, 4, 12, 4);
65+
leftleg.setRotationPoint(2F, 12F, 0F);
66+
leftleg.setTextureSize(64, 32);
67+
leftleg.mirror = true;
68+
setRotation(leftleg, 0F, 0F, 0F);
69+
}
70+
71+
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
72+
{
73+
super.render(entity, f, f1, f2, f3, f4, f5);
74+
setRotationAngles(f, f1, f2, f3, f4, f5);
75+
head.render(f5);
76+
body.render(f5);
77+
rightarm.render(f5);
78+
leftarm.render(f5);
79+
rightleg.render(f5);
80+
leftleg.render(f5);
81+
}
82+
83+
private void setRotation(ModelRenderer model, float x, float y, float z)
84+
{
85+
model.rotateAngleX = x;
86+
model.rotateAngleY = y;
87+
model.rotateAngleZ = z;
88+
}
89+
90+
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
91+
{
92+
93+
}
94+
95+
}

common/com/nexized/cross/manager/biomeManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.io.File;
44

55
import com.nexized.cross.conf.idManager;
6+
import com.nexized.cross.world.biome.BiomeDoOctoBase;
67
import com.nexized.cross.world.biome.BiomeIceDesert;
78
import com.nexized.cross.world.biome.BiomeRedwoodForest;
89
import com.nexized.emec.configuration.emecConfigurationFile;
@@ -27,12 +28,14 @@ public class biomeManager {
2728
// Define Biomes
2829
public static BiomeGenBase iceDesert;
2930
public static BiomeGenBase redwoodForest;
31+
public static BiomeGenBase doOctoBase;
3032

3133
// Defined Biomes
3234
//TODO: Red rock mountains and canyons, Redwood forests(requires custom trees), Oasis, City(Can we really do this?), Wheat fields, Savanna(requires custom trees), Floating islands(Can we really do this?), Subway tunnels(This is not even a biome!!!), and Fairie Forest
3335
public static void init() {
3436
iceDesert = (new BiomeIceDesert(emecConfigurationFile.iceb).setBiomeName("Ice Desert").setMinMaxHeight(0.3F, 1.5F).setEnableSnow().setTemperatureRainfall(0.05F, 0.08F));
3537
redwoodForest = (new BiomeRedwoodForest(emecConfigurationFile.redwoodb).setBiomeName("Redwood Forest"));
38+
doOctoBase = (new BiomeDoOctoBase(100).setBiomeName("Tutorial").setMinMaxHeight(0.3F, 0.31F));
3639
GameRegistry.addBiome(iceDesert);
3740

3841
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.nexized.cross.world.biome;
2+
3+
import com.nexized.cross.manager.blockManager;
4+
5+
import net.minecraft.block.Block;
6+
import net.minecraft.world.biome.BiomeGenBase;
7+
8+
public class BiomeDoOctoBase extends BiomeGenBase{
9+
10+
public BiomeDoOctoBase(int par1) {
11+
super(par1);
12+
this.topBlock = (byte)Block.dirt.blockID;
13+
this.fillerBlock = (byte)Block.blockClay.blockID;
14+
}
15+
16+
}

common/com/nexized/emec/emec.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ public ItemStack getIconItemStack() {
146146
}
147147
@EventHandler
148148
public static void preInit (FMLPreInitializationEvent event) {
149-
emecConfigurationFile.init(event.getModConfigurationDirectory());
149+
emecConfigurationFile.init((event.getSuggestedConfigurationFile()));
150+
if (emecConfigurationFile.enableBiomes) {
151+
com.nexized.cross.manager.biomeManager.init();
152+
}
150153
}
151154
}
152155

0 commit comments

Comments
 (0)