Finishing Textures
This commit is contained in:
@@ -36,15 +36,15 @@ public class EventHookContainer
|
||||
@ForgeSubscribe
|
||||
public void onSoundLoad(SoundLoadEvent event)
|
||||
{
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/monk.ogg");
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/crack.ogg");
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/tearing.ogg");
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/rift.ogg");
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftStart.ogg");
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftEnd.ogg");
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftClose.ogg");
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftDoor.ogg");
|
||||
event.manager.soundPoolMusic.addSound("mods/DimDoors/sfx/creepy.ogg");
|
||||
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/monk.ogg");
|
||||
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/crack.ogg");
|
||||
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/tearing.ogg");
|
||||
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/rift.ogg");
|
||||
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/riftStart.ogg");
|
||||
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/riftEnd.ogg");
|
||||
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/riftClose.ogg");
|
||||
event.manager.soundPoolSounds.addSound(mod_pocketDim.modid+":/sfx/riftDoor.ogg");
|
||||
event.manager.soundPoolMusic.addSound(mod_pocketDim.modid+":/sfx/creepy.ogg");
|
||||
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
@@ -389,7 +390,7 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
|
||||
if (canUse && entity instanceof EntityPlayer)
|
||||
{
|
||||
// Dont check for non-player entites
|
||||
canUse = isEntityFacingDoor(metadata, (EntityLiving) entity);
|
||||
canUse = isEntityFacingDoor(metadata, (EntityLivingBase) entity);
|
||||
}
|
||||
if (canUse)
|
||||
{
|
||||
@@ -421,7 +422,7 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
|
||||
return (metadata & 4) != 0;
|
||||
}
|
||||
|
||||
protected static boolean isEntityFacingDoor(int metadata, EntityLiving entity)
|
||||
protected static boolean isEntityFacingDoor(int metadata, EntityLivingBase entity)
|
||||
{
|
||||
// Although any entity has the proper fields for this check,
|
||||
// we should only apply it to living entities since things
|
||||
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -39,7 +40,7 @@ public class TransientDoor extends BaseDimDoor
|
||||
if (canUse && entity instanceof EntityLiving)
|
||||
{
|
||||
// Don't check for non-living entities since it might not work right
|
||||
canUse = BaseDimDoor.isEntityFacingDoor(metadata, (EntityLiving) entity);
|
||||
canUse = BaseDimDoor.isEntityFacingDoor(metadata, (EntityLivingBase) entity);
|
||||
}
|
||||
if (canUse)
|
||||
{
|
||||
|
||||
@@ -398,11 +398,6 @@ public class DDTeleporter
|
||||
if (player != null)
|
||||
{
|
||||
newWorld.getChunkProvider().loadChunk(MathHelper.floor_double(entity.posX) >> 4, MathHelper.floor_double(entity.posZ) >> 4);
|
||||
if(difDest)
|
||||
{
|
||||
newWorld.getPlayerManager().addPlayer(player);
|
||||
}
|
||||
|
||||
// Tell Forge we're moving its players so everyone else knows.
|
||||
// Let's try doing this down here in case this is what's killing NEI.
|
||||
GameRegistry.onPlayerChangedDimension((EntityPlayer)entity);
|
||||
|
||||
@@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.ticking;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.DataWatcher;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityFlying;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
@@ -36,7 +37,6 @@ public class MobMonolith extends EntityFlying implements IMob
|
||||
public MobMonolith(World par1World)
|
||||
{
|
||||
super(par1World);
|
||||
this.texture="/mods/DimDoors/textures/mobs/Monolith0.png";
|
||||
this.setSize(3F, 9.0F);
|
||||
this.noClip=true;
|
||||
this.scaleFactor= (float) ((rand.nextDouble()/2)+1);
|
||||
@@ -88,10 +88,6 @@ public class MobMonolith extends EntityFlying implements IMob
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||
|
||||
this.texture="/mods/DimDoors/textures/mobs/Monolith"+b0+".png";
|
||||
super.onEntityUpdate();
|
||||
|
||||
if (this.isEntityAlive() && this.isEntityInsideOpaqueBlock())
|
||||
@@ -290,4 +286,9 @@ public class MobMonolith extends EntityFlying implements IMob
|
||||
this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty() &&
|
||||
!this.worldObj.isAnyLiquid(this.boundingBox);
|
||||
}
|
||||
|
||||
public DataWatcher getDataWatcher()
|
||||
{
|
||||
return this.dataWatcher;
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -21,6 +22,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class RenderDimDoor extends TileEntitySpecialRenderer
|
||||
{
|
||||
FloatBuffer field_76908_a = GLAllocation.createDirectFloatBuffer(16);
|
||||
private ResourceLocation riftPath= new ResourceLocation(mod_pocketDim.modid+":/RIFT.png");
|
||||
private ResourceLocation warpPath= new ResourceLocation(mod_pocketDim.modid+":/WARP.png");
|
||||
|
||||
public RenderDimDoor()
|
||||
{
|
||||
@@ -65,7 +68,7 @@ public class RenderDimDoor extends TileEntitySpecialRenderer
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
this.bindTextureByName("/RIFT.png");
|
||||
this.bindTexture(riftPath);
|
||||
// move files into assets/modid and change to new ResourceLocation(modid:/RIFT.png)
|
||||
var17 = 0.1F;
|
||||
var15 = 25.0F;
|
||||
@@ -76,7 +79,7 @@ public class RenderDimDoor extends TileEntitySpecialRenderer
|
||||
|
||||
if (count == 1)
|
||||
{
|
||||
this.bindTextureByName("/WARP.png");
|
||||
this.bindTexture(warpPath);
|
||||
// move files into assets/modid and change to new ResourceLocation(modid:/WARP.png)
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package StevenDimDoors.mod_pocketDimClient;
|
||||
|
||||
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -16,10 +17,14 @@ public class RenderMobObelisk extends RenderLiving
|
||||
super(new ModelMobObelisk(), f);
|
||||
this.obeliskModel = (ModelMobObelisk)this.mainModel;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity entity) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
protected ResourceLocation getEntityTexture(Entity entity)
|
||||
{
|
||||
byte b0 = entity.getDataWatcher().getWatchableObjectByte(16);
|
||||
|
||||
return new ResourceLocation(mod_pocketDim.modid+":/textures/mobs/Monolith"+b0+".png");
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -22,6 +23,9 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
|
||||
{
|
||||
private FloatBuffer field_76908_a = GLAllocation.createDirectFloatBuffer(16);
|
||||
private static DDProperties properties = null;
|
||||
private ResourceLocation riftPath= new ResourceLocation(mod_pocketDim.modid+":/RIFT.png");
|
||||
private ResourceLocation warpPath= new ResourceLocation(mod_pocketDim.modid+":/WARP.png");
|
||||
|
||||
|
||||
public RenderTransTrapdoor()
|
||||
{
|
||||
@@ -62,8 +66,7 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
this.bindTextureByName("/RIFT.png");
|
||||
// move files into assets/modid and change to new ResourceLocation(modid:/RIFT.png)
|
||||
this.bindTexture(riftPath);
|
||||
var17 = 0.1F;
|
||||
var15 = 25.0F;
|
||||
var16 = 0.125F;
|
||||
@@ -73,7 +76,7 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
|
||||
|
||||
if (count == 1)
|
||||
{
|
||||
this.bindTextureByName("/WARP.png");
|
||||
this.bindTexture(warpPath);
|
||||
// move files into assets/modid and change to new ResourceLocation(modid:/WARP.png)
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
|
||||
|
||||
Reference in New Issue
Block a user