Skip to content

Commit

Permalink
Annotation processor, why did you not tell me about this :(
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCodex6824 committed Nov 25, 2024
1 parent 99a7d9f commit e5b0ec6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private static AuraChunk redirectAddAuraChunk(Chunk chunk, short base, float vis
* @reason The original clamps the amount once, which will not work if someone else updated it between
* that and adding the amount
*/
@Overwrite
@Overwrite(remap = false)
public static float drainVis(World world, BlockPos pos, float amount, boolean simulate) {
AuraChunk ac = AuraHandler.getAuraChunk(world.provider.getDimension(),
pos.getX() >> 4, pos.getZ() >> 4);
Expand All @@ -68,7 +68,7 @@ else if (ac instanceof IAtomicAuraChunk) {
* @reason The original clamps the amount once, which will not work if someone else updated it between
* that and adding the amount
*/
@Overwrite
@Overwrite(remap = false)
public static float drainFlux(World world, BlockPos pos, float amount, boolean simulate) {
AuraChunk ac = AuraHandler.getAuraChunk(world.provider.getDimension(),
pos.getX() >> 4, pos.getZ() >> 4);
Expand All @@ -89,7 +89,7 @@ else if (ac instanceof IAtomicAuraChunk) {
* @reason A redirect will not work since the argument passed to setVis had the potentially stale
* old vis amount added to it
*/
@Overwrite
@Overwrite(remap = false)
public static boolean modifyVisInChunk(AuraChunk ac, float amount, boolean notSimulate) {
if (notSimulate && ac instanceof IAtomicAuraChunk) {
((IAtomicAuraChunk) ac).addVis(amount);
Expand All @@ -104,7 +104,7 @@ public static boolean modifyVisInChunk(AuraChunk ac, float amount, boolean notSi
* @reason A redirect will not work since the argument passed to setFlux had the potentially stale
* old flux amount added to it
*/
@Overwrite
@Overwrite(remap = false)
private static boolean modifyFluxInChunk(AuraChunk ac, float amount, boolean notSimulate) {
if (notSimulate && ac instanceof IAtomicAuraChunk) {
((IAtomicAuraChunk) ac).addFlux(amount);
Expand Down

0 comments on commit e5b0ec6

Please sign in to comment.