修复molang名称填写错误
This commit is contained in:
parent
be1952929e
commit
95154a9ab3
1 changed files with 4 additions and 4 deletions
|
@ -20,11 +20,11 @@ import java.util.function.DoubleSupplier;
|
||||||
public abstract class CustomGunModel<T extends GunItem & GeoAnimatable> extends GeoModel<T> {
|
public abstract class CustomGunModel<T extends GunItem & GeoAnimatable> extends GeoModel<T> {
|
||||||
|
|
||||||
public ResourceLocation getLODModelResource(T animatable) {
|
public ResourceLocation getLODModelResource(T animatable) {
|
||||||
return this.getModelResource(animatable);
|
return this.getModelResource(animatable, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResourceLocation getLODTextureResource(T animatable) {
|
public ResourceLocation getLODTextureResource(T animatable) {
|
||||||
return this.getTextureResource(animatable);
|
return this.getTextureResource(animatable, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -65,7 +65,7 @@ public abstract class CustomGunModel<T extends GunItem & GeoAnimatable> extends
|
||||||
|
|
||||||
var data = GunData.from(stack);
|
var data = GunData.from(stack);
|
||||||
set(MolangVariable.SBW_IS_EMPTY, () -> data.isEmpty.get() ? 1 : 0);
|
set(MolangVariable.SBW_IS_EMPTY, () -> data.isEmpty.get() ? 1 : 0);
|
||||||
set(MolangVariable.SBW_IS_EMPTY, System::currentTimeMillis);
|
set(MolangVariable.SBW_SYSTEM_TIME, System::currentTimeMillis);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void set(String key, DoubleSupplier value) {
|
private static void set(String key, DoubleSupplier value) {
|
||||||
|
@ -74,7 +74,7 @@ public abstract class CustomGunModel<T extends GunItem & GeoAnimatable> extends
|
||||||
|
|
||||||
private void resetQueryValue() {
|
private void resetQueryValue() {
|
||||||
set(MolangVariable.SBW_IS_EMPTY, () -> 0);
|
set(MolangVariable.SBW_IS_EMPTY, () -> 0);
|
||||||
set(MolangVariable.SBW_IS_EMPTY, () -> 0);
|
set(MolangVariable.SBW_SYSTEM_TIME, () -> 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shouldCancelRender(ItemStack stack, AnimationState<T> animationState) {
|
public boolean shouldCancelRender(ItemStack stack, AnimationState<T> animationState) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue