9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-29 11:59:11 +00:00

移除一些方法以便重构

This commit is contained in:
XiaoMoMi
2025-04-23 03:58:27 +08:00
parent edb1e41b8f
commit 23d0dede51
8 changed files with 3 additions and 46 deletions

View File

@@ -280,16 +280,6 @@ public class AbstractItem<W extends ItemWrapper<I>, I> implements Item<I> {
return this.factory.load(this.item);
}
@Override
public I loadCopy() {
return this.factory.loadCopy(this.item);
}
@Override
public void update() {
this.factory.update(this.item);
}
@Override
public Item<I> copyWithCount(int count) {
return new AbstractItem<>(this.factory, this.item.copyWithCount(count));

View File

@@ -114,10 +114,6 @@ public interface Item<I> {
I load();
I loadCopy();
void update();
int maxStackSize();
Item<I> maxStackSize(int amount);

View File

@@ -45,14 +45,10 @@ public abstract class ItemFactory<P extends Plugin, W extends ItemWrapper<I>, I>
protected abstract void resetComponent(ItemWrapper<I> item, Key type);
protected abstract void update(ItemWrapper<I> item);
protected abstract I load(ItemWrapper<I> item);
protected abstract I getItem(ItemWrapper<I> item);
protected abstract I loadCopy(ItemWrapper<I> item);
protected abstract void customModelData(ItemWrapper<I> item, Integer data);
protected abstract Optional<Integer> customModelData(ItemWrapper<I> item);

View File

@@ -6,12 +6,8 @@ public interface ItemWrapper<I> {
I getItem();
void update();
I load();
I loadCopy();
Object getLiteralObject();
boolean set(Object value, Object... path);