Skip to content

Commit

Permalink
Merge pull request #7 from jumpcutfindo/1.1.2a
Browse files Browse the repository at this point in the history
Fix naughty nice capability issue
  • Loading branch information
jumpcutfindo authored Oct 16, 2021
2 parents e55acb9 + e93eecc commit b27e57b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply from: 'https://raw.githubusercontent.com/SizableShrimp/Forge-Class-Remapper/main/classremapper.gradle'

version = '1.1.2'
version = '1.1.2a'
group = 'com.jumpcutfindo.happyholidays' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'happyholidays'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class NaughtyNiceProvider implements ICapabilitySerializable<CompoundTag>
@Nonnull
@Override
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) {
return meterOptional.cast();
return cap == CapabilityNaughtyNice.NAUGHTY_NICE_CAPABILITY ? meterOptional.cast() : LazyOptional.empty();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.jumpcutfindo.happyholidays.HappyHolidaysMod;
import com.jumpcutfindo.happyholidays.common.block.christmas.ChristmasBlock;
import com.jumpcutfindo.happyholidays.common.capabilities.christmas.CapabilityNaughtyNice;
import com.jumpcutfindo.happyholidays.common.capabilities.christmas.INaughtyNiceHandler;
import com.jumpcutfindo.happyholidays.common.registry.christmas.ChristmasBlocks;
import com.jumpcutfindo.happyholidays.common.registry.christmas.ChristmasTriggers;

Expand Down Expand Up @@ -97,6 +98,7 @@ public static void configureBlocks(FMLCommonSetupEvent event) {
@SubscribeEvent
public static void registerCapabilities(RegisterCapabilitiesEvent event) {
event.register(CapabilityNaughtyNice.class);
event.register(INaughtyNiceHandler.class);
}

@SubscribeEvent
Expand Down

0 comments on commit b27e57b

Please sign in to comment.