-
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.
Fixes and updates for mixins and mods
- Most of the mods got updated to the newest versions (Sorry AdvancedRocketry and GeographiCraft, you're not very special). - Organized modsupport mixins to different directories for quicker and easier changes later (Plus too many fixes to begin with). - Included fixes from JEIDsIntegration with permission from BobbyTables (JEIDsI creator, thanks for the help). - Made Mixins work on servers.......cause apparently we're idiots and missed this somehow. - Also made mixins modsupport meta file be alphabetized........cause A E S T H E T I C S So most mod support related bugs should be fixed, except pregen (Still have no idea why this is causing an issue), other bugs will be looked into over the next few months.
- Loading branch information
1 parent
98836b0
commit 7c8af94
Showing
27 changed files
with
339 additions
and
59 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
24 changes: 0 additions & 24 deletions
24
src/main/java/org/dimdev/jeid/mixin/modsupport/MixinBlockTFMagicLogSpecial.java
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...jeid/mixin/modsupport/MixinBiomeUtil.java → ...dsupport/abyssalcraft/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
31 changes: 31 additions & 0 deletions
31
src/main/java/org/dimdev/jeid/mixin/modsupport/abyssalcraft/MixinCleansingRitualMessage.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,31 @@ | ||
package org.dimdev.jeid.mixin.modsupport.abyssalcraft; | ||
|
||
import com.shinoow.abyssalcraft.common.network.client.CleansingRitualMessage; | ||
import com.shinoow.abyssalcraft.common.util.BiomeUtil; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraftforge.fml.relauncher.Side; | ||
import org.spongepowered.asm.mixin.*; | ||
|
||
@Pseudo | ||
@Mixin(CleansingRitualMessage.class) | ||
public class MixinCleansingRitualMessage { | ||
@Shadow private int x; | ||
@Shadow private int z; | ||
@Shadow private int biomeID; | ||
@Shadow private boolean batched; | ||
|
||
/** | ||
* @reason This exists to revert changes made by JEID | ||
* @author Shinoow | ||
*/ | ||
@Final | ||
@Overwrite(remap = false) | ||
public void process(EntityPlayer player, Side side) { | ||
BiomeUtil.updateBiome(player.world, new BlockPos(x, 0, z), biomeID, false); | ||
|
||
if(x % 14 == 0 || z % 14 == 0 || !batched) | ||
Minecraft.getMinecraft().renderGlobal.markBlockRangeForRenderUpdate(x - 7, 0, z - 7, x + 7, 255, z + 7); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...d/mixin/modsupport/MixinBiomeHandler.java → ...t/advancedrocketry/MixinBiomeHandler.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
2 changes: 1 addition & 1 deletion
2
...eid/mixin/modsupport/MixinBOPCommand.java → ...upport/biomesoplenty/MixinBOPCommand.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
2 changes: 1 addition & 1 deletion
2
...jeid/mixin/modsupport/MixinModBiomes.java → ...support/biomesoplenty/MixinModBiomes.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
31 changes: 31 additions & 0 deletions
31
src/main/java/org/dimdev/jeid/mixin/modsupport/bookshelf/MixinWorldUtils.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,31 @@ | ||
package org.dimdev.jeid.mixin.modsupport.bookshelf; | ||
|
||
import net.darkhax.bookshelf.lib.Constants; | ||
import net.darkhax.bookshelf.util.WorldUtils; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import net.minecraft.world.biome.Biome; | ||
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; | ||
|
||
import java.util.Arrays; | ||
|
||
@Pseudo | ||
@Mixin(WorldUtils.class) | ||
public abstract class MixinWorldUtils { | ||
@Overwrite(remap = false) | ||
public static void setBiomes(World world, BlockPos pos, Biome biome) { | ||
try { | ||
final Chunk chunk = world.getChunk(pos); | ||
final int[] biomes = ((INewChunk) chunk).getIntBiomeArray(); | ||
Arrays.fill(biomes, Biome.getIdForBiome(biome)); | ||
|
||
WorldUtils.updateNearbyChunks(world, chunk, true, true); | ||
} catch (Exception e) { | ||
Constants.LOG.warn(e, "Unable to set biome for Pos: {}, Biome: {}", pos.toString(), biome.getRegistryName()); | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...d/mixin/modsupport/MixinEntityPortal.java → ...ort/creepingnether/MixinEntityPortal.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
31 changes: 31 additions & 0 deletions
31
src/main/java/org/dimdev/jeid/mixin/modsupport/cyclopscore/MixinWorldHelpers.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,31 @@ | ||
package org.dimdev.jeid.mixin.modsupport.cyclopscore; | ||
|
||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import net.minecraft.world.biome.Biome; | ||
import net.minecraft.world.chunk.Chunk; | ||
import net.minecraftforge.fml.common.network.NetworkRegistry; | ||
import org.cyclops.cyclopscore.helper.WorldHelpers; | ||
import org.dimdev.jeid.INewChunk; | ||
import org.dimdev.jeid.network.BiomeChangeMessage; | ||
import org.dimdev.jeid.network.MessageManager; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Overwrite; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
|
||
@Pseudo | ||
@Mixin(WorldHelpers.class) | ||
public class MixinWorldHelpers { | ||
@Overwrite | ||
public static void setBiome(World world, BlockPos pos, Biome biome) { | ||
Chunk chunk = world.getChunk(pos); | ||
((INewChunk) chunk).getIntBiomeArray()[(pos.getZ() & 0xF) << 4 | pos.getX() & 0xF] = Biome.getIdForBiome(biome); | ||
chunk.markDirty(); | ||
if (!world.isRemote) { | ||
MessageManager.CHANNEL.sendToAllAround( | ||
new BiomeChangeMessage(pos.getX(), pos.getZ(), Biome.getIdForBiome(biome)), | ||
new NetworkRegistry.TargetPoint(world.provider.getDimension(), pos.getX(), 128.0D, pos.getZ(), 128.0D) | ||
); | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/org/dimdev/jeid/mixin/modsupport/extrautils2/MixinBiomeManip.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,31 @@ | ||
package org.dimdev.jeid.mixin.modsupport.extrautils2; | ||
|
||
import com.rwtema.extrautils2.biome.BiomeManip; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import net.minecraft.world.biome.Biome; | ||
import net.minecraft.world.chunk.Chunk; | ||
import net.minecraftforge.fml.common.network.NetworkRegistry; | ||
import org.dimdev.jeid.INewChunk; | ||
import org.dimdev.jeid.network.BiomeChangeMessage; | ||
import org.dimdev.jeid.network.MessageManager; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Overwrite; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
|
||
@Pseudo | ||
@Mixin(BiomeManip.class) | ||
public class MixinBiomeManip { | ||
@Overwrite | ||
public static void setBiome(World world, Biome biome, BlockPos pos) { | ||
Chunk chunk = world.getChunk(pos); | ||
((INewChunk) chunk).getIntBiomeArray()[(pos.getZ() & 0xF) << 4 | pos.getX() & 0xF] = Biome.getIdForBiome(biome); | ||
chunk.markDirty(); | ||
if (!world.isRemote) { | ||
MessageManager.CHANNEL.sendToAllAround( | ||
new BiomeChangeMessage(pos.getX(), pos.getZ(), Biome.getIdForBiome(biome)), | ||
new NetworkRegistry.TargetPoint(world.provider.getDimension(), pos.getX(), 128.0D, pos.getZ(), 128.0D) | ||
); | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...xin/modsupport/MixinDimensionManager.java → ...geographicraft/MixinDimensionManager.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
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
2 changes: 1 addition & 1 deletion
2
...dev/jeid/mixin/modsupport/MixinUtils.java → ...xin/modsupport/thaumcraft/MixinUtils.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
25 changes: 25 additions & 0 deletions
25
src/main/java/org/dimdev/jeid/mixin/modsupport/thebetweenlands/MixinBlockSpreadingDeath.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,25 @@ | ||
package org.dimdev.jeid.mixin.modsupport.thebetweenlands; | ||
|
||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import net.minecraft.world.biome.Biome; | ||
import net.minecraft.world.chunk.Chunk; | ||
import org.dimdev.jeid.INewChunk; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
import thebetweenlands.common.block.terrain.BlockSpreadingDeath; | ||
|
||
@Pseudo | ||
@Mixin(BlockSpreadingDeath.class) | ||
public class MixinBlockSpreadingDeath { | ||
@Inject(method = "convertBiome", at = @At("HEAD"), cancellable = true, remap = false) | ||
private void convertBiomes(World world, BlockPos pos, Biome biome, CallbackInfo ci) { | ||
Chunk chunk = world.getChunk(pos); | ||
((INewChunk) chunk).getIntBiomeArray()[(pos.getZ() & 15) << 4 | pos.getX() & 15] = Biome.getIdForBiome(biome); | ||
chunk.markDirty(); | ||
ci.cancel(); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...a/org/dimdev/jeid/mixin/modsupport/thebetweenlands/MixinGenLayerVoronoiZoomInstanced.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,16 @@ | ||
package org.dimdev.jeid.mixin.modsupport.thebetweenlands; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
import thebetweenlands.common.world.gen.layer.GenLayerVoronoiZoomInstanced; | ||
|
||
@Pseudo | ||
@Mixin(GenLayerVoronoiZoomInstanced.class) | ||
public abstract class MixinGenLayerVoronoiZoomInstanced { | ||
@ModifyConstant(method = "func_75904_a", constant = @Constant(intValue = 255), remap = false) | ||
private int getBitMask(int oldValue) { | ||
return 0xFFFFFFFF; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/org/dimdev/jeid/mixin/modsupport/tofucraft/MixinGenLayerRiverMix.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,16 @@ | ||
package org.dimdev.jeid.mixin.modsupport.tofucraft; | ||
|
||
import cn.mcmod.tofucraft.world.gen.layer.GenLayerRiverMix; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Pseudo | ||
@Mixin(GenLayerRiverMix.class) | ||
public class MixinGenLayerRiverMix { | ||
@ModifyConstant(method = "func_75904_a", constant = @Constant(intValue = 255), remap = false) | ||
private int getBitMask(int oldValue) { | ||
return 0xFFFFFFFF; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/org/dimdev/jeid/mixin/modsupport/tofucraft/MixinGenLayerTofuVoronoiZoom.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,16 @@ | ||
package org.dimdev.jeid.mixin.modsupport.tofucraft; | ||
|
||
import cn.mcmod.tofucraft.world.gen.layer.GenLayerTofuVoronoiZoom; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Pseudo | ||
@Mixin(GenLayerTofuVoronoiZoom.class) | ||
public class MixinGenLayerTofuVoronoiZoom { | ||
@ModifyConstant(method = "func_75904_a", constant = @Constant(intValue = 255), remap = false) | ||
private int getBitMask(int oldValue) { | ||
return 0xFFFFFFFF; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/org/dimdev/jeid/mixin/modsupport/tropicraft/MixinGenLayerTropiVoronoiZoom.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,16 @@ | ||
package org.dimdev.jeid.mixin.modsupport.tropicraft; | ||
|
||
import net.tropicraft.core.common.worldgen.genlayer.GenLayerTropiVoronoiZoom; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Pseudo | ||
@Mixin(GenLayerTropiVoronoiZoom.class) | ||
public class MixinGenLayerTropiVoronoiZoom { | ||
@ModifyConstant(method = "func_75904_a", constant = @Constant(intValue = 255), remap = false) | ||
private int getBitMask(int oldValue) { | ||
return 0xFFFFFFFF; | ||
} | ||
} |
Oops, something went wrong.