-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Bumped provided version of Fabric Loader from 0.14.24 to 0.15.0 - Added MixinExtras as a jar-in-jar mod inside of quilt loader. - This is an additional library for creating mixins in more expressive and compatible ways. For example "@WrapOperation" is a more compatible way of doing "@reDIrect", if you don't need to replace the method call in all circumstances. For more information please see the MixinExtras wiki page: https://github.com/LlamaLad7/MixinExtras/wiki - You can use the system property "-Dloader.disable_builtin_mixin_extras=true" to disable loader's builtin version of mixin extras. As such mods that use mixin extras are encouraged to add it as a dependency in their quilt.mod.json to make the crash more obvious when a user has disabled it but a mod requires it. - Re-added a previous fix that was added in 0.18.1-beta.1 and accidently removed in 0.18.1-beta.58: - Changed the entrypoint hook to use the old fabric class when running in versions before 1.17. - This allows NotEnoughCrashes to redirect our entrypoint Bug Fixes: - Fixed QuiltClassPath.getResources not always returning all paths, when multiple mods ship the same file.
- Loading branch information
Showing
17 changed files
with
142 additions
and
33 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
18 changes: 17 additions & 1 deletion
18
...craft/minecraft-test/src/main/java/net/fabricmc/minecraft/test/mixin/MixinGrassBlock.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,19 +1,35 @@ | ||
package net.fabricmc.minecraft.test.mixin; | ||
|
||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; | ||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; | ||
import com.llamalad7.mixinextras.sugar.Local; | ||
|
||
import net.minecraft.block.Blocks; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.Fertilizable; | ||
import net.minecraft.block.GrassBlock; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.util.random.RandomGenerator; | ||
import net.minecraft.world.World; | ||
import net.minecraft.world.WorldView; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Overwrite; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
@Mixin(GrassBlock.class) | ||
public abstract class MixinGrassBlock implements Fertilizable { | ||
@Override | ||
@Overwrite | ||
public boolean canGrow(World world, RandomGenerator random, BlockPos pos, BlockState state) { | ||
public boolean canFertilize(World world, RandomGenerator random, BlockPos pos, BlockState state) { | ||
return false; | ||
} | ||
|
||
@WrapOperation(method = "isFertilizable", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/WorldView;getBlockState(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;")) | ||
private BlockState testMixinExtras(WorldView instance, BlockPos pos, Operation<BlockState> original, @Local(argsOnly = true) BlockState state) { | ||
if (state == null) { | ||
return Blocks.AIR.getDefaultState(); | ||
} | ||
|
||
return original.call(instance, pos); | ||
} | ||
} |
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
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
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
Oops, something went wrong.