Display flying when an elytra is used with the trinkets mod. Closes #2074
This commit is contained in:
parent
8b16fe191b
commit
9612c82cd3
4 changed files with 43 additions and 1 deletions
|
@ -26,7 +26,9 @@ package techreborn;
|
|||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.block.ComposterBlock;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -40,6 +42,7 @@ import reborncore.common.util.Torus;
|
|||
import reborncore.common.world.DataAttachment;
|
||||
import techreborn.blockentity.storage.energy.idsu.IDSUManager;
|
||||
import techreborn.client.GuiType;
|
||||
import techreborn.compat.trinkets.Trinkets;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.events.ModRegistry;
|
||||
import techreborn.init.FluidGeneratorRecipes;
|
||||
|
@ -55,6 +58,8 @@ import techreborn.packets.ServerboundPackets;
|
|||
import techreborn.utils.PoweredCraftingHandler;
|
||||
import techreborn.world.WorldGenerator;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class TechReborn implements ModInitializer {
|
||||
|
||||
public static final String MOD_ID = "techreborn";
|
||||
|
@ -65,6 +70,8 @@ public class TechReborn implements ModInitializer {
|
|||
new Identifier("techreborn", "item_group"),
|
||||
() -> new ItemStack(TRContent.NUKE));
|
||||
|
||||
public static Predicate<PlayerEntity> elytraPredicate = playerEntity -> false;
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
INSTANCE = this;
|
||||
|
@ -104,6 +111,10 @@ public class TechReborn implements ModInitializer {
|
|||
ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE.put(TRContent.Dusts.SAW.asItem(), 0.3F);
|
||||
ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE.put(TRContent.SmallDusts.SAW.asItem(), 0.1F);
|
||||
|
||||
if (FabricLoader.getInstance().isModLoaded("trinkets")) {
|
||||
elytraPredicate = Trinkets.isElytraEquipped();
|
||||
}
|
||||
|
||||
LOGGER.info("TechReborn setup done!");
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue