Add explicit "public" to interfaces

This commit is contained in:
abel1502 2025-05-17 12:53:09 +03:00
parent e59f8b441d
commit f1184f8731
No known key found for this signature in database
GPG Key ID: 076926596A536338
4 changed files with 10 additions and 10 deletions

View File

@ -3,17 +3,17 @@ package com.hbm.handler.ability;
import net.minecraft.client.resources.I18n;
public interface IBaseAbility {
String getName();
public String getName();
default String getExtension(int level) {
public default String getExtension(int level) {
return "";
}
default String getFullName(int level) {
public default String getFullName(int level) {
return I18n.format(getName()) + getExtension(level);
}
default boolean isAllowed() {
public default boolean isAllowed() {
return true;
}

View File

@ -27,7 +27,7 @@ public interface IToolAreaAbility extends IBaseAbility {
// The initial block is always implicitly broken and shouldn't be included.
// If true is returned, no block breaking is handled by the tool
// (neither for the original block nor for the extras)
boolean onDig(int level, World world, int x, int y, int z, EntityPlayer player, IItemWithAbility tool);
public boolean onDig(int level, World world, int x, int y, int z, EntityPlayer player, IItemWithAbility tool);
// region handlers
public static final IToolAreaAbility NONE = new IToolAreaAbility() {

View File

@ -23,14 +23,14 @@ import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.world.World;
public interface IToolHarvestAbility extends IBaseAbility {
default void preHarvestAll(int level, World world, EntityPlayer player) {}
public default void preHarvestAll(int level, World world, EntityPlayer player) {}
default void postHarvestAll(int level, World world, EntityPlayer player) {}
public default void postHarvestAll(int level, World world, EntityPlayer player) {}
boolean skipDefaultDrops(int level);
public boolean skipDefaultDrops(int level);
// Call IToolHarvestAbility.super.onHarvestBlock to emulate the actual block breaking
default void onHarvestBlock(int level, World world, int x, int y, int z, EntityPlayer player, Block block, int meta) {
public default void onHarvestBlock(int level, World world, int x, int y, int z, EntityPlayer player, Block block, int meta) {
if (skipDefaultDrops(level)) {
// Emulate the block breaking without drops
world.setBlockToAir(x, y, z);

View File

@ -35,7 +35,7 @@ import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
public interface IWeaponAbility extends IBaseAbility {
void onHit(int level, World world, EntityPlayer player, Entity victim, IItemWithAbility tool);
public void onHit(int level, World world, EntityPlayer player, Entity victim, IItemWithAbility tool);
// region handlers
public static final IWeaponAbility NONE = new IWeaponAbility() {