-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
39 changed files
with
454 additions
and
263 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
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 |
---|---|---|
|
@@ -15,13 +15,34 @@ jobs: | |
- name: make gradle wrapper executable | ||
run: chmod +x ./gradlecw | ||
- name: build | ||
run: ./gradlecw build | ||
run: ./gradlecw build -Pbuild.release=true | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
EntityCulling-Fabric/build/libs/* | ||
EntityCulling-Forge/build/libs/* | ||
EntityCulling-Neo/build/libs/* | ||
EntityCulling-Versionless/build/libs/* | ||
- name: Publish-Neo-Curseforge | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
curseforge-id: 448233 | ||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | ||
loaders: neoforge | ||
name: ${{github.ref_name}} - NeoForge | ||
version-type: beta | ||
files: '*Neo/build/libs/!(*-@(dev|sources|javadoc|all)).jar' | ||
game-versions: 1.20.2 | ||
- name: Publish-Neo-Modrinth | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
modrinth-id: NNAgCjsB | ||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | ||
loaders: neoforge | ||
name: ${{github.ref_name}} - NeoForge | ||
files: '*Neo/build/libs/!(*-@(dev|sources|javadoc|all)).jar' | ||
game-versions: 1.20.2 | ||
- name: Publish-Forge-Curseforge | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
|
@@ -31,6 +52,7 @@ jobs: | |
name: ${{github.ref_name}} - Forge | ||
version-type: beta | ||
files: '*Forge/build/libs/!(*-@(dev|sources|javadoc|all)).jar' | ||
game-versions: 1.20.2 | ||
- name: Publish-Forge-Modrinth | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
|
@@ -39,6 +61,7 @@ jobs: | |
loaders: forge | ||
name: ${{github.ref_name}} - Forge | ||
files: '*Forge/build/libs/!(*-@(dev|sources|javadoc|all)).jar' | ||
game-versions: 1.20.2 | ||
- name: Publish-Fabric | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
|
@@ -49,3 +72,4 @@ jobs: | |
loaders: fabric | ||
name: ${{github.ref_name}} - Fabric | ||
files: '*Fabric/build/libs/!(*-@(dev|sources|javadoc|all)).jar' | ||
game-versions: 1.20.2 |
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 |
---|---|---|
|
@@ -39,4 +39,5 @@ logs/ | |
*.properties | ||
gradle/wrapper | ||
VersionShared | ||
UtilityCode | ||
UtilityCode | ||
formatter.xml |
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 |
---|---|---|
@@ -1,34 +1,29 @@ | ||
{ | ||
"schemaVersion": 1, | ||
"id": "entityculling", | ||
"version": "${version}", | ||
|
||
"name": "EntityCulling-Fabric", | ||
"description": "This mod uses async path-tracing to hide Tiles/Entities that are not visible.", | ||
"authors": [ | ||
"tr7zw" | ||
], | ||
"contact": { | ||
"homepage": "https://github.com/tr7zw/EntityCulling-Fabric", | ||
"sources": "https://github.com/tr7zw/EntityCulling-Fabric", | ||
"issues": "https://github.com/tr7zw/EntityCulling-Fabric/issues" | ||
}, | ||
|
||
"license": "tr7zw Protective License", | ||
"icon": "assets/entityculling/icon.png", | ||
|
||
"environment": "client", | ||
"entrypoints": { | ||
"client": [ | ||
"dev.tr7zw.entityculling.EntityCullingMod" | ||
] | ||
}, | ||
"mixins": [ | ||
"entityculling.mixins.json" | ||
], | ||
|
||
"depends": { | ||
"fabric-api": "*", | ||
"minecraft": ">=1.20.2" | ||
} | ||
"schemaVersion": 1, | ||
"id": "${mod_id}", | ||
"version": "${version}", | ||
"name": "${mod_name}", | ||
"description": "${description}", | ||
"authors": [ | ||
"${mod_author}" | ||
], | ||
"contact": { | ||
"homepage": "${homepage_url}", | ||
"sources": "${sources_url}", | ||
"issues": "${issues_url}" | ||
}, | ||
"license": "${license_name}", | ||
"icon": "assets/${mod_id}/icon.png", | ||
"environment": "CLIENT", | ||
"entrypoints": { | ||
"client": [ | ||
"dev.tr7zw.entityculling.EntityCullingMod" | ||
] | ||
}, | ||
"mixins": [ | ||
"${mod_id}.mixins.json" | ||
], | ||
"depends": { | ||
"minecraft": "${minecraft_version_range_fabric}" | ||
} | ||
} |
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
31 changes: 14 additions & 17 deletions
31
EntityCulling-Forge/src/main/resources/META-INF/mods.toml
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 |
---|---|---|
@@ -1,24 +1,21 @@ | ||
modLoader="javafml" | ||
loaderVersion="[35,)" | ||
license="tr7zw Protective License" | ||
loaderVersion="${loader_version_range_forge}" | ||
issueTrackerURL="${issues_url}" | ||
|
||
license="${license_name}" | ||
[[mods]] | ||
modId="entityculling" | ||
version="1.6.2" | ||
displayName="EntityCulling" | ||
authors="tr7zw" | ||
modId="${mod_id}" | ||
version="${version}" | ||
displayName="${mod_name}" | ||
displayURL="${homepage_url}" | ||
logoFile="assets/${mod_id}/icon.png" | ||
authors="${mod_author}" | ||
description=''' | ||
Using async raytracing to hide Tile-/Entities that are hidden behind solid blocks. | ||
${description} | ||
''' | ||
[[dependencies.entityculling]] #optional | ||
modId="forge" | ||
mandatory=true | ||
versionRange="[35,)" | ||
ordering="NONE" | ||
side="CLIENT" | ||
# Here's another dependency | ||
[[dependencies.entityculling]] | ||
[[dependencies.${mod_id}]] | ||
modId="minecraft" | ||
mandatory=true | ||
versionRange="[1.20.2,)" | ||
versionRange="${minecraft_version_range_forge}" | ||
ordering="NONE" | ||
side="CLIENT" | ||
side="BOTH" |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"pack": { | ||
"description": "entityculling resources", | ||
"pack_format": 15 | ||
} | ||
"pack": { | ||
"description": "Resources for ${mod_name}", | ||
"pack_format": ${pack_format_number} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
EntityCulling-Neo/src/main/java/dev/tr7zw/entityculling/EntityCullingBootstrap.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,21 @@ | ||
package dev.tr7zw.entityculling; | ||
|
||
import net.neoforged.fml.common.Mod; | ||
import net.neoforged.fml.loading.FMLEnvironment; | ||
|
||
/** | ||
* Stupid Forge bootstrap class to work around their removal of sidedness | ||
* | ||
* @author tr7zw | ||
* | ||
*/ | ||
@Mod("entityculling") | ||
public class EntityCullingBootstrap { | ||
|
||
public EntityCullingBootstrap() { | ||
if (FMLEnvironment.dist.isClient()) { | ||
new EntityCullingMod(); | ||
} | ||
} | ||
|
||
} |
52 changes: 52 additions & 0 deletions
52
EntityCulling-Neo/src/main/java/dev/tr7zw/entityculling/EntityCullingMod.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,52 @@ | ||
package dev.tr7zw.entityculling; | ||
|
||
import org.apache.commons.lang3.ArrayUtils; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.world.level.block.entity.BlockEntity; | ||
import net.minecraft.world.phys.AABB; | ||
import net.neoforged.fml.IExtensionPoint; | ||
import net.neoforged.fml.ModLoadingContext; | ||
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent; | ||
import net.neoforged.fml.javafmlmod.FMLJavaModLoadingContext; | ||
import net.neoforged.neoforge.common.NeoForge; | ||
import net.neoforged.neoforge.event.TickEvent.ClientTickEvent; | ||
import net.neoforged.neoforge.event.TickEvent.LevelTickEvent; | ||
|
||
public class EntityCullingMod extends EntityCullingModBase { | ||
|
||
public EntityCullingMod() { | ||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); | ||
} | ||
|
||
private void setup(final FMLCommonSetupEvent event) { | ||
onInitialize(); | ||
} | ||
|
||
@Override | ||
public void initModloader() { | ||
Minecraft.getInstance().options.keyMappings = ArrayUtils.add(Minecraft.getInstance().options.keyMappings, | ||
keybind); | ||
NeoForge.EVENT_BUS.addListener(this::doClientTick); | ||
NeoForge.EVENT_BUS.addListener(this::doWorldTick); | ||
ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, | ||
() -> new IExtensionPoint.DisplayTest( | ||
() -> ModLoadingContext.get().getActiveContainer().getModInfo().getVersion().toString(), | ||
(remote, isServer) -> true)); | ||
} | ||
|
||
private void doClientTick(ClientTickEvent event) { | ||
this.clientTick(); | ||
} | ||
|
||
private void doWorldTick(LevelTickEvent event) { | ||
this.worldTick(); | ||
} | ||
|
||
@Override | ||
public AABB setupAABB(BlockEntity entity, BlockPos pos) { | ||
return new AABB(pos); | ||
} | ||
|
||
} |
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,28 @@ | ||
modLoader="javafml" | ||
loaderVersion="${loader_version_range_neoforge}" | ||
issueTrackerURL="${issues_url}" | ||
|
||
license="${license_name}" | ||
[[mods]] | ||
modId="${mod_id}" | ||
version="${version}" | ||
displayName="${mod_name}" | ||
displayURL="${homepage_url}" | ||
logoFile="assets/${mod_id}/icon.png" | ||
authors="${mod_author}" | ||
description=''' | ||
${description} | ||
''' | ||
displayTest="IGNORE_ALL_VERSION" | ||
[[dependencies.${mod_id}]] | ||
modId="minecraft" | ||
mandatory=true | ||
versionRange="${minecraft_version_range_forge}" | ||
ordering="NONE" | ||
side="BOTH" | ||
[[dependencies.${mod_id}]] | ||
modId="neoforge" | ||
mandatory=true | ||
versionRange="${neo_version_range}" | ||
ordering="NONE" | ||
side="BOTH" |
Oops, something went wrong.