Search in sources :

Example 6 with HeatBehaviour

use of me.desht.pneumaticcraft.api.heat.HeatBehaviour in project pnc-repressurized by TeamPneumatic.

the class HeatBehaviourManager method addHeatBehaviours.

public void addHeatBehaviours(World world, BlockPos pos, IHeatExchangerLogic logic, List<HeatBehaviour> list) {
    for (HeatBehaviour behaviour : behaviours.values()) {
        behaviour.initialize(logic, world, pos);
        if (behaviour.isApplicable()) {
            try {
                behaviour = behaviour.getClass().newInstance();
                behaviour.initialize(logic, world, pos);
                list.add(behaviour);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
Also used : HeatBehaviour(me.desht.pneumaticcraft.api.heat.HeatBehaviour)

Aggregations

HeatBehaviour (me.desht.pneumaticcraft.api.heat.HeatBehaviour)6 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)3 IHeatExchangerLogic (me.desht.pneumaticcraft.api.heat.IHeatExchangerLogic)2 NBTTagList (net.minecraft.nbt.NBTTagList)2 EnumFacing (net.minecraft.util.EnumFacing)1