Skip to content

Commit

Permalink
comment out broken stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysdh540 committed Aug 28, 2023
1 parent 9060d93 commit cd8afac
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public String getName() {

public final ConfigGroup glue = group(1, "glue", Comments.glue);
public final ConfigFloat maxGlueConnectionRange = f(24F, 0F, "maxGlueConnectionRange", Comments.maxGlueConnectionRange);
public final ConfigBool physicalBlockConnection = b(true, "physicalBlockConnection", Comments.physicalBlockConnection);
// public final ConfigBool physicalBlockConnection = b(true, "physicalBlockConnection", Comments.physicalBlockConnection);

public final ConfigGroup extendo = group(1, "extendo", Comments.extendo);
public final ConfigInt singleExtendoGripRange = i(3, 0, "singleExtendoGripRange", Comments.singleExtendoGripRange);
Expand All @@ -44,7 +44,7 @@ private static class Comments {
maxGlueConnectionRange = "Maximum distance between two blocks for them to be considered for glue connections.",
physicalBlockConnection = "Require blocks to be connected for glue connections.";

static String extendo = "Extend even more!", // unused because it's not implemented yet
static String extendo = "Extend even more!",
singleExtendoGripRange = "How much to extend your reach when holding an Extendo-Grip. Adds to your base reach.",
doubleExtendoGripRange = "How much to extend your reach when holding two Extendo-Grips. Adds to your base reach.";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ public class SuperGlueSectionHandlerMixin {
private double modifyMaxSuperGlueDistance(double original) {
return CUConfigs.server().maxGlueConnectionRange.get();
}
@Redirect(method = "tick", at = @At(value = "INVOKE", target = "Ljava/util/Set;contains(Ljava/lang/Object;)Z"), remap = false)
private boolean modifyNeedsConnected(Set<BlockPos> instance, Object o) {
return instance.contains((BlockPos) o) || !CUConfigs.server().physicalBlockConnection.get();
}
@Redirect(method = "onMouseInput", at = @At(value = "INVOKE", target = "Ljava/util/Set;contains(Ljava/lang/Object;)Z"), remap = false)
private boolean modifyNeedsConnectedClick(Set<BlockPos> instance, Object o) {
return instance.contains((BlockPos) o) || !CUConfigs.server().physicalBlockConnection.get();
}

// @Redirect(method = "tick", at = @At(value = "INVOKE", target = "Ljava/util/Set;contains(Ljava/lang/Object;)Z"), remap = false)
// private boolean modifyNeedsConnected(Set<BlockPos> instance, Object o) {
// return instance.contains((BlockPos) o) || !CUConfigs.server().physicalBlockConnection.get();
// }
//
// @Redirect(method = "onMouseInput", at = @At(value = "INVOKE", target = "Ljava/util/Set;contains(Ljava/lang/Object;)Z"), remap = false)
// private boolean modifyNeedsConnectedClick(Set<BlockPos> instance, Object o) {
// return instance.contains((BlockPos) o) || !CUConfigs.server().physicalBlockConnection.get();
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ public class SuperGlueSelectionPacketMixin {
private double modifyMaxSuperGlueDistance(double original) {
return CUConfigs.server().maxGlueConnectionRange.get();
}

//todo make this work
@Redirect(method = "lambda$handle$0", at = @At(value = "INVOKE", target = "Ljava/util/Set;contains(Ljava/lang/Object;)Z", remap = false), remap = false)
private boolean modifyNeedsConnected(Set<BlockPos> instance, Object o) {
return instance.contains((BlockPos) o) || !CUConfigs.server().physicalBlockConnection.get();
}
// @Redirect(method = "lambda$handle$0", at = @At(value = "INVOKE", target = "Ljava/util/Set;contains(Ljava/lang/Object;)Z", remap = false), remap = false)
// private boolean modifyNeedsConnected(Set<BlockPos> instance, Object o) {
// return instance.contains((BlockPos) o) || !CUConfigs.server().physicalBlockConnection.get();
// }
}

0 comments on commit cd8afac

Please sign in to comment.