detect wandering trader
This commit is contained in:
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -32,7 +32,12 @@ jobs:
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: build/libs/*.jar
|
||||
- name: Test
|
||||
- name: Modrinth Readme Sync
|
||||
env:
|
||||
MODRINTH_TOKEN: ${{ vars.MODRINTH_TOKEN }}
|
||||
run: ./gradlew modrinthSyncBody
|
||||
- name: Modrinth Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
MODRINTH_TOKEN: ${{ vars.MODRINTH_TOKEN }}
|
||||
run: ./gradlew modrinth
|
||||
|
||||
@@ -22,6 +22,7 @@ import net.minecraft.client.gui.screen.ingame.MerchantScreen;
|
||||
import net.minecraft.client.gui.screen.ingame.ShulkerBoxScreen;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.passive.VillagerEntity;
|
||||
import net.minecraft.entity.passive.WanderingTraderEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.packet.c2s.play.SelectMerchantTradeC2SPacket;
|
||||
@@ -293,7 +294,7 @@ public class KeybindCallbacks implements IHotkeyCallback, IClientTickHandler {
|
||||
Vector<Entity> newVillagersInRange = new Vector<Entity>(villagersInRange);
|
||||
|
||||
for (Entity entity : mc.player.clientWorld.getEntities()) {
|
||||
if (entity instanceof VillagerEntity) {
|
||||
if (entity instanceof VillagerEntity || entity instanceof WanderingTraderEntity) {
|
||||
if (entity.getPos().distanceTo(mc.player.getPos()) < 2.5f) {
|
||||
if (found == false) {
|
||||
if (newVillagersInRange.contains(entity) == false) {
|
||||
|
||||
Reference in New Issue
Block a user