Skip to content

Commit

Permalink
23w12a
Browse files Browse the repository at this point in the history
  • Loading branch information
gnembon committed Mar 22, 2023
1 parent 4e94d1b commit f1586b3
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 43 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check https://fabricmc.net/develop/
minecraft_version=1.19.4
loader_version=0.14.17
minecraft_version=23w12a
loader_version=0.14.18
jsr305_version=3.0.2
fabric_version=0.75.3+1.19.4
fabric_version=0.76.0+1.19.4

# Mod Properties
mod_version = 1.4.101
Expand All @@ -17,7 +17,7 @@ org.gradle.jvmargs=-Xmx1G
# The Curseforge versions "names" or ids for the main branch (comma separated: 1.16.4,1.16.5)
# This is needed because CF uses too vague names for prereleases and release candidates
# Can also be the version ID directly coming from https://minecraft.curseforge.com/api/game/versions?token=[API_TOKEN]
release-curse-versions = Minecraft 1.19:1.19.4
release-curse-versions = Minecraft 1.20:1.20-Snapshot
# Whether or not to build another branch on release
release-extra-branch = false
# The name of the second branch to release
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/carpet/helpers/QuasiConnectivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import carpet.CarpetSettings;

import net.minecraft.core.BlockPos;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.SignalGetter;

public class QuasiConnectivity {

public static boolean hasQuasiSignal(Level level, BlockPos pos) {
public static boolean hasQuasiSignal(SignalGetter level, BlockPos pos) {
for (int i = 1; i <= CarpetSettings.quasiConnectivity; i++) {
BlockPos above = pos.above(i);

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/carpet/mixins/PistonBaseBlock_qcMixin.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package carpet.mixins;

import net.minecraft.world.level.SignalGetter;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
Expand All @@ -9,7 +10,6 @@

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.piston.PistonBaseBlock;

@Mixin(PistonBaseBlock.class)
Expand All @@ -23,7 +23,7 @@ public class PistonBaseBlock_qcMixin {
target = "Lnet/minecraft/core/BlockPos;above()Lnet/minecraft/core/BlockPos;"
)
)
private void carpet_checkQuasiSignal(Level level, BlockPos pos, Direction facing, CallbackInfoReturnable<Boolean> cir) {
private void carpet_checkQuasiSignal(SignalGetter level, BlockPos pos, Direction facing, CallbackInfoReturnable<Boolean> cir) {
cir.setReturnValue(QuasiConnectivity.hasQuasiSignal(level, pos));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.SignalGetter;
import net.minecraft.world.level.block.piston.PistonBaseBlock;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;

@Mixin(PistonBaseBlock.class)
public abstract class PistonBaseBlock_rotatorBlockMixin implements PistonBlockInterface
{
@Shadow protected abstract boolean getNeighborSignal(Level world_1, BlockPos blockPos_1, Direction direction_1);
@Shadow protected abstract boolean getNeighborSignal(SignalGetter world_1, BlockPos blockPos_1, Direction direction_1);

@Override
public boolean publicShouldExtend(Level world_1, BlockPos blockPos_1, Direction direction_1)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package carpet.mixins;


import carpet.CarpetSettings;
import net.minecraft.world.level.block.entity.SculkSensorBlockEntity;
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.CallbackInfoReturnable;

@Mixin(SculkSensorBlockEntity.VibrationConfig.class)
public class SculkSensorBlockEntityVibrationConfig_sculkSensorRangeMixin
{
@Inject(method = "getListenerRadius", at = @At("HEAD"), cancellable = true)
private void sculkSensorRange(CallbackInfoReturnable<Integer> cir)
{
if (CarpetSettings.sculkSensorRange != SculkSensorBlockEntity.VibrationConfig.LISTENER_RANGE) {
cir.setReturnValue(CarpetSettings.sculkSensorRange);
}
}
}
30 changes: 0 additions & 30 deletions src/main/java/carpet/mixins/SculkSensorBlock_rangeMixin.java

This file was deleted.

2 changes: 0 additions & 2 deletions src/main/java/carpet/script/value/ScreenValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import net.minecraft.world.inventory.GrindstoneMenu;
import net.minecraft.world.inventory.HopperMenu;
import net.minecraft.world.inventory.LecternMenu;
import net.minecraft.world.inventory.LegacySmithingMenu;
import net.minecraft.world.inventory.LoomMenu;
import net.minecraft.world.inventory.MerchantMenu;
import net.minecraft.world.inventory.ShulkerBoxMenu;
Expand Down Expand Up @@ -99,7 +98,6 @@ public class ScreenValue extends Value
screenHandlerFactories.put("loom", LoomMenu::new);
screenHandlerFactories.put("merchant", MerchantMenu::new);
screenHandlerFactories.put("shulker_box", (syncId, playerInventory) -> new ShulkerBoxMenu(syncId, playerInventory, new SimpleContainer(9 * 3)));
screenHandlerFactories.put("smithing_legacy", LegacySmithingMenu::new);
screenHandlerFactories.put("smithing", SmithingMenu::new);
screenHandlerFactories.put("smoker", SmokerMenu::new);
screenHandlerFactories.put("stonecutter", StonecutterMenu::new);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/carpet.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"TheEndGatewayBlockEntity_creativeNoClipMixin",
"LivingEntity_creativeFlyMixin",
"ChunkMap_creativePlayersLoadChunksMixin",
"SculkSensorBlock_rangeMixin",
"SculkSensorBlockEntityVibrationConfig_sculkSensorRangeMixin",
"CollectingNeighborUpdaterAccessor",

"BlockBehaviour_customStickyMixin",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"accessWidener" : "carpet.accesswidener",

"depends": {
"minecraft": "1.19.4",
"minecraft": ">1.19.4",
"fabricloader": ">=0.14.6",
"java": ">=17"
}
Expand Down

0 comments on commit f1586b3

Please sign in to comment.