use of ladysnake.gaspunk.api.customization.GrenadeSkins in project Gaspunk by Ladysnake.
the class ThaumcraftCompat method registerGasAspect.
private static void registerGasAspect(IGas gas, AspectList aspects) {
ItemStack gasTube = ((ItemGasTube) ModItems.GAS_TUBE).getItemStackFor(gas);
aspects.add(divide(generateAspectsFromBrewing(gasTube), 1.1));
ThaumcraftApi.registerObjectTag(gasTube, aspects.copy());
ItemStack grenade = ((ItemGrenade) ModItems.GRENADE).getItemStackFor(gas);
// aspects = divide(aspects, 1.2);
aspects.add(divide(AspectHelper.getObjectAspects(new ItemStack(ModItems.GRENADE)), 1.8));
for (GrenadeSkins skin : GrenadeSkins.VALUES) {
// need to register for every skin as thaumcraft counts an itemstack with different nbt as unique
((ItemGrenade) ModItems.GRENADE).setSkin(grenade, skin);
ThaumcraftApi.registerObjectTag(grenade, aspects.copy());
}
}
use of ladysnake.gaspunk.api.customization.GrenadeSkins in project Gaspunk by Ladysnake.
the class ClientProxy method onSpecialRewardsRetrieved.
@Override
public void onSpecialRewardsRetrieved() {
UUID profileID = Minecraft.getMinecraft().getSession().getProfile().getId();
// add the config option to choose which one will appear on new grenades
if (SpecialRewardChecker.isSpecialPerson(profileID)) {
List<GrenadeSkins> awardedSkins = SpecialRewardChecker.getRewards(profileID);
// list of valid skins this player can have
String[] skinNames = awardedSkins.stream().map(GrenadeSkins::getDisplayName).toArray(String[]::new);
// this guy has a special skin, don't hide it by default
String defaultSkin = awardedSkins.stream().filter(g -> g != GrenadeSkins.NONE).findAny().orElse(GrenadeSkins.NONE).getDisplayName();
selectedSkin = config.get("general", "specialGrenadeSkin", defaultSkin, "The kind of diffuser you will craft (grenade skins are determined by the diffuser used)", skinNames);
}
}
Aggregations