@@ -7,23 +7,27 @@
|
||||
+ // CraftBukkit start - obfuscator went a little crazy
|
||||
+ /*
|
||||
this.a(new MinecraftKey("throwing"), (itemstack, world, entityliving) -> {
|
||||
return entityliving != null && entityliving.isHandRaised() && entityliving.cW() == itemstack ? 1.0F : 0.0F;
|
||||
return entityliving != null && entityliving.isHandRaised() && entityliving.dl() == itemstack ? 1.0F : 0.0F;
|
||||
});
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public boolean a(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman) {
|
||||
@@ -33,7 +37,7 @@
|
||||
@Override
|
||||
@@ -37,9 +41,12 @@
|
||||
|
||||
if (k <= 0 || entityhuman.ao()) {
|
||||
if (k <= 0 || entityhuman.isInWaterOrRain()) {
|
||||
if (!world.isClientSide) {
|
||||
- itemstack.damage(1, entityhuman);
|
||||
+ // itemstack.damage(1, entityhuman); // CraftBukkit - moved down
|
||||
+ // CraftBukkit - moved down
|
||||
+ /*
|
||||
itemstack.damage(1, entityhuman, (entityhuman1) -> {
|
||||
entityhuman1.d(entityliving.getRaisedHand());
|
||||
});
|
||||
+ */
|
||||
if (k == 0) {
|
||||
EntityThrownTrident entitythrowntrident = new EntityThrownTrident(world, entityhuman, itemstack);
|
||||
|
||||
@@ -42,7 +46,18 @@
|
||||
@@ -48,7 +55,20 @@
|
||||
entitythrowntrident.fromPlayer = EntityArrow.PickupStatus.CREATIVE_ONLY;
|
||||
}
|
||||
|
||||
@@ -36,16 +40,18 @@
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ itemstack.damage(1, entityhuman);
|
||||
+ itemstack.damage(1, entityhuman, (entityhuman1) -> {
|
||||
+ entityhuman1.d(entityliving.getRaisedHand());
|
||||
+ });
|
||||
+ entitythrowntrident.trident = itemstack.cloneItemStack(); // SPIGOT-4511 update since damage call moved
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
world.a((EntityHuman) null, (Entity) entitythrowntrident, SoundEffects.ITEM_TRIDENT_THROW, SoundCategory.PLAYERS, 1.0F, 1.0F);
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
entityhuman.inventory.f(itemstack);
|
||||
}
|
||||
@@ -53,6 +68,10 @@
|
||||
SoundEffect soundeffect = SoundEffects.ITEM_TRIDENT_THROW;
|
||||
@@ -58,6 +78,10 @@
|
||||
|
||||
entityhuman.b(StatisticList.ITEM_USED.b(this));
|
||||
if (k > 0) {
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.event.player.PlayerRiptideEvent event = new org.bukkit.event.player.PlayerRiptideEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack));
|
||||
|
||||
Reference in New Issue
Block a user