Search in sources :

Example 1 with CoverPlaceBehavior

use of gregtech.common.items.behaviors.CoverPlaceBehavior in project GregTech by GregTechCE.

the class CoverBehaviors method registerBehavior.

public static void registerBehavior(int coverNetworkId, ResourceLocation coverId, MetaValueItem placerItem, BiFunction<ICoverable, EnumFacing, CoverBehavior> behaviorCreator) {
    CoverDefinition coverDefinition = new CoverDefinition(coverId, behaviorCreator, placerItem.getStackForm());
    CoverDefinition.registerCover(coverNetworkId, coverDefinition);
    placerItem.addComponents(new CoverPlaceBehavior(coverDefinition));
}
Also used : CoverPlaceBehavior(gregtech.common.items.behaviors.CoverPlaceBehavior) CoverDefinition(gregtech.api.cover.CoverDefinition)

Aggregations

CoverDefinition (gregtech.api.cover.CoverDefinition)1 CoverPlaceBehavior (gregtech.common.items.behaviors.CoverPlaceBehavior)1