mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 02:47:43 +01:00
Store placer on Block when placed
This commit is contained in:
committed by
granny
parent
ab27287ecb
commit
305d99234b
@@ -0,0 +1,19 @@
|
||||
--- a/net/minecraft/world/level/block/Block.java
|
||||
+++ b/net/minecraft/world/level/block/Block.java
|
||||
@@ -412,7 +_,15 @@
|
||||
}
|
||||
|
||||
public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) {
|
||||
- }
|
||||
+ this.placer = placer; // Purpur - Store placer on Block when placed
|
||||
+ }
|
||||
+
|
||||
+ // Purpur start - Store placer on Block when placed
|
||||
+ @Nullable protected LivingEntity placer = null;
|
||||
+ public void forgetPlacer() {
|
||||
+ this.placer = null;
|
||||
+ }
|
||||
+ // Purpur end - Store placer on Block when placed
|
||||
|
||||
public boolean isPossibleToRespawnInThis(BlockState state) {
|
||||
return !state.isSolid() && !state.liquid();
|
||||
Reference in New Issue
Block a user