mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-26 10:29:20 +00:00
优化客户端材质
This commit is contained in:
@@ -429,6 +429,11 @@ public class AbstractItem<W extends ItemWrapper<I>, I> implements Item<I> {
|
||||
return new AbstractItem<>(this.factory, this.factory.transmuteCopy(this.item, another, count));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item<I> unsafeTransmuteCopy(Object another, int count) {
|
||||
return new AbstractItem<>(this.factory, this.factory.unsafeTransmuteCopy(this.item, another, count));
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@Override
|
||||
public void merge(Item<I> another) {
|
||||
|
||||
@@ -181,6 +181,8 @@ public interface Item<I> {
|
||||
|
||||
Item<I> transmuteCopy(Key another, int count);
|
||||
|
||||
Item<I> unsafeTransmuteCopy(Object another, int count);
|
||||
|
||||
void shrink(int amount);
|
||||
|
||||
default Item<I> transmuteCopy(Key another) {
|
||||
|
||||
@@ -196,4 +196,6 @@ public abstract class ItemFactory<W extends ItemWrapper<I>, I> {
|
||||
protected abstract void setNBTComponent(W item, Object type, Tag value);
|
||||
|
||||
protected abstract W transmuteCopy(W item, Key newItem, int amount);
|
||||
|
||||
protected abstract W unsafeTransmuteCopy(W item, Object newItem, int count);
|
||||
}
|
||||
|
||||
@@ -116,6 +116,7 @@ public abstract class AbstractPackManager implements PackManager {
|
||||
|
||||
loadInternalList("models", "block/", VANILLA_MODELS::add);
|
||||
loadInternalList("models", "item/", VANILLA_MODELS::add);
|
||||
VANILLA_MODELS.add(Key.of("minecraft", "builtin/entity"));
|
||||
}
|
||||
|
||||
private void loadInternalData(String path, BiConsumer<Key, JsonObject> callback) {
|
||||
|
||||
Reference in New Issue
Block a user