|
14 | 14 | @Mixin(value = Entity.class, priority = 9999 /* Run us last */)
|
15 | 15 | abstract class MEntity implements ContraptionCollidable {
|
16 | 16 |
|
17 |
| - private int lastCollidedContraptionStateTick = -1; |
18 |
| - private BlockState lastCollidedContraptionState = Blocks.AIR.getDefaultState(); |
| 17 | + private int presenceFootsteps$lastCollidedContraptionStateTick = -1; |
| 18 | + private BlockState presenceFootsteps$lastCollidedContraptionState = Blocks.AIR.getDefaultState(); |
19 | 19 |
|
20 | 20 | @Dynamic(
|
21 |
| - value = "forCollission(center, consumer) - Private member injected by Create. See: https://github.com/Fabricators-of-Create/Create/blob/49cc17e3de33c965b1c409130abe436821f7410c/src/main/java/com/simibubi/create/foundation/mixin/client/EntityContraptionInteractionMixin.java#L81C21-L81C21" |
| 21 | + value = "create$forCollision(center, consumer) - Private member injected by Create. See: https://github.com/Fabricators-of-Create/Create/blob/49cc17e3de33c965b1c409130abe436821f7410c/src/main/java/com/simibubi/create/foundation/mixin/client/EntityContraptionInteractionMixin.java#L81C21-L81C21" |
22 | 22 | )
|
23 |
| - @Shadow |
24 |
| - private void forCollision(Vec3d anchorPos, TriConsumer<Object, BlockState, BlockPos> action) {} |
| 23 | + @Shadow(aliases = { |
| 24 | + "forCollision", "create$forCollision" |
| 25 | + }) |
| 26 | + private void create$forCollision(Vec3d anchorPos, TriConsumer<Object, BlockState, BlockPos> action) {} |
25 | 27 |
|
26 | 28 | @Override
|
27 | 29 | public BlockState getCollidedStateAt(BlockPos pos) {
|
28 |
| - if (lastCollidedContraptionStateTick != ((Entity)(Object)this).age) { |
29 |
| - lastCollidedContraptionStateTick = ((Entity)(Object)this).age; |
30 |
| - forCollision(((Entity)(Object)this).getPos().add(0, -0.2, 0), (unused, state, p) -> { |
| 30 | + if (presenceFootsteps$lastCollidedContraptionStateTick != ((Entity)(Object)this).age) { |
| 31 | + presenceFootsteps$lastCollidedContraptionStateTick = ((Entity)(Object)this).age; |
| 32 | + create$forCollision(((Entity)(Object)this).getPos().add(0, -0.2, 0), (unused, state, p) -> { |
31 | 33 | if (pos.equals(p)) {
|
32 |
| - lastCollidedContraptionState = state; |
| 34 | + presenceFootsteps$lastCollidedContraptionState = state; |
33 | 35 | }
|
34 | 36 | });
|
35 | 37 | }
|
36 |
| - return lastCollidedContraptionState; |
| 38 | + return presenceFootsteps$lastCollidedContraptionState; |
37 | 39 | }
|
38 | 40 | }
|
0 commit comments