Merge branch '1.9.4'

This commit is contained in:
cpw committed 2016-05-31 00:34:03 -04:00
commit caa61e1be9
332 files changed
+3806 -3131

No files matched your search

@@ -10,8 +10,8 @@ import net.minecraft.entity.EntityLiving;
import net.minecraft.world.World;
/**
* LivingSpawnEvent is fired whenever a living Entity is spawned. <br>
* If a method utilizes this {@link Event} as its parameter, the method will
* LivingSpawnEvent is fired for any events associated with Living Enttnies spawn status. <br>
* If a method utilizes this {@link Event} as its parameter, the method will
* receive every child event of this class.<br>
* <br>
* {@link #world} contains the world in which this living Entity is being spawned.<br>
@@ -27,7 +27,7 @@ public class LivingSpawnEvent extends LivingEvent
private final float x;
private final float y;
private final float z;
public LivingSpawnEvent(EntityLiving entity, World world, float x, float y, float z)
{
super(entity);
@@ -43,7 +43,7 @@ public class LivingSpawnEvent extends LivingEvent
public float getZ() { return z; }
/**
* Fires before mob spawn events.
*
*
* Result is significant:
* DEFAULT: use vanilla spawn rules
* ALLOW: allow the spawn
@@ -60,9 +60,8 @@ public class LivingSpawnEvent extends LivingEvent
}
/**
* SpecialSpawn is fired when an Entity is to be spawned from a mob spawner.<br>
* This event is fired whenever an Entity is spawned in a mob spawner in<br>
* {@link WorldEntitySpawner#findChunksForSpawning(WorldServer, boolean, boolean, boolean)}.<br>
* SpecialSpawn is fired when an Entity is to be spawned.<br>
* This allows you to do special inializers in the new entity.<br>
* <br>
* This event is fired via the {@link ForgeEventFactory#doSpecialSpawn(EntityLiving, World, float, float, float)}.<br>
* <br>
@@ -81,17 +80,17 @@ public class LivingSpawnEvent extends LivingEvent
super(entity, world, x, y, z);
}
}
/**
* Fired each tick for despawnable mobs to allow control over despawning.
* {@link Result#DEFAULT} will pass the mob on to vanilla despawn mechanics.
* {@link Result#ALLOW} will force the mob to despawn.
* {@link Result#DENY} will force the mob to remain.
* This is fired every tick for every despawnable entity. Be efficient in your handlers.
*
*
* Note: this is not fired <em>if</em> the mob is definitely going to otherwise despawn. It is fired to check if
* the mob can be allowed to despawn. See {@link EntityLiving#despawnEntity}
*
*
* @author cpw
*
*/
@@ -102,6 +101,6 @@ public class LivingSpawnEvent extends LivingEvent
{
super(entity, entity.worldObj, (float)entity.posX, (float)entity.posY, (float)entity.posZ);
}
}
}
@@ -4,7 +4,7 @@ import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.multiplayer.PlayerControllerMP;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.network.NetHandlerPlayServer;
import net.minecraft.network.play.client.CPacketPlayerBlockPlacement;
import net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock;
import net.minecraft.network.play.client.CPacketPlayerTryUseItem;
import net.minecraft.server.management.PlayerInteractionManager;
import net.minecraft.util.EnumFacing;
@@ -27,8 +27,8 @@ import net.minecraft.util.EnumHand;
* {@link EntityPlayer#damageShield(float)},
* {@link ForgeHooks#getContainerItem(ItemStack)},
* {@link PlayerInteractionManager#processRightClick(EntityPlayer, World, ItemStack, EnumHand)},
* {@link NetHandlerPlayServer#processPlayerBlockPlacement(CPacketPlayerBlockPlacement)}
* and {@link NetHandlerPlayServer#processRightClickBlock(CPacketPlayerTryUseItem)}.<br>
* {@link NetHandlerPlayServer#processPlayerBlockPlacement(CPacketPlayerTryUseItem)}
* and {@link NetHandlerPlayServer#processRightClickBlock(CPacketPlayerTryUseItemOnBlock)}.<br>
* <br>
* {@link #original} contains the original ItemStack before the item was destroyed. <br>
* (@link #hand) contains the hand that the current item was held in.<br>
@@ -1,7 +1,7 @@
package net.minecraftforge.event.entity.player;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayer.EnumStatus;
import net.minecraft.entity.player.EntityPlayer.SleepResult;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
@@ -22,7 +22,7 @@ import net.minecraftforge.fml.common.eventhandler.Cancelable;
**/
public class PlayerSleepInBedEvent extends PlayerEvent
{
private EnumStatus result = null;
private SleepResult result = null;
private final BlockPos pos;
public PlayerSleepInBedEvent(EntityPlayer player, BlockPos pos)
@@ -31,12 +31,12 @@ public class PlayerSleepInBedEvent extends PlayerEvent
this.pos = pos;
}
public EnumStatus getResultStatus()
public SleepResult getResultStatus()
{
return result;
}
public void setResult(EnumStatus result)
public void setResult(SleepResult result)
{
this.result = result;
}