prefix method

This commit is contained in:
IThundxr 2024-05-02 20:06:16 -04:00
parent 0414692d82
commit 62a16a4070
No known key found for this signature in database
GPG Key ID: E291EC97BAF935E6

View File

@ -8,7 +8,6 @@ import java.util.stream.Stream;
import org.apache.commons.lang3.mutable.MutableBoolean;
import org.apache.logging.log4j.util.TriConsumer;
import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@ -82,7 +81,7 @@ public abstract class EntityContraptionInteractionMixin extends CapabilityProvid
}
@Unique
private void forCollision(Vec3 worldPos, TriConsumer<Contraption, BlockState, BlockPos> action) {
private void create$forCollision(Vec3 worldPos, TriConsumer<Contraption, BlockState, BlockPos> action) {
create$getIntersectingContraptions().forEach(cEntity -> {
Vec3 localPos = ContraptionCollider.worldToLocalPos(worldPos, cEntity);
@ -105,7 +104,7 @@ public abstract class EntityContraptionInteractionMixin extends CapabilityProvid
Vec3 worldPos = position.add(0, -0.2, 0);
MutableBoolean stepped = new MutableBoolean(false);
forCollision(worldPos, (contraption, state, pos) -> {
create$forCollision(worldPos, (contraption, state, pos) -> {
playStepSound(pos, state);
stepped.setTrue();
});
@ -155,7 +154,7 @@ public abstract class EntityContraptionInteractionMixin extends CapabilityProvid
Vec3 worldPos = position.add(0, -0.2, 0);
BlockPos particlePos = new BlockPos(worldPos); // pos where particles are spawned
forCollision(worldPos, (contraption, state, pos) -> {
create$forCollision(worldPos, (contraption, state, pos) -> {
if (!state.addRunningEffects(level, pos, self)
&& state.getRenderShape() != RenderShape.INVISIBLE) {
Vec3 speed = self.getDeltaMovement();