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

Commit

Permalink
feat: port to Fabric 1.18.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ViRb3 committed Mar 13, 2022
1 parent c66690a commit 7d6e213
Show file tree
Hide file tree
Showing 43 changed files with 908 additions and 891 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches-ignore:
- master
pull_request:
branches-ignore:
- master

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Prepare build
run: |
sed -i "s/{{release_branch}}/$GITHUB_REF_NAME/" .releaserc* || exit 1
mv .releaserc1.yml .releaserc.yml
- name: Setup Java JDK
uses: actions/setup-java@v2.4.0
with:
distribution: "temurin"
java-version: "17"

- name: Version
uses: cycjimmy/semantic-release-action@v2.6.0
with:
semantic_version: "18.0.0"
extra_plugins: |
@semantic-release/exec@6.0.1
env:
GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }}

- name: Build
run: |
sed -i "s/mod_version=.*/mod_version=$(cat .version)/" gradle.properties || exit 1
./gradlew build
mv .releaserc2.yml .releaserc.yml
- name: Release
uses: cycjimmy/semantic-release-action@v2.6.0
with:
semantic_version: "18.0.0"
env:
GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }}
177 changes: 167 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,171 @@
*
!src/
!src/**

!verilog/
!verilog/**
# Created by https://www.toptal.com/developers/gitignore/api/macos,java,intellij+all,gradle
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,java,intellij+all,gradle

!markdown/
!markdown/**
### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

!screenshots/
!screenshots/**
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

!README.md
# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.

.idea/*

!.idea/codeStyles
!.idea/runConfigurations

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Gradle ###
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

# End of https://www.toptal.com/developers/gitignore/api/macos,java,intellij+all,gradle
10 changes: 10 additions & 0 deletions .releaserc1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
dryRun: true
branches:
- "{{release_branch}}"
tagFormat: v{{release_branch}}-${version}
plugins:
- "@semantic-release/commit-analyzer"
- #
- "@semantic-release/exec"
- verifyReleaseCmd: echo "${nextRelease.version}" > .version
11 changes: 11 additions & 0 deletions .releaserc2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
branches:
- "{{release_branch}}"
tagFormat: v{{release_branch}}-${version}
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- #
- "@semantic-release/github"
- assets:
- path: build/libs/*.jar
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,32 @@
[flow]: https://github.com/itsFrank/MinecraftHDL/blob/master/screenshots/flow.png?raw=true


# Minecraft HDL
# Fabric HDL

Fabric HDL is a Fabric 1.18.2 port of the Forge 1.10.2 mod [Minecraft HDL](https://github.com/itsFrank/MinecraftHDL). The GUI has been removed in favor of a chat command:

```
/synth <path_to_json_file>
```

## Installing

Grab the latest version from the releases and install it like any Fabric mod.

> :information_source: [Fabric API](https://www.curseforge.com/minecraft/mc-mods/fabric-api) is required.
## Building

Make sure Java 17 is in your PATH. Then, run:
```
./gradlew build
```
The mod will be built under `build/libs/`.

---

# Minecraft HDL

Minecraft HDL is a digital synthesis flow for minecraft redstone circuits. It is an attempt to use industry standard design tools and methods to generate digital circuits with redstone.

### Example:
Expand Down
72 changes: 72 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
plugins {
id 'fabric-loom' version '0.11-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
}

dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
}

processResources {
inputs.property "version", project.version

filesMatching("fabric.mod.json") {
expand "version": project.version
}
}

tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
16 changes: 16 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.1
loader_version=0.13.3

# Mod Properties
mod_version = 1.0.0
maven_group = com.virb3
archives_base_name = fabric-hdl

# Dependencies
fabric_version=0.47.8+1.18.2
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 7d6e213

Please sign in to comment.