This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor mixins into toggleable modules
- Loading branch information
Showing
83 changed files
with
1,562 additions
and
1,359 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
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
...enderer/texture/MixinAbstractTexture.java → ...xins/early/base/MixinAbstractTexture.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
33 changes: 33 additions & 0 deletions
33
src/main/java/mist475/mcpatcherforge/mixins/early/base/MixinBlockGrass.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,33 @@ | ||
package mist475.mcpatcherforge.mixins.early.base; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.block.BlockGrass; | ||
import net.minecraft.util.IIcon; | ||
import net.minecraft.world.IBlockAccess; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
import com.prupe.mcpatcher.mal.block.RenderBlocksUtils; | ||
|
||
@Mixin(BlockGrass.class) | ||
public class MixinBlockGrass { | ||
|
||
@Shadow | ||
private IIcon field_149991_b; | ||
|
||
@Inject( | ||
method = "getIcon(Lnet/minecraft/world/IBlockAccess;IIII)Lnet/minecraft/util/IIcon;", | ||
at = @At("HEAD"), | ||
cancellable = true) | ||
private void modifyGetIcon(IBlockAccess worldIn, int x, int y, int z, int side, CallbackInfoReturnable<IIcon> cir) { | ||
final IIcon grassTexture = RenderBlocksUtils | ||
.getGrassTexture((Block) (Object) this, worldIn, x, y, z, side, this.field_149991_b); | ||
if (grassTexture != null) { | ||
cir.setReturnValue(grassTexture); | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ixins/early/block/MixinBlockMycelium.java → ...mixins/early/base/MixinBlockMycelium.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
2 changes: 1 addition & 1 deletion
2
...MixinSimpleReloadableResourceManager.java → ...MixinSimpleReloadableResourceManager.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
...erer/texture/MixinTextureAtlasSprite.java → ...s/early/base/MixinTextureAtlasSprite.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
Oops, something went wrong.