generated from QuiltMC/quilt-template-mod
-
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.
- Loading branch information
1 parent
b8ab833
commit 67232a2
Showing
7 changed files
with
47 additions
and
3 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,3 +1,3 @@ | ||
## Additions | ||
|
||
- Add `elytra_repair_ingredients` tag which controls which blocks azalea's can be placed on | ||
- Add `seagrass_cant_plant_on` tag which controls which blocks a seagrass can't be placed on |
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
17 changes: 17 additions & 0 deletions
17
src/main/java/fr/mysteriousdev/quilt_tag_plus/mixin/SeagrassBlockMixin.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,17 @@ | ||
package fr.mysteriousdev.quilt_tag_plus.mixin; | ||
|
||
import fr.mysteriousdev.quilt_tag_plus.utils.ModBlockTags; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.SeagrassBlock; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(SeagrassBlock.class) | ||
public class SeagrassBlockMixin { | ||
@Redirect(method = "canPlantOnTop", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;isOf(Lnet/minecraft/block/Block;)Z")) | ||
private boolean canPlantOnTop(BlockState instance, Block block) { | ||
return instance.isIn(ModBlockTags.SEAGRASS_CANT_PLANT_ON); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/fr/mysteriousdev/quilt_tag_plus/mixin/TallSeagrassBlockMixin.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,17 @@ | ||
package fr.mysteriousdev.quilt_tag_plus.mixin; | ||
|
||
import fr.mysteriousdev.quilt_tag_plus.utils.ModBlockTags; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.TallSeagrassBlock; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(TallSeagrassBlock.class) | ||
public class TallSeagrassBlockMixin { | ||
@Redirect(method = "canPlantOnTop", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;isOf(Lnet/minecraft/block/Block;)Z")) | ||
private boolean canPlantOnTop(BlockState instance, Block block) { | ||
return instance.isIn(ModBlockTags.SEAGRASS_CANT_PLANT_ON); | ||
} | ||
} |
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
6 changes: 6 additions & 0 deletions
6
src/main/resources/data/quilt_tag_plus/tags/block/seagrass_cant_plant_on.json
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,6 @@ | ||
{ | ||
"values": [ | ||
"minecraft:magma_block", | ||
"minecraft:gold_block" | ||
] | ||
} |
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