-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
88 additions
and
146 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,41 @@ | ||
# Automatically build the project and run any configured tests for every push | ||
# and submitted pull request. This can help catch issues that only occur on | ||
# certain platforms or Java versions, and provides a first line of defence | ||
# against bad commits. | ||
|
||
name: build | ||
on: [pull_request, push] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
# Use these Java versions | ||
java: [ | ||
17, # Current Java LTS & minimum supported by Minecraft | ||
21, # Current Java LTS | ||
] | ||
# and run on both Linux and Windows | ||
os: [ubuntu-22.04, windows-2022] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v4 | ||
- name: validate gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: setup jdk ${{ matrix.java }} | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: 'microsoft' | ||
- name: make gradle wrapper executable | ||
if: ${{ runner.os != 'Windows' }} | ||
run: chmod +x ./gradlew | ||
- name: build | ||
run: ./gradlew build | ||
- name: capture build artifacts | ||
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Artifacts | ||
path: build/libs/ |
This file was deleted.
Oops, something went wrong.
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
27 changes: 0 additions & 27 deletions
27
src/client/java/net/i_no_am/glowing_entities/GlowingEntitiesClient.java
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
src/main/java/net/i_no_am/glowing_entities/GlowingEntities.java
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
src/main/java/net/i_no_am/glowing_entities/GlowingEntitiesClient.java
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,33 @@ | ||
package net.i_no_am.glowing_entities; | ||
|
||
import com.mojang.brigadier.arguments.IntegerArgumentType; | ||
import net.fabricmc.api.ClientModInitializer; | ||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.fabricmc.fabric.api.client.command.v1.ClientCommandManager; | ||
import net.minecraft.text.Text; | ||
|
||
import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.argument; | ||
import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.literal; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class GlowingEntitiesClient implements ClientModInitializer { | ||
@Override | ||
public void onInitializeClient() { | ||
ClientCommandManager.DISPATCHER.register( | ||
literal("glowing_effect") | ||
.then(argument("glowing", IntegerArgumentType.integer()) | ||
.executes(context -> { | ||
int value = IntegerArgumentType.getInteger(context, "glowing"); | ||
IEntityDataSaver playerData = (IEntityDataSaver) context.getSource().getPlayer(); | ||
playerData.getPersistentData().putInt("glow", value); | ||
if (value > 15) | ||
value = 15; | ||
String glow = value < 0 ? "Normal" : String.valueOf(value); | ||
context.getSource().sendFeedback(Text.of("§l§6Glowing Entities: §bThe Entity Glowing set to: " + glow)); | ||
return value; | ||
}) | ||
) | ||
); | ||
} | ||
} |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ies/mixin/client/EntityRendererMixin.java → ...g_entities/mixin/EntityRendererMixin.java
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
15 changes: 0 additions & 15 deletions
15
src/main/java/net/i_no_am/glowing_entities/mixin/ExampleMixin.java
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...mixin/client/ModEntityDataSaverMixin.java → ...tities/mixin/ModEntityDataSaverMixin.java
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