Skip to content
This repository has been archived by the owner on May 27, 2023. It is now read-only.

Updating v0.2 to be working now #17

Open
wants to merge 5 commits into
base: feat/v0.2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +25,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
joshuasing marked this conversation as resolved.
Show resolved Hide resolved
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
joshuasing marked this conversation as resolved.
Show resolved Hide resolved
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
68 changes: 34 additions & 34 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,43 +25,43 @@ jobs:
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
cache: maven
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
cache: gradle


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
56 changes: 38 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,54 @@
# Scaffolding

Scaffolding is a library for Minestom that allows you to load and place schematics.
> This library is still under heavy development and has too many bugs to count. For your own safety, this should not be used in a production environment.
> This library is still under heavy development and has too many bugs to count. For your own safety, this should not be
> used in a production environment.
> This library's API is likely to change a lot as this project works towards a stable 1.0.0 release.

## Usage

```java
// Load a schematic from File.
public void method1() {
Schematic schematic = Scaffolding.fromFile(new File("schematics/my_schematic.schematic"));
}

public void method2() {
Schematic schematic = new SpongeSchematic();
schematic.read(new FileInputStream(new File("schematics/my_schematic.schematic")));
//Load Schematics
public class LoadASchematic {
public void method1(){
Schematic schematic = Scaffolding.fromFile(new File("schematics/my_schematic.schematic"));
}


public void method2(){
Schematic schematic = new Schematic();
schematic.read(new FileInputStream(new File("schematics/my_schematic.schematic")));
joshuasing marked this conversation as resolved.
Show resolved Hide resolved
}
}

```

```java
// Place a schematic at a location.
Instance instance = player.getInstance();
Pos position = player.getPosition();
schematic.build(instance, position).thenRun(() -> player.sendMessage("Schematic placed!"));
```
```java
// Write a schematic (Soon:tm:)
Region region = new Region(new Pos(0, 0, 0), new Pos(10, 10, 10));
Schematic schematic = new SpongeSchematic();
schematic.write(new FileOutputStream("schematics/my_schematic.schematic"), region);

public class LoadAndPasteSchematicOrSaveIt {

// Place a schematic at a location.
public void method1() {
Instance instance = player.getInstance();
Pos position = player.getPosition();
schematic.build(instance, position).thenRun(() -> player.sendMessage("Schematic placed!"));
}


//Select a region and save it to a schematic (Soon TM)
public void method2() {
Region region = new Region(new Pos(0, 0, 0), new Pos(10, 10, 10));
Schematic schematic = new SpongeSchematic();
schematic.write(new FileOutputStream("schematics/my_schematic.schematic"), region);
}
}
```

## Dependency

### Gradle (Kotlin)

Add Scaffolding as a dependency in your `build.gradle.kts` file.

```kt
Expand All @@ -44,6 +62,7 @@ dependencies {
```

### Gradle (Groovy)

Add Scaffolding as a dependency in your `build.gradle` file.

```groovy
Expand All @@ -57,6 +76,7 @@ dependencies {
```

### Maven

Add Scaffolding as a dependency in your `pom.xml` file.

```xml
Expand Down
23 changes: 23 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,32 @@
group = "dev.hypera"
version = "0.2.0-SNAPSHOT"

//Minestom
joshuasing marked this conversation as resolved.
Show resolved Hide resolved
val minestomVersion by extra("-SNAPSHOT")

//Gson
val gsonVersion by extra("2.9.0")

//Fast Utililities
val fastUtilVersion by extra("2.0.1")

//Jupiter Testing
val jupiterAPIVersion by extra("5.8.2")
val jupiterEngineVersion by extra("5.8.2")

plugins {
`java-library`
}

allprojects {
repositories {
mavenCentral()
maven("https://jitpack.io/")
}
}

tasks {
compileJava {
options.encoding = "UTF-8"
}
}
18 changes: 12 additions & 6 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,19 @@ java {
}

dependencies {
compileOnlyApi("com.github.Minestom:Minestom:7be96b7679")
compileOnly("space.vectrix.flare:flare-fastutil:2.0.1")
compileOnly("com.google.code.gson:gson:2.9.0")
compileOnlyApi("com.github.Minestom:Minestom:${rootProject.extra["minestomVersion"]}")
joshuasing marked this conversation as resolved.
Show resolved Hide resolved
compileOnly("space.vectrix.flare:flare-fastutil:${rootProject.extra["fastUtilVersion"]}")
compileOnly("com.google.code.gson:gson:${rootProject.extra["gsonVersion"]}")

testImplementation("com.github.Minestom:Minestom:7be96b7679")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
testImplementation("com.github.Minestom:Minestom:${rootProject.extra["minestomVersion"]}")
testImplementation("org.junit.jupiter:junit-jupiter-api:${rootProject.extra["jupiterAPIVersion"]}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${rootProject.extra["jupiterEngineVersion"]}")
}

tasks {
compileJava {
options.encoding = "UTF-8"
}
}

publishing {
Expand Down
Loading