mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-12-03 04:48:06 +00:00
Update to latest Fabric
- Overhaul model loading to work with the new API. This allows for using the emissive texture system in a more generic way, which is nice! - Convert some of our custom models to use Fabric's model hooks (i.e. emitItemQuads). We don't make use of this right now, but might be useful for rendering tools with enchantment glints. Note this does /not/ change any of the turtle block entity rendering code to use Fabric/Forge's model code. This will be a change we want to make in the future. - Some cleanup of our config API. This fixes us printing lots of warnings when creating a new config file on Fabric (same bug also occurs on Forge, but that's a loader problem). - Fix a few warnings
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
package dan200.computercraft.core;
|
||||
|
||||
import com.google.common.base.Splitter;
|
||||
import dan200.computercraft.api.filesystem.WritableMount;
|
||||
import dan200.computercraft.api.lua.ILuaAPI;
|
||||
import dan200.computercraft.api.lua.LuaException;
|
||||
@@ -346,10 +347,10 @@ public class ComputerTestDelegate {
|
||||
var details = (Map<?, ?>) entry.getValue();
|
||||
var def = (String) details.get("definition");
|
||||
|
||||
var parts = name.split("\0");
|
||||
var parts = Splitter.on('\0').splitToList(name);
|
||||
var builder = root;
|
||||
for (var i = 0; i < parts.length - 1; i++) builder = builder.get(parts[i]);
|
||||
builder.runs(parts[parts.length - 1], def, () -> {
|
||||
for (var i = 0; i < parts.size() - 1; i++) builder = builder.get(parts.get(i));
|
||||
builder.runs(parts.get(parts.size() - 1), def, () -> {
|
||||
// Run it
|
||||
lock.lockInterruptibly();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user