Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
re-fix sodium 0.5.x compat & sync from forge version
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Oct 8, 2023
1 parent 7237666 commit 1a08baa
Show file tree
Hide file tree
Showing 32 changed files with 578 additions and 535 deletions.
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ body:
label: Mod Version
description: The version of the mod you were using when the bug occured
options:
- "0.6.10"
- "0.6.9"
- "0.6.8.a"
- "0.6.8"
- "0.6.7"
Expand All @@ -82,6 +84,7 @@ body:
label: Minecraft Version
description: The version of Minecraft you were using when the bug occured
options:
- "1.20.1"
- "1.19.2"
- "1.18.2"
- "1.18.1"
Expand All @@ -91,8 +94,8 @@ body:
- type: input
attributes:
label: Loader Version
description: The version of Forge or Fabric you were using when the bug occured
placeholder: Forge 39.0.0
description: The version of Fabric API you were using when the bug occured
placeholder: Fabric API 0.84.0+1.20.1
validations:
required: true
- type: textarea
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<div align="center">
<img src="https://i.imgur.com/yVFgPpr.png" alt="Logo by @voxel_dani on Twitter" width="250">
<h1>Flywheel</h1>
<h1>Flywheel DM-Earth Edition</h1>
<h6>A modern engine for modded Minecraft.</h6>
<a href='https://ci.tterrag.com/job/Flywheel/job/Fabric/job/1.18/'><img src='https://ci.tterrag.com/job/Flywheel/job/Fabric/job/1.18/badge/icon' alt="Jenkins"></a>
<a href="https://discord.gg/xjD59ThnXy"><img src="https://img.shields.io/discord/841464837406195712?color=5865f2&label=Discord&style=flat" alt="Discord"></a>
<a href="https://www.curseforge.com/minecraft/mc-mods/flywheel"><img src="http://cf.way2muchnoise.eu/486392.svg" alt="Curseforge Downloads"></a>
<br>
</div>

Expand All @@ -16,7 +15,7 @@ graphics programming.

### Instancing

Flywheel provides an alternate, unified path for entity and tile entity rendering that takes advantage of GPU
Flywheel provides an alternate, unified path for entity and block entity rendering that takes advantage of GPU
instancing. In doing so, Flywheel gives the developer the flexibility to define their own vertex and instance formats,
and write custom shaders to ingest that data.

Expand Down
30 changes: 7 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
plugins {
id 'fabric-loom' version "${loom_version}"
id 'maven-publish'
id 'com.matthewprenger.cursegradle' version "${cursegradle_version}"
}

boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equalsIgnoreCase('false');

ext.buildNumber = System.getenv('BUILD_NUMBER')

group = 'com.jozufozu.flywheel'
archivesBaseName = "flywheel-fabric-${artifact_minecraft_version}"
version = mod_version + (dev && buildNumber != null ? "-${buildNumber}" : '')
group = 'dm.earth.flywheel'
archivesBaseName = "flywheel-fabric"
version = mod_version + (dev && buildNumber != null ? "-${buildNumber}" : '') + "+${artifact_minecraft_version}"

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand Down Expand Up @@ -65,8 +64,9 @@ dependencies {
// Fabric API
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"

modCompileOnly 'maven.modrinth:sodium:mc1.20-0.4.10'
modCompileOnly 'maven.modrinth:iris:1.6.4+1.20'
modCompileOnly 'maven.modrinth:starlight:1.1.2+1.20'
modCompileOnly 'maven.modrinth:sodium:mc1.20.1-0.5.3'
modCompileOnly 'maven.modrinth:iris:1.6.9+1.20.1'

implementation 'com.google.code.findbugs:jsr305:3.0.2'
}
Expand Down Expand Up @@ -109,7 +109,7 @@ jar {
'Implementation-Version' : project.jar.archiveVersion,
//'Implementation-Vendor': 'flywheel authors',
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'MixinConfigs' : 'flywheel.mixins.json'
//'MixinConfigs' : 'flywheel.mixins.json'
])
}
}
Expand Down Expand Up @@ -142,19 +142,3 @@ publishing {
}
}
}

tasks.curseforge.enabled = !dev && project.hasProperty('jozu_curseforge_key')

curseforge {
if (project.hasProperty('jozu_curseforge_key')) {
apiKey = project.jozu_curseforge_key
}

project {
id = project.projectId
changelog = file('changelog.txt')
releaseType = project.curse_type
mainArtifact jar
addGameVersion '1.20.1'
}
}
9 changes: 2 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ org.gradle.jvmargs = -Xmx3G
org.gradle.daemon = false

# mod version info
mod_version = 0.6.9
mod_version = 0.6.10
artifact_minecraft_version = 1.20.1

minecraft_version = 1.20.1
Expand All @@ -11,14 +11,9 @@ fabric_version = 0.84.0+1.20.1

# build dependency versions
loom_version = 1.3-SNAPSHOT
cursegradle_version = 1.4.0
parchment_version = 2023.06.25

use_parchment = false

# curseforge info
projectId = 486392
curse_type = release

# github info
github_project = Jozufozu/Flywheel
github_project = DM-Earth/flywheel-fabric-dme-edition
2 changes: 0 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ pluginManagement {
gradlePluginPortal()
}
}

rootProject.name = 'Flywheel-Fabric'
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.block.entity.BlockEntity;

Expand Down Expand Up @@ -107,6 +108,21 @@ public static void resetInstanceWorld(ClientLevel world) {
.loadEntities(world);
}

public static <T extends BlockEntity> boolean tryAddBlockEntity(T blockEntity) {
Level level = blockEntity.getLevel();
if (!Backend.canUseInstancing(level)) {
return false;
}

if (!InstancedRenderRegistry.canInstance(blockEntity.getType())) {
return false;
}

getBlockEntities(level).queueAdd(blockEntity);

return InstancedRenderRegistry.shouldSkipRender(blockEntity);
}

public static void getDebugString(List<String> debug) {
debug.add("");
debug.add("Flywheel: " + Flywheel.getVersion());
Expand Down
Loading

0 comments on commit 1a08baa

Please sign in to comment.