forked from Snownee/Jade
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Kasualix/main
- Loading branch information
Showing
14 changed files
with
184 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
on: [ push, pull_request, workflow_dispatch ] | ||
|
||
jobs: | ||
Build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: 17 | ||
- name: Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
.gradle | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'build.gradle') }} | ||
- name: Build with Gradle | ||
run: | | ||
chmod +x gradlew | ||
./gradlew build | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Artifacts-forge | ||
path: ${{ github.workspace }}/build/libs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package snownee.jade.api; | ||
|
||
public interface ExtendedTileEntityType { | ||
boolean amber$shouldShowCustomName(); | ||
void amber$setShouldShowCustomName(boolean shouldShowCustomName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package snownee.jade.api; | ||
|
||
public interface WailaBlacklisted { | ||
boolean amber$isInWailaBlacklist(); | ||
void amber$setIsInWailaBlacklist(boolean isInWailaBlacklist); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package snownee.jade.mixin; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
|
||
import net.minecraft.entity.EntityType; | ||
import snownee.jade.api.WailaBlacklisted; | ||
|
||
@Mixin(EntityType.class) | ||
public abstract class EntityTypeMixin implements WailaBlacklisted { | ||
|
||
@Unique private boolean amber$isInWailaBlacklist; | ||
|
||
@Override | ||
public boolean amber$isInWailaBlacklist() { | ||
return this.amber$isInWailaBlacklist; | ||
} | ||
|
||
@Override | ||
public void amber$setIsInWailaBlacklist(boolean isInWailaBlacklist) { | ||
this.amber$isInWailaBlacklist = isInWailaBlacklist; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package snownee.jade.mixin; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
|
||
import net.minecraft.item.Item; | ||
import snownee.jade.api.WailaBlacklisted; | ||
|
||
@Mixin(Item.class) | ||
public class ItemMixin implements WailaBlacklisted { | ||
@Unique private boolean amber$isInWailaBlacklist; | ||
@Override | ||
public boolean amber$isInWailaBlacklist() { | ||
return this.amber$isInWailaBlacklist; | ||
} | ||
|
||
@Override | ||
public void amber$setIsInWailaBlacklist(boolean isInWailaBlacklist) { | ||
this.amber$isInWailaBlacklist = isInWailaBlacklist; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package snownee.jade.mixin; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
|
||
import net.minecraft.tileentity.TileEntityType; | ||
import snownee.jade.api.ExtendedTileEntityType; | ||
|
||
@Mixin(TileEntityType.class) | ||
public class TileEntityTypeMixin implements ExtendedTileEntityType { | ||
@Unique private boolean amber$shouldShowCustomName; | ||
|
||
@Override | ||
public boolean amber$shouldShowCustomName() { | ||
return this.amber$shouldShowCustomName; | ||
} | ||
|
||
@Override | ||
public void amber$setShouldShowCustomName(boolean shouldShowCustomName) { | ||
this.amber$shouldShowCustomName = shouldShowCustomName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"required": true, | ||
"minVersion": "0.8", | ||
"package": "snownee.jade.mixin", | ||
"compatibilityLevel": "JAVA_8", | ||
"refmap": "amber.refmap.json", | ||
"injectors": { | ||
"defaultRequire": 1 | ||
}, | ||
"client": [ | ||
"EntityTypeMixin", | ||
"ItemMixin" | ||
], | ||
"mixins": [ | ||
"TileEntityTypeMixin" | ||
] | ||
} |