Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlockConfig #5

Open
Dockter opened this issue Jul 22, 2018 · 1 comment
Open

BlockConfig #5

Dockter opened this issue Jul 22, 2018 · 1 comment

Comments

@Dockter
Copy link
Member

Dockter commented Jul 22, 2018

public interface BlockConfig {
String STATE = "state";
String DEFAULT_STATE_NAME = "normal";

String MAP_COLOR = "map_color";
String MATERIAL = "material";

String EFFECTIVE_TOOLS = "effective_tools";

String ITEM_GROUP = "item_group";
String RENDER_LAYER = "render_layer";

interface State {
    String PARENT = "parent";

    /**
     * @see AABBConfig
     */
    String AABB = "aabb";
    /**
     * @see ActionConfig
     */
    String ACTION = "action";
    String BLOCK_FACE_SHAPE = "block_face_shape";
    String HARDNESS = "hardness"; //Stone == 1.5, Coal == 3.0
    String OPAQUE = "opaque" :  //true/false  (controls neighbor face render)
    String FLAMMABILITY = "flammability";
    String FIRE_SPREAD_SPEED = "fire_spread_speed";
    /**
     * @see Light
     */
    String LIGHT = "light";
    String RESISTANCE = "resistance"; 
    /**
     * @see BlockSoundGroupConfig
     */
    String SOUND = "sound";

    interface Light {
        String EMISSION = "emission"; //Light value the block emits (used in lamps)
        String OPACITY = "opacity"; //skylight depletion when calculating light per face
    }
}

}

@Dockter
Copy link
Member Author

Dockter commented Jan 12, 2020

Methods:

isOpaqueCube = Controls whether a neighbor block sides render. Use should return false for any block that isn't a true 1 x 1 x 1 otherwise blocks touching this block won't render its sides.

getLightOpacity = Each block has an Opacity value ( .getLightOpacity() ), which determines how much light it receives from its six neighbours. A low opacity (eg 1) means the light level decreases by 1 from its brightest neighbour, higher opacity (eg 3) leads to a correspondingly larger decrease. This calculation is performed separately for both the Sky Light and the Block Light.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant