Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Villager RNG Manipulation #642

Open
wants to merge 98 commits into
base: fabric
Choose a base branch
from

Conversation

RealRTTV
Copy link
Contributor

Add Villager RNG Manipulation to brute-force optimal trades

@xpple
Copy link
Collaborator

xpple commented May 31, 2024

Holy fuck nice!

@erxson
Copy link

erxson commented May 31, 2024

yooooo

RealRTTV and others added 24 commits May 31, 2024 14:55
- i need to fix for ping tho
- i can probably remove the clock requirement and use the day/night packets
- i can probably remove the clock requirement and use the day/night packets
Add simulation for more actions and add trade cracking for levels above 1
@vanvac
Copy link

vanvac commented Nov 30, 2024

👍

@vanvac
Copy link

vanvac commented Nov 30, 2024

can i test out build artifacts?
if so how?

@Earthcomputer
Copy link
Owner

Earthcomputer commented Nov 30, 2024

can i test out build artifacts?
if so how?

Yeah you just unzip it, get the mod jar out of it and then install it like a regular mod. It's in a working state but I won't be providing support for using it. It needs to be made more user friendly before it can be merged.

@vanvac
Copy link

vanvac commented Nov 30, 2024

image
the only zip file i could find in the artifacts was for im guessing what are the unit tests (cheked the zip files and all there is are the html pages)

@Earthcomputer
Copy link
Owner

Ah sorry, I forgot artifacts are not built for PRs. You will have to clone the PR and build it yourself. But again, this channel is for development, it's best to join the discord and ask in support if you get stuck.

Copy link
Owner

@Earthcomputer Earthcomputer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having some issues running it, see Discord

src/main/resources/assets/clientcommands/lang/en_us.json Outdated Show resolved Hide resolved
src/main/resources/assets/clientcommands/lang/en_us.json Outdated Show resolved Hide resolved
villager_rng_setup.png Outdated Show resolved Hide resolved
}

private static void sendInvalidSetupHelp() {
ClientCommandHelper.sendHelp(Component.translatable("villagerManip.help.setup.prefix").append(Component.translatable("villagerManip.help.setup.here").withStyle(ChatFormatting.UNDERLINE).withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://raw.githubusercontent.com/Earthcomputer/clientcommands/refs/heads/fabric/villager_rng_setup.png")))).append(Component.translatable("villagerManip.help.setup.suffix")));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be a permalink, otherwise we're committing to having this file in the repository forever. The problem is, we don't have a permalink pointing to my repo yet. I'll add something to the clientcommands buildscript that allows you to get the commit hash that clientcommands was built with

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

BlockState trapdoorPosState = level.getBlockState(trapdoorPos);
if (!((airPosState.isAir() || direction != bedDirection) && trapdoorPosState.is(BlockTags.TRAPDOORS) && trapdoorPosState.getValue(TrapDoorBlock.HALF) == Half.TOP && trapdoorPosState.getValue(TrapDoorBlock.HALF) == Half.TOP && trapdoorPosState.getValue(TrapDoorBlock.OPEN) == Boolean.FALSE)) {
if (!(trapdoorPosState.is(BlockTags.TRAPDOORS) && trapdoorPosState.getValue(TrapDoorBlock.HALF) == Half.TOP && trapdoorPosState.getValue(TrapDoorBlock.HALF) == Half.TOP && trapdoorPosState.getValue(TrapDoorBlock.OPEN) == Boolean.FALSE)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're checking the trapdoor half twice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed i am...

@@ -293,7 +287,7 @@ private static void checkVillagerSetup() {
}

private static void sendInvalidSetupHelp() {
ClientCommandHelper.sendHelp(Component.translatable("villagerManip.help.setup.prefix").append(Component.translatable("villagerManip.help.setup.here").withStyle(ChatFormatting.UNDERLINE).withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://raw.githubusercontent.com/Earthcomputer/clientcommands/refs/heads/fabric/villager_rng_setup.png")))).append(Component.translatable("villagerManip.help.setup.suffix")));
ClientCommandHelper.sendHelp(Component.translatable("villagerManip.help.setup", Component.translatable("villagerManip.help.setup.link").withStyle(style -> style.withUnderlined(true).withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://raw.githubusercontent.com/Earthcomputer/clientcommands/refs/heads/fabric/dpcs/villager_rng_setup.png")))));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo of docs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bruh moment


"villagerManip.help.day": "Help: Villager RNG manipulation can only be done at night-time",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The villagerManip translations shouldn't be in the middle of the commands, as that's not alphabetical

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i'll move them

RealRTTV and others added 6 commits December 2, 2024 19:32
…king

# Conflicts:
#	src/main/java/net/earthcomputer/clientcommands/util/DebugRandom.java
…king

# Conflicts:
#	src/main/java/net/earthcomputer/clientcommands/features/FishingCracker.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants