1.渲染由客户端世界Tick进行 2.优化了些细节实现(如拴绳交互) 3.提供可调配的实体配置(用于过滤拴绳拉动和拴绳传送) fix: 1.移除旧的技术实体实现,转为Tick计算力 2.修复C/S网络同步问题
72 lines
2.1 KiB
Java
72 lines
2.1 KiB
Java
/*
|
|
* Super Lead rope mod
|
|
* Copyright (C) 2025 R3944Realms
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
package top.r3944realms.superleadrope.content;
|
|
|
|
import net.minecraft.world.item.Tier;
|
|
import net.minecraft.world.item.crafting.Ingredient;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import java.util.function.Supplier;
|
|
|
|
public enum SLPToolTier implements Tier {
|
|
STRING(24, 1.0F, 0.0F, 15, () -> Ingredient.of(SLPTags.Items.LEAD))
|
|
;
|
|
private final int uses;
|
|
private final float speed;
|
|
private final float attackDamageBonus;
|
|
private final int enchantmentValue;
|
|
private final Supplier<Ingredient> repairIngredient;
|
|
SLPToolTier(int uses, float speed, float attackDamageBonus, int enchantmentValue, Supplier<Ingredient> repairIngredient) {
|
|
this.uses = uses;
|
|
this.speed = speed;
|
|
this.attackDamageBonus = attackDamageBonus;
|
|
this.enchantmentValue = enchantmentValue;
|
|
this.repairIngredient = repairIngredient;
|
|
}
|
|
|
|
|
|
@Override
|
|
public int getUses() {
|
|
return this.uses;
|
|
}
|
|
|
|
@Override
|
|
public float getSpeed() {
|
|
return this.speed;
|
|
}
|
|
|
|
@Override
|
|
public float getAttackDamageBonus() {
|
|
return this.attackDamageBonus;
|
|
}
|
|
|
|
@Override
|
|
public int getLevel() {
|
|
return 0;
|
|
}
|
|
|
|
|
|
@Override
|
|
public int getEnchantmentValue() {
|
|
return this.enchantmentValue;
|
|
}
|
|
|
|
@Override
|
|
public @NotNull Ingredient getRepairIngredient() {
|
|
return this.repairIngredient.get();
|
|
}
|
|
}
|