Checkpoint continued progress
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
from mcpacker.emit.markdown.report import Report
|
||||
from mcpacker.model.core.world import World
|
||||
from mcpacker.model.modpack import ModPack
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class BiomeReport(Report):
|
||||
|
||||
def __init__(self, world:World):
|
||||
super().__init__("biomes.md", world)
|
||||
def __init__(self, pack:ModPack):
|
||||
super().__init__("biomes.md", pack)
|
||||
|
||||
def build(self):
|
||||
for biome in self.world.biomes.all():
|
||||
self.line(f"# Biome: {biome.city} <{biome.gameId}>")
|
||||
for biome in self.pack.world.biomes.all():
|
||||
self.line(f"# Biome: {biome.gameId} ({biome.city})")
|
||||
self.line()
|
||||
|
||||
self.indent()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from mcpacker.emit.markdown.biomereport import BiomeReport
|
||||
from mcpacker.model.core.ecology.biome import Biome
|
||||
from mcpacker.model.core.ecology.biomecatalog import BiomeCatalog
|
||||
from mcpacker.model.core.world import World
|
||||
from mcpacker.model.modpack import ModPack
|
||||
from pytest import fixture
|
||||
|
||||
import mcpacker.model.core.ecology.flora as F
|
||||
@@ -16,24 +15,31 @@ import textwrap
|
||||
|
||||
# Fixtures #########################################################################################
|
||||
|
||||
@fixture(name="biomes")
|
||||
def createCatalog():
|
||||
yield BiomeCatalog([
|
||||
@fixture(name="addBiomes")
|
||||
def defineAddBiomes():
|
||||
def addBiomes(pack:ModPack):
|
||||
pack.world.biomes.add(
|
||||
Biome("dallas", "minecraft:savanna",
|
||||
F.FIELD, G.SEDIMENTARY, E.SUBTROPICAL, U.DRY, S.SANDY, W.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
pack.world.biomes.add(
|
||||
Biome("kansascity", "minecraft:plains",
|
||||
F.FIELD, G.SEDIMENTARY, E.TEMPERATE, U.DAMP, S.LOAMY, W.INLAND
|
||||
),
|
||||
])
|
||||
)
|
||||
)
|
||||
|
||||
@fixture(name="world")
|
||||
def createWorld(biomes):
|
||||
yield World(biomes, None, None, None)
|
||||
return addBiomes
|
||||
|
||||
@fixture(name="pack")
|
||||
def createPack(addBiomes):
|
||||
pack = ModPack("test")
|
||||
pack.augment(addBiomes)
|
||||
yield pack
|
||||
|
||||
@fixture(name="report")
|
||||
def createReport(world):
|
||||
report = BiomeReport(world)
|
||||
def createReport(pack):
|
||||
report = BiomeReport(pack)
|
||||
report.build()
|
||||
yield report
|
||||
|
||||
@@ -41,16 +47,7 @@ def createReport(world):
|
||||
|
||||
def test_report(report):
|
||||
assert str(report) == textwrap.dedent("""
|
||||
# Biome: dallas <minecraft:savanna>
|
||||
|
||||
* Flora: field
|
||||
* Geology: sedimentary
|
||||
* Heat: subtropical
|
||||
* Humidity: dry
|
||||
* Soil: sandy
|
||||
* Water: inland
|
||||
|
||||
# Biome: kansascity <minecraft:plains>
|
||||
# Biome: minecraft:plains (kansascity)
|
||||
|
||||
* Flora: field
|
||||
* Geology: sedimentary
|
||||
@@ -58,4 +55,13 @@ def test_report(report):
|
||||
* Humidity: damp
|
||||
* Soil: loamy
|
||||
* Water: inland
|
||||
|
||||
# Biome: minecraft:savanna (dallas)
|
||||
|
||||
* Flora: field
|
||||
* Geology: sedimentary
|
||||
* Heat: subtropical
|
||||
* Humidity: dry
|
||||
* Soil: sandy
|
||||
* Water: inland
|
||||
""").strip()
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
from mcpacker.emit.markdown.report import Report
|
||||
from mcpacker.model.core.world import World
|
||||
from mcpacker.model.modpack import ModPack
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class MineralReport(Report):
|
||||
|
||||
def __init__(self, world:World):
|
||||
super().__init__("minerals.md", world)
|
||||
def __init__(self, pack:ModPack):
|
||||
super().__init__("minerals.md", pack)
|
||||
|
||||
def build(self):
|
||||
for mineral in self.world.minerals.all():
|
||||
for mineral in self.pack.world.minerals.all():
|
||||
self.line(f"# Mineral: {mineral.name}")
|
||||
self.line()
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
from mcpacker.emit.markdown.mineralreport import MineralReport
|
||||
from mcpacker.model.core.geology.mineral import Mineral
|
||||
from mcpacker.model.core.geology.mineralcatalog import MineralCatalog
|
||||
from mcpacker.model.core.geology.replacement import Replacement
|
||||
from mcpacker.model.core.world import World
|
||||
from mcpacker.model.modpack import ModPack
|
||||
from pytest import fixture
|
||||
|
||||
import textwrap
|
||||
@@ -10,31 +9,30 @@ import textwrap
|
||||
|
||||
# Fixtures #########################################################################################
|
||||
|
||||
@fixture(name="copper")
|
||||
def createCopper():
|
||||
yield Mineral("copper", [
|
||||
@fixture(name="addMinerals")
|
||||
def defineAddMinerals():
|
||||
def addMinerals(pack:ModPack):
|
||||
pack.world.minerals.add(Mineral("copper", [
|
||||
Replacement("#minecraft:stone_replaceables", "minecraft:copper_ore"),
|
||||
Replacement("#minecraft:deepslate_replaceables", "minecraft:deepslate_copper_ore")
|
||||
])
|
||||
]))
|
||||
|
||||
@fixture(name="iron")
|
||||
def createIron():
|
||||
yield Mineral("iron", [
|
||||
pack.world.minerals.add(Mineral("iron", [
|
||||
Replacement("#minecraft:stone_replaceables", "minecraft:iron_ore"),
|
||||
Replacement("#minecraft:deepslate_replaceables", "minecraft:deepslate_iron_ore")
|
||||
])
|
||||
]))
|
||||
|
||||
@fixture(name="minerals")
|
||||
def createMineralCatalog(copper, iron):
|
||||
yield MineralCatalog([copper, iron])
|
||||
return addMinerals
|
||||
|
||||
@fixture(name="world")
|
||||
def createWorld(minerals):
|
||||
yield World(None, None, minerals, None)
|
||||
@fixture(name="pack")
|
||||
def createPack(addMinerals):
|
||||
pack = ModPack("test")
|
||||
pack.augment(addMinerals)
|
||||
yield pack
|
||||
|
||||
@fixture(name="report")
|
||||
def createReport(world):
|
||||
report = MineralReport(world)
|
||||
def createReport(pack):
|
||||
report = MineralReport(pack)
|
||||
report.build()
|
||||
yield report
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
from mcpacker.emit.markdown.report import Report
|
||||
from mcpacker.model.core.ecology.biometrait import BiomeTrait
|
||||
from mcpacker.model.core.world import World
|
||||
from mcpacker.model.modpack import ModPack
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class MobReport(Report):
|
||||
|
||||
def __init__(self, world:World):
|
||||
super().__init__("mobs.md", world)
|
||||
def __init__(self, pack:ModPack):
|
||||
super().__init__("mobs.md", pack)
|
||||
|
||||
def build(self):
|
||||
for placement in self.world.mobs.all():
|
||||
for placement in self.pack.world.mobs.all():
|
||||
self.line(f"# Mob: {placement.mob.name} <{placement.mob.gameId}>")
|
||||
self.line()
|
||||
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
from collections.abc import Iterator
|
||||
from mcpacker.model.core.world import World
|
||||
from mcpacker.model.modpack import ModPack
|
||||
|
||||
|
||||
# Constants ########################################################################################
|
||||
|
||||
INDENT = " "
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class Report:
|
||||
|
||||
def __init__(self, name:str, world:World):
|
||||
def __init__(self, name:str, pack:ModPack):
|
||||
self.name = name
|
||||
self.world = world
|
||||
self.pack = pack
|
||||
self.reset()
|
||||
|
||||
def __str__(self) -> str:
|
||||
|
||||
@@ -3,6 +3,7 @@ from mcpacker.emit.markdown.report import Report
|
||||
import os
|
||||
import shutil
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class ReportWriter:
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.emit.markdown.reportwriter
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -0,0 +1 @@
|
||||
from mcpacker.model.core.modpack
|
||||
@@ -1,3 +1,4 @@
|
||||
from collections.abc import Iterable
|
||||
from mcpacker.model.core.ecology.biome import Biome
|
||||
from mcpacker.model.core.ecology.biomefilter import BiomeFilter
|
||||
|
||||
@@ -9,17 +10,23 @@ class BiomeCatalog:
|
||||
A comprehensive list of all available biomes in the modpack.
|
||||
"""
|
||||
|
||||
def __init__(self, biomes):
|
||||
self.biomes = sorted(biomes, key=lambda b: b.city)
|
||||
def __init__(self, biomes:Iterable[Biome]|None=None):
|
||||
self._biomes = {}
|
||||
|
||||
def all(self) -> list[Biome]:
|
||||
return list(self.biomes)
|
||||
for biome in (biomes or []):
|
||||
self.add(biome)
|
||||
|
||||
def matching(self, biomeFilter:BiomeFilter) -> list[Biome]:
|
||||
result = []
|
||||
def add(self, biome:Biome) -> "BiomeCatalog":
|
||||
if biome.gameId in self._biomes:
|
||||
raise Exception(f"Catalog already contains {biome.gameId}")
|
||||
|
||||
for biome in self.biomes:
|
||||
self._biomes[biome.gameId] = biome
|
||||
|
||||
def all(self) -> Iterable[Biome]:
|
||||
for gameId in sorted([b.gameId for b in self._biomes.values()]):
|
||||
yield self._biomes[gameId]
|
||||
|
||||
def matching(self, biomeFilter:BiomeFilter) -> Iterable[Biome]:
|
||||
for biome in self.all():
|
||||
if biomeFilter.accepts(biome):
|
||||
result.append(biome)
|
||||
|
||||
return result
|
||||
yield biome
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from collections.abc import Iterator
|
||||
from collections.abc import Iterable
|
||||
from mcpacker.model.core.fauna.mobplacement import MobPlacement
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ from mcpacker.model.core.fauna.mobplacement import MobPlacement
|
||||
|
||||
class MobCatalog:
|
||||
|
||||
def __init__(self, mobs:tuple[MobPlacement]):
|
||||
def __init__(self, mobs:Iterable[MobPlacement]|None=None):
|
||||
self._mobs = {}
|
||||
|
||||
for mob in mobs:
|
||||
for mob in (mobs or []):
|
||||
self.add(mob)
|
||||
|
||||
def add(self, placement:MobPlacement) -> "MobCatalog":
|
||||
@@ -18,7 +18,7 @@ class MobCatalog:
|
||||
|
||||
self._mobs[placement.mob.name] = placement
|
||||
|
||||
def all(self) -> Iterator[MobPlacement]:
|
||||
def all(self) -> Iterable[MobPlacement]:
|
||||
for placement in self._mobs.values():
|
||||
yield placement
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
from mcpacker.model.core.material.loottable import LootTable
|
||||
from mcpacker.model.core.material.soundtype import SoundType
|
||||
from mcpacker.model.core.resourceid import ResourceId
|
||||
|
||||
import mcpacker.model.core.material.soundtype as ST
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class Block:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
name:str,
|
||||
gameId:ResourceId,
|
||||
loot:LootTable,
|
||||
requiresTool:bool=False,
|
||||
soundType:SoundType=ST.STONE,
|
||||
tags:list[str]=None,
|
||||
):
|
||||
self.gameId = gameId
|
||||
self.loot = loot
|
||||
self.name = name
|
||||
self.requiresTool = requiresTool
|
||||
self.silkTouchLoot = loot
|
||||
self.soundType = soundType
|
||||
self.tags = tags or []
|
||||
@@ -0,0 +1,6 @@
|
||||
import mcpacker.model.core.material.block
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -0,0 +1,30 @@
|
||||
from mcpacker.model.core.material.block import Block
|
||||
from typing import Iterator
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class BlockCatalog:
|
||||
|
||||
def __init__(self, blocks:tuple[Block]=None):
|
||||
self._blocks = {}
|
||||
|
||||
for block in (blocks or []):
|
||||
self.add(block)
|
||||
|
||||
def __len__(self) -> int:
|
||||
return len(self._blocks)
|
||||
|
||||
def add(self, block:Block) -> "BlockCatalog":
|
||||
if block.name in self._blocks:
|
||||
raise Exception(f"Catalog already contains an entry for {block.name}")
|
||||
|
||||
self._blocks[block.name] = block
|
||||
|
||||
def all(self) -> Iterator[Block]:
|
||||
for block in self._blocks.values():
|
||||
yield block
|
||||
|
||||
def get(self, name:str) -> Block|None:
|
||||
return self._blocks.get(name, None)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.model.core.material.blockcatalog
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -0,0 +1,12 @@
|
||||
from mcpacker.model.core.resourceid import ResourceId
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class Item:
|
||||
|
||||
def __init__(self, gameId:ResourceId):
|
||||
self.gameId = gameId
|
||||
|
||||
if not isinstance(self.gameId, ResourceId):
|
||||
self.gameId = ResourceId.parse(str(self.gameId))
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.model.core.material.item
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -0,0 +1,27 @@
|
||||
from mcpacker.model.core.material.item import Item
|
||||
from typing import Iterator
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class ItemCatalog:
|
||||
|
||||
def __init__(self, items:tuple[Item]=None):
|
||||
self._items = {}
|
||||
|
||||
for item in (items or []):
|
||||
self.add(item)
|
||||
|
||||
def add(self, item:Item) -> "ItemCatalog":
|
||||
if item.gameId in self._items:
|
||||
raise Exception(f"Catalog already contains an entry for {item.gameId}")
|
||||
|
||||
self._items[item.gameId] = item
|
||||
|
||||
def all(self) -> Iterator[Item]:
|
||||
for item in self._items.values():
|
||||
yield item
|
||||
|
||||
def get(self, gameId:str) -> Item|None:
|
||||
return self._items.get(gameId, None)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.model.core.material.itemcatalog
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -0,0 +1,24 @@
|
||||
from mcpacker.model.core.material.item import Item
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class Loot:
|
||||
|
||||
def __init__(self, item:Item, maxCount:int=1, minCount:int=1, weight:int=1):
|
||||
self.item = item
|
||||
self.maxCount = maxCount
|
||||
self.minCount = minCount
|
||||
self.weight = weight
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return "".join([repr(p) for p in [
|
||||
"Loot{",
|
||||
"item: ", self.item, ", ",
|
||||
"minCount: ", self.minCount, ", ",
|
||||
"weight: ", self.weight,
|
||||
"}"
|
||||
]])
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"{str(item)} ({self.minCount}..{self.maxCount} @ {self.weight})"
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.model.core.material.loot
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -0,0 +1,9 @@
|
||||
from mcpacker.model.core.material.loot import Loot
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class LootTable:
|
||||
|
||||
def __init__(self, items:list[Loot]):
|
||||
self.items = items
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.model.core.material.loottable
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -0,0 +1,35 @@
|
||||
# Class ############################################################################################
|
||||
|
||||
class SoundType:
|
||||
|
||||
def __init__(self, name:str):
|
||||
self.name = name
|
||||
|
||||
def __eq__(self, other) -> bool:
|
||||
if type(self) != type(other): return False
|
||||
if self.name != other.name: return False
|
||||
return True
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return hash(self.name)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"SoundType<{self.name}>"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.name
|
||||
|
||||
# Constants ########################################################################################
|
||||
|
||||
CRYSTAL = SoundType("crystal")
|
||||
DIRT = SoundType("dirt")
|
||||
FOLIAGE = SoundType("foliage")
|
||||
GLASS = SoundType("glass")
|
||||
GRAVEL = SoundType("gravel")
|
||||
HONEY = SoundType("honey")
|
||||
METAL = SoundType("metal")
|
||||
SCULK = SoundType("sculk")
|
||||
SLIME = SoundType("slime")
|
||||
STONE = SoundType("stone")
|
||||
WOOD = SoundType("wood")
|
||||
WOOL = SoundType("wool")
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.model.core.material.soundtype
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -34,7 +34,7 @@ COLD = [WINTER]
|
||||
|
||||
# Constants ########################################################################################
|
||||
|
||||
def excluding(target:Season) -> list[Season]:
|
||||
def exclude(target:Season) -> list[Season]:
|
||||
result = []
|
||||
|
||||
for season in ALL:
|
||||
|
||||
@@ -7,10 +7,10 @@ import mcpacker.model.core.season as season
|
||||
|
||||
@fixture(name="notSummer")
|
||||
def createNotSummerList():
|
||||
yield season.excluding(season.SUMMER)
|
||||
yield season.exclude(season.SUMMER)
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_excluding(notSummer):
|
||||
def test_exclude(notSummer):
|
||||
assert ", ".join([str(s) for s in notSummer]) == "spring, autumn, winter"
|
||||
|
||||
@@ -2,6 +2,8 @@ from mcpacker.model.core.ecology.biomecatalog import BiomeCatalog
|
||||
from mcpacker.model.core.fauna.mobcatalog import MobCatalog
|
||||
from mcpacker.model.core.geology.depositcatalog import DepositCatalog
|
||||
from mcpacker.model.core.geology.mineralcatalog import MineralCatalog
|
||||
from mcpacker.model.core.material.blockcatalog import BlockCatalog
|
||||
from mcpacker.model.core.material.itemcatalog import ItemCatalog
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
@@ -10,12 +12,16 @@ class World:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
biomes:BiomeCatalog,
|
||||
deposits:DepositCatalog,
|
||||
minerals:MineralCatalog,
|
||||
mobs:MobCatalog
|
||||
biomes:BiomeCatalog|None=None,
|
||||
blocks:BlockCatalog|None=None,
|
||||
deposits:DepositCatalog|None=None,
|
||||
items:ItemCatalog|None=None,
|
||||
minerals:MineralCatalog|None=None,
|
||||
mobs:MobCatalog|None=None,
|
||||
):
|
||||
self.biomes = biomes
|
||||
self.deposits = deposits
|
||||
self.minerals = minerals
|
||||
self.mobs = mobs
|
||||
self.biomes = biomes or BiomeCatalog()
|
||||
self.blocks = blocks or BlockCatalog()
|
||||
self.deposits = deposits or DepositCatalog()
|
||||
self.items = items or ItemCatalog()
|
||||
self.minerals = minerals or MineralCatalog()
|
||||
self.mobs = mobs or MobCatalog()
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
from collections.abc import Iterable
|
||||
from mcpacker.model.datapack.mod import Mod
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class Datapack:
|
||||
class DataPack:
|
||||
|
||||
def __init__(self, name:str, mods:list[Mod]):
|
||||
def __init__(self, name:str, mods:Iterable[Mod]|None=None):
|
||||
self.name = name
|
||||
self._mods = {}
|
||||
self._defaultMod = None
|
||||
|
||||
for mod in mods:
|
||||
if not self._defaultMod:
|
||||
self._defaultMod = mod
|
||||
|
||||
for mod in (mods or []):
|
||||
self.add(mod)
|
||||
|
||||
def add(self, mod:Mod) -> "Datapack":
|
||||
if not self._defaultMod:
|
||||
self._defaultMod = mod
|
||||
|
||||
self._mods[mod.name] = mod
|
||||
return self
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Class ############################################################################################
|
||||
|
||||
class Mod:
|
||||
|
||||
def __init__(self):
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Class ############################################################################################
|
||||
|
||||
class Mod:
|
||||
|
||||
def __init__(self, name:str):
|
||||
self.name = name
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.model.mod
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -0,0 +1,31 @@
|
||||
from collections.abc import Iterable
|
||||
from mcpacker.model.core.world import World
|
||||
from mcpacker.model.datapack import DataPack
|
||||
from mcpacker.model.mod import Mod
|
||||
from mcpacker.model.resourcepack import ResourcePack
|
||||
from typing import Callable
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class ModPack:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
name:str,
|
||||
mods:Iterable[Mod]|None=None,
|
||||
world:World|None=None,
|
||||
dataPack:DataPack|None=None,
|
||||
resourcePack:ResourcePack|None=None,
|
||||
):
|
||||
self.name = name
|
||||
self.world = world or World()
|
||||
self.dataPack = dataPack or DataPack(self.name)
|
||||
self.resourcePack = resourcePack or ResourcePack(self.name)
|
||||
|
||||
self._mods = {}
|
||||
for mod in (mods or []):
|
||||
self._mods[mod.name] = mod
|
||||
|
||||
def augment(self, doAugment:"Callable[[ModPack], None]") -> "ModPack":
|
||||
doAugment(self)
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.model.modpack
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -0,0 +1,40 @@
|
||||
from collections.abc import Iterable
|
||||
from mcpacker.model.resourcepack.mod import Mod
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class ResourcePack:
|
||||
|
||||
def __init__(self, name:str, mods:Iterable[Mod]|None=None):
|
||||
self.name = name
|
||||
self._mods = {}
|
||||
self._defaultMod = None
|
||||
|
||||
for mod in (mods or []):
|
||||
self.add(mod)
|
||||
|
||||
def add(self, mod:Mod) -> "Resourcepack":
|
||||
if not self._defaultMod:
|
||||
self._defaultMod = mod
|
||||
|
||||
self._mods[mod.name] = mod
|
||||
return self
|
||||
|
||||
def get(self, modName:str) -> Mod:
|
||||
return self._mods.get(modName, None)
|
||||
|
||||
@property
|
||||
def defaultMod(self) -> Mod:
|
||||
return self._defaultMod
|
||||
|
||||
@defaultMod.setter
|
||||
def setDefaultMod(self, mod:Mod) -> "Resourcepack":
|
||||
existingMod = self.get(mod.name)
|
||||
if not existingMod:
|
||||
self.add(mod)
|
||||
elif existingMod != mod:
|
||||
raise Exception(f"Resourcepack already has a mod named {mod.name}")
|
||||
|
||||
self._defaultMod = mod
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Class ############################################################################################
|
||||
|
||||
class Kind:
|
||||
|
||||
def __init__(self, name:str):
|
||||
self.name = name
|
||||
|
||||
def __eq__(self, other) -> bool:
|
||||
if type(self) != type(other): return False
|
||||
if self.name != othere.name: return False
|
||||
return True
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"Kind<{self.name}>"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.name
|
||||
|
||||
|
||||
# Constants ########################################################################################
|
||||
|
||||
ITEM = Kind("item")
|
||||
BLOCK = Kind("block")
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.model.resourcepack.kind
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -0,0 +1,8 @@
|
||||
# Class ############################################################################################
|
||||
|
||||
class Mod:
|
||||
|
||||
def __init__(self):
|
||||
self.blockStates = []
|
||||
self.models = []
|
||||
self.textures = []
|
||||
@@ -0,0 +1,8 @@
|
||||
import mcpacker.model.resourcepack.mod
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
from mcpacker.model.resourcepack.kind import Kind
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class Texture:
|
||||
|
||||
def __init__(self, imageFileName:str, kind:Kind):
|
||||
self.imageFileName = imageFileName
|
||||
self.kind = kind
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.model.resourcepack.texture
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1,6 +1,6 @@
|
||||
from mcpacker.model.core.ecology.biome import Biome
|
||||
from mcpacker.model.core.ecology.biomecatalog import BiomeCatalog
|
||||
from mcpacker.model.core.ecology.biomefilter import BiomeFilter
|
||||
from mcpacker.model.modpack import ModPack
|
||||
|
||||
import mcpacker.model.core.ecology.flora as FL
|
||||
import mcpacker.model.core.ecology.geology as GE
|
||||
@@ -9,157 +9,306 @@ import mcpacker.model.core.ecology.humidity as HU
|
||||
import mcpacker.model.core.ecology.soil as SO
|
||||
import mcpacker.model.core.ecology.water as WA
|
||||
|
||||
# Constants ########################################################################################
|
||||
|
||||
CATALOG = BiomeCatalog([
|
||||
# Functions ########################################################################################
|
||||
|
||||
def addBiomes(pack:ModPack):
|
||||
pack.world.biomes.add(
|
||||
Biome("aberdeen", "minecraft:windswept_gravelly_hills",
|
||||
FL.BARREN, GE.METAMORPHIC, HE.BOREAL, HU.DAMP, SO.ROCKY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("archangel", "minecraft:frozen_ocean",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.FROZEN, HU.WET, SO.SANDY, WA.OCEAN
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("aspen", "minecraft:frozen_peaks",
|
||||
FL.BARREN, GE.IGNEOUS, HE.FROZEN, HU.WET, SO.ROCKY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("bombay", "minecraft:lukewarm_ocean",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.SUBTROPICAL, HU.WET, SO.SANDY, WA.OCEAN
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("boston", "minecraft:cold_ocean",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.BOREAL, HU.WET, SO.CLAYEY, WA.OCEAN
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("bryce", "minecraft:eroded_badlands",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.SUBTROPICAL, HU.DRY, SO.CLAYEY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("calcutta", "minecraft:mangrove_swamp",
|
||||
FL.FOREST, GE.SEDIMENTARY, HE.SUBTROPICAL, HU.WET, SO.CLAYEY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("cornwall", "minecraft:windswept_hills",
|
||||
FL.BARREN, GE.METAMORPHIC, HE.BOREAL, HU.DAMP, SO.ROCKY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("dallas", "minecraft:savanna",
|
||||
FL.FIELD, GE.SEDIMENTARY, HE.SUBTROPICAL, HU.DRY, SO.SANDY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("duluth", "minecraft:frozen_river",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.FROZEN, HU.WET, SO.SANDY, WA.RIVER
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("durango", "minecraft:savanna_plateau",
|
||||
FL.FIELD, GE.IGNEOUS, HE.SUBTROPICAL, HU.DRY, SO.SANDY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("freiburg", "minecraft:dark_forest",
|
||||
FL.CANOPY, GE.SEDIMENTARY, HE.TEMPERATE, HU.WET, SO.CLAYEY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("glasgow", "minecraft:windswept_forest",
|
||||
FL.CLEARING, GE.METAMORPHIC, HE.BOREAL, HU.DAMP, SO.ACIDIC, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("haarlem", "minecraft:flower_forest",
|
||||
FL.CLEARING, GE.SEDIMENTARY, HE.TEMPERATE, HU.DAMP, SO.LOAMY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("halifax", "minecraft:deep_cold_ocean",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.BOREAL, HU.WET, SO.SANDY, WA.OCEAN
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("hammerfest", "minecraft:ice_spikes",
|
||||
FL.BARREN, GE.METAMORPHIC, HE.FROZEN, HU.WET, SO.ROCKY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("havana", "minecraft:deep_lukewarm_ocean",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.SUBTROPICAL, HU.WET, SO.SANDY, WA.OCEAN
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("hilo", "minecraft:mushroom_fields",
|
||||
FL.CLEARING, GE.IGNEOUS, HE.SUBTROPICAL, HU.WET, SO.FUNGAL, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("honolulu", "minecraft:deep_ocean",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.TEMPERATE, HU.WET, SO.SANDY, WA.OCEAN
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("innnesbruk", "minecraft:meadow",
|
||||
FL.FIELD, GE.SEDIMENTARY, HE.BOREAL, HU.DAMP, SO.PEATY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("irkutsk", "minecraft:taiga",
|
||||
FL.FOREST, GE.METAMORPHIC, HE.BOREAL, HU.DAMP, SO.ACIDIC, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("jackson", "minecraft:jagged_peaks",
|
||||
FL.BARREN, GE.METAMORPHIC, HE.BOREAL, HU.DRY, SO.ROCKY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("juneau", "minecraft:old_growth_spruce_taiga",
|
||||
FL.FOREST, GE.METAMORPHIC, HE.BOREAL, HU.DAMP, SO.PEATY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("kansascity", "minecraft:plains",
|
||||
FL.FIELD, GE.SEDIMENTARY, HE.TEMPERATE, HU.DAMP, SO.LOAMY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("kola", "minecraft:snowy_taiga",
|
||||
FL.BARREN, GE.METAMORPHIC, HE.FROZEN, HU.DAMP, SO.ACIDIC, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("kyoto", "minecraft:cherry_grove",
|
||||
FL.CLEARING, GE.SEDIMENTARY, HE.TEMPERATE, HU.DAMP, SO.ROCKY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("madras", "minecraft:sparse_jungle",
|
||||
FL.CLEARING, GE.SEDIMENTARY, HE.TROPICAL, HU.WET, SO.ACIDIC, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("memphis", "minecraft:river",
|
||||
FL.CLEARING, GE.SEDIMENTARY, HE.TEMPERATE, HU.WET, SO.SANDY, WA.RIVER
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("minsk", "minecraft:old_growth_birch_forest",
|
||||
FL.FOREST, GE.SEDIMENTARY, HE.TEMPERATE, HU.DAMP, SO.ACIDIC, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("moab", "minecraft:windswept_savanna",
|
||||
FL.FIELD, GE.IGNEOUS, HE.SUBTROPICAL, HU.DRY, SO.ROCKY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("mobile", "minecraft:swamp",
|
||||
FL.CLEARING, GE.SEDIMENTARY, HE.TEMPERATE, HU.WET, SO.PEATY, WA.SWAMP
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("moscow", "minecraft:snowy_plains",
|
||||
FL.FIELD, GE.SEDIMENTARY, HE.FROZEN, HU.DAMP, SO.LOAMY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("nassau", "minecraft:warm_ocean",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.TROPICAL, HU.WET, SO.SANDY, WA.COAST
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("nice", "minecraft:beach",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.SUBTROPICAL, HU.DAMP, SO.SANDY, WA.COAST
|
||||
),
|
||||
Biome("nuuk", "minecraft:beach",
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("nuuk", "minecraft:snowy_beach",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.FROZEN, HU.DAMP, SO.SANDY, WA.COAST
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("perm", "minecraft:old_growth_pine_taiga",
|
||||
FL.FOREST, GE.METAMORPHIC, HE.BOREAL, HU.DAMP, SO.ACIDIC, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("phoenix", "minecraft:desert",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.TROPICAL, HU.DRY, SO.SANDY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("plymouth", "minecraft:stony_shore",
|
||||
FL.BARREN, GE.METAMORPHIC, HE.TEMPERATE, HU.DAMP, SO.ROCKY, WA.COAST
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("portland", "minecraft:forest",
|
||||
FL.FOREST, GE.SEDIMENTARY, HE.TEMPERATE, HU.DAMP, SO.LOAMY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("quito", "minecraft:stony_peaks",
|
||||
FL.BARREN, GE.IGNEOUS, HE.BOREAL, HU.DRY, SO.ROCKY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("rangoon", "minecraft:bamboo_jungle",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.SUBTROPICAL, HU.DRY, SO.LOAMY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("sanfrancisco", "minecraft:ocean",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.TEMPERATE, HU.WET, SO.SANDY, WA.OCEAN
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("santafe", "minecraft:wooded_badlands",
|
||||
FL.CLEARING, GE.SEDIMENTARY, HE.SUBTROPICAL, HU.DRY, SO.CLAYEY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("singapore", "minecraft:jungle",
|
||||
FL.CANOPY, GE.SEDIMENTARY, HE.TROPICAL, HU.WET, SO.ACIDIC, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("tombstone", "minecraft:badlands",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.SUBTROPICAL, HU.DRY, SO.CLAYEY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("topeka", "minecraft:sunflower_plains",
|
||||
FL.FIELD, GE.SEDIMENTARY, HE.TEMPERATE, HU.DAMP, SO.LOAMY, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("tromso", "minecraft:deep_frozen_ocean",
|
||||
FL.BARREN, GE.SEDIMENTARY, HE.FROZEN, HU.WET, SO.SANDY, WA.OCEAN
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("umea", "minecraft:grove",
|
||||
FL.CLEARING, GE.METAMORPHIC, HE.FROZEN, HU.DAMP, SO.ACIDIC, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("warsaw", "minecraft:birch_forest",
|
||||
FL.FOREST, GE.SEDIMENTARY, HE.TEMPERATE, HU.DAMP, SO.ACIDIC, WA.INLAND
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
pack.world.biomes.add(
|
||||
Biome("zurich", "minecraft:snowy_slopes",
|
||||
FL.BARREN, GE.METAMORPHIC, HE.FROZEN, HU.DAMP, SO.ROCKY, WA.INLAND
|
||||
),
|
||||
])
|
||||
)
|
||||
)
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
from mcpacker.model.core.material.block import Block
|
||||
from mcpacker.model.core.material.blockcatalog import BlockCatalog
|
||||
from mcpacker.model.core.material.item import Item
|
||||
from mcpacker.model.core.material.loottable import LootTable
|
||||
from mcpacker.model.core.material.loot import Loot
|
||||
from mcpacker.model.modpack import ModPack
|
||||
|
||||
import mcpacker.model.core.material.soundtype as SO
|
||||
|
||||
|
||||
# Functions ########################################################################################
|
||||
|
||||
def addBlocks(pack:ModPack):
|
||||
blocks = pack.world.blocks
|
||||
items = pack.world.items
|
||||
|
||||
blocks.add(Block(
|
||||
gameId = "kubejs:peat_block",
|
||||
loot = LootTable(Loot(items.get("kubejs:peat_chunk"), 2, 9)),
|
||||
name = "Peat Block",
|
||||
soundType = SO.DIRT,
|
||||
tags = ["minecraft:mineable/shovel"],
|
||||
))
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.pack.mysteriousisland.blockcatalog
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -0,0 +1,8 @@
|
||||
from mcpacker.model.modpack import ModPack
|
||||
from mcpacker.model.datapack import DataPack
|
||||
|
||||
|
||||
# Functions ########################################################################################
|
||||
|
||||
def addDataPack(modPack:ModPack):
|
||||
pass
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.pack.mysteriousisland.datapack
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -1,8 +1,7 @@
|
||||
from mcpacker.model.core.ecology.biomefilter import BiomeFilter as BF
|
||||
from mcpacker.model.core.geology.deposit.metaldeposit import MetalDeposit
|
||||
from mcpacker.model.core.geology.depositcatalog import DepositCatalog
|
||||
from mcpacker.model.core.geology.inclusion import Inclusion as I
|
||||
from mcpacker.pack.mysteriousisland.mineralcatalog import CATALOG as M
|
||||
from mcpacker.model.modpack import ModPack
|
||||
|
||||
import mcpacker.model.core.altitude as AL
|
||||
import mcpacker.model.core.ecology.flora as FL
|
||||
@@ -16,13 +15,19 @@ import mcpacker.model.core.scarcity as SC
|
||||
|
||||
# Catalog ##########################################################################################
|
||||
|
||||
CATALOG = C = DepositCatalog()
|
||||
def addDeposits(pack:ModPack):
|
||||
minerals = pack.world.minerals
|
||||
deposits = pack.world.deposits
|
||||
|
||||
C.add(MetalDeposit(
|
||||
deposits.add(MetalDeposit(
|
||||
name = "bif_iron",
|
||||
scarcity = SC.COMMON,
|
||||
biomeFilter = BF([GE.METAMORPHIC, (HE.BOREAL, HE.FROZEN), HU.DAMP]),
|
||||
inclusions = [I(M.get("iron"), 50), I(M.get("quartz"), 45), I(M.get("uranium"), 5)],
|
||||
inclusions = [
|
||||
I(minerals.get("iron"), 50),
|
||||
I(minerals.get("quartz"), 45),
|
||||
I(minerals.get("uranium"), 5)
|
||||
],
|
||||
bulk = BU.LARGE,
|
||||
proportion = 0.2,
|
||||
))
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
from mcpacker.model.core.material.item import Item
|
||||
from mcpacker.model.modpack import ModPack
|
||||
|
||||
|
||||
# Constants ########################################################################################
|
||||
|
||||
def addItems(pack:ModPack):
|
||||
pack.world.items.add(Item("kubejs:peak_chunk"))
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.pack.mysteriousisland.blockcatalog
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -1,6 +1,7 @@
|
||||
from mcpacker.model.core.geology.mineral import Mineral
|
||||
from mcpacker.model.core.geology.mineralcatalog import MineralCatalog
|
||||
from mcpacker.model.core.geology.replacement import Replacement
|
||||
from mcpacker.model.modpack import ModPack
|
||||
|
||||
|
||||
# Constants ########################################################################################
|
||||
@@ -41,69 +42,70 @@ def makeRailcraftOreMineral(name:str) -> Mineral:
|
||||
|
||||
# Catalog ##########################################################################################
|
||||
|
||||
CATALOG = C = MineralCatalog()
|
||||
def addMinerals(pack:ModPack):
|
||||
minerals = pack.world.minerals
|
||||
|
||||
# Basic Ores
|
||||
C.add(makeOreMineral("coal"))
|
||||
C.add(makeOreMineral("copper"))
|
||||
C.add(makeOreMineral("diamond"))
|
||||
C.add(makeOreMineral("emerald"))
|
||||
C.add(makeOreMineral("gold"))
|
||||
C.add(makeOreMineral("iron"))
|
||||
C.add(makeOreMineral("lapis"))
|
||||
C.add(makeOreMineral("redstone"))
|
||||
minerals.add(makeOreMineral("coal"))
|
||||
minerals.add(makeOreMineral("copper"))
|
||||
minerals.add(makeOreMineral("diamond"))
|
||||
minerals.add(makeOreMineral("emerald"))
|
||||
minerals.add(makeOreMineral("gold"))
|
||||
minerals.add(makeOreMineral("iron"))
|
||||
minerals.add(makeOreMineral("lapis"))
|
||||
minerals.add(makeOreMineral("redstone"))
|
||||
|
||||
# Crystals
|
||||
C.add(makeMineral("amethyst", "amethyst_block"))
|
||||
C.add(makeMineral("glowstone", "glowstone"))
|
||||
C.add(makeMineral("quartz", f"{OQ}:quartz_ore", f"{OQ}:deepslate_quartz_ore"))
|
||||
C.add(makeMineral("salt", "butcher:saltblock"))
|
||||
minerals.add(makeMineral("amethyst", "amethyst_block"))
|
||||
minerals.add(makeMineral("glowstone", "glowstone"))
|
||||
minerals.add(makeMineral("quartz", f"{OQ}:quartz_ore", f"{OQ}:deepslate_quartz_ore"))
|
||||
minerals.add(makeMineral("salt", "butcher:saltblock"))
|
||||
|
||||
# Earth, gravel, etc.
|
||||
C.add(makeMineral("clay", "clay"))
|
||||
C.add(makeMineral("coarsedirt", "coarse_dirt"))
|
||||
C.add(makeMineral("dirt", "dirt"))
|
||||
C.add(makeMineral("gravel", "gravel"))
|
||||
C.add(makeMineral("loam", "farmersdelight:rich_soil"))
|
||||
C.add(makeMineral("packedice", "packed_ice"))
|
||||
C.add(makeMineral("peat", "kubejs:peat_block"))
|
||||
C.add(makeMineral("redsand", "redsand"))
|
||||
C.add(makeMineral("sand", "sand"))
|
||||
C.add(makeMineral("soulsand", "soulsand"))
|
||||
minerals.add(makeMineral("clay", "clay"))
|
||||
minerals.add(makeMineral("coarsedirt", "coarse_dirt"))
|
||||
minerals.add(makeMineral("dirt", "dirt"))
|
||||
minerals.add(makeMineral("gravel", "gravel"))
|
||||
minerals.add(makeMineral("loam", "farmersdelight:rich_soil"))
|
||||
minerals.add(makeMineral("packedice", "packed_ice"))
|
||||
minerals.add(makeMineral("peat", "kubejs:peat_block"))
|
||||
minerals.add(makeMineral("redsand", "redsand"))
|
||||
minerals.add(makeMineral("sand", "sand"))
|
||||
minerals.add(makeMineral("soulsand", "soulsand"))
|
||||
|
||||
# Stone
|
||||
C.add(makeMineral("andesite", "andesite"))
|
||||
C.add(makeMineral("arkrose", "red_sandstone"))
|
||||
C.add(makeMineral("basalt", "basalt"))
|
||||
C.add(makeMineral("breccia", "cobblestone"))
|
||||
C.add(makeMineral("chalk", "calcite"))
|
||||
C.add(makeMineral("diorite", "diorite"))
|
||||
C.add(makeMineral("dolostone", "end_stone"))
|
||||
C.add(makeMineral("gneiss", "deepslate"))
|
||||
C.add(makeMineral("granite", "granite"))
|
||||
C.add(makeMineral("greywacke", "stone"))
|
||||
C.add(makeMineral("komatite", "blackstone"))
|
||||
C.add(makeMineral("limestone", "dripstone_block"))
|
||||
C.add(makeMineral("magma", "magma_block"))
|
||||
C.add(makeMineral("marble", f"{RC}:quarried_stone"))
|
||||
C.add(makeMineral("netherite", "ancient_debris"))
|
||||
C.add(makeMineral("obsidian", "obsidian"))
|
||||
C.add(makeMineral("pumice", "netherrack"))
|
||||
C.add(makeMineral("sandstone", "sandstone"))
|
||||
C.add(makeMineral("tuff", "tuff"))
|
||||
minerals.add(makeMineral("andesite", "andesite"))
|
||||
minerals.add(makeMineral("arkrose", "red_sandstone"))
|
||||
minerals.add(makeMineral("basalt", "basalt"))
|
||||
minerals.add(makeMineral("breccia", "cobblestone"))
|
||||
minerals.add(makeMineral("chalk", "calcite"))
|
||||
minerals.add(makeMineral("diorite", "diorite"))
|
||||
minerals.add(makeMineral("dolostone", "end_stone"))
|
||||
minerals.add(makeMineral("gneiss", "deepslate"))
|
||||
minerals.add(makeMineral("granite", "granite"))
|
||||
minerals.add(makeMineral("greywacke", "stone"))
|
||||
minerals.add(makeMineral("komatite", "blackstone"))
|
||||
minerals.add(makeMineral("limestone", "dripstone_block"))
|
||||
minerals.add(makeMineral("magma", "magma_block"))
|
||||
minerals.add(makeMineral("marble", f"{RC}:quarried_stone"))
|
||||
minerals.add(makeMineral("netherite", "ancient_debris"))
|
||||
minerals.add(makeMineral("obsidian", "obsidian"))
|
||||
minerals.add(makeMineral("pumice", "netherrack"))
|
||||
minerals.add(makeMineral("sandstone", "sandstone"))
|
||||
minerals.add(makeMineral("tuff", "tuff"))
|
||||
|
||||
# Immersive Engineering Ores
|
||||
C.add(makeImmersiveEngineeringOreMineral("aluminum"))
|
||||
C.add(makeImmersiveEngineeringOreMineral("lead"))
|
||||
C.add(makeImmersiveEngineeringOreMineral("nickel"))
|
||||
C.add(makeImmersiveEngineeringOreMineral("silver"))
|
||||
C.add(makeImmersiveEngineeringOreMineral("uranium"))
|
||||
minerals.add(makeImmersiveEngineeringOreMineral("aluminum"))
|
||||
minerals.add(makeImmersiveEngineeringOreMineral("lead"))
|
||||
minerals.add(makeImmersiveEngineeringOreMineral("nickel"))
|
||||
minerals.add(makeImmersiveEngineeringOreMineral("silver"))
|
||||
minerals.add(makeImmersiveEngineeringOreMineral("uranium"))
|
||||
|
||||
# Railcraft Ores
|
||||
C.add(Mineral("saltpeter", [
|
||||
minerals.add(Mineral("saltpeter", [
|
||||
Replacement("sand", f"{RC}:saltpeter_ore"),
|
||||
Replacement("sandstone", f"{RC}:saltpeter_ore"),
|
||||
]))
|
||||
C.add(makeRailcraftOreMineral("sulfur"))
|
||||
C.add(makeRailcraftOreMineral("tin"))
|
||||
C.add(makeRailcraftOreMineral("zinc"))
|
||||
minerals.add(makeRailcraftOreMineral("sulfur"))
|
||||
minerals.add(makeRailcraftOreMineral("tin"))
|
||||
minerals.add(makeRailcraftOreMineral("zinc"))
|
||||
|
||||
@@ -3,6 +3,7 @@ from mcpacker.model.core.fauna.mob import Mob
|
||||
from mcpacker.model.core.fauna.mobcatalog import MobCatalog
|
||||
from mcpacker.model.core.fauna.mobplacement import MobPlacement
|
||||
from mcpacker.model.core.habitat import Habitat
|
||||
from mcpacker.model.modpack import ModPack
|
||||
|
||||
import mcpacker.model.core.altitude as AL
|
||||
import mcpacker.model.core.ecology.flora as FL
|
||||
@@ -20,7 +21,10 @@ import mcpacker.model.core.season as SE
|
||||
|
||||
# Constants ########################################################################################
|
||||
|
||||
CATALOG = MobCatalog([
|
||||
def addMobs(pack:ModPack):
|
||||
mobs = pack.world.mobs
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("armadillo", "minecraft:armadillo", AC.NOCTURNAL),
|
||||
Habitat(
|
||||
altitude = AL.LOWLANDS,
|
||||
@@ -31,11 +35,14 @@ CATALOG = MobCatalog([
|
||||
).derive(
|
||||
altitude = AL.UPLANDS, scarcity = SC.SPARSE,
|
||||
).derive(
|
||||
altitude = AL.LOWLANDS, seasons = SE.excluding(SE.SUMMER), scarcity = SC.UNCOMMON,
|
||||
altitude = AL.LOWLANDS, seasons = SE.exclude(SE.SUMMER), scarcity = SC.UNCOMMON,
|
||||
).derive(
|
||||
altitude = AL.UPLANDS, scarcity = SC.UNUSUAL,
|
||||
)
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("black_bear", "bearminimum:black_bear"),
|
||||
Habitat(
|
||||
altitude = AL.span(AL.LOWLANDS, AL.ALPINE),
|
||||
@@ -56,7 +63,10 @@ CATALOG = MobCatalog([
|
||||
).derive(
|
||||
seasons = SE.WINTER, scarcity = SC.RARE
|
||||
)
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("blaze", "minecraft:blaze"),
|
||||
Habitat(
|
||||
altitude = AL.PLUTONIC,
|
||||
@@ -64,8 +74,14 @@ CATALOG = MobCatalog([
|
||||
group = GR.SOLO,
|
||||
scarcity = SC.UNCOMMON
|
||||
)
|
||||
),
|
||||
MobPlacement(Mob("bogged", "minecraft:bogged")),
|
||||
)
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("bogged", "minecraft:bogged"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("brown_bear", "bearminimum:brown_bear"),
|
||||
Habitat(
|
||||
altitude = AL.span(AL.LOWLANDS, AL.ALPINE),
|
||||
@@ -78,8 +94,14 @@ CATALOG = MobCatalog([
|
||||
).derive(
|
||||
seasons = SE.WINTER, scarcity = SC.RARE
|
||||
)
|
||||
),
|
||||
MobPlacement(Mob("bulwark", "immersiveengineering:bulwark")),
|
||||
)
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("bulwark", "immersiveengineering:bulwark"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("camel", "minecraft:camel", AC.CREPUSCULAR),
|
||||
Habitat(
|
||||
altitude = AL.span(AL.DUNES, AL.LOWLANDS),
|
||||
@@ -90,8 +112,14 @@ CATALOG = MobCatalog([
|
||||
).derive(
|
||||
seasons = SE.WET, scarcity = SC.RARE
|
||||
)
|
||||
),
|
||||
MobPlacement(Mob("cat", "minecraft:cat")),
|
||||
)
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("cat", "minecraft:cat"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("cave_spider", "minecraft:cave_spider"),
|
||||
Habitat(
|
||||
altitude = AL.span(AL.OVERBURDEN, AL.HILLS),
|
||||
@@ -99,7 +127,10 @@ CATALOG = MobCatalog([
|
||||
group = GR.SOLO,
|
||||
scarcity = SC.UNCOMMON
|
||||
)
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("chameleon", "cold_sweat:chameleon"),
|
||||
Habitat(
|
||||
altitude = AL.span(AL.DUNES, AL.UPLANDS),
|
||||
@@ -116,7 +147,10 @@ CATALOG = MobCatalog([
|
||||
).derive(
|
||||
seasons = SE.DRY, scarcity = SC.SPARSE,
|
||||
)
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("chicken", "minecraft:chicken"),
|
||||
Habitat(
|
||||
altitude = AL.span(AL.LOWLANDS, AL.UPLANDS),
|
||||
@@ -125,60 +159,219 @@ CATALOG = MobCatalog([
|
||||
group = GR.TROUP,
|
||||
scarcity = SC.COMMON,
|
||||
).derive(
|
||||
seasons = SE.excluding(SE.SUMMER), scarcity = SC.UNCOMMON
|
||||
seasons = SE.exclude(SE.SUMMER), scarcity = SC.UNCOMMON
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("cod", "minecraft:cod"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("commando", "immersiveengineering:commando"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("cow", "minecraft:cow"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("crab", "crabbersdelight:crab"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("creeper", "minecraft:creeper"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("dolphin", "minecraft:dolphin"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("donkey", "minecraft:donkey"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("drowned", "minecraft:drowned"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("enderman", "minecraft:enderman"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("evoker", "minecraft:evoker"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("fox", "minecraft:fox"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("frog", "minecraft:frog"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("fusilier", "immersiveengineering:fusilier"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("glow_squid", "minecraft:glow_squid"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("goat", "minecraft:goat"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("hoglin", "minecraft:hoglin"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("horse", "minecraft:horse"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("husk", "minecraft:husk"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("llama", "minecraft:llama"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("magma_cube", "minecraft:magma_cube"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("mooshroom", "minecraft:mooshroom"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("mule", "minecraft:mule"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("ocelot", "minecraft:ocelot"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("panda", "minecraft:panda"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("parrot", "minecraft:parrot"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("pig", "minecraft:pig"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("pillager", "minecraft:pillager"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("polar_bear", "minecraft:polar_bear"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("pufferfish", "minecraft:pufferfish"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("rabbit", "minecraft:rabbit"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("raccoon", "animalplus:raccoon"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("ravager", "minecraft:ravager"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("red_panda", "animalplus:red_panda"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("salmon", "minecraft:salmon"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("sheep", "minecraft:sheep"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("skeleton", "minecraft:skeleton"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("slime", "minecraft:slime"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("spider", "minecraft:spider"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("squid", "minecraft:squid"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("tropical_fish", "minecraft:tropical_fish"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("turtle", "minecraft:turtle"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("vex", "minecraft:vex"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("villager", "minecraft:villager"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("vindicator", "minecraft:vindicator"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("wandering_trader", "minecraft:wandering_trader"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("warden", "minecraft:warden"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("witch", "minecraft:witch"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("wither_skeleton", "minecraft:wither_skeleton"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("wither", "minecraft:wither"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("wolf", "minecraft:wolf"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("zoglin", "minecraft:zoglin"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("zombie_villager", "minecraft:zombie_villager"))
|
||||
)
|
||||
|
||||
mobs.add(
|
||||
MobPlacement(Mob("zombie", "minecraft:zombie"))
|
||||
)
|
||||
),
|
||||
MobPlacement(Mob("cod", "minecraft:cod")),
|
||||
MobPlacement(Mob("commando", "immersiveengineering:commando")),
|
||||
MobPlacement(Mob("cow", "minecraft:cow")),
|
||||
MobPlacement(Mob("crab", "crabbersdelight:crab")),
|
||||
MobPlacement(Mob("creeper", "minecraft:creeper")),
|
||||
MobPlacement(Mob("dolphin", "minecraft:dolphin")),
|
||||
MobPlacement(Mob("donkey", "minecraft:donkey")),
|
||||
MobPlacement(Mob("drowned", "minecraft:drowned")),
|
||||
MobPlacement(Mob("enderman", "minecraft:enderman")),
|
||||
MobPlacement(Mob("evoker", "minecraft:evoker")),
|
||||
MobPlacement(Mob("fox", "minecraft:fox")),
|
||||
MobPlacement(Mob("frog", "minecraft:frog")),
|
||||
MobPlacement(Mob("fusilier", "immersiveengineering:fusilier")),
|
||||
MobPlacement(Mob("glow_squid", "minecraft:glow_squid")),
|
||||
MobPlacement(Mob("goat", "minecraft:goat")),
|
||||
MobPlacement(Mob("hoglin", "minecraft:hoglin")),
|
||||
MobPlacement(Mob("horse", "minecraft:horse")),
|
||||
MobPlacement(Mob("husk", "minecraft:husk")),
|
||||
MobPlacement(Mob("llama", "minecraft:llama")),
|
||||
MobPlacement(Mob("magma_cube", "minecraft:magma_cube")),
|
||||
MobPlacement(Mob("mooshroom", "minecraft:mooshroom")),
|
||||
MobPlacement(Mob("mule", "minecraft:mule")),
|
||||
MobPlacement(Mob("ocelot", "minecraft:ocelot")),
|
||||
MobPlacement(Mob("panda", "minecraft:panda")),
|
||||
MobPlacement(Mob("parrot", "minecraft:parrot")),
|
||||
MobPlacement(Mob("pig", "minecraft:pig")),
|
||||
MobPlacement(Mob("pillager", "minecraft:pillager")),
|
||||
MobPlacement(Mob("polar_bear", "minecraft:polar_bear")),
|
||||
MobPlacement(Mob("pufferfish", "minecraft:pufferfish")),
|
||||
MobPlacement(Mob("rabbit", "minecraft:rabbit")),
|
||||
MobPlacement(Mob("raccoon", "animalplus:raccoon")),
|
||||
MobPlacement(Mob("ravager", "minecraft:ravager")),
|
||||
MobPlacement(Mob("red_panda", "animalplus:red_panda")),
|
||||
MobPlacement(Mob("salmon", "minecraft:salmon")),
|
||||
MobPlacement(Mob("sheep", "minecraft:sheep")),
|
||||
MobPlacement(Mob("skeleton", "minecraft:skeleton")),
|
||||
MobPlacement(Mob("slime", "minecraft:slime")),
|
||||
MobPlacement(Mob("spider", "minecraft:spider")),
|
||||
MobPlacement(Mob("squid", "minecraft:squid")),
|
||||
MobPlacement(Mob("tropical_fish", "minecraft:tropical_fish")),
|
||||
MobPlacement(Mob("turtle", "minecraft:turtle")),
|
||||
MobPlacement(Mob("vex", "minecraft:vex")),
|
||||
MobPlacement(Mob("villager", "minecraft:villager")),
|
||||
MobPlacement(Mob("vindicator", "minecraft:vindicator")),
|
||||
MobPlacement(Mob("wandering_trader", "minecraft:wandering_trader")),
|
||||
MobPlacement(Mob("warden", "minecraft:warden")),
|
||||
MobPlacement(Mob("witch", "minecraft:witch")),
|
||||
MobPlacement(Mob("wither_skeleton", "minecraft:wither_skeleton")),
|
||||
MobPlacement(Mob("wither", "minecraft:wither")),
|
||||
MobPlacement(Mob("wolf", "minecraft:wolf")),
|
||||
MobPlacement(Mob("zoglin", "minecraft:zoglin")),
|
||||
MobPlacement(Mob("zombie_villager", "minecraft:zombie_villager")),
|
||||
MobPlacement(Mob("zombie", "minecraft:zombie")),
|
||||
])
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
from mcpacker.model.modpack import ModPack
|
||||
from mcpacker.pack.mysteriousisland.biomecatalog import addBiomes
|
||||
from mcpacker.pack.mysteriousisland.blockcatalog import addBlocks
|
||||
from mcpacker.pack.mysteriousisland.depositcatalog import addDeposits
|
||||
from mcpacker.pack.mysteriousisland.itemcatalog import addItems
|
||||
from mcpacker.pack.mysteriousisland.mineralcatalog import addMinerals
|
||||
from mcpacker.pack.mysteriousisland.mobcatalog import addMobs
|
||||
from mcpacker.pack.mysteriousisland.datapack import addDataPack
|
||||
from mcpacker.pack.mysteriousisland.resourcepack import addResourcePack
|
||||
|
||||
|
||||
# Constants ########################################################################################
|
||||
|
||||
def buildModPack():
|
||||
pack = ModPack("mysteriousisland")
|
||||
|
||||
# Order is significant as layers have dependencies
|
||||
pack.augment(addBiomes)
|
||||
pack.augment(addItems)
|
||||
pack.augment(addBlocks)
|
||||
pack.augment(addMinerals)
|
||||
pack.augment(addDeposits)
|
||||
pack.augment(addMobs)
|
||||
pack.augment(addResourcePack)
|
||||
pack.augment(addDataPack)
|
||||
|
||||
return pack
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.pack.mysteriousisland.modpack
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -0,0 +1,8 @@
|
||||
from mcpacker.model.modpack import ModPack
|
||||
from mcpacker.model.resourcepack import ResourcePack
|
||||
|
||||
|
||||
# Functions ########################################################################################
|
||||
|
||||
def addResourcePack(modPack:ModPack):
|
||||
pass
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.pack.mysteriousisland.resourcepack
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -1,33 +1,10 @@
|
||||
from mcpacker.emit.markdown.biomereport import BiomeReport
|
||||
from mcpacker.emit.markdown.mineralreport import MineralReport
|
||||
from mcpacker.emit.markdown.mobreport import MobReport
|
||||
from mcpacker.emit.markdown.reportwriter import ReportWriter
|
||||
from mcpacker.pack.mysteriousisland.world import WORLD
|
||||
from mcpacker.ui.runner import Runner as BaseRunner
|
||||
from mcpacker.pack.mysteriousisland.modpack import buildModPack
|
||||
from mcpacker.ui.runner import Runner
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
# Constants ########################################################################################
|
||||
|
||||
REPORT_PATH = "./output/markdown/mysteriousisland"
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class Runner(BaseRunner):
|
||||
|
||||
def _command_writeReports(self):
|
||||
writer = ReportWriter([
|
||||
BiomeReport(self.world),
|
||||
MineralReport(self.world),
|
||||
MobReport(self.world),
|
||||
])
|
||||
writer.write(REPORT_PATH)
|
||||
|
||||
|
||||
|
||||
# Script ###########################################################################################
|
||||
|
||||
if __name__ == "__main__":
|
||||
Runner(WORLD).run(sys.argv)
|
||||
Runner(buildModPack()).run(sys.argv)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import mcpacker.pack.mysteriousisland.runner
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
def test_syntax():
|
||||
pass
|
||||
@@ -1,10 +0,0 @@
|
||||
from mcpacker.model.core.world import World
|
||||
from mcpacker.pack.mysteriousisland.biomecatalog import CATALOG as biomeCatalog
|
||||
from mcpacker.pack.mysteriousisland.depositcatalog import CATALOG as depositCatalog
|
||||
from mcpacker.pack.mysteriousisland.mineralcatalog import CATALOG as mineralCatalog
|
||||
from mcpacker.pack.mysteriousisland.mobcatalog import CATALOG as mobCatalog
|
||||
|
||||
|
||||
# Constants ########################################################################################
|
||||
|
||||
WORLD = World(biomeCatalog, depositCatalog, mineralCatalog, mobCatalog)
|
||||
+23
-3
@@ -1,15 +1,25 @@
|
||||
from mcpacker.model.core.world import World
|
||||
from mcpacker.emit.markdown.reportwriter import ReportWriter
|
||||
from mcpacker.emit.markdown.biomereport import BiomeReport
|
||||
from mcpacker.emit.markdown.mineralreport import MineralReport
|
||||
from mcpacker.emit.markdown.mobreport import MobReport
|
||||
from mcpacker.model.modpack import ModPack
|
||||
|
||||
import inspect
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
# Constants ########################################################################################
|
||||
|
||||
OUTPUT_PATH = "output"
|
||||
|
||||
|
||||
# Class ############################################################################################
|
||||
|
||||
class Runner:
|
||||
|
||||
def __init__(self, world:World):
|
||||
self.world = world
|
||||
def __init__(self, pack:ModPack|None=None):
|
||||
self.pack = pack or ModPack("untitled")
|
||||
|
||||
def abort(self, message:str, status:int=-1):
|
||||
print(message)
|
||||
@@ -26,3 +36,13 @@ class Runner:
|
||||
sys.exit(0)
|
||||
|
||||
abort("No command named: " + argv[1])
|
||||
|
||||
# Commands #################################################################
|
||||
|
||||
def _command_writeReports(self):
|
||||
writer = ReportWriter([
|
||||
BiomeReport(self.pack),
|
||||
MineralReport(self.pack),
|
||||
MobReport(self.pack),
|
||||
])
|
||||
writer.write(os.path.join(OUTPUT_PATH, self.pack.name, "markdown"))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from mcpacker.ui.runner import Runner
|
||||
import mcpacker.ui.runner
|
||||
|
||||
|
||||
# Tests ############################################################################################
|
||||
|
||||
Reference in New Issue
Block a user