Prepare having more of the kind.
This commit is contained in:
parent
04d5253732
commit
6d16bcea00
|
@ -0,0 +1,24 @@
|
|||
package fr.neatmonster.nocheatplus.compat.blocks;
|
||||
|
||||
import fr.neatmonster.nocheatplus.components.registry.activation.Activation;
|
||||
|
||||
public abstract class AbstractBlockPropertiesPatch implements IPatchBlockPropertiesSetup {
|
||||
|
||||
protected final Activation activation = new Activation();
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return activation.isAvailable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNeutralDescription() {
|
||||
return activation.getNeutralDescription();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean advertise() {
|
||||
return activation.advertise();
|
||||
}
|
||||
|
||||
}
|
|
@ -21,7 +21,6 @@ import java.util.List;
|
|||
import fr.neatmonster.nocheatplus.compat.blocks.BlockPropertiesSetup;
|
||||
import fr.neatmonster.nocheatplus.compat.blocks.IPatchBlockPropertiesSetup;
|
||||
import fr.neatmonster.nocheatplus.compat.blocks.init.vanilla.special.MultiClientProtocolWaterLilyPatch;
|
||||
import fr.neatmonster.nocheatplus.components.registry.activation.IActivation;
|
||||
import fr.neatmonster.nocheatplus.config.WorldConfigProvider;
|
||||
import fr.neatmonster.nocheatplus.logging.StaticLog;
|
||||
|
||||
|
|
|
@ -2,8 +2,7 @@ package fr.neatmonster.nocheatplus.compat.blocks.init.vanilla.special;
|
|||
|
||||
import org.bukkit.Material;
|
||||
|
||||
import fr.neatmonster.nocheatplus.compat.blocks.IPatchBlockPropertiesSetup;
|
||||
import fr.neatmonster.nocheatplus.components.registry.activation.Activation;
|
||||
import fr.neatmonster.nocheatplus.compat.blocks.AbstractBlockPropertiesPatch;
|
||||
import fr.neatmonster.nocheatplus.config.WorldConfigProvider;
|
||||
import fr.neatmonster.nocheatplus.utilities.map.BlockFlags;
|
||||
import fr.neatmonster.nocheatplus.utilities.map.BlockProperties;
|
||||
|
@ -14,15 +13,17 @@ import fr.neatmonster.nocheatplus.utilities.map.BlockProperties;
|
|||
* @author asofold
|
||||
*
|
||||
*/
|
||||
public class MultiClientProtocolWaterLilyPatch implements IPatchBlockPropertiesSetup {
|
||||
public class MultiClientProtocolWaterLilyPatch extends AbstractBlockPropertiesPatch {
|
||||
// TODO: Later just dump these into the generic registry (on activation), let BlockProperties fetch.
|
||||
|
||||
private final Activation activation = new Activation()
|
||||
.neutralDescription("WATER_LILY block shape patch for multi client protocol support around 1.7.x - 1.11.x.")
|
||||
.advertise(true)
|
||||
.pluginExist("ViaVersion")
|
||||
// TODO: Other/More ?
|
||||
;
|
||||
public MultiClientProtocolWaterLilyPatch() {
|
||||
activation
|
||||
.neutralDescription("WATER_LILY block shape patch for multi client protocol support around 1.7.x - 1.11.x.")
|
||||
.advertise(true)
|
||||
.pluginExist("ViaVersion")
|
||||
// TODO: Other/More ?
|
||||
;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupBlockProperties(WorldConfigProvider<?> worldConfigProvider) {
|
||||
|
@ -30,19 +31,4 @@ public class MultiClientProtocolWaterLilyPatch implements IPatchBlockPropertiesS
|
|||
BlockProperties.F_GROUND | BlockProperties.F_HEIGHT8_1 | BlockProperties.F_GROUND_HEIGHT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return activation.isAvailable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNeutralDescription() {
|
||||
return activation.getNeutralDescription();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean advertise() {
|
||||
return activation.advertise();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue