mirror of
				https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
				synced 2025-10-31 08:39:09 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| --- a/net/minecraft/server/EntityProjectileThrowable.java
 | |
| +++ b/net/minecraft/server/EntityProjectileThrowable.java
 | |
| @@ -18,8 +18,8 @@
 | |
|  
 | |
|      public void setItem(ItemStack itemstack) {
 | |
|          if (itemstack.getItem() != this.i() || itemstack.hasTag()) {
 | |
| -            this.getDataWatcher().set(EntityProjectileThrowable.e, SystemUtils.a((Object) itemstack.cloneItemStack(), (itemstack1) -> {
 | |
| -                itemstack1.setCount(1);
 | |
| +            this.getDataWatcher().set(EntityProjectileThrowable.e, SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // CraftBukkit - decompile error
 | |
| +                if (!itemstack1.isEmpty()) itemstack1.setCount(1); // CraftBukkit
 | |
|              }));
 | |
|          }
 | |
|  
 | |
| @@ -27,7 +27,13 @@
 | |
|  
 | |
|      protected abstract Item i();
 | |
|  
 | |
| -    protected ItemStack getItem() {
 | |
| +    // CraftBukkit start
 | |
| +    public Item getDefaultItem() {
 | |
| +        return i();
 | |
| +    }
 | |
| +    // CraftBukkit end
 | |
| +
 | |
| +    public ItemStack getItem() { // PAIL protected -> public
 | |
|          return (ItemStack) this.getDataWatcher().get(EntityProjectileThrowable.e);
 | |
|      }
 | |
|  
 | 
