From ae2b0f487514b147e3e440c50bade61de7999636 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Fri, 23 Apr 2021 01:41:01 +0000 Subject: [PATCH] Move blocks, items, mcdata, mobs to info/ folder --- mosfet/bot.py | 8 ++++---- mosfet/game.py | 8 ++++---- mosfet/{ => info}/blocks.py | 2 +- mosfet/{ => info}/items.py | 0 mosfet/{ => info}/mcdata.py | 0 mosfet/{ => info}/mobs.py | 0 mosfet/job.py | 8 ++++---- mosfet/jobs/cache_items.py | 8 ++++---- mosfet/jobs/check_threats.py | 8 ++++---- mosfet/jobs/clear_leaves.py | 8 ++++---- mosfet/jobs/eat_food.py | 8 ++++---- mosfet/jobs/fill_blocks.py | 8 ++++---- mosfet/jobs/find_gapple.py | 8 ++++---- mosfet/jobs/gather_crop.py | 8 ++++---- mosfet/jobs/gather_sand.py | 8 ++++---- mosfet/jobs/gather_wart.py | 10 +++++----- mosfet/jobs/gather_wood.py | 8 ++++---- mosfet/jobs/grab_sand.py | 8 ++++---- mosfet/jobs/grab_sapling.py | 8 ++++---- mosfet/jobs/grab_supplies.py | 8 ++++---- mosfet/jobs/plant_tree.py | 8 ++++---- mosfet/jobs/sell_to_villager.py | 8 ++++---- mosfet/jobs/sleep_with_bed.py | 8 ++++---- mosfet/path.py | 2 +- mosfet/protocol/packets.py | 2 +- mosfet/utils.py | 4 ++-- mosfet/world.py | 4 ++-- 27 files changed, 84 insertions(+), 84 deletions(-) rename mosfet/{ => info}/blocks.py (99%) rename mosfet/{ => info}/items.py (100%) rename mosfet/{ => info}/mcdata.py (100%) rename mosfet/{ => info}/mobs.py (100%) diff --git a/mosfet/bot.py b/mosfet/bot.py index ef58d39..10ea490 100644 --- a/mosfet/bot.py +++ b/mosfet/bot.py @@ -24,17 +24,17 @@ from mosfet.protocol.managers import DataManager, ChunksManager, ChatManager, Ch from munch import Munch -from mosfet import blocks from mosfet import game -from mosfet import items from mosfet import job -from mosfet import mcdata -from mosfet import mobs from mosfet import path from mosfet import print_help from mosfet import utils from mosfet import vector from mosfet import world +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs for module in [ blocks, diff --git a/mosfet/game.py b/mosfet/game.py index 8f0021a..fa5fc65 100644 --- a/mosfet/game.py +++ b/mosfet/game.py @@ -25,12 +25,12 @@ from mosfet.protocol.types import Slot from mosfet import print_help from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs from mosfet import bot from mosfet import vector +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class Game: def __init__(self, global_state): diff --git a/mosfet/blocks.py b/mosfet/info/blocks.py similarity index 99% rename from mosfet/blocks.py rename to mosfet/info/blocks.py index f93627e..a9b3ff9 100644 --- a/mosfet/blocks.py +++ b/mosfet/info/blocks.py @@ -1,7 +1,7 @@ import json import importlib -from mosfet import mcdata +from mosfet.info import mcdata MCD_BLOCKS = {} for d in mcdata.mcd.blocks.values(): diff --git a/mosfet/items.py b/mosfet/info/items.py similarity index 100% rename from mosfet/items.py rename to mosfet/info/items.py diff --git a/mosfet/mcdata.py b/mosfet/info/mcdata.py similarity index 100% rename from mosfet/mcdata.py rename to mosfet/info/mcdata.py diff --git a/mosfet/mobs.py b/mosfet/info/mobs.py similarity index 100% rename from mosfet/mobs.py rename to mosfet/info/mobs.py diff --git a/mosfet/job.py b/mosfet/job.py index 3179469..90cb323 100644 --- a/mosfet/job.py +++ b/mosfet/job.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs from mosfet.jobs import ( cache_items, diff --git a/mosfet/jobs/cache_items.py b/mosfet/jobs/cache_items.py index 28621ce..18a29c3 100644 --- a/mosfet/jobs/cache_items.py +++ b/mosfet/jobs/cache_items.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class CacheItemsStates: def idle(self): diff --git a/mosfet/jobs/check_threats.py b/mosfet/jobs/check_threats.py index f5b35e4..38075e1 100644 --- a/mosfet/jobs/check_threats.py +++ b/mosfet/jobs/check_threats.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class CheckThreatsStates: def idle(self): diff --git a/mosfet/jobs/clear_leaves.py b/mosfet/jobs/clear_leaves.py index 3592e7b..e3e9221 100644 --- a/mosfet/jobs/clear_leaves.py +++ b/mosfet/jobs/clear_leaves.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class ClearLeavesStates: def idle(self): diff --git a/mosfet/jobs/eat_food.py b/mosfet/jobs/eat_food.py index cccb508..16bb758 100644 --- a/mosfet/jobs/eat_food.py +++ b/mosfet/jobs/eat_food.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class EatFoodStates: def idle(self): diff --git a/mosfet/jobs/fill_blocks.py b/mosfet/jobs/fill_blocks.py index 6b9d488..633b292 100644 --- a/mosfet/jobs/fill_blocks.py +++ b/mosfet/jobs/fill_blocks.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class FillBlocksStates: def idle(self): diff --git a/mosfet/jobs/find_gapple.py b/mosfet/jobs/find_gapple.py index 874ed8a..6ac0f82 100644 --- a/mosfet/jobs/find_gapple.py +++ b/mosfet/jobs/find_gapple.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class FindGappleStates: def idle(self): diff --git a/mosfet/jobs/gather_crop.py b/mosfet/jobs/gather_crop.py index c0d3662..7917435 100644 --- a/mosfet/jobs/gather_crop.py +++ b/mosfet/jobs/gather_crop.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class GatherCropStates: def idle(self): diff --git a/mosfet/jobs/gather_sand.py b/mosfet/jobs/gather_sand.py index 5b4d579..59b418c 100644 --- a/mosfet/jobs/gather_sand.py +++ b/mosfet/jobs/gather_sand.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class GatherSandStates: def bair(self, p): diff --git a/mosfet/jobs/gather_wart.py b/mosfet/jobs/gather_wart.py index e552ec5..d99ab84 100644 --- a/mosfet/jobs/gather_wart.py +++ b/mosfet/jobs/gather_wart.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class GatherWartStates: def idle(self): @@ -48,7 +48,7 @@ class GatherWartStates: navpath = w.path_to_place(p, self.wart) if navpath: - print('Going to wart', self.crop) + print('Going to wart', self.wart) self.g.path = navpath self.g.look_at = utils.padd(self.wart, path.BLOCK_BELOW) self.state = self.going_to_wart diff --git a/mosfet/jobs/gather_wood.py b/mosfet/jobs/gather_wood.py index 429bfd2..32443fe 100644 --- a/mosfet/jobs/gather_wood.py +++ b/mosfet/jobs/gather_wood.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class GatherWoodStates: def bair(self, p): diff --git a/mosfet/jobs/grab_sand.py b/mosfet/jobs/grab_sand.py index 03204c6..0d1c99c 100644 --- a/mosfet/jobs/grab_sand.py +++ b/mosfet/jobs/grab_sand.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class GrabSandStates: def idle(self): diff --git a/mosfet/jobs/grab_sapling.py b/mosfet/jobs/grab_sapling.py index 259a379..d2f1012 100644 --- a/mosfet/jobs/grab_sapling.py +++ b/mosfet/jobs/grab_sapling.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class GrabSaplingStates: def idle(self): diff --git a/mosfet/jobs/grab_supplies.py b/mosfet/jobs/grab_supplies.py index 61e681a..b3bec35 100644 --- a/mosfet/jobs/grab_supplies.py +++ b/mosfet/jobs/grab_supplies.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class GrabSuppliesStates: def idle(self): diff --git a/mosfet/jobs/plant_tree.py b/mosfet/jobs/plant_tree.py index 41be5f1..e2e264e 100644 --- a/mosfet/jobs/plant_tree.py +++ b/mosfet/jobs/plant_tree.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class PlantTreeStates: def idle(self): diff --git a/mosfet/jobs/sell_to_villager.py b/mosfet/jobs/sell_to_villager.py index 231a052..698963f 100644 --- a/mosfet/jobs/sell_to_villager.py +++ b/mosfet/jobs/sell_to_villager.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class SellToVillagerStates: def idle(self): diff --git a/mosfet/jobs/sleep_with_bed.py b/mosfet/jobs/sleep_with_bed.py index ab48041..8d33a0c 100644 --- a/mosfet/jobs/sleep_with_bed.py +++ b/mosfet/jobs/sleep_with_bed.py @@ -11,10 +11,10 @@ from mosfet.protocol.managers import ChunkNotLoadedException from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import items -from mosfet import mcdata -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import items +from mosfet.info import mcdata +from mosfet.info import mobs class SleepWithBedStates: def idle(self): diff --git a/mosfet/path.py b/mosfet/path.py index a2f0e54..f951af3 100644 --- a/mosfet/path.py +++ b/mosfet/path.py @@ -5,7 +5,7 @@ from math import hypot, sqrt from astar import AStar -from mosfet import blocks +from mosfet.info import blocks from mosfet import utils class AStarTimeout(Exception): diff --git a/mosfet/protocol/packets.py b/mosfet/protocol/packets.py index 055ddf3..e940dd1 100644 --- a/mosfet/protocol/packets.py +++ b/mosfet/protocol/packets.py @@ -10,7 +10,7 @@ from minecraft.networking.types import ( from .types import Nbt, Slot, Entry, Trade -from mosfet import blocks +from mosfet.info import blocks class ChunkDataPacket(Packet): diff --git a/mosfet/utils.py b/mosfet/utils.py index ba04f87..f8c69fe 100644 --- a/mosfet/utils.py +++ b/mosfet/utils.py @@ -2,8 +2,8 @@ import importlib import collections from math import floor, ceil, sqrt, hypot -from mosfet import blocks -from mosfet import mcdata +from mosfet.info import blocks +from mosfet.info import mcdata TICK = 0.05 diff --git a/mosfet/world.py b/mosfet/world.py index 4db6ae8..1192e17 100644 --- a/mosfet/world.py +++ b/mosfet/world.py @@ -8,8 +8,8 @@ from copy import copy from mosfet import utils from mosfet import path -from mosfet import blocks -from mosfet import mobs +from mosfet.info import blocks +from mosfet.info import mobs class World: def __init__(self, global_state):