1.6.4 basic fixes

This commit is contained in:
CannibalVox
2013-12-06 20:38:55 -06:00
parent 7687a77332
commit e825cb74b9
31 changed files with 234 additions and 158 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", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/monk.ogg")));
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/crack.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/crack.ogg")));
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/tearing.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/tearing.ogg")));
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/rift.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/rift.ogg")));
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftStart.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/riftStart.ogg")));
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftEnd.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/riftEnd.ogg")));
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftClose.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/riftClose.ogg")));
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftDoor.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/riftDoor.ogg")));
event.manager.soundPoolMusic.addSound("mods/DimDoors/sfx/creepy.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/creepy.ogg")));
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");
}
@SideOnly(Side.CLIENT)
@@ -96,7 +96,7 @@ public class EventHookContainer
ChunkCoordinates coords = LimboProvider.getLimboSkySpawn(player.worldObj.rand);
Point4D destination = new Point4D((int) (coords.posX+entity.posX), coords.posY, (int) (coords.posZ+entity.posZ ), mod_pocketDim.properties.LimboDimensionID);
DDTeleporter.teleportEntity(player, destination, false);
player.setEntityHealth(player.getMaxHealth());
player.setHealth(player.getMaxHealth());
event.setCanceled(true);
return false;
}
@@ -119,7 +119,7 @@ public class EventHookContainer
SoundSystem sndSystem = FMLClientHandler.instance().getClient().sndManager.sndSystem;
sndSystem.stop("BgMusic");
SoundPoolEntry soundPoolEntry = FMLClientHandler.instance().getClient().sndManager.soundPoolMusic.getRandomSoundFromSoundPool("mods.DimDoors.sfx.creepy");
sndSystem.backgroundMusic("LimboMusic", soundPoolEntry.soundUrl, soundPoolEntry.soundName, false);
sndSystem.backgroundMusic("LimboMusic", soundPoolEntry.getSoundUrl(), soundPoolEntry.getSoundName(), false);
sndSystem.play("LimboMusic");
}
else if(world.isRemote && !(world.provider instanceof LimboProvider))

View File

@@ -42,8 +42,8 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
public void registerIcons(IconRegister par1IconRegister)
{
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_top");
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_bottom");
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5)+"_top");
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5)+"_bottom");
}
@SideOnly(Side.CLIENT)

View File

@@ -59,8 +59,8 @@ public class BlockDimWall extends Block
public void registerIcons(IconRegister par1IconRegister)
{
this.blockIcon[0] = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2());
this.blockIcon[1] = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2() + "Perm");
this.blockIcon[0] = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5));
this.blockIcon[1] = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5) + "Perm");
}
@SideOnly(Side.CLIENT)

View File

@@ -32,7 +32,7 @@ public class BlockDimWallPerm extends Block
public void registerIcons(IconRegister par1IconRegister)
{
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2());
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5));
}
public int quantityDropped(Random par1Random)

View File

@@ -33,8 +33,8 @@ public class BlockDoorGold extends BlockDoor
public void registerIcons(IconRegister par1IconRegister)
{
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_top");
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_bottom");
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5)+"_top");
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5)+"_bottom");
}
public Icon getIcon(int par1, int par2)

View File

@@ -40,7 +40,7 @@ public class BlockLimbo extends Block
@Override
public void registerIcons(IconRegister iconRegister)
{
this.blockIcon = iconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2());
this.blockIcon = iconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5));
}
@Override

View File

@@ -66,7 +66,7 @@ public class BlockRift extends BlockContainer
@Override
public void registerIcons(IconRegister par1IconRegister)
{
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2());
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5));
}
//sends a packet informing the client that there is a link present so it renders properly. (when placed)

View File

@@ -32,7 +32,7 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit
@Override
public void registerIcons(IconRegister par1IconRegister)
{
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2());
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5));
}
//Teleports the player to the exit link of that dimension, assuming it is a pocket

View File

@@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
import java.util.Collection;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper;
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
@@ -30,6 +31,13 @@ public class CommandCreateDungeonRift extends DDCommandBase
return instance;
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "Usage: /dd-rift <dungeon name>\r\n" +
" /dd-rift list\r\n" +
" /dd-rift random";
}
@Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{
@@ -54,9 +62,9 @@ public class CommandCreateDungeonRift extends DDCommandBase
Collection<String> dungeonNames = dungeonHelper.getDungeonNames();
for (String name : dungeonNames)
{
sender.sendChatToPlayer(name);
sender.addChatMessage(name);
}
sender.sendChatToPlayer("");
sender.addChatMessage("");
}
else
{
@@ -74,7 +82,7 @@ public class CommandCreateDungeonRift extends DDCommandBase
link = dimension.createLink(x, y + 1, z, LinkTypes.DUNGEON,orientation);
sender.worldObj.setBlock(x, y + 1, z,mod_pocketDim.blockRift.blockID,0,3);
sender.sendChatToPlayer("Created a rift to a random dungeon.");
sender.addChatMessage("Created a rift to a random dungeon.");
}
else
{
@@ -93,7 +101,7 @@ public class CommandCreateDungeonRift extends DDCommandBase
PocketBuilder.generateSelectedDungeonPocket(link, mod_pocketDim.properties, result);
sender.worldObj.setBlock(x, y + 1, z,mod_pocketDim.blockRift.blockID,0,3);
sender.sendChatToPlayer("Created a rift to \"" + result.schematicName() + "\" dungeon (Dimension ID = " + link.destination().getDimension() + ").");
sender.addChatMessage("Created a rift to \"" + result.schematicName() + "\" dungeon (Dimension ID = " + link.destination().getDimension() + ").");
}
else
{

View File

@@ -1,5 +1,6 @@
package StevenDimDoors.mod_pocketDim.commands;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
@@ -20,6 +21,11 @@ public class CommandCreatePocket extends DDCommandBase
return instance;
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "Usage: /dd-create";
}
@Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{
@@ -41,7 +47,7 @@ public class CommandCreatePocket extends DDCommandBase
DungeonHelper.instance().createCustomDungeonDoor(sender.worldObj, x, y, z);
//Notify the player
sender.sendChatToPlayer("Created a door to a pocket dimension. Please build your dungeon there.");
sender.addChatMessage("Created a door to a pocket dimension. Please build your dungeon there.");
}
return DDCommandResult.SUCCESS;
}

View File

@@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
import java.util.ArrayList;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
@@ -26,6 +27,11 @@ public class CommandDeleteAllLinks extends DDCommandBase
return instance;
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "Usage: /dd-deletelinks <targetDimensionID>";
}
@Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{
@@ -41,7 +47,7 @@ public class CommandDeleteAllLinks extends DDCommandBase
{
targetDim=0;
shouldGo=false;
sender.sendChatToPlayer("Error-Invalid argument, delete_all_links <targetDimID>");
sender.addChatMessage("Error-Invalid argument, delete_all_links <targetDimID>");
}
if(shouldGo)
@@ -59,7 +65,7 @@ public class CommandDeleteAllLinks extends DDCommandBase
linksRemoved++;
}
sender.sendChatToPlayer("Removed " + linksRemoved + " links.");
sender.addChatMessage("Removed " + linksRemoved + " links.");
}
return DDCommandResult.SUCCESS; //TEMPORARY HACK

View File

@@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
import java.util.ArrayList;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
@@ -26,6 +27,11 @@ public class CommandDeleteRifts extends DDCommandBase
return instance;
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "Usage: /dd-??? <dimension ID>";
}
@Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{
@@ -41,7 +47,7 @@ public class CommandDeleteRifts extends DDCommandBase
{
targetDim=0;
shouldGo=false;
sender.sendChatToPlayer("Error-Invalid argument, delete_all_links <targetDimID>");
sender.addChatMessage("Error-Invalid argument, delete_all_links <targetDimID>");
}
if(shouldGo)
@@ -61,7 +67,7 @@ public class CommandDeleteRifts extends DDCommandBase
dim.deleteLink(link);
}
}
sender.sendChatToPlayer("Removed " + linksRemoved + " rifts.");
sender.addChatMessage("Removed " + linksRemoved + " rifts.");
}
return DDCommandResult.SUCCESS; //TEMPORARY HACK

View File

@@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
import java.io.File;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import StevenDimDoors.mod_pocketDim.DDProperties;
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
@@ -25,6 +26,13 @@ public class CommandExportDungeon extends DDCommandBase
return instance;
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "Usage: /dd-export <dungeon type> <dungeon name> open <weight>\r\n" +
" /dd-export <dungeon type> <dungeon name> closed <weight>\r\n" +
" /dd-export <schematic name> override";
}
@Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{
@@ -132,7 +140,7 @@ public class CommandExportDungeon extends DDCommandBase
String exportPath = properties.CustomSchematicDirectory + File.separator + name + ".schematic";
if (dungeonHelper.exportDungeon(player.worldObj, x, y, z, exportPath))
{
player.sendChatToPlayer("Saved dungeon schematic in " + exportPath);
player.addChatMessage("Saved dungeon schematic in " + exportPath);
dungeonHelper.registerDungeon(exportPath, dungeonHelper.getDungeonPack("ruins"), false, true);
return DDCommandResult.SUCCESS;
}

View File

@@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
import java.util.ArrayList;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.DimensionManager;
import StevenDimDoors.mod_pocketDim.core.DimLink;
@@ -26,6 +27,11 @@ public class CommandResetDungeons extends DDCommandBase
return instance;
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "/dd-resetdungeons";
}
@Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{
@@ -84,7 +90,7 @@ public class CommandResetDungeons extends DDCommandBase
//TODO- for some reason the parent field of loaded dimenions get reset to null if I call .setParentToRoot() before I delete the pockets.
//TODO implement blackList
//Notify the user of the results
sender.sendChatToPlayer("Reset complete. " + resetCount + " out of " + dungeonCount + " dungeons were reset.");
sender.addChatMessage("Reset complete. " + resetCount + " out of " + dungeonCount + " dungeons were reset.");
return DDCommandResult.SUCCESS;
}
}

View File

@@ -11,6 +11,7 @@ import StevenDimDoors.mod_pocketDim.core.PocketManager;
import StevenDimDoors.mod_pocketDim.helpers.yCoordHelper;
import StevenDimDoors.mod_pocketDim.util.Point4D;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.world.World;
@@ -36,6 +37,11 @@ public class CommandTeleportPlayer extends DDCommandBase
return instance;
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "Usage: /dd-tp <player name> <dimension id> <x> <y> <z>";
}
/**
* TODO- Change to accept variety of input, like just coords, just dim ID, or two player names.
*/

View File

@@ -63,10 +63,10 @@ public abstract class DDCommandBase extends CommandBase
//Send the argument formats for this command
for (String format : formats)
{
player.sendChatToPlayer("Usage: " + name + " " + format);
player.addChatMessage("Usage: " + name + " " + format);
}
}
player.sendChatToPlayer(result.getMessage());
player.addChatMessage(result.getMessage());
}
}
}

View File

@@ -357,13 +357,13 @@ public class DDTeleporter
oldWorld.getChunkFromChunkCoords(entX, entZ).isModified = true;
}
// Memory concerns.
oldWorld.releaseEntitySkin(entity);
oldWorld.onEntityRemoved(entity);
if (player == null) // Are we NOT working with a player?
{
NBTTagCompound entityNBT = new NBTTagCompound();
entity.isDead = false;
entity.addEntityID(entityNBT);
entity.writeMountToNBT(entityNBT);
entity.isDead = true;
entity = EntityList.createEntityFromNBT(entityNBT, newWorld);

View File

@@ -28,6 +28,6 @@ public class ItemBlockDimWall extends ItemBlock
public String getUnlocalizedName(ItemStack par1ItemStack)
{
return subNames[getItemDamageFromStack(par1ItemStack)];
return subNames[this.getDamage(par1ItemStack)];
}
}

View File

@@ -2,11 +2,15 @@ package StevenDimDoors.mod_pocketDim.items;
import java.util.List;
import com.google.common.collect.Multimap;
import net.minecraft.block.Block;
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.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.EnumToolMaterial;
@@ -60,10 +64,12 @@ public class ItemRiftBlade extends ItemSword
}
@Override
public int getDamageVsEntity(Entity par1Entity)
{
return 7;
}
public Multimap getItemAttributeModifiers()
{
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", (double)7, 0));
return multimap;
}
@Override
@SideOnly(Side.CLIENT)
@@ -73,7 +79,7 @@ public class ItemRiftBlade extends ItemSword
}
@Override
public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLiving, EntityLivingBase par3EntityLiving)
{
par1ItemStack.damageItem(1, par3EntityLiving);
return true;

View File

@@ -98,14 +98,14 @@ public class ItemRiftSignature extends Item
stack.stackSize--;
}
clearSource(stack);
player.sendChatToPlayer("Rift Created");
player.addChatMessage("Rift Created");
world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftEnd", 0.6f, 1);
}
else
{
//The link signature has not been used. Store its current target as the first location.
setSource(stack, x, adjustedY, z,orientation, PocketManager.getDimensionData(world));
player.sendChatToPlayer("Location Stored in Rift Signature");
player.addChatMessage("Location Stored in Rift Signature");
world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftStart", 0.6f, 1);
}
return true;

View File

@@ -56,7 +56,7 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
// or if the player can pay an Ender Pearl to create a rift.
if (!player.capabilities.isCreativeMode && !player.inventory.hasItem(Item.enderPearl.itemID))
{
player.sendChatToPlayer("You don't have any Ender Pearls!");
player.addChatMessage("You don't have any Ender Pearls!");
return true;
}
@@ -86,14 +86,14 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
{
player.inventory.consumeInventoryItem(Item.enderPearl.itemID);
}
player.sendChatToPlayer("Rift Created");
player.addChatMessage("Rift Created");
world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftEnd", 0.6f, 1);
}
else
{
//The link signature has not been used. Store its current target as the first location.
setSource(stack, x, adjustedY, z, orientation, PocketManager.getDimensionData(world));
player.sendChatToPlayer("Location Stored in Rift Signature");
player.addChatMessage("Location Stored in Rift Signature");
world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftStart", 0.6f, 1);
}
return true;

View File

@@ -94,7 +94,7 @@ serverPacketHandlerSpec =
public class mod_pocketDim
{
public static final String version = "1.5.2R2.0.1RC1";
public static final String version = "$VERSION$";
public static final String modid = "DimDoors";
//need to clean up

View File

@@ -11,8 +11,6 @@ import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import scala.Char;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;

View File

@@ -5,6 +5,7 @@ import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityFlying;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
@@ -36,7 +37,7 @@ public class MobMonolith extends EntityFlying implements IMob
public MobMonolith(World par1World)
{
super(par1World);
this.texture="/mods/DimDoors/textures/mobs/Monolith0.png";
this.getDataWatcher().addObject(16,0);
this.setSize(3F, 9.0F);
this.noClip=true;
this.scaleFactor= (float) ((rand.nextDouble()/2)+1);
@@ -55,10 +56,10 @@ public class MobMonolith extends EntityFlying implements IMob
}
@Override
public int getMaxHealth()
protected void applyEntityAttributes()
{
// TODO Auto-generated method stub
return 20;
super.applyEntityAttributes();
this.getAttributeMap().func_111150_b(SharedMonsterAttributes.maxHealth).setAttribute(20);
}
public boolean canBePushed()
@@ -93,9 +94,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())

View File

@@ -350,13 +350,13 @@ public class TileEntityRift extends TileEntity
NBTTagCompound nbt = new NBTTagCompound();
writeToNBT(nbt);
packet.customParam1 = nbt;
packet.data = nbt;
return packet;
}
@Override
public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt)
{
readFromNBT(pkt.customParam1);
readFromNBT(pkt.data);
}
}

View File

@@ -1,5 +1,6 @@
package StevenDimDoors.mod_pocketDim.world;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
@@ -43,7 +44,7 @@ public class CustomSkyProvider extends IRenderHandler
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
RenderHelper.disableStandardItemLighting();
GL11.glDepthMask(false);
mc.renderEngine.bindTexture("/misc/tunnel.png");
mc.renderEngine.bindTexture(new ResourceLocation("/misc/tunnel.png"));
Tessellator tessellator = Tessellator.instance;
if (mc.theWorld.provider.isSurfaceWorld())
@@ -136,7 +137,7 @@ public class CustomSkyProvider extends IRenderHandler
GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(world.getCelestialAngle(par1) * 360.0F, 1.0F, 0.0F, 0.0F);
f10 = 30.0F;
mc.renderEngine.bindTexture(this.getSunRenderPath());
mc.renderEngine.bindTexture(new ResourceLocation(this.getSunRenderPath()));
tessellator1.startDrawingQuads();
tessellator1.addVertexWithUV((double)(-f10), 100.0D, (double)(-f10), 0.0D, 0.0D);
tessellator1.addVertexWithUV((double)f10, 100.0D, (double)(-f10), 1.0D, 0.0D);
@@ -144,7 +145,7 @@ public class CustomSkyProvider extends IRenderHandler
tessellator1.addVertexWithUV((double)(-f10), 100.0D, (double)f10, 0.0D, 1.0D);
tessellator1.draw();
f10 = 20.0F;
mc.renderEngine.bindTexture(this.getMoonRenderPath());
mc.renderEngine.bindTexture(new ResourceLocation(this.getMoonRenderPath()));
int k = world.getMoonPhase();
int l = k % 4;
int i1 = k / 4 % 2;

View File

@@ -9,6 +9,7 @@ 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;
import StevenDimDoors.mod_pocketDim.DDProperties;
@@ -65,7 +66,7 @@ public class RenderDimDoor extends TileEntitySpecialRenderer
if (count == 0)
{
this.bindTextureByName("/RIFT.png");
this.bindTexture(new ResourceLocation("/RIFT.png"));
var17 = 0.1F;
var15 = 25.0F;
var16 = 0.125F;
@@ -75,7 +76,7 @@ public class RenderDimDoor extends TileEntitySpecialRenderer
if (count == 1)
{
this.bindTextureByName("/WARP.png");
this.bindTexture(new ResourceLocation("/WARP.png"));
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
var16 = .5F;

View File

@@ -3,6 +3,8 @@ package StevenDimDoors.mod_pocketDimClient;
import net.minecraft.client.renderer.entity.RenderLiving;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
@SideOnly(Side.CLIENT)
public class RenderMobObelisk extends RenderLiving
@@ -16,6 +18,11 @@ protected ModelMobObelisk obeliskModel;
}
@Override
public ResourceLocation getEntityTexture(Entity entity) {
int watchByte = entity.getDataWatcher().getWatchableObjectByte(16);
return new ResourceLocation("/mods/DimDoors/textures/mobs/Monolith"+watchByte+".png");
}
}

View File

@@ -8,6 +8,7 @@ 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;
import StevenDimDoors.mod_pocketDim.DDProperties;
@@ -62,7 +63,7 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
if (count == 0)
{
this.bindTextureByName("/RIFT.png");
this.bindTexture(new ResourceLocation("/RIFT.png"));
var17 = 0.1F;
var15 = 25.0F;
var16 = 0.125F;
@@ -72,7 +73,7 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
if (count == 1)
{
this.bindTextureByName("/WARP.png");
this.bindTexture(new ResourceLocation("/WARP.png"));
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
var16 = .5F;