Removed a lot of old files

This commit is contained in:
LexManos 2012-08-07 18:31:25 -07:00
parent 316bf8d448
commit 1bd8cdcd3e
22 changed files with 0 additions and 950 deletions

View File

@ -1,22 +0,0 @@
/*
* This software is provided under the terms of the Minecraft Forge Public
* License v1.0.
*/
package net.minecraft.src.forge;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.EnumStatus;
import net.minecraft.src.RenderGlobal;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.MovingObjectPosition;
import net.minecraft.src.ItemStack;
public interface IHighlightHandler
{
/**
* Allow custom handling of highlights. Return true if the highlight has
* been handled.
*/
public boolean onBlockHighlight(RenderGlobal render, EntityPlayer player, MovingObjectPosition target, int i, ItemStack currentItem, float partialTicks);
}

View File

@ -1,18 +0,0 @@
/*
* This software is provided under the terms of the Minecraft Forge Public
* License v1.0.
*/
package net.minecraft.src.forge;
import net.minecraft.src.RenderGlobal;
public interface IRenderWorldLastHandler
{
/** Called after rendering all the 3D data of the world. This is
* called before the user's tool is rendered, but otherwise after all
* 3D content. It is called twice in anaglyph mode. This is intended
* for rendering visual effect overlays into the world.
*/
void onRenderWorldLast(RenderGlobal renderer, float partialTicks);
}

View File

@ -1,109 +0,0 @@
package net.minecraft.src.forge;
import net.minecraft.src.Entity;
import net.minecraft.src.SoundManager;
import net.minecraft.src.SoundPoolEntry;
public interface ISoundHandler
{
/**
* This event is raised by the SoundManager when it does its first setup of the
* SoundSystemConfig's codecs, use this function to add your own codecs.
* @param soundManager The SoundManager instance
*/
void onSetupAudio(SoundManager soundManager);
/**
* Raised by the SoundManager.loadSoundSettings, this would be a good place for
* adding your custom sounds to the SoundPool.
*
* @param soundManager The SoundManager instance
*/
void onLoadSoundSettings(SoundManager soundManager);
/**
* Raised when the SoundManager tries to play a Background Music file,
* If you return null from this function it will prevent the sound from being played,
* you can return a different entry if you want to change the sound being played.
*
* If you do not want to change anything, just return the passed in entry.
*
* @param soundManager The SoundManager instance
* @param entry The current entry that will be played
* @return The new sound entry to play, or the current one passed in.
*/
SoundPoolEntry onPlayBackgroundMusic(SoundManager soundManager, SoundPoolEntry entry);
/**
* Raised when the SoundManager tries to play a 'Streaming' file,
* in vanilla it is only the Jukebox that uses this function.
*
* If you return null from this function it will prevent the sound from being played,
* you can return a different entry if you want to change the sound being played.
*
* If you do not want to change anything, just return the passed in entry.
*
* @param soundManager The SoundManager instance
* @param entry The current entry that will be played
* @param soundName The name of the request sound
* @param x The X position where the sound will be played
* @param y The Y position where the sound will be played
* @param z The Z position where the sound will be played
* @return The new sound entry to play, or the current one passed in.
*/
SoundPoolEntry onPlayStreaming(SoundManager soundManager, SoundPoolEntry entry, String soundName, float x, float y, float z);
/***
* Raised when the SoundManager tries to play a normal sound,
* dogs barking, footsteps, etc. THe majority of all sounds during normal game play.
*
* If you return null from this function it will prevent the sound from being played,
* you can return a different entry if you want to change the sound being played.
*
* If you do not want to change anything, just return the passed in entry.
*
* @param soundManager The SoundManager instance
* @param entry The current entry that will be played
* @param soundName The name of the request sound
* @param x The X position where the sound will be played
* @param y The Y position where the sound will be played
* @param z The Z position where the sound will be played
* @param volume The sound's volume, between 0.0 and 1.0
* @param pitch The sound's pitch
* @return The new sound entry to play, or the current one passed in.
*/
SoundPoolEntry onPlaySound(SoundManager soundManager, SoundPoolEntry entry, String soundName, float x, float y, float z, float volume, float pitch);
/**
* Raised when the SoundManager tries to play a effect sound,
* currently the only known sounds are 'random.click' when a GUI button is clicked,
* or 'portal.trigger' and 'portal.travel' when the player is near/inside a portal.
*
* If you return null from this function it will prevent the sound from being played,
* you can return a different entry if you want to change the sound being played.
*
* If you do not want to change anything, just return the passed in entry.
*
* @param soundManager The SoundManager instance
* @param entry The current entry that will be played
* @param soundName The name of the request sound
* @param volume The sound's volume, between 0.0 and 1.0
* @param pitch The sound's pitch
* @return The new sound entry to play, or the current one passed in.
*/
SoundPoolEntry onPlaySoundEffect(SoundManager soundManager, SoundPoolEntry entry, String soundName, float volume, float pitch);
/**
* Raised when an entity attempts to play a sound via World's playSoundAtEntity
* function. This is so that additional data about the state of the entity can
* be obtained efficiently without using AABBs. An important thing to note:
* This hook will be called even if the sound is off.
*
* @param entity The entity that the sound should be played at. Always the calling Entity or the Player.
* @param soundName The name of the requested sound.
* @param volume The sound's volume, between 0.0 and 1.0.
* @param pitch The sound's pitch
* @return The sound to play, null to cancel the event.
*/
String onPlaySoundAtEntity(Entity entity, String soundName, float volume, float pitch);
}

View File

@ -1,6 +0,0 @@
package net.minecraft.src.forge;
public interface ITextureLoadHandler
{
public void onTextureLoad(String textureName, int textureID);
}

View File

@ -1,49 +0,0 @@
package net.minecraft.src.forge.adaptors;
import net.minecraft.src.Entity;
import net.minecraft.src.SoundManager;
import net.minecraft.src.SoundPoolEntry;
import net.minecraft.src.forge.ISoundHandler;
/**
* Adaptor class for convince sake when implementing ISoundHandler, as most
* mods will only actually care about onSetupAudio/onLoadSoundSettings.
*/
public class SoundHandlerAdaptor implements ISoundHandler
{
@Override
public void onSetupAudio(SoundManager soundManager){}
@Override
public void onLoadSoundSettings(SoundManager soundManager){}
@Override
public SoundPoolEntry onPlayBackgroundMusic(SoundManager soundManager, SoundPoolEntry entry)
{
return entry;
}
@Override
public SoundPoolEntry onPlayStreaming(SoundManager soundManager, SoundPoolEntry entry, String soundName, float x, float y, float z)
{
return entry;
}
@Override
public SoundPoolEntry onPlaySound(SoundManager soundManager, SoundPoolEntry entry, String soundName, float x, float y, float z, float volume, float pitch)
{
return entry;
}
@Override
public SoundPoolEntry onPlaySoundEffect(SoundManager soundManager, SoundPoolEntry entry, String soundName, float volume, float pitch)
{
return entry;
}
@Override
public String onPlaySoundAtEntity(Entity entity, String soundName, float volume, float pitch)
{
return soundName;
}
}

View File

@ -1,34 +0,0 @@
/**
* This software is provided under the terms of the Minecraft Forge Public
* License v1.0.
*/
package net.minecraft.src.forge;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import net.minecraft.src.Achievement;
public class AchievementPage
{
private String name;
private LinkedList<Achievement> achievements;
public AchievementPage(String name, Achievement... achievements)
{
this.name = name;
this.achievements = new LinkedList<Achievement>(Arrays.asList(achievements));
}
public String getName()
{
return name;
}
public List<Achievement> getAchievements()
{
return achievements;
}
}

View File

@ -1,51 +0,0 @@
package net.minecraft.src.forge;
import java.util.Random;
import net.minecraft.src.ItemStack;
/**
*
* Used to hold a list of all items that can be spawned in a world dungeon
*
*/
public class DungeonLoot
{
private ItemStack itemStack;
private int minCount = 1;
private int maxCount = 1;
/**
* @param item A item stack
* @param min Minimum stack size when randomly generating
* @param max Maximum stack size when randomly generating
*/
public DungeonLoot(ItemStack item, int min, int max)
{
this.itemStack = item;
minCount = min;
maxCount = max;
}
/**
* Grabs a ItemStack ready to be added to the dungeon chest,
* the stack size will be between minCount and maxCount
* @param rand World gen random number generator
* @return The ItemStack to be added to the chest
*/
public ItemStack generateStack(Random rand)
{
ItemStack ret = this.itemStack.copy();
ret.stackSize = minCount + (rand.nextInt(maxCount - minCount + 1));
return ret;
}
public boolean equals(ItemStack item, int min, int max)
{
return (min == minCount && max == maxCount && item.isItemEqual(this.itemStack));
}
public boolean equals(ItemStack item)
{
return item.isItemEqual(this.itemStack);
}
}

View File

@ -1,24 +0,0 @@
/**
* This software is provided under the terms of the Minecraft Forge Public
* License v1.0.
*/
package net.minecraft.src.forge;
import net.minecraft.src.ItemStack;
import net.minecraft.src.World;
public interface IBucketHandler
{
/**
* This is called before Minecraft tries to fill a bucket with water or
* lava. If it returns a non-null result, then the filling process will
* be stopped and the empty bucket will be changed to the result of this
* subprogram.
*
* @see MinecraftForge#registerCustomBucketHander(IBucketHandler)
*/
public ItemStack fillCustomBucket(World world, int X, int Y, int Z);
}

View File

@ -1,76 +0,0 @@
package net.minecraft.src.forge;
import net.minecraft.src.EntityPlayer;
public interface IChatHandler
{
/**
* Called when a player sends a normal chat message to the server,
* you can manipulate the message parameter by returning a modified
* version from this function.
*
* This is only called on the server side.
*
* @param player The player issuing the message
* @param message The message the player is sending
* @return The message to be displayed, normal case is the 'message' parameter. Return null to cancel displaying this message.
*/
public String onServerChat(EntityPlayer player, String message);
/**
* Called when a player sends a normal chat message to the server
* that starts with a '/'.
*
* This is only called on the server side.
*
* Return true from this function to indicate that you have
* handled the command and no further processing is necessary.
*
* @param player The player trying to issue the command
* @param isOp True if the player is on the Op list
* @param command The command trying to be issued
* @return True if no further processing is necessary, false to continue processing.
*/
public boolean onChatCommand(EntityPlayer player, boolean isOp, String command);
/**
* Called when either the console or a player issues a / command that is not handled elsewhere.
*
* This is only called on the server side.
*
* Return true from this function to indicate that you have
* handled the command and no further processing is necessary.
*
* The listener will always be a instance of ICommandListener, but because the client does
* not have this class it is defined as a Object to allow client compilation.
*
* @param listener The source of the command, will always be a instance of ICommandListener
* @param username The username of the person issuing the command, 'CONSOLE' if it's not a player.
* @param command The command trying to be issued
* @return True if no further processing is necessary, false to continue processing.
*/
public boolean onServerCommand(Object listener, String username, String command);
/**
*
* Called when either the console or a player issues the /say command
*
* This is only called on the server side.
*
* @param listener The source of the command, will always be a instance of ICommandListener
* @param username The username of the person issuing the command, 'CONSOLE' if it's not a player.
* @param message The message trying to be sent, without the /say
* @return The message to be displayed, normal case is the 'message' parameter. Return null to cancel displaying this message.
*/
public String onServerCommandSay(Object listener, String username, String message);
/**
* Called when the client receives a Chat packet.
*
* This is only called on the client side
*
* @param message The chat message received
* @return The message to be displayed, normal case is the 'message' parameter. Return null to cancel displaying this message.
*/
public String onClientChatRecv(String message);
}

View File

@ -1,24 +0,0 @@
/**
* This software is provided under the terms of the Minecraft Forge Public
* License v1.0.
*/
package net.minecraft.src.forge;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.Entity;
public interface IEntityInteractHandler
{
/**
* This is called before a player attacks, or interacts {left or right click by default}
* with another entity. Before any damage, or other interaction code is run.
* In multiplayer, this is called by both the client and the server.
*
* @param player The player doing the interacting
* @param entity The entity being interacted with
* @param isAttack True if it is a attack {left click} false if it is a interact {right click}
* @return True to continue processing, false to cancel.
*/
public boolean onEntityInteract(EntityPlayer player, Entity entity, boolean isAttack);
}

View File

@ -1,127 +0,0 @@
/**
* This software is provided under the terms of the Minecraft Forge Public
* License v1.0.
*/
package net.minecraft.src.forge;
import java.util.ArrayList;
import net.minecraft.src.EntityItem;
import net.minecraft.src.EntityLiving;
import net.minecraft.src.DamageSource;
import net.minecraft.src.World;
public interface IEntityLivingHandler
{
/**
* Raised when an EntityLiving is spawned into the world from natural means, meaning
* not by command, MobSpawner, cheat, etc.. Just naturally throughout the world.
*
* This allows the mod to create special functionality that runs on a mob natural
* spawn. The Vanilla minecraft mechanic of having 'Spider Jockies', the color of
* sheep's wool, and Ocelot's spawning with babies can be canceled by returning
* true from this function
*
* Returning true will indicate that you have performed your special spawning,
* and no more handling will be done.
*
* @param entity The newly spawned entity
* @param world The world the entity is in
* @param x The Entitie's X Position
* @param y The Entitie's Y Position
* @param z The Entitie's Z Position
* @return True if the event was handled and no more processing should be done, false to continue processing
*/
public boolean onEntityLivingSpawn(EntityLiving entity, World world, float x, float y, float z);
/**
* This is called when any EntityLiving's health reaches 0.
* You can cancel the death here, but you must raise the health or it will die again.
* In multiplayer, this is called by both the client and the server.
*
* @param entity Entity about to die
* @param killer DamageSource instance causing the death
* @return True to continue processing, false to cancel.
*/
public boolean onEntityLivingDeath(EntityLiving entity, DamageSource killer);
/**
* This is called immediately after an EntityLiving receives a new attack target from AI classes.
* eg when a Zombie 'spots' a player. Handles friendly fire (setRevengeTarget) as well.
* In multiplayer, this is called by the server only.
*
* @param entity Entity attacking
* @param target Entity designated as new target
*/
public void onEntityLivingSetAttackTarget(EntityLiving entity, EntityLiving target);
/**
* This is called when any EntityLiving takes damage from any DamageSource.
* In multiplayer, this is called by both the client and the server.
*
* @param entity Entity being attacked
* @param attack DamageSource instance of the attack
* @param damage Unmitigated damage the attack would cause
* @return True if the event was handled and no more processing should be done, false to continue processing
*/
public boolean onEntityLivingAttacked(EntityLiving entity, DamageSource attack, int damage);
/**
* This is called immediately after an EntityLiving started a jump
* Velocity will already be set and can be modified.
*
* @param entity Entity starting the jump
*/
public void onEntityLivingJump(EntityLiving entity);
/**
* This is called when an EntityLiving reconnects with the ground.
* Aborting this would stop both damage and the landing sound.
*
* @param entity Entity which fell
* @param distance absolute height between the last position touching the ground and the current.
* @return True if the event was handled and no more processing should be done, false to continue processing
*/
public boolean onEntityLivingFall(EntityLiving entity, float distance);
/**
* This is called before EntityLiving's Base Update Tick.
* Aborting this process will freeze both Movement and Actions.
*
* @param entity Entity being ticked
* @return True if the event was handled and no more processing should be done, false to continue processing
*/
public boolean onEntityLivingUpdate(EntityLiving entity);
/**
* This is called whenever a EntityLiving is hurt, before any armor calculations are taken into effect.
* Before any blocking, or potions are taken into account.
* Returning 0 from this will stop all processing.
* For the client's entity, this is only called in Single player, or if you are the server.
*
* @param entity The entity being hurt
* @param source The type of damage being dealt
* @param damage The amount of damage being dealt
* @return The amount of damage to let through. Returning 0 will prevent any further processing.
*/
public int onEntityLivingHurt(EntityLiving entity, DamageSource source, int damage);
/**
* This is called after a EntityLiving die, and it spawns it's loot. The drop list should contain any item that the entity spawned at death.
* May not work properly on all Mod entities if they do not use dropFewItems/dropRareDrop/entityDropItem
* This will not contain the special record that creepers drop when they are killed by a Skeleton, or the apple notch drops.
* Or the player's inventory.
*
* If you need to deal with the Player's inventory, do so in onEntityLivingDeath
* In most cases, drops will be empty if the entity was a baby that hadn't reached full size yet.
*
* @param entity The entity that is droping the items
* @param source The damage source that caused the entities death
* @param drops An ArrayList containing all items to drop, AYou must make sure to not cause any concurancy exceptions with this
* @param lootingLevel The Looting enchantment level if the attacker was a player and they had the enchantment, else 0
* @param recentlyHit Signifying if the entity was recently hit by a player.
* @param specialDropValue Random number used to determine if the 'special' loot should be dropped. 0 if the entity was a child
*/
public void onEntityLivingDrops(EntityLiving entity, DamageSource source, ArrayList<EntityItem> drops, int lootingLevel, boolean recentlyHit, int specialDropValue);
}

View File

@ -1,39 +0,0 @@
package net.minecraft.src.forge;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityMinecart;
import net.minecraft.src.EntityPlayer;
public interface IMinecartHandler
{
/**
* This functions is called at the end of every minecart's doUpdate loop.
* If you override EntityMinecart.doUpdate(), is recommended that you retain the code that calls this function.
* @param cart The cart that called the function.
* @param i X coordinate of the rail
* @param j Y coordinate of the rail
* @param k Z coordinate of the rail
*/
public void onMinecartUpdate(EntityMinecart minecart, int x, int y, int z);
/**
* This function allows several mods to add code into the collision routine at the same time regardless of the collision handler registered.
* If you override EntityMinecart.applyEntityCollision(), is recommended that you retain the code that calls this function.
* @param cart The cart that called the function.
* @param other
*/
public void onMinecartEntityCollision(EntityMinecart minecart, Entity entity);
/**
* This function is called whenever a player attempts to interact with a minecart.
* The primary reason for this hook is to fix a few bugs and put restrictions on how a minecart can be used under certain circumstances.
* If you override EntityMinecart.interact(), is recommended that you retain the code that calls this function.
* @param cart The cart that called the function.
* @param player The player that tried to interact with the minecart.
* @param canceled Wither or not a pervious hook has canceled the interaction of a player.
* @return Whether the player can interact with the minecart.
*/
public boolean onMinecartInteract(EntityMinecart minecart, EntityPlayer player, boolean canceled);
}

View File

@ -1,18 +0,0 @@
/**
* This software is provided under the terms of the Minecraft Forge Public
* License v1.0.
*/
package net.minecraft.src.forge;
/** This interface is to be implemented by a Block class. Allows a block
* type to perform rendering in both render passes, in case some parts of the
* block are solid and others are transparent.
*/
public interface IMultipassRender
{
/** Returns true when the block has things to render in this render
* pass.
*/
public boolean canRenderInPass(int pass);
}

View File

@ -1,32 +0,0 @@
/**
* This software is provided under the terms of the Minecraft Forge Public
* License v1.0.
*/
package net.minecraft.src.forge;
import net.minecraft.src.Block;
import net.minecraft.src.World;
/**
* This interface is to be implemented by block classes. It will allow a block
* to control how it can be replaced
*
* @see Block
* @deprecated. This functionality will be removed soon.
*/
public interface IOverrideReplace
{
/**
* Return true if this block has to take control over replacement, for
* the intended replacement given by the parameter bid. If false, then
* the block replacement will be prevented.
*/
public boolean canReplaceBlock(World world, int X, int Y, int Z, int replacement);
/**
* Return the status of the actual replacement.
*/
public boolean getReplacedSuccess();
}

View File

@ -1,26 +0,0 @@
package net.minecraft.src.forge;
import net.minecraft.src.EntityItem;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.ItemStack;
public interface IPickupHandler
{
/**
* Raised when a player collides with a EntityItem.
* The handler may consume all, or part of the stack.
* The handler will only be called if the stack size is > 0
* The event may be cut part way through if the stack size
* falls to 0 or a previous handler returns false;
* Will only be called if delay before pickup is 0.
*
* The Entity will destroyed if the stack size falls to 0.
*
* @param player Player that picked up the item
* @param item Item picked up as entity. May be manipulated
* @return True If processing should continue.
*/
public boolean onItemPickup(EntityPlayer player, EntityItem item);
}

View File

@ -1,50 +0,0 @@
package net.minecraft.src.forge;
import net.minecraft.src.Chunk;
import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.World;
public interface ISaveEventHandler
{
/**
* Called when the world is created, either newly created or loaded from a save file
* @param world The world being loaded.
*/
public void onWorldLoad(World world);
/**
* Called whenever the world is saving. Use this to save extra data alongside the world, eg. maps.
* @param world The world being saved.
*/
public void onWorldSave(World world);
/**
* Called when a chunk is created, either newly generated or loaded from a save file
* @param world The world containing this chunk.
* @param chunk The chunk being loaded.
*/
public void onChunkLoad(World world, Chunk chunk);
/**
* Called when a chunk is unloaded and removed from the world
* @param world The world containing this chunk.
* @param chunk The chunk being loaded.
*/
public void onChunkUnload(World world, Chunk chunk);
/**
* Use this to save extra data in with the chunk file.
* @param world The world containing this chunk.
* @param chunk The chunk being saved.
* @param data The compound to save data into and be written to disk
*/
public void onChunkSaveData(World world, Chunk chunk, NBTTagCompound data);
/**
* Use this to load extra save data from a chunk file.
* @param world The world containing this chunk.
* @param chunk The chunk being loaded.
* @param data The compound to load data from
*/
public void onChunkLoadData(World world, Chunk chunk, NBTTagCompound data);
}

View File

@ -1,23 +0,0 @@
/**
* This software is provided under the terms of the Minecraft Forge Public
* License v1.0.
*/
package net.minecraft.src.forge;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.EnumStatus;
public interface ISleepHandler
{
/**
* This is called before a player sleeps in a bed. If it returns a
* non-null result, then the normal sleeping process will be skipped, and
* the value returned by this method will be returned to
* BlockBed.blockActivated.
*
* @see MinecraftForge#registerSleepHandler(ISleepHandler)
*/
public EnumStatus sleepInBedAt(EntityPlayer player, int X, int Y, int Z);
}

View File

@ -1,22 +0,0 @@
/**
* This software is provided under the terms of the Minecraft Forge Public
* License v1.0.
*/
package net.minecraft.src.forge;
/**
* This interface has to be implemented either by an instance of Block or Item.
* It allow to use texture files different from terrain.png or items.png.
*/
public interface ITextureProvider
{
/**
* This interface has to return the path to a file that is the same size as
* terrain.png, but not named terrain.png. It will be used instead of the
* regular terrain file to render blocks and items.
*/
public String getTextureFile();
}

View File

@ -1,50 +0,0 @@
package net.minecraft.src.forge;
import net.minecraft.src.EntityMinecart;
/**
* Used to create hashmap values for Minecart/type pairs
* Written by CovertJaguar
*/
public class MinecartKey
{
public final Class<? extends EntityMinecart> minecart;
public final int type;
public MinecartKey(Class<? extends EntityMinecart> cls, int typtID)
{
minecart = cls;
type = typtID;
}
@Override
public boolean equals(Object obj)
{
if (obj == null)
{
return false;
}
if (getClass() != obj.getClass())
{
return false;
}
final MinecartKey other = (MinecartKey)obj;
if (this.minecart != other.minecart && (this.minecart == null || !this.minecart.equals(other.minecart)))
{
return false;
}
return (this.type == other.type);
}
@Override
public int hashCode()
{
int hash = 7;
hash = 59 * hash + (this.minecart != null ? this.minecart.hashCode() : 0);
hash = 59 * hash + this.type;
return hash;
}
}

View File

@ -1,46 +0,0 @@
package net.minecraft.src.forge;
import net.minecraft.src.BaseMod;
import net.minecraft.src.NetworkManager;
/**
* This is for mods that are designed to be used on the server side alone,
* or both the client and server side. This class is used when registering
* various things relating to network traffic. Entity ID's, GUI Id's, etc..
*/
public abstract class NetworkMod extends BaseMod
{
/**
* Returns true if every client is required to have this
* mod installed when it is installed on a server.
* @return True if client is required, false if not.
*/
public boolean clientSideRequired()
{
return false;
}
/**
* Returns true if the server is required to have this
* mod when it is installed on the client.
* @return True if server is required, false if not.
*/
public boolean serverSideRequired()
{
return false;
}
/**
* Called when the 'small' data packet is received for this NetworkMod,
* Internally, this utilizes the Packet131MapData packet. This is useful
* data that is sent rapidly and would like to save the overhead of the
* 250 custom payload packet.
*
* Data is limited to 256 bytes.
*
* @param net
* @param id
* @param data
*/
public void onPacketData(NetworkManager net, short id, byte[] data){}
}

View File

@ -1,40 +0,0 @@
package net.minecraft.src.forge;
/**
* A class that holds two generic values, can be used as a Key/Value pair,
* but is used in forge as a frequency/object pair.
*
* @param <T1> The type of the first value
* @param <T2> The Type of the second value
*/
public class ObjectPair<T1, T2>
{
private T1 object1;
private T2 object2;
public ObjectPair(T1 obj1, T2 obj2)
{
this.object1 = obj1;
this.object2 = obj2;
}
public T1 getValue1()
{
return this.object1;
}
public T2 getValue2()
{
return this.object2;
}
public void setValue1(T1 value)
{
object1 = value;
}
public void setValue2(T2 value)
{
object2 = value;
}
}

View File

@ -1,64 +0,0 @@
package net.minecraft.src.forge.adaptors;
import java.util.ArrayList;
import net.minecraft.src.DamageSource;
import net.minecraft.src.EntityItem;
import net.minecraft.src.EntityLiving;
import net.minecraft.src.World;
import net.minecraft.src.forge.IEntityLivingHandler;
public class EntityLivingHandlerAdaptor implements IEntityLivingHandler
{
@Override
public boolean onEntityLivingSpawn(EntityLiving entity, World world, float x, float y, float z)
{
return false;
}
@Override
public boolean onEntityLivingDeath(EntityLiving entity, DamageSource killer)
{
return false;
}
@Override
public void onEntityLivingSetAttackTarget(EntityLiving entity, EntityLiving target)
{
}
@Override
public boolean onEntityLivingAttacked(EntityLiving entity, DamageSource attack, int damage)
{
return false;
}
@Override
public void onEntityLivingJump(EntityLiving entity)
{
}
@Override
public boolean onEntityLivingFall(EntityLiving entity, float distance)
{
return false;
}
@Override
public boolean onEntityLivingUpdate(EntityLiving entity)
{
return false;
}
@Override
public int onEntityLivingHurt(EntityLiving entity, DamageSource source, int damage)
{
return damage;
}
@Override
public void onEntityLivingDrops(EntityLiving entity, DamageSource source, ArrayList<EntityItem> drops, int lootingLevel, boolean recentlyHit, int specialDropValue)
{
}
}