package net.minecraft.world.level.border;

public interface BorderChangeListener {
    void onBorderSizeSet(final WorldBorder cgw, final double double2);
    
    void onBorderSizeLerping(final WorldBorder cgw, final double double2, final double double3, final long long4);
    
    void onBorderCenterSet(final WorldBorder cgw, final double double2, final double double3);
    
    void onBorderSetWarningTime(final WorldBorder cgw, final int integer);
    
    void onBorderSetWarningBlocks(final WorldBorder cgw, final int integer);
    
    void onBorderSetDamagePerBlock(final WorldBorder cgw, final double double2);
    
    void onBorderSetDamageSafeZOne(final WorldBorder cgw, final double double2);
    
    public static class DelegateBorderChangeListener implements BorderChangeListener {
        private final WorldBorder worldBorder;
        
        public DelegateBorderChangeListener(final WorldBorder cgw) {
            this.worldBorder = cgw;
        }
        
        @Override
        public void onBorderSizeSet(final WorldBorder cgw, final double double2) {
            this.worldBorder.setSize(double2);
        }
        
        @Override
        public void onBorderSizeLerping(final WorldBorder cgw, final double double2, final double double3, final long long4) {
            this.worldBorder.lerpSizeBetween(double2, double3, long4);
        }
        
        @Override
        public void onBorderCenterSet(final WorldBorder cgw, final double double2, final double double3) {
            this.worldBorder.setCenter(double2, double3);
        }
        
        @Override
        public void onBorderSetWarningTime(final WorldBorder cgw, final int integer) {
            this.worldBorder.setWarningTime(integer);
        }
        
        @Override
        public void onBorderSetWarningBlocks(final WorldBorder cgw, final int integer) {
            this.worldBorder.setWarningBlocks(integer);
        }
        
        @Override
        public void onBorderSetDamagePerBlock(final WorldBorder cgw, final double double2) {
            this.worldBorder.setDamagePerBlock(double2);
        }
        
        @Override
        public void onBorderSetDamageSafeZOne(final WorldBorder cgw, final double double2) {
            this.worldBorder.setDamageSafeZone(double2);
        }
    }
}
