3
0
This commit is contained in:
Prototik
2015-06-05 20:41:54 +07:00
parent 9c2057bf68
commit 7f699c1473
21 changed files with 398 additions and 42 deletions

View File

@ -47,3 +47,15 @@
}
}
}
@@ -101,4 +116,11 @@
return true;
}
}
+
+ // Cauldron start
+ @Override
+ public boolean entityProjectileHook() {
+ return true;
+ }
+ // Cauldron end
}

View File

@ -0,0 +1,23 @@
--- ../src-base/minecraft/net/minecraft/entity/item/EntityEnderEye.java
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityEnderEye.java
@@ -117,7 +117,7 @@
this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
if (!this.worldObj.isRemote)
- {
+ {
double d0 = this.targetX - this.posX;
double d1 = this.targetZ - this.posZ;
float f1 = (float)Math.sqrt(d0 * d0 + d1 * d1);
@@ -203,4 +203,11 @@
{
return false;
}
+
+ // Cauldron start
+ @Override
+ public boolean entityProjectileHook() {
+ return true;
+ }
+ // Cauldron end
}

View File

@ -1,9 +1,10 @@
--- ../src-base/minecraft/net/minecraft/entity/item/EntityEnderPearl.java
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityEnderPearl.java
@@ -12,6 +12,12 @@
@@ -12,6 +12,13 @@
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
+
+// CraftBukkit start
+import org.bukkit.Bukkit;
+import org.bukkit.craftbukkit.event.CraftEventFactory;
@ -13,7 +14,7 @@
public class EntityEnderPearl extends EntityThrowable
{
private static final String __OBFID = "CL_00001725";
@@ -52,18 +58,31 @@
@@ -52,22 +59,42 @@
if (entityplayermp.playerNetServerHandler.func_147362_b().isChannelOpen() && entityplayermp.worldObj == this.worldObj)
{
@ -54,3 +55,14 @@
}
}
this.setDead();
}
}
+
+ // Cauldron start
+ @Override
+ public boolean entityProjectileHook() {
+ return true;
+ }
+ // Cauldron end
}

View File

@ -22,3 +22,15 @@
while (i > 0)
{
int j = EntityXPOrb.getXPSplit(i);
@@ -56,4 +67,11 @@
this.setDead();
}
}
+
+ // Cauldron start
+ @Override
+ public boolean entityProjectileHook() {
+ return true;
+ }
+ // Cauldron end
}

View File

@ -1,6 +1,17 @@
--- ../src-base/minecraft/net/minecraft/entity/item/EntityFallingBlock.java
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityFallingBlock.java
@@ -19,9 +19,11 @@
@@ -2,8 +2,10 @@
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
import java.util.ArrayList;
import java.util.Iterator;
+
import net.minecraft.block.Block;
import net.minecraft.block.BlockFalling;
import net.minecraft.block.ITileEntityProvider;
@@ -19,9 +21,11 @@
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
@ -13,7 +24,7 @@
public int field_145814_a;
public int field_145812_b;
public boolean field_145813_c;
@@ -103,7 +105,8 @@
@@ -103,7 +107,8 @@
if (this.field_145812_b == 1)
{
@ -23,7 +34,7 @@
{
this.setDead();
return;
@@ -122,8 +125,17 @@
@@ -122,8 +127,17 @@
{
this.setDead();
@ -42,7 +53,7 @@
if (this.field_145811_e instanceof BlockFalling)
{
((BlockFalling)this.field_145811_e).func_149828_a(this.worldObj, i, j, k, this.field_145814_a);
@@ -189,8 +201,10 @@
@@ -189,8 +203,10 @@
while (iterator.hasNext())
{
@ -55,3 +66,15 @@
}
if (flag && (double)this.rand.nextFloat() < 0.05000000074505806D + (double)i * 0.05D)
@@ -304,4 +320,11 @@
{
return this.field_145811_e;
}
+
+ // Cauldron start
+ @Override
+ public boolean entityProjectileHook() {
+ return true;
+ }
+ // Cauldron end
}

View File

@ -9,3 +9,15 @@
private static final String __OBFID = "CL_00001718";
public EntityFireworkRocket(World p_i1762_1_)
@@ -199,4 +199,11 @@
{
return false;
}
+
+ // Cauldron start
+ @Override
+ public boolean entityProjectileHook() {
+ return true;
+ }
+ // Cauldron end
}

View File

@ -14,3 +14,15 @@
this.func_146065_b(p_70097_1_.getEntity(), false);
this.setDisplayedItem((ItemStack)null);
}
@@ -203,4 +210,11 @@
return true;
}
+
+ // Cauldron start
+ @Override
+ public boolean entityProjectileHook() {
+ return true;
+ }
+ // Cauldron end
}

View File

@ -1,6 +1,16 @@
--- ../src-base/minecraft/net/minecraft/entity/item/EntityPainting.java
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityPainting.java
@@ -19,6 +19,7 @@
@@ -2,7 +2,9 @@
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
import java.util.ArrayList;
+
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityHanging;
import net.minecraft.entity.player.EntityPlayer;
@@ -19,6 +21,7 @@
public EntityPainting(World p_i1599_1_)
{
super(p_i1599_1_);
@ -8,3 +18,15 @@
}
public EntityPainting(World p_i1600_1_, int p_i1600_2_, int p_i1600_3_, int p_i1600_4_, int p_i1600_5_)
@@ -170,4 +173,11 @@
this.offsetY = p_i1598_7_;
}
}
+
+ // Cauldron start
+ @Override
+ public boolean entityProjectileHook() {
+ return true;
+ }
+ // Cauldron end
}

View File

@ -55,3 +55,15 @@
}
protected void writeEntityToNBT(NBTTagCompound p_70014_1_)
@@ -107,4 +124,11 @@
{
return this.tntPlacedBy;
}
+
+ // Cauldron start
+ @Override
+ public boolean entityProjectileHook() {
+ return true;
+ }
+ // Cauldron end
}

View File

@ -1,9 +1,10 @@
--- ../src-base/minecraft/net/minecraft/entity/item/EntityXPOrb.java
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityXPOrb.java
@@ -12,13 +12,18 @@
@@ -12,13 +12,19 @@
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerPickupXpEvent;
+
+// CraftBukkit start
+import org.bukkit.craftbukkit.event.CraftEventFactory;
+import org.bukkit.event.entity.EntityTargetEvent;
@ -20,7 +21,7 @@
private EntityPlayer closestPlayer;
private int xpTargetColor;
private static final String __OBFID = "CL_00001544";
@@ -115,18 +120,27 @@
@@ -115,18 +121,27 @@
if (this.closestPlayer != null)
{
@ -58,7 +59,7 @@
}
}
@@ -210,7 +224,7 @@
@@ -210,7 +225,7 @@
p_70100_1_.xpCooldown = 2;
this.worldObj.playSoundAtEntity(p_70100_1_, "random.orb", 0.1F, 0.5F * ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.8F));
p_70100_1_.onItemPickup(this, 1);
@ -67,7 +68,7 @@
this.setDead();
}
}
@@ -229,6 +243,88 @@
@@ -229,6 +244,88 @@
public static int getXPSplit(int p_70527_0_)
{
@ -156,3 +157,15 @@
return p_70527_0_ >= 2477 ? 2477 : (p_70527_0_ >= 1237 ? 1237 : (p_70527_0_ >= 617 ? 617 : (p_70527_0_ >= 307 ? 307 : (p_70527_0_ >= 149 ? 149 : (p_70527_0_ >= 73 ? 73 : (p_70527_0_ >= 37 ? 37 : (p_70527_0_ >= 17 ? 17 : (p_70527_0_ >= 7 ? 7 : (p_70527_0_ >= 3 ? 3 : 1)))))))));
}
@@ -236,4 +333,11 @@
{
return false;
}
+
+ // Cauldron start
+ @Override
+ public boolean entityProjectileHook() {
+ return true;
+ }
+ // Cauldron end
}