texture change
@@ -233,7 +233,6 @@ public class dimHelper extends DimensionManager
|
|||||||
{
|
{
|
||||||
oldWorld.getChunkFromChunkCoords(entX, entZ).removeEntity(entity);
|
oldWorld.getChunkFromChunkCoords(entX, entZ).removeEntity(entity);
|
||||||
oldWorld.getChunkFromChunkCoords(entX, entZ).isModified = true;
|
oldWorld.getChunkFromChunkCoords(entX, entZ).isModified = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,22 +31,30 @@ public class MobObelisk extends EntityFlying implements IMob
|
|||||||
int aggro = 0;
|
int aggro = 0;
|
||||||
byte textureState = 0;
|
byte textureState = 0;
|
||||||
boolean hasJumped= false;
|
boolean hasJumped= false;
|
||||||
|
float scaleFactor = 0;
|
||||||
|
|
||||||
int destX=0;
|
int destX=0;
|
||||||
int destY=0;
|
int destY=0;
|
||||||
int destZ=0;
|
int destZ=0;
|
||||||
public MobObelisk(World par1World)
|
public MobObelisk(World par1World)
|
||||||
{
|
{
|
||||||
|
|
||||||
super(par1World);
|
super(par1World);
|
||||||
this.texture="/mods/DimensionalDoors/textures/mobs/Monolith0.png";
|
this.texture="/mods/DimensionalDoors/textures/mobs/Monolith0.png";
|
||||||
this.setSize(2F, 8.0F);
|
this.setSize(2F, 8.0F);
|
||||||
this.noClip=true;
|
this.noClip=true;
|
||||||
|
this.scaleFactor= (float) (rand.nextDouble()+1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO Auto-generated constructor stub
|
// TODO Auto-generated constructor stub
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean canDespawn()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxHealth()
|
public int getMaxHealth()
|
||||||
@@ -60,6 +68,11 @@ public class MobObelisk extends EntityFlying implements IMob
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float getRenderSizeModifier()
|
||||||
|
{
|
||||||
|
return this.scaleFactor;
|
||||||
|
}
|
||||||
|
|
||||||
public void setEntityPosition(Entity entity, double x, double y, double z)
|
public void setEntityPosition(Entity entity, double x, double y, double z)
|
||||||
{
|
{
|
||||||
entity.lastTickPosX = entity.prevPosX = entity.posX = x;
|
entity.lastTickPosX = entity.prevPosX = entity.posX = x;
|
||||||
@@ -394,6 +407,7 @@ public class MobObelisk extends EntityFlying implements IMob
|
|||||||
par1NBTTagCompound.setInteger("aggro", this.aggro);
|
par1NBTTagCompound.setInteger("aggro", this.aggro);
|
||||||
par1NBTTagCompound.setByte("textureState", this.textureState);
|
par1NBTTagCompound.setByte("textureState", this.textureState);
|
||||||
par1NBTTagCompound.setBoolean("hasJumped", this.hasJumped);
|
par1NBTTagCompound.setBoolean("hasJumped", this.hasJumped);
|
||||||
|
par1NBTTagCompound.setFloat("scaleFactor", this.scaleFactor);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -407,6 +421,8 @@ public class MobObelisk extends EntityFlying implements IMob
|
|||||||
this.aggro=par1NBTTagCompound.getInteger("aggro");
|
this.aggro=par1NBTTagCompound.getInteger("aggro");
|
||||||
this.textureState=par1NBTTagCompound.getByte("textureState");
|
this.textureState=par1NBTTagCompound.getByte("textureState");
|
||||||
this.hasJumped=par1NBTTagCompound.getBoolean("hasJumped");
|
this.hasJumped=par1NBTTagCompound.getBoolean("hasJumped");
|
||||||
|
this.scaleFactor=par1NBTTagCompound.getFloat("scaleFactor");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ package StevenDimDoors.mod_pocketDimClient;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import StevenDimDoors.mod_pocketDim.ticking.MobObelisk;
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelBase;
|
import net.minecraft.client.model.ModelBase;
|
||||||
import net.minecraft.client.model.ModelRenderer;
|
import net.minecraft.client.model.ModelRenderer;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@@ -21,12 +27,15 @@ public class ModelMobObelisk extends ModelBase
|
|||||||
{
|
{
|
||||||
//fields
|
//fields
|
||||||
ModelRenderer wholemonolith;
|
ModelRenderer wholemonolith;
|
||||||
|
Random rand = new Random();
|
||||||
|
|
||||||
|
|
||||||
public ModelMobObelisk()
|
public ModelMobObelisk()
|
||||||
{
|
{
|
||||||
textureWidth = 256;
|
textureWidth = 256;
|
||||||
textureHeight = 256;
|
textureHeight = 256;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wholemonolith = new ModelRenderer(this, 0, 0);
|
wholemonolith = new ModelRenderer(this, 0, 0);
|
||||||
wholemonolith.addBox(-48/2F,-108F/1.3F, -12/2F, 48, 108, 12);
|
wholemonolith.addBox(-48/2F,-108F/1.3F, -12/2F, 48, 108, 12);
|
||||||
@@ -44,6 +53,9 @@ public class ModelMobObelisk extends ModelBase
|
|||||||
{
|
{
|
||||||
super.render(par1Entity, 0, 0, 0, 0, 0, 0);
|
super.render(par1Entity, 0, 0, 0, 0, 0, 0);
|
||||||
this.setRotationAngles(0, 0, 0, 0, 0,0, par1Entity);
|
this.setRotationAngles(0, 0, 0, 0, 0,0, par1Entity);
|
||||||
|
|
||||||
|
|
||||||
|
GL11.glScalef(((MobObelisk) par1Entity).getRenderSizeModifier(), ((MobObelisk) par1Entity).getRenderSizeModifier(), ((MobObelisk) par1Entity).getRenderSizeModifier());
|
||||||
wholemonolith.render(par7);
|
wholemonolith.render(par7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 20 KiB |