Skip to content

Commit

Permalink
Merge pull request #1351 from Reabstraction/1.21
Browse files Browse the repository at this point in the history
Add Fusion connected textures for the pressure_chamber_glass texture
  • Loading branch information
desht authored Nov 8, 2024
2 parents 7d0872e + f539dc8 commit b0dadfc
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
import net.neoforged.fml.loading.FMLEnvironment;
import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.event.AddPackFindersEvent;
import net.neoforged.neoforge.event.AddReloadListenerEvent;
import net.neoforged.neoforge.event.RegisterCommandsEvent;
import net.neoforged.neoforge.event.server.ServerStartedEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public boolean propagatesSkylightDown(BlockState p_200123_1_, BlockGetter p_2001
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> curInfo, TooltipFlag flag) {
super.appendHoverText(stack, context, curInfo, flag);

if (!ModList.get().isLoaded(ModIds.CTM)) {
if (!ModList.get().isLoaded(ModIds.CTM) && !ModList.get().isLoaded(ModIds.FUSION)) {
curInfo.add(xlate("gui.tooltip.block.pneumaticcraft.pressure_chamber_glass.ctm").withStyle(ChatFormatting.GRAY));
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package me.desht.pneumaticcraft.common.thirdparty;

import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.packs.PackType;
import net.minecraft.server.packs.repository.PackSource;
import net.minecraft.server.packs.repository.Pack.Position;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.ModList;
import net.neoforged.neoforge.event.AddPackFindersEvent;

public class Fusion implements IThirdParty {

private void addPackFinders(AddPackFindersEvent event) {
if (ModList.get().isLoaded("fusion"))
event.addPackFinders(ResourceLocation.fromNamespaceAndPath("pneumaticcraft", "fusion_integration"), PackType.CLIENT_RESOURCES, Component.literal("Fusion for PneumaticCraft"), PackSource.BUILT_IN, false, Position.TOP);
}

@Override
public void clientPreInit(IEventBus modBus) {
modBus.addListener(this::addPackFinders);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ private void discoverMods() {
thirdPartyClasses.put(ModIds.CRAFTTWEAKER, () -> IMPLICIT_INIT);
thirdPartyClasses.put(ModIds.GAMESTAGES, Gamestages::new);
thirdPartyClasses.put(ModIds.CREATE, Create::new);
thirdPartyClasses.put(ModIds.FUSION, Fusion::new);
thirdPartyClasses.put(ModIds.FFS, FTBFilterSystem::new);
thirdPartyClasses.put(ModIds.FTB_TEAMS, FTBTeams::new);

Expand Down
1 change: 1 addition & 0 deletions src/main/java/me/desht/pneumaticcraft/lib/ModIds.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ public class ModIds {
public static final String FFS = "ftbfiltersystem";
public static final String FTB_TEAMS = "ftbteams";
public static final String CTM = "ctm";
public static final String FUSION = "fusion";
}
2 changes: 1 addition & 1 deletion src/main/resources/assets/pneumaticcraft/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
"gui.tooltip.block.pneumaticcraft.pneumatic_dynamo" : "Converts compressed air into Forge Energy (compatible with RF and many other mods' energy). It has a base efficiency of 40%%, i.e. 100mL of air be used to generate 40 FE. Speed Upgrades will reduce this efficiency slightly.\nThis Dynamo generates heat, which must be dissipated to avoid efficiency loss.",
"gui.tooltip.block.pneumaticcraft.pneumatic_generator" : "This machine converts compressed air into Industrial Craft 2 EU. You can interact with this machine with an IC2 Wrench just like any other IC2 machine.",
"gui.tooltip.block.pneumaticcraft.pressure_chamber_glass" : "This block is used to create a Pressure Chamber. Create a hollow 3x3x3/4x4x4/5x5x5 structure with at least one Pressure Chamber Valve in a face (not edge or corner) of the structure. Pressure Chamber Walls and Pressure Chamber Glass can be used interchangeably.",
"gui.tooltip.block.pneumaticcraft.pressure_chamber_glass.ctm" : "Install ConnectedTexturesMod (CTM) for connected textures",
"gui.tooltip.block.pneumaticcraft.pressure_chamber_glass.ctm" : "Install ConnectedTexturesMod (CTM) or Fusion for connected textures",
"gui.tooltip.block.pneumaticcraft.pressure_chamber_interface" : "This block is used to import/export items to/from a Pressure Chamber. It imports on the 'I' face, and exports on the 'O' face. You should have at least two Pressure Chamber Interfaces in your Pressure Chamber: one with the 'O' face pointing into the chamber, and one with the 'O' face pointing out to the outside world.",
"gui.tooltip.block.pneumaticcraft.pressure_chamber_valve" : "This multi-block structure can be used as air storage. Its primary usage, however, is to compress various materials into other materials. Like Iron into Compressed Iron. Or Coal into Diamonds.",
"gui.tooltip.block.pneumaticcraft.pressure_chamber_wall" : "This block is used to create a Pressure Chamber. Create a hollow 3x3x3/4x4x4/5x5x5 structure with at least one Pressure Chamber Valve in a face (not edge or corner) of the structure. Pressure Chamber Walls and Pressure Chamber Glass can be used interchangeably.",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"loader": "fusion:model",
"type": "connecting",
"connections": [
{
"type": "is_same_block"
}
],
"parent": "minecraft:block/cube_all",
"textures": {
"all": "pneumaticcraft:block/pressure_chamber/window"
},
"render_type": "cutout"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"fusion": {
"type": "connecting",
"layout": "full"
}
}
7 changes: 7 additions & 0 deletions src/main/resources/fusion_integration/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"pack": {
"pack_format": 14,
"supported_formats": [14,50],
"description": "Integration with Fusion connected textures"
}
}

0 comments on commit b0dadfc

Please sign in to comment.