mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Add new DispenseBehavior files from mc-dev for diff visibility.
This commit is contained in:
1 parent
ff1c1daf69
commit
fbe609bdbe
4 files changed
+127
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
final class DispenseBehaviorTNT extends DispenseBehaviorItem {
|
||||
|
||||
DispenseBehaviorTNT() {}
|
||||
|
||||
protected ItemStack b(ISourceBlock isourceblock, ItemStack itemstack) {
|
||||
EnumFacing enumfacing = BlockDispenser.j_(isourceblock.h());
|
||||
World world = isourceblock.k();
|
||||
int i = isourceblock.getBlockX() + enumfacing.c();
|
||||
int j = isourceblock.getBlockY() + enumfacing.d();
|
||||
int k = isourceblock.getBlockZ() + enumfacing.e();
|
||||
EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), (EntityLiving) null);
|
||||
|
||||
world.addEntity(entitytntprimed);
|
||||
--itemstack.count;
|
||||
return itemstack;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user