23w13a
This commit is contained in:
1 parent
23b7aa0945
commit
4171f9b784
7 files changed
+31
-9
No files matched your search
+1
-1
@@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check https://fabricmc.net/develop/
|
# check https://fabricmc.net/develop/
|
||||||
minecraft_version=23w12a
|
minecraft_version=23w13a
|
||||||
loader_version=0.14.18
|
loader_version=0.14.18
|
||||||
jsr305_version=3.0.2
|
jsr305_version=3.0.2
|
||||||
fabric_version=0.76.0+1.19.4
|
fabric_version=0.76.0+1.19.4
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package carpet.mixins;
|
||||||
|
|
||||||
|
import carpet.CarpetSettings;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.BuddingAmethystBlock;
|
||||||
|
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||||
|
import net.minecraft.world.level.material.PushReaction;
|
||||||
|
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;
|
||||||
|
|
||||||
|
@Mixin(BlockBehaviour.BlockStateBase.class)
|
||||||
|
public abstract class BlockBehaviourBlockStateBase_mixin
|
||||||
|
{
|
||||||
|
@Shadow public abstract Block getBlock();
|
||||||
|
|
||||||
|
@Inject(method = "getPistonPushReaction", at = @At("HEAD"), cancellable = true)
|
||||||
|
private void onGetPistonPushReaction(CallbackInfoReturnable<PushReaction> cir)
|
||||||
|
{
|
||||||
|
if (CarpetSettings.movableAmethyst && getBlock() instanceof BuddingAmethystBlock)
|
||||||
|
{
|
||||||
|
cir.setReturnValue(PushReaction.NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,11 +26,6 @@ public class BuddingAmethystBlock_movableAmethystMixin extends Block {
|
|||||||
super(settings);
|
super(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(at = @At("HEAD"), method = "getPistonPushReaction(Lnet/minecraft/world/level/block/state/BlockState;)Lnet/minecraft/world/level/material/PushReaction;", cancellable = true)
|
|
||||||
void getPistonBehavior(BlockState state, CallbackInfoReturnable<PushReaction> cir) {
|
|
||||||
if (CarpetSettings.movableAmethyst) cir.setReturnValue(PushReaction.NORMAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack) {
|
public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack) {
|
||||||
super.playerDestroy(world, player, pos, state, blockEntity, stack);
|
super.playerDestroy(world, player, pos, state, blockEntity, stack);
|
||||||
|
|||||||
@@ -524,7 +524,7 @@ public class WorldAccess
|
|||||||
booleanStateTest(c, "liquid", lv, (s, p) -> !s.getFluidState().isEmpty()));
|
booleanStateTest(c, "liquid", lv, (s, p) -> !s.getFluidState().isEmpty()));
|
||||||
|
|
||||||
expression.addContextFunction("flammable", -1, (c, t, lv) ->
|
expression.addContextFunction("flammable", -1, (c, t, lv) ->
|
||||||
booleanStateTest(c, "flammable", lv, (s, p) -> s.getMaterial().isFlammable()));
|
booleanStateTest(c, "flammable", lv, (s, p) -> s.ignitedByLava()));
|
||||||
|
|
||||||
expression.addContextFunction("transparent", -1, (c, t, lv) ->
|
expression.addContextFunction("transparent", -1, (c, t, lv) ->
|
||||||
booleanStateTest(c, "transparent", lv, (s, p) -> !s.getMaterial().isSolid()));
|
booleanStateTest(c, "transparent", lv, (s, p) -> !s.getMaterial().isSolid()));
|
||||||
|
|||||||
@@ -182,7 +182,6 @@ public class Colors
|
|||||||
entry(Material.SPONGE , "sponge" ),
|
entry(Material.SPONGE , "sponge" ),
|
||||||
entry(Material.SHULKER_SHELL , "shulker" ),
|
entry(Material.SHULKER_SHELL , "shulker" ),
|
||||||
entry(Material.WOOD , "wood" ),
|
entry(Material.WOOD , "wood" ),
|
||||||
entry(Material.NETHER_WOOD , "nether_wood" ),
|
|
||||||
entry(Material.BAMBOO_SAPLING , "shoots" ),
|
entry(Material.BAMBOO_SAPLING , "shoots" ),
|
||||||
entry(Material.BAMBOO , "bamboo" ),
|
entry(Material.BAMBOO , "bamboo" ),
|
||||||
entry(Material.WOOL , "wool" ),
|
entry(Material.WOOL , "wool" ),
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class BlockInfo
|
|||||||
lst.add(Messenger.s(String.format(" - Blocks movement on land: %s", !state.isPathfindable(world,pos, PathComputationType.LAND))));
|
lst.add(Messenger.s(String.format(" - Blocks movement on land: %s", !state.isPathfindable(world,pos, PathComputationType.LAND))));
|
||||||
lst.add(Messenger.s(String.format(" - Blocks movement in air: %s", !state.isPathfindable(world,pos, PathComputationType.AIR))));
|
lst.add(Messenger.s(String.format(" - Blocks movement in air: %s", !state.isPathfindable(world,pos, PathComputationType.AIR))));
|
||||||
lst.add(Messenger.s(String.format(" - Blocks movement in liquids: %s", !state.isPathfindable(world,pos, PathComputationType.WATER))));
|
lst.add(Messenger.s(String.format(" - Blocks movement in liquids: %s", !state.isPathfindable(world,pos, PathComputationType.WATER))));
|
||||||
lst.add(Messenger.s(String.format(" - Can burn: %s", material.isFlammable())));
|
lst.add(Messenger.s(String.format(" - Can burn: %s", state.ignitedByLava())));
|
||||||
lst.add(Messenger.s(String.format(" - Requires a tool: %s", !material.isReplaceable()))); //?maybe
|
lst.add(Messenger.s(String.format(" - Requires a tool: %s", !material.isReplaceable()))); //?maybe
|
||||||
lst.add(Messenger.s(String.format(" - Hardness: %.2f", state.getDestroySpeed(world, pos))));
|
lst.add(Messenger.s(String.format(" - Hardness: %.2f", state.getDestroySpeed(world, pos))));
|
||||||
lst.add(Messenger.s(String.format(" - Blast resistance: %.2f", block.getExplosionResistance())));
|
lst.add(Messenger.s(String.format(" - Blast resistance: %.2f", block.getExplosionResistance())));
|
||||||
|
|||||||
@@ -183,6 +183,7 @@
|
|||||||
"CollectingNeighborUpdaterAccessor",
|
"CollectingNeighborUpdaterAccessor",
|
||||||
|
|
||||||
"BlockBehaviour_customStickyMixin",
|
"BlockBehaviour_customStickyMixin",
|
||||||
|
"BlockBehaviourBlockStateBase_mixin",
|
||||||
"ChainBlock_customStickyMixin",
|
"ChainBlock_customStickyMixin",
|
||||||
"ChestBlock_customStickyMixin",
|
"ChestBlock_customStickyMixin",
|
||||||
"HoneyBlock_customStickyMixin",
|
"HoneyBlock_customStickyMixin",
|
||||||
|
|||||||
Reference in new issue
Block a user