mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 05:33:00 +00:00 
			
		
		
		
	Allow placing items against some blocks
We define a tag which allows specifying which blocks can be used. Right now this is is just cauldrons and hives, as they have "placing into" semantics. Closes #1305. Many thanks to Lindsay-Needs-Sleep for their initial work on this! Fixes #1008. I believe also fixes #854.
This commit is contained in:
		| @@ -55,6 +55,7 @@ import java.util.List; | ||||
| import java.util.function.BiFunction; | ||||
| import java.util.function.Consumer; | ||||
| import java.util.function.Function; | ||||
| import java.util.function.Predicate; | ||||
| 
 | ||||
| @AutoService({ PlatformHelper.class, dan200.computercraft.impl.PlatformHelper.class, ComputerCraftAPIService.class }) | ||||
| public class TestPlatformHelper extends AbstractComputerCraftAPI implements PlatformHelper { | ||||
| @@ -202,7 +203,7 @@ public class TestPlatformHelper extends AbstractComputerCraftAPI implements Plat | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public InteractionResult useOn(ServerPlayer player, ItemStack stack, BlockHitResult hit) { | ||||
|     public InteractionResult useOn(ServerPlayer player, ItemStack stack, BlockHitResult hit, Predicate<BlockState> canUseBlock) { | ||||
|         throw new UnsupportedOperationException("Cannot interact with the world inside tests"); | ||||
|     } | ||||
| 
 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jonathan Coates
					Jonathan Coates