Skip to content

Commit

Permalink
Update Abyssalcraft mixin to adapt new BiomeUtil class
Browse files Browse the repository at this point in the history
No longer need mixin for CleansingRitualMessage
Addresses DarkPacks/SevTech-Ages#3639
  • Loading branch information
sam-kirby authored and Runemoro committed Apr 4, 2019
1 parent 882c029 commit 98836b0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 30 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies {
compileOnly "2555:531:BiomesOPlenty-1.12.2-7.0.1.2384-universal@jar"
compileOnly "2561:393:twilightforest-1.12.2-3.7.424-universal@jar"
compileOnly "2569:273:Thaumcraft-1.12.2-6.1.BETA16@jar"
compileOnly "2572:684:AbyssalCraft-1.12.2-1.9.4.10@jar"
compileOnly "2691:339:AbyssalCraft-1.12.2-1.9.6@jar"
compileOnly "2509:208:Creeping+Nether-2.0@jar"
compileOnly "2497:541:GeographiCraft-1.12-0.8.9b@jar"
compileOnly "2581:550:mystcraft-1.12.2-0.13.4.05@jar"
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/org/dimdev/jeid/mixin/modsupport/MixinBiomeUtil.java
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());
}
}
}

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/mixins.jeid.modsupport.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"MixinBOPCommand",
"MixinBlockTFMagicLogSpecial",
"MixinUtils",
"MixinCleansingRitualMessage",
"MixinBiomeUtil",
"MixinEntityPortal",
"MixinDimensionManager",
"MixinBiomeReplacer",
Expand Down

0 comments on commit 98836b0

Please sign in to comment.