Search in sources :

Example 1 with SuspendableGas

use of ladysnake.gaspunk.gas.SuspendableGas in project Gaspunk by Ladysnake.

the class ModGases method addGases.

@SubscribeEvent
public static void addGases(RegistryEvent.Register<PotionType> event) {
    REGISTRY.register(new SuspendableGas(GasTypes.GAS, 0x00FFFFFF, GasAgents.getAgent(new ResourceLocation(GasPunk.MOD_ID, "nerve")), 0.8F).setRegistryName("sarin_gas"));
    REGISTRY.register(new Gas(GasTypes.GAS, GasParticleTypes.GAS, 0x99FFFFFF, 0xAA0033FF, ImmutableList.of(), new String[0]).setRegistryName("air"));
    for (EnumDyeColor color : EnumDyeColor.values()) {
        // this is probably illegal in 53 states but I didn't want to parse the value back from the table
        REGISTRY.register(new Gas(GasTypes.SMOKE, 0xFF000000 | (int) ReflectionHelper.getPrivateValue(EnumDyeColor.class, color, "colorValue", "field_193351_w")).setRegistryName("colored_smoke_" + color.getName()));
    }
}
Also used : SuspendableGas(ladysnake.gaspunk.gas.SuspendableGas) ResourceLocation(net.minecraft.util.ResourceLocation) SuspendableGas(ladysnake.gaspunk.gas.SuspendableGas) Gas(ladysnake.gaspunk.gas.Gas) IGas(ladysnake.gaspunk.api.IGas) EnumDyeColor(net.minecraft.item.EnumDyeColor) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Aggregations

IGas (ladysnake.gaspunk.api.IGas)1 Gas (ladysnake.gaspunk.gas.Gas)1 SuspendableGas (ladysnake.gaspunk.gas.SuspendableGas)1 EnumDyeColor (net.minecraft.item.EnumDyeColor)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1