-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Abyssalcraft mixin to adapt new BiomeUtil class
No longer need mixin for CleansingRitualMessage Addresses DarkPacks/SevTech-Ages#3639
- Loading branch information
Showing
4 changed files
with
28 additions
and
30 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
26 changes: 26 additions & 0 deletions
26
src/main/java/org/dimdev/jeid/mixin/modsupport/MixinBiomeUtil.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,26 @@ | ||
package org.dimdev.jeid.mixin.modsupport; | ||
|
||
import com.shinoow.abyssalcraft.common.network.PacketDispatcher; | ||
import com.shinoow.abyssalcraft.common.network.client.CleansingRitualMessage; | ||
import com.shinoow.abyssalcraft.common.util.BiomeUtil; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import net.minecraft.world.chunk.Chunk; | ||
import org.dimdev.jeid.INewChunk; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Overwrite; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
|
||
@Pseudo | ||
@Mixin(BiomeUtil.class) | ||
public class MixinBiomeUtil { | ||
@Overwrite(remap = false) | ||
public static void updateBiome(World worldIn, BlockPos pos, int b, boolean batched) { | ||
Chunk c = worldIn.getChunk(pos); | ||
((INewChunk) c).getIntBiomeArray()[(pos.getZ() & 0xF) << 4 | pos.getX() & 0xF] = b; | ||
c.setModified(true); | ||
if(!worldIn.isRemote) { | ||
PacketDispatcher.sendToDimension(new CleansingRitualMessage(pos.getX(), pos.getZ(), b, batched), worldIn.provider.getDimension()); | ||
} | ||
} | ||
} |
28 changes: 0 additions & 28 deletions
28
src/main/java/org/dimdev/jeid/mixin/modsupport/MixinCleansingRitualMessage.java
This file was deleted.
Oops, something went wrong.
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