Fixed door placement on rifts,

working on biomes and mob
This commit is contained in:
StevenRS11
2013-05-21 14:49:14 -04:00
parent 6407b1be71
commit 42f7057f3d
9 changed files with 142 additions and 12 deletions

View File

@@ -28,7 +28,7 @@ public class LimboProvider extends WorldProvider
public LimboProvider()
{
this.hasNoSky=true;
super.worldChunkMgr = new WorldChunkManagerHell(mod_pocketDim.limboBiome, 0.0F, 0.0F);
super.worldChunkMgr = new WorldChunkManagerLimbo();

View File

@@ -19,7 +19,32 @@ import net.minecraftforge.event.terraingen.*;
import static net.minecraft.world.biome.BiomeGenBase.*;
public class WorldChunkManagerLimbo extends WorldChunkManager
{
public static ArrayList<BiomeGenBase> allowedBiomes = new ArrayList<BiomeGenBase>(Arrays.asList(forest, plains, taiga, taigaHills, forestHills, jungle. jungleHills));
BiomeGenBase biomeGenerator = mod_pocketDim.limboBiome;
public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5)
{
return new BiomeGenBase[] {mod_pocketDim.limboBiome};
}
public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5, boolean par6)
{
return new BiomeGenBase[] {mod_pocketDim.limboBiome};
}
public BiomeGenBase getBiomeGenAt(int par1, int par2)
{
return mod_pocketDim.limboBiome;
}
public boolean areBiomesViable(int par1, int par2, int par3, List par4List)
{
return par4List.contains(this.biomeGenerator);
}
}

View File

@@ -211,7 +211,7 @@ public class ItemRiftBlade extends itemDimDoor
Block var11 = mod_pocketDim.transientDoor;
int par4 = hit.blockX;
int par5 = hit.blockY-1;
int par5 = hit.blockY;
int par6 = hit.blockZ;
int par7 = 0 ;
@@ -222,14 +222,14 @@ public class ItemRiftBlade extends itemDimDoor
{
int var12 = MathHelper.floor_double((double)((par3EntityPlayer.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
if (!this.canPlace(par2World, par4, par5, par6, var12)||!this.canPlace(par2World, par4, par5+1, par6, var12)||dimHelper.instance.getLinkDataFromCoords(par4, par5+1, par6, par2World)==null)
if (!this.canPlace(par2World, par4, par5, par6, var12)||!this.canPlace(par2World, par4, par5-1, par6, var12)||dimHelper.instance.getLinkDataFromCoords(par4, par5, par6, par2World)==null)
{
return par1ItemStack;
}
else
{
placeDoorBlock(par2World, par4, par5, par6, var12, var11);
placeDoorBlock(par2World, par4, par5-1, par6, var12, var11);
didFindThing=true;

View File

@@ -41,6 +41,7 @@ public class ItemStableFabric extends Item
if(!par3World.isRemote)
{
System.out.println("Block metadata is "+par3World.getBlockMetadata(par4, par5, par6));
System.out.println(par3World.getBiomeGenForCoords(par4, par6).biomeName);
this.onItemRightClick(par1ItemStack, par3World, par2EntityPlayer);
}
//System.out.println("Block texture data is "+Block.blocksList[par3World.getBlockId(par4, par5, par6)].getBlockTexture(par3World,par4, par5, par6,par7).getIconName());

View File

@@ -157,7 +157,7 @@ public class itemDimDoor extends ItemDoor
}
int par4 = hit.blockX;
int par5 = hit.blockY-1;
int par5 = hit.blockY;
int par6 = hit.blockZ;
int par7 = 0 ;
@@ -168,14 +168,14 @@ public class itemDimDoor extends ItemDoor
{
int var12 = MathHelper.floor_double((double)((par3EntityPlayer.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
if (!this.canPlace(par2World, par4, par5, par6, var12)||!this.canPlace(par2World, par4, par5-1, par6, var12)||dimHelper.instance.getLinkDataFromCoords(par4, par5+1, par6, par2World)==null)
if (!this.canPlace(par2World, par4, par5, par6, var12)||!this.canPlace(par2World, par4, par5-1, par6, var12)||dimHelper.instance.getLinkDataFromCoords(par4, par5, par6, par2World)==null)
{
return par1ItemStack;
}
else
{
placeDoorBlock(par2World, par4, par5, par6, var12, var11);
placeDoorBlock(par2World, par4, par5-1, par6, var12, var11);

View File

@@ -10,6 +10,7 @@ public class MobObelisk extends EntityMob
{
super(par1World);
this.texture="/mods/DimensionalDoors/textures/mobs/Monolith.png";
this.setSize(4.0F, 4.0F);
// TODO Auto-generated constructor stub
}