Archiviert
13
0

Fix modified fireworks from dispenser event

Dieser Commit ist enthalten in:
chickeneer 2015-06-13 22:50:04 -05:00 committet von md_5
Ursprung 994b2aae3f
Commit c9c233b796

Datei anzeigen

@ -60,10 +60,11 @@
return itemstack;
}
});
@@ -90,10 +127,38 @@
@@ -90,10 +127,39 @@
double d0 = isourceblock.getX() + (double) enumdirection.getAdjacentX();
double d1 = (double) ((float) isourceblock.getBlockPosition().getY() + 0.2F);
double d2 = isourceblock.getZ() + (double) enumdirection.getAdjacentZ();
- EntityFireworks entityfireworks = new EntityFireworks(isourceblock.i(), d0, d1, d2, itemstack);
+ // CraftBukkit start
+ World world = isourceblock.i();
+ ItemStack itemstack1 = itemstack.a(1);
@ -91,7 +92,8 @@
+ }
+ }
+
EntityFireworks entityfireworks = new EntityFireworks(isourceblock.i(), d0, d1, d2, itemstack);
+ itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
+ EntityFireworks entityfireworks = new EntityFireworks(isourceblock.i(), event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), itemstack1);
isourceblock.i().addEntity(entityfireworks);
- itemstack.a(1);
@ -100,7 +102,7 @@
return itemstack;
}
@@ -114,8 +179,38 @@
@@ -114,8 +180,38 @@
double d4 = random.nextGaussian() * 0.05D + (double) enumdirection.getAdjacentY();
double d5 = random.nextGaussian() * 0.05D + (double) enumdirection.getAdjacentZ();
@ -141,7 +143,7 @@
return itemstack;
}
@@ -146,10 +241,38 @@
@@ -146,10 +242,38 @@
d3 = 0.0D;
}
@ -182,7 +184,7 @@
return itemstack;
}
@@ -164,9 +287,48 @@
@@ -164,9 +288,48 @@
ItemBucket itembucket = (ItemBucket) itemstack.getItem();
BlockPosition blockposition = isourceblock.getBlockPosition().shift(BlockDispenser.b(isourceblock.f()));
@ -233,7 +235,7 @@
return itemstack;
} else {
return this.b.a(isourceblock, itemstack);
@@ -197,6 +359,30 @@
@@ -197,6 +360,30 @@
item = Items.LAVA_BUCKET;
}
@ -264,7 +266,7 @@
world.setAir(blockposition);
if (--itemstack.count == 0) {
itemstack.setItem(item);
@@ -215,11 +401,39 @@
@@ -215,11 +402,39 @@
World world = isourceblock.i();
BlockPosition blockposition = isourceblock.getBlockPosition().shift(BlockDispenser.b(isourceblock.f()));
@ -307,7 +309,7 @@
} else if (world.getType(blockposition).getBlock() == Blocks.TNT) {
Blocks.TNT.postBreak(world, blockposition, Blocks.TNT.getBlockData().set(BlockTNT.EXPLODE, Boolean.valueOf(true)));
world.setAir(blockposition);
@@ -247,6 +461,30 @@
@@ -247,6 +462,30 @@
World world = isourceblock.i();
BlockPosition blockposition = isourceblock.getBlockPosition().shift(BlockDispenser.b(isourceblock.f()));
@ -338,7 +340,7 @@
if (ItemDye.a(itemstack, world, blockposition)) {
if (!world.isClientSide) {
world.triggerEffect(2005, blockposition, 0);
@@ -274,11 +512,40 @@
@@ -274,11 +513,40 @@
protected ItemStack b(ISourceBlock isourceblock, ItemStack itemstack) {
World world = isourceblock.i();
BlockPosition blockposition = isourceblock.getBlockPosition().shift(BlockDispenser.b(isourceblock.f()));