GithubHelp home page GithubHelp logo

colintimbarndt / sandstone-resourcepacks Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 185 KB

Generate resourcepacks using Sandstone

License: MIT License

TypeScript 100.00%
minecraft library typescript sandstone resourcepack

sandstone-resourcepacks's People

Contributors

colintimbarndt avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

sandstone-resourcepacks's Issues

writing to wrong directory when using custom-path saveType

i am struggling to keep my workspace tidy working with sandstone.
what i'd like is a project structure like this:

my_project:
 - datapack:
   - pack.mcmeta
   - data/
 - resources:
   - pack.mcmeta
   - assets/
 - sandstone:
   - project.json
   - src/
   ...

however this does not seem possible with the current way sandstone-resourcepacks handles the root path.

i have tried the following structure as well:

my_reconfigured_project:
 - main:
   - pack.mcmeta
   - data/
 - main-resources:
   - pack.mcmeta
   - assets/
 - sandstone:
   - project.json
   - src/
   ...

however the main-resources folder ends up at the same level as the root my_reconfigured_project directory
this seems to be because of the way sandstone-resourcepacks handles custom resources in src > resource.ts (saveResourcepackResource):

4	export const saveResourcepackResource =
5		(...assetPath: string[]): CustomResourceSave =>
6			({ saveType, packName, saveLocation }): string => {
7				if (saveType === "root") {
8					return path.join(saveLocation!, "..", "resourcepacks", packName, ...assetPath);
9				}
10				if (saveType === "world") {
11					return path.join(saveLocation!, "..", "..", "resourcepacks", packName, ...assetPath);
12				}
13				if (saveType === "custom-path") {
14					return path.join(saveLocation!, "../", packName + "-resources", ...assetPath);
//									^^^^^ moving out too far?
15				}
16				throw new Error("Invalid saveType: " + saveType);
17			}

i hope that this is a simple fix and a solution is found soon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.