-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'main' into mixin-and-obsolete-mod-simpl…
…ified
- Loading branch information
Showing
23 changed files
with
586 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...va/mod/acgaming/universaltweaks/mods/modularrouters/mixin/UTParticleBeamMessageMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package mod.acgaming.universaltweaks.mods.modularrouters.mixin; | ||
|
||
|
||
import java.awt.Color; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.world.World; | ||
|
||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; | ||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; | ||
import me.desht.modularrouters.client.fx.Vector3; | ||
import me.desht.modularrouters.network.ParticleBeamMessage; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
// Courtesy of jchung01 | ||
@Mixin(value = ParticleBeamMessage.Handler.class, remap = false) | ||
public class UTParticleBeamMessageMixin | ||
{ | ||
@WrapOperation(method = "onMessage(Lme/desht/modularrouters/network/ParticleBeamMessage;Lnet/minecraftforge/fml/common/network/simpleimpl/MessageContext;)Lnet/minecraftforge/fml/common/network/simpleimpl/IMessage;", at = @At(value = "INVOKE", target = "Lme/desht/modularrouters/client/fx/ParticleBeam;doParticleBeam(Lnet/minecraft/world/World;Lme/desht/modularrouters/client/fx/Vector3;Lme/desht/modularrouters/client/fx/Vector3;Ljava/awt/Color;F)V")) | ||
private void utScheduleParticle(World world, Vector3 orig, Vector3 end, Color flatColor, float size, Operation<Void> original) | ||
{ | ||
Minecraft.getMinecraft().addScheduledTask(() -> | ||
{ | ||
original.call(world, orig, end, flatColor, size); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.