Finishing Textures

This commit is contained in:
StevenRS11 2013-11-06 19:30:39 -05:00
parent bef91e2ce6
commit 51ee6d9c5e
45 changed files with 112 additions and 31 deletions

View file

@ -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)

View file

@ -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

View file

@ -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)
{

View file

@ -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);

View file

@ -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;
}
}

View file

@ -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);

View file

@ -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;
@ -17,9 +18,13 @@ public class RenderMobObelisk extends RenderLiving
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");
}
}

View file

@ -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);

View file

@ -1 +0,0 @@
0*7,1*7,2*7,3*7,4*7,5*7,6*7,5*7,4*7,3*7,2*7,1*7

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View file

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

Before

Width:  |  Height:  |  Size: 489 B

After

Width:  |  Height:  |  Size: 489 B

View file

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1,22 @@
{
"animation":
{
"frametime": 7,
"frames":
[
0,
1,
2,
3,
4,
5,
6,
5,
4,
3,
2,
1,
0
]
}
}

View file

Before

Width:  |  Height:  |  Size: 551 B

After

Width:  |  Height:  |  Size: 551 B

View file

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 613 B

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

Before

Width:  |  Height:  |  Size: 625 B

After

Width:  |  Height:  |  Size: 625 B

View file

Before

Width:  |  Height:  |  Size: 540 B

After

Width:  |  Height:  |  Size: 540 B

View file

Before

Width:  |  Height:  |  Size: 778 B

After

Width:  |  Height:  |  Size: 778 B

View file

Before

Width:  |  Height:  |  Size: 698 B

After

Width:  |  Height:  |  Size: 698 B

View file

Before

Width:  |  Height:  |  Size: 625 B

After

Width:  |  Height:  |  Size: 625 B

View file

Before

Width:  |  Height:  |  Size: 540 B

After

Width:  |  Height:  |  Size: 540 B

View file

Before

Width:  |  Height:  |  Size: 698 B

After

Width:  |  Height:  |  Size: 698 B

View file

Before

Width:  |  Height:  |  Size: 676 B

After

Width:  |  Height:  |  Size: 676 B

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -0,0 +1,51 @@
Adding dungeons is pretty simple, but you have to know the various flags and stuff I use to read them in and build them. Ill walk you through the process here, and provide all the flags and a breif description of what they mean here.
To get started, run Minecraft with DimDoors installed and use the "/dd-create" command.
This will generate an empty pocket dim for you to build with that is in the proper orientation (north). If you do not use this command, you WILL run into issues later.
So on to the building- You can ONLY use vanilla blocks in the dungeons. Everything that is not vanilla MC will be turned into fabric of reality when I gen them, or it will crash horribly. The only exceptions to this are DimDoors doors, which will be treated like mundane, vanilla doors of the same material.
The first step is to make your entrance door. This is where the player will appear when they teleport in for the first time. It is marked by a vanilla wooden door. It will be replaced by a wooden warp door on generation, and by default is set as the door you entered from.
As you build your dungeon, there are a few restrictions. Any chests you place will get filled with random loot, and not what you place in them. Any dispensers will get a few stacks of arrows. Other than that, any vanilla mechanics should work fine, except rails. I'm working on that now, as well as saving inventories.
Any iron doors you place will become iron dim doors, and link to more dungeon pockets, so use these to make your dungeon lead farther into a dungeon chain.
If you want your dungeon to link back the Overworld, place a wooden door on top of a Sandstone block. This will mark it as an exit door, and it will generate as a wooden Dim door leading to the Overworld (or whatever dim this chain started in). The sandstone block will become whatever is under it.
Once you have finished creating your dungeon, you need to use the command "/dd-export <fileName>"
To name it, use the following format:
<DungeonType>_<DungeonName>_<IsOpen>_<SpawnWeight>
DungeonType: The dungeon types are "Hub", "SimpleHall", "ComplexHall", "Trap', "Maze", "Exit", and "DeadEnd'.
Hub: Dungeons that have 4 or more iron doors in them should be labeled as hubs, so they don't generate one after another.
SimpleHall: Dungeons that contain a single iron door or two, but no more than that, and don't contain traps. These are the halls that separate rooms and should generally be tagged as 'closed'.
ComplexHall: These dungeons are more like rooms and can be open. They can have piston puzzles or locks, and up to three iron doors. In addition, they can contain wooden doors to link to the surface.
Trap: These dungeons are primarily traps and often contain only a single iron door. The traps should never instantly kill the player, and it should be possible to beat them. They can contain either a reward/chest, or simply allow progress. Piston traps are very fun for these.
Maze: These dungeons can contain up to 3 iron doors. They can be simple labyrinths or full of changing walls, etc. They should not, however, be primarily trying to kill the player, though they can have possibly lethal elements. In the worst case, think of it as half trap and half hub.
Exit: The main purpose of these dungeons is to link back to Overworld with a wooden door. They should never contain iron doors.
DeadEnd: Dungeons that have no other doors except the entrance. Usually contain some sort of treasure.
IsOpen: Indicates whether the dungeon is an open-air structure or a closed structure that should be surrounded by Monoliths. Monoliths prevent players from breaking out of closed structures to avoid puzzles or traps. The only valid values are "open" or "closed".
SpawnWeight: An optional integer that determines how frequently you want the dungeon to appear relative to others of the same type. The default weight is 100. Higher values cause a dungeon to generate more often, while lower values cause it to be less common. The minimum weight is 0 and the maximum weight is 10,000.
Examples:
Hub_RuinsWithDoors_Open_100
SimpleHall_WindingHallway_Closed_50
Trap_CleverTrap_Closed
Although you can deviate from the format above, the current dungeon generation system requires that format to work properly. It will not select schematics that do not follow those naming rules.
Congratulations! You have added your own dungeon. You can use the command "/dd-rift <dungeonName>" to generate it, or use "/dd-rift list" to list all available dungeons. Finally, "/dd-rift random" will select a dungeon at random.