Skip to content
Merged

A #2

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
3df56e1
fix: remove MixinExtras relocation
Goldenfield192 Jun 22, 2026
063b16f
fix: add
Goldenfield192 Jun 23, 2026
f78bff6
Port to ForgeGradle7 (#245)
Codetoil Jun 24, 2026
becfeb2
chore: use java25 when building
Goldenfield192 Jun 24, 2026
74a735d
chore: update release pipeline
Goldenfield192 Jun 24, 2026
8ee97fb
remove legacy srg name in AT
Goldenfield192 Jun 24, 2026
da0f86c
re-add srg AT entries
Goldenfield192 Jun 24, 2026
d8652e2
ref: rename AT to match 1.14+ cases
Goldenfield192 Jun 24, 2026
c302e67
Merge remote-tracking branch 'origin/1.12.2-forge' into 1.14.4-forge
Goldenfield192 Jun 24, 2026
dc9b7c2
chore: bump FG to 7.0.30
Goldenfield192 Jun 24, 2026
7a63289
ref: bump Forge version
Goldenfield192 Jun 24, 2026
75ba3c6
Merge remote-tracking branch 'origin/1.12.2-forge' into 1.14.4-forge
Goldenfield192 Jun 24, 2026
62974f3
ref: add 1.14 deps & AT entries
Goldenfield192 Jun 25, 2026
6b06999
Merge remote-tracking branch 'origin/1.14.4-forge' into 1.15.2-forge
Goldenfield192 Jun 25, 2026
ea43777
Merge remote-tracking branch 'origin/1.15.2-forge' into 1.16.5-forge
Goldenfield192 Jun 25, 2026
7439f75
resolve 1.16 conflicts
Goldenfield192 Jun 25, 2026
e14c944
Merge remote-tracking branch 'origin/1.16.5-forge' into 1.17.1-forge
Goldenfield192 Jun 25, 2026
4db1d2a
resolve 1.17 conflicts
Goldenfield192 Jun 25, 2026
73ccff8
fix: add refmap
Goldenfield192 Jun 25, 2026
c233b67
revert "Port to FG7" and following changes
Goldenfield192 Jun 26, 2026
6f680b5
Revert "revert "Port to FG7" and following changes"
Goldenfield192 Jun 26, 2026
7b50029
bump FG to 7.0.31
Goldenfield192 Jun 26, 2026
d1b69cf
Merge remote-tracking branch 'origin/1.12.2-forge' into 1.14.4-forge
Goldenfield192 Jun 26, 2026
5432fa6
revert to legacy FG
Goldenfield192 Jun 26, 2026
51cd971
chore: use java25 for 1.7.10
Goldenfield192 Jun 26, 2026
6558a9a
Merge remote-tracking branch 'origin/1.12.2-forge' into 1.14.4-forge
Goldenfield192 Jun 26, 2026
aaa431a
resolve 1.14 conflicts
Goldenfield192 Jun 26, 2026
44191d0
Merge remote-tracking branch 'origin/1.14.4-forge' into 1.15.2-forge
Goldenfield192 Jun 26, 2026
20efc5a
Merge remote-tracking branch 'origin/1.15.2-forge' into 1.16.5-forge
Goldenfield192 Jun 26, 2026
3dc099c
Merge remote-tracking branch 'origin/1.16.5-forge' into 1.17.1-forge
Goldenfield192 Jun 26, 2026
8830a3d
resolve 1.17 conflicts
Goldenfield192 Jun 26, 2026
96e1a9d
Merge remote-tracking branch 'origin/1.17.1-forge' into 1.18.2-forge
Goldenfield192 Jun 26, 2026
d8a806b
resolve 1.18 conflicts
Goldenfield192 Jun 26, 2026
f391bd1
Merge remote-tracking branch 'origin/1.18.2-forge' into 1.19.4-forge
Goldenfield192 Jun 26, 2026
29ba8fb
Merge remote-tracking branch 'origin/1.19.4-forge' into 1.20.1-forge
Goldenfield192 Jun 26, 2026
abaad0b
fix: incorrect shadow on scaled model
Goldenfield192 Jun 26, 2026
169556e
Merge remote-tracking branch 'origin/1.17.1-forge' into 1.18.2-forge
Goldenfield192 Jun 26, 2026
f0ae327
Merge remote-tracking branch 'origin/1.18.2-forge' into 1.19.4-forge
Goldenfield192 Jun 26, 2026
a7431ec
Merge remote-tracking branch 'origin/1.19.4-forge' into 1.20.1-forge
Goldenfield192 Jun 26, 2026
8c70240
fix: apply velocity when loading
Goldenfield192 Jun 27, 2026
0e5c3c8
Merge remote-tracking branch 'origin/1.12.2-forge' into 1.14.4-forge
Goldenfield192 Jun 27, 2026
700307f
Merge remote-tracking branch 'origin/1.14.4-forge' into 1.15.2-forge
Goldenfield192 Jun 27, 2026
a0d62c8
Merge remote-tracking branch 'origin/1.15.2-forge' into 1.16.5-forge
Goldenfield192 Jun 27, 2026
8fc70f7
bump 1.14 Forge version
Goldenfield192 Jun 27, 2026
a375497
Merge remote-tracking branch 'origin/1.16.5-forge' into 1.17.1-forge
Goldenfield192 Jun 27, 2026
e0a8b9b
fix: avoid ArrayIndexOutOfBoundsException by copying entity list befo…
Goldenfield192 Jun 27, 2026
3f642b1
Merge remote-tracking branch 'origin/1.17.1-forge' into 1.18.2-forge
Goldenfield192 Jun 27, 2026
da400e6
Merge remote-tracking branch 'origin/1.18.2-forge' into 1.19.4-forge
Goldenfield192 Jun 27, 2026
983f256
Merge remote-tracking branch 'origin/1.19.4-forge' into 1.20.1-forge
Goldenfield192 Jun 27, 2026
939cdfd
bump version to 1.3.1
Goldenfield192 Jun 28, 2026
7ca69be
Merge remote-tracking branch 'origin/1.12.2-forge' into 1.14.4-forge
Goldenfield192 Jun 28, 2026
d5bf217
bump mods.toml and fix template issue
Goldenfield192 Jun 28, 2026
87488eb
Merge remote-tracking branch 'origin/1.14.4-forge' into 1.15.2-forge
Goldenfield192 Jun 28, 2026
ae90018
Merge remote-tracking branch 'origin/1.15.2-forge' into 1.16.5-forge
Goldenfield192 Jun 28, 2026
5e6b299
Merge remote-tracking branch 'origin/1.16.5-forge' into 1.17.1-forge
Goldenfield192 Jun 28, 2026
516ab20
Merge remote-tracking branch 'origin/1.17.1-forge' into 1.18.2-forge
Goldenfield192 Jun 28, 2026
ed72d4f
Merge remote-tracking branch 'origin/1.18.2-forge' into 1.19.4-forge
Goldenfield192 Jun 28, 2026
d2c302a
fix: use EffectiveSide to get logical side
Goldenfield192 Jun 28, 2026
1f8b081
Merge remote-tracking branch 'origin/1.19.4-forge' into 1.20.1-forge
Goldenfield192 Jun 28, 2026
3831fa2
fix: restrict MixinBooter version
Goldenfield192 Jun 29, 2026
ecf252a
fix: use server-compatible way to load speed
Goldenfield192 Jun 30, 2026
608f931
Merge remote-tracking branch 'origin/1.12.2-forge' into 1.14.4-forge
Goldenfield192 Jun 30, 2026
07eb1fd
Merge remote-tracking branch 'origin/1.14.4-forge' into 1.15.2-forge
Goldenfield192 Jun 30, 2026
3b5ad37
Merge remote-tracking branch 'origin/1.15.2-forge' into 1.16.5-forge
Goldenfield192 Jun 30, 2026
1f15e33
ref: use BuiltinPack to handle item model
Goldenfield192 Jul 1, 2026
9276e07
fix: change BuiltinPack.putData param to Identifier
Goldenfield192 Jul 1, 2026
704197c
Merge remote-tracking branch 'origin/1.12.2-forge' into 1.14.4-forge
Goldenfield192 Jul 1, 2026
9be3039
resolve 1.14 conflicts
Goldenfield192 Jul 1, 2026
4f4eb58
Merge remote-tracking branch 'origin/1.14.4-forge' into 1.15.2-forge
Goldenfield192 Jul 1, 2026
8d048c3
Merge remote-tracking branch 'origin/1.15.2-forge' into 1.16.5-forge
Goldenfield192 Jul 1, 2026
228ef37
resolve 1.16 conflicts
Goldenfield192 Jul 1, 2026
7a2ce6d
Merge remote-tracking branch 'origin/1.16.5-forge' into 1.17.1-forge
Goldenfield192 Jul 1, 2026
a24e83a
resolve 1.17 conflicts
Goldenfield192 Jul 1, 2026
d1066d1
Merge remote-tracking branch 'origin/1.17.1-forge' into 1.18.2-forge
Goldenfield192 Jul 1, 2026
aed62a4
Merge remote-tracking branch 'origin/1.18.2-forge' into 1.19.4-forge
Goldenfield192 Jul 1, 2026
fa571b6
Merge remote-tracking branch 'origin/1.19.4-forge' into 1.20.1-forge
Goldenfield192 Jul 1, 2026
07e0dc8
Merge branch '1.21.1-forge' into a
Codetoil Jul 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 25 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,28 @@ name: Universal Mod Core CI
on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '21' # The JDK version to make available on the path.
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64
- run: |
ref=`echo ${github_ref} | sed -e 's,refs/heads/,,' | tr '/' '-'`
echo $ref
echo "::set-env name=ref::$ref"
env:
github_ref: ${{ github.ref }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: keyscan
run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa teamopenindustry.cc >> ~/.ssh/known_hosts
- name: Gradle publish
env:
MAVENCI_PASS: ${{ secrets.MAVENCI_PASS }}
run: ./gradlew publish
- uses: actions/upload-artifact@v4
with:
name: UniversalModCore-${{ env.ref }}
path: build/libs/UniversalModCore-*.jar
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
- run: |
ref=`echo ${github_ref} | sed -e 's,refs/heads/,,' | tr '/' '-'`
echo $ref
echo "::set-env name=ref::$ref"
env:
github_ref: ${{ github.ref }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: keyscan
run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa teamopenindustry.cc >> ~/.ssh/known_hosts
- name: Gradle publish
env:
MAVENCI_PASS: ${{ secrets.MAVENCI_PASS }}
run: ./gradlew publish
- uses: actions/upload-artifact@v6
with:
name: UniversalModCore-${{ env.ref }}
path: build/libs/UniversalModCore-*.jar
85 changes: 54 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,57 @@ name: Universal Mod Core Release
on: [workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
branch: [1.7.10-forge, 1.10.2-forge, 1.11.2-forge, 1.12.2-forge, 1.14.4-forge, 1.15.2-forge, 1.16.5-forge]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- uses: actions/setup-java@v1
with:
java-version: '1.8' # The JDK version to make available on the path.
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64
- run: |
ref=`echo ${github_ref} | sed -e 's,refs/heads/,,' | tr '/' '-'`
echo $ref
echo "::set-env name=ref::$ref"
env:
github_ref: ${{ github.ref }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: keyscan
run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa teamopenindustry.cc >> ~/.ssh/known_hosts
- name: Gradle publish
env:
MAVENCI_PASS: ${{ secrets.MAVENCI_PASS }}
run: ./gradlew publish -Dtarget=release
- uses: actions/upload-artifact@v4
with:
name: UniversalModCore-${{ env.ref }}
path: build/libs/UniversalModCore-*.jar
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- branch: 1.7.10-forge
java: 25 # RFG uses gradle 9
- branch: 1.10.2-forge
java: 8
- branch: 1.11.2-forge
java: 8
- branch: 1.12.2-forge
java: 8
- branch: 1.14.4-forge
java: 8
- branch: 1.15.2-forge
java: 8
- branch: 1.16.5-forge
java: 8
- branch: 1.17.1-forge
java: 16
- branch: 1.18.2-forge
java: 17
- branch: 1.19.4-forge
java: 17
- branch: 1.20.1-forge
java: 17
- branch: 1.21.1-neoforge
java: 21
steps:
- uses: actions/checkout@v5
with:
ref: ${{ matrix.branch }}
- uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- run: |
ref=`echo ${github_ref} | sed -e 's,refs/heads/,,' | tr '/' '-'`
echo $ref
echo "::set-env name=ref::$ref"
env:
github_ref: ${{ github.ref }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: keyscan
run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa teamopenindustry.cc >> ~/.ssh/known_hosts
- name: Gradle publish
env:
MAVENCI_PASS: ${{ secrets.MAVENCI_PASS }}
run: ./gradlew publish -Dtarget=release
- uses: actions/upload-artifact@v6
with:
name: UniversalModCore-${{ env.ref }}
path: build/libs/UniversalModCore-*.jar
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ build
# other
eclipse
runs
logs

# sketchup
*.skb
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repositories {
}
}

String umcVersion = "1.3.0"
String umcVersion = "1.3.1"
if (!"release".equalsIgnoreCase(System.getProperty("target"))) {
try {
umcVersion += "-${(providers.exec { commandLine("git", "rev-parse", "--verify", "--short=7", "HEAD") }.standardOutput.asText.get() as String).substring(0, 7)}"
Expand Down Expand Up @@ -116,7 +116,7 @@ dependencies {
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"

// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
2 changes: 1 addition & 1 deletion src/main/java/cam72cam/mod/ModCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
public class ModCore {
public static final String MODID = "universalmodcore";
public static final String NAME = "UniversalModCore";
public static final String VERSION = "1.3.0";
public static final String VERSION = "1.3.1";
public static ModCore instance;
public static boolean hasResources;
private static boolean isInReload;
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/cam72cam/mod/entity/EntityRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import net.minecraftforge.api.distmarker.OnlyIn;
import org.apache.commons.lang3.tuple.Pair;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Supplier;
Expand Down Expand Up @@ -100,7 +102,11 @@ public static void registerClientEvents() {
if (w.isClientSide) {
// Cleanup client side since mc does not call setDead client side...
// See ClientEvents registration for related crap
for (net.minecraft.world.entity.Entity entity : ((ClientLevel) w).entitiesForRendering()) {
Iterable<net.minecraft.world.entity.Entity> iter = ((ClientLevel) w).entitiesForRendering();
if (iter instanceof Collection<net.minecraft.world.entity.Entity> e) {
iter = new ArrayList<>(e);
}
for (net.minecraft.world.entity.Entity entity : iter) {
if (entity instanceof ModdedEntity) {
entity.remove(net.minecraft.world.entity.Entity.RemovalReason.DISCARDED);
}
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/cam72cam/mod/entity/ModdedEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import cam72cam.mod.serialization.*;
import cam72cam.mod.util.SingleCache;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.ListTag;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.protocol.game.ClientGamePacketListener;
import net.minecraft.network.syncher.EntityDataAccessor;
Expand Down Expand Up @@ -120,6 +121,7 @@ private void load(TagCompound data) {
} catch (SerializationException e) {
ModCore.catching(e, "Error during entity load: %s - %s", this, data);
}
applySavedVelocity(data);

if (!this.level().isClientSide()) {
getEntityData().set(ROLL, this.roll);
Expand Down Expand Up @@ -574,6 +576,14 @@ public void setDeltaMovement(double x, double y, double z) {
}
}

private void applySavedVelocity(TagCompound data) {
ListTag vel = data.internal.getList("Motion", 6);
double x = vel.getDouble(0);
double y = vel.getDouble(1);
double z = vel.getDouble(2);
super.setDeltaMovement(x, y, z);
}

/*
@Override
public String getName() {
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/cam72cam/mod/item/Fuzzy.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
import net.minecraft.core.HolderSet;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import cam72cam.mod.util.RegistryUtil;
import net.minecraft.resources.ResourceLocation;
import cam72cam.mod.resource.BuiltinPack;
import cam72cam.mod.resource.Identifier;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.level.block.Block;
Expand Down Expand Up @@ -101,8 +104,8 @@ public class Fuzzy {
" \"values\": []\n" +
"}").getBytes(StandardCharsets.UTF_8);
BuiltinPack.addNamespace("c");
BuiltinPack.putData(ResourceLocation.parse("c:tags/items/ingots/steel.json"), data);
BuiltinPack.putData(ResourceLocation.parse("c:tags/items/storage_blocks/steel.json"), data);
BuiltinPack.putData(new Identifier("c:tags/items/ingots/steel.json"), data);
BuiltinPack.putData(new Identifier("c:tags/items/storage_blocks/steel.json"), data);
}

static Map<String, Fuzzy> registered;
Expand Down
29 changes: 14 additions & 15 deletions src/main/java/cam72cam/mod/render/ItemRender.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@
import cam72cam.mod.MinecraftClient;
import cam72cam.mod.ModCore;
import cam72cam.mod.event.ClientEvents;
import cam72cam.mod.event.CommonEvents;
import cam72cam.mod.gui.Progress;
import cam72cam.mod.item.CustomItem;
import cam72cam.mod.item.ItemStack;
import cam72cam.mod.render.opengl.RenderContext;
import cam72cam.mod.render.opengl.RenderState;
import cam72cam.mod.resource.BuiltinPack;
import cam72cam.mod.resource.Identifier;
import cam72cam.mod.util.With;
import cam72cam.mod.world.World;
import com.google.common.collect.ImmutableList;
import com.mojang.blaze3d.pipeline.TextureTarget;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Transformation;
import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer;
Expand All @@ -28,14 +27,11 @@
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.resources.model.*;
import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.RandomSource;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.inventory.InventoryMenu;
import net.minecraft.world.item.ItemDisplayContext;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.client.model.ItemLayerModel;
import net.minecraftforge.client.model.SimpleModelState;
import net.minecraftforge.client.model.*;
import net.minecraftforge.client.model.geometry.IGeometryBakingContext;
import org.apache.commons.lang3.tuple.Pair;
import org.lwjgl.BufferUtils;
Expand All @@ -46,21 +42,25 @@
import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.function.BiConsumer;
import java.util.stream.Collectors;

/** Item Render Registry (Here be dragons...) */
public class ItemRender {
private static final List<BakedQuad> EMPTY = Collections.emptyList();
private static final SpriteSheet iconSheet = new SpriteSheet(Config.SpriteSize);

private static final Executor POOL = Executors.newFixedThreadPool(1);
//String template for simple item models
private static final String modelTemplate = "models/item/%s.json";
private static final String jsonTemplate = """
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "%s"
}
}""";

/** Register a simple image for an item */
public static void register(CustomItem item, Identifier tex) {
Expand Down Expand Up @@ -130,8 +130,7 @@ public boolean isComponentVisible(String s, boolean b) {
}, foo, ItemOverrides.EMPTY/*, tex.internal*/));
});

ClientEvents.TEXTURE_STITCH.subscribe(list -> list.addSprite(tex.internal));
ClientEvents.MODEL_CREATE.subscribe(() -> Minecraft.getInstance().getItemRenderer().getItemModelShaper().register(item.internal, new ModelResourceLocation(item.getRegistryName().internal, "")));
ClientEvents.TEXTURE_STITCH.subscribe(evt -> evt.addSprite(tex.internal));
}

/** Register a complex model for an item */
Expand Down
Loading
Loading