-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hopefully match with JEIDsI now and can lead to a proper release of 1…
….0.3 - Added support for Dimstack mod - Added additional support for Extra Utils 2 - Added Gaia Dimension support - Updated CreepingNether support - Updated JourneyMap support - Additional updates and changes Thank you @sk2048 for the creation of JEIDsI and the help along the way with adding these additional changes and support for mods. Hopefully these next few commits will lead to the unification of both mods and hopefully better support for JEID
- Loading branch information
1 parent
c87fb63
commit adc3704
Showing
13 changed files
with
189 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
language: java | ||
jdk: oraclejdk8 | ||
jdk: openjdk8 | ||
|
||
if: tag IS blank | ||
git: | ||
|
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
27 changes: 18 additions & 9 deletions
27
src/main/java/org/dimdev/jeid/mixin/modsupport/creepingnether/MixinCorruptorAbstract.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 |
---|---|---|
@@ -1,29 +1,38 @@ | ||
package org.dimdev.jeid.mixin.modsupport.creepingnether; | ||
|
||
import com.cutievirus.creepingnether.Ref; | ||
import com.cutievirus.creepingnether.entity.CorruptorAbstract; | ||
import net.minecraft.init.Biomes; | ||
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; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Pseudo | ||
@Mixin(CorruptorAbstract.class) | ||
public class MixinCorruptorAbstract { | ||
@Shadow private static Biome toBiome; | ||
public abstract class MixinCorruptorAbstract { | ||
@Shadow public abstract Biome getBiome(); | ||
|
||
/** | ||
* This should(?) fix Creeping Nether issues | ||
*/ | ||
@Overwrite(remap = false) | ||
public static void corruptBiome(World world, BlockPos pos) { | ||
if (world.isBlockLoaded(pos)) { | ||
Chunk chunk = world.getChunk(pos); | ||
((INewChunk) chunk).getIntBiomeArray()[(pos.getZ() & 15) << 4 | pos.getX() & 15] = Biome.getIdForBiome(toBiome); | ||
public void corruptBiome(World world, BlockPos pos) { | ||
if (!world.isBlockLoaded(pos)) return; | ||
Biome oldBiome = world.getBiome(pos); | ||
if (oldBiome == this.getBiome() || oldBiome != Biomes.HELL && this.getBiome() != Ref.biomeCreepingNether) return; | ||
Chunk chunk = world.getChunk(pos); | ||
((INewChunk) chunk).getIntBiomeArray()[(pos.getZ() & 15) << 4 | pos.getX() & 15] = Biome.getIdForBiome(this.getBiome()); | ||
if (!world.isRemote) { | ||
MessageManager.CHANNEL.sendToAllAround( | ||
new BiomeChangeMessage(pos.getX(), pos.getZ(), Biome.getIdForBiome(this.getBiome())), | ||
new NetworkRegistry.TargetPoint(world.provider.getDimension(), pos.getX(), 128.0D, pos.getZ(), 128.0D) | ||
); | ||
} | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
src/main/java/org/dimdev/jeid/mixin/modsupport/dimstack/DimstackPlugin.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,47 @@ | ||
package org.dimdev.jeid.mixin.modsupport.dimstack; | ||
|
||
import net.minecraftforge.fml.common.Loader; | ||
import org.spongepowered.asm.lib.tree.ClassNode; | ||
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; | ||
import org.spongepowered.asm.mixin.extensibility.IMixinInfo; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
|
||
public class DimstackPlugin implements IMixinConfigPlugin { | ||
@Override | ||
public void onLoad(String s) { | ||
|
||
} | ||
|
||
@Override | ||
public String getRefMapperConfig() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean shouldApplyMixin(String s, String s1) { | ||
if (Loader.isModLoaded("dimstack")) return true; | ||
return false; | ||
} | ||
|
||
@Override | ||
public void acceptTargets(Set<String> set, Set<String> set1) { | ||
|
||
} | ||
|
||
@Override | ||
public List<String> getMixins() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void preApply(String s, ClassNode classNode, String s1, IMixinInfo iMixinInfo) { | ||
|
||
} | ||
|
||
@Override | ||
public void postApply(String s, ClassNode classNode, String s1, IMixinInfo iMixinInfo) { | ||
|
||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/org/dimdev/jeid/mixin/modsupport/dimstack/MixinChunkPrimer.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,18 @@ | ||
package org.dimdev.jeid.mixin.modsupport.dimstack; | ||
|
||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.world.chunk.ChunkPrimer; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(value = ChunkPrimer.class, priority = 500) | ||
public class MixinChunkPrimer { | ||
public IBlockState ingnoredBlock; | ||
|
||
@Inject(method = "setBlockState", at = @At(value = "HEAD"), cancellable = true) | ||
private void ignoreBlock(int x, int y, int z, IBlockState state, CallbackInfo ci) { | ||
if (state != null && this.ingnoredBlock == state) ci.cancel(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/org/dimdev/jeid/mixin/modsupport/extrautils2/MixinWorldProviderSpecialDim.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,23 @@ | ||
package org.dimdev.jeid.mixin.modsupport.extrautils2; | ||
|
||
import com.rwtema.extrautils2.dimensions.workhousedim.WorldProviderSpecialDim; | ||
import net.minecraft.world.chunk.Chunk; | ||
import net.minecraft.world.gen.ChunkProviderServer; | ||
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 org.spongepowered.asm.mixin.injection.callback.LocalCapture; | ||
|
||
import java.util.Arrays; | ||
|
||
@Pseudo | ||
@Mixin(WorldProviderSpecialDim.class) | ||
public class MixinWorldProviderSpecialDim { | ||
@Inject(method = "generate", at = @At(target = "Lnet/minecraft/world/chunk/Chunk;setTerrainPopulated(Z)V", value = "INVOKE"), locals = LocalCapture.CAPTURE_FAILSOFT) | ||
private static void setChunkIntBiomeArray(int x, int z, ChunkProviderServer chunkProvider, Object generator, CallbackInfo ci, Chunk chunk, int idForBiome) { | ||
Arrays.fill(((INewChunk) chunk).getIntBiomeArray(), idForBiome); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/org/dimdev/jeid/mixin/modsupport/gaiadimension/MixinGenLayerGDRiverMix.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.gaiadimension; | ||
|
||
import androsa.gaiadimension.world.layer.GenLayerGDRiverMix; | ||
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(GenLayerGDRiverMix.class) | ||
public class MixinGenLayerGDRiverMix { | ||
@ModifyConstant(method = "func_75904_a", constant = @Constant(intValue = 255), remap = false) | ||
private int getBitMask(int oldValue) { | ||
return 0xFFFFFFFF; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"package": "org.dimdev.jeid.mixin.modsupport.dimstack", | ||
"plugin": "org.dimdev.jeid.mixin.modsupport.dimstack.DimstackPlugin", | ||
"required": true, | ||
"refmap": "mixins.jeid.refmap.json", | ||
"target": "@env(DEFAULT)", | ||
"minVersion": "0.6", | ||
"compatibilityLevel": "JAVA_8", | ||
"mixins": [ | ||
"MixinChunkPrimer" | ||
], | ||
"client": [], | ||
"injectors": { | ||
"maxShiftBy": 10 | ||
} | ||
} |
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