Added computer to display source ponder tag

- Added advanced computer to display source ponder tag
- Added missing lang entry for computer display source
This commit is contained in:
caelwarner 2023-03-13 18:31:56 -07:00
parent 952941e5fc
commit 8e1e4e8bd3
Failed to generate hash of commit
2 changed files with 11 additions and 0 deletions

View file

@ -1706,6 +1706,7 @@
"create.display_source.redstone_power.progress_bar": "Progress Bar", "create.display_source.redstone_power.progress_bar": "Progress Bar",
"create.display_source.boiler.not_enough_space": "Not enough space ", "create.display_source.boiler.not_enough_space": "Not enough space ",
"create.display_source.boiler.for_boiler_status": "for Boiler Status", "create.display_source.boiler.for_boiler_status": "for Boiler Status",
"create.display_source.computer_display_source": "From Computer",
"create.display_target.line": "Line %1$s", "create.display_target.line": "Line %1$s",
"create.display_target.page": "Page %1$s", "create.display_target.page": "Page %1$s",

View file

@ -3,6 +3,7 @@ package com.simibubi.create.foundation.ponder.content;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
import com.simibubi.create.Create; import com.simibubi.create.Create;
import com.simibubi.create.compat.Mods;
import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.ponder.PonderRegistrationHelper; import com.simibubi.create.foundation.ponder.PonderRegistrationHelper;
import com.simibubi.create.foundation.ponder.PonderRegistry; import com.simibubi.create.foundation.ponder.PonderRegistry;
@ -20,8 +21,11 @@ import com.simibubi.create.foundation.ponder.content.trains.TrainScenes;
import com.simibubi.create.foundation.ponder.content.trains.TrainSignalScenes; import com.simibubi.create.foundation.ponder.content.trains.TrainSignalScenes;
import com.simibubi.create.foundation.ponder.content.trains.TrainStationScenes; import com.simibubi.create.foundation.ponder.content.trains.TrainStationScenes;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.DyeColor; import net.minecraft.world.item.DyeColor;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
import net.minecraftforge.registries.ForgeRegistries;
public class PonderIndex { public class PonderIndex {
@ -548,6 +552,12 @@ public class PonderIndex {
.add(Blocks.COMMAND_BLOCK) .add(Blocks.COMMAND_BLOCK)
.add(Blocks.TARGET); .add(Blocks.TARGET);
Mods.COMPUTERCRAFT.executeIfInstalled(() -> () -> {
Block computer = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(Mods.COMPUTERCRAFT.asId(), "computer_advanced"));
if (computer != null)
PonderRegistry.TAGS.forTag(PonderTag.DISPLAY_SOURCES).add(computer);
});
PonderRegistry.TAGS.forTag(PonderTag.DISPLAY_TARGETS) PonderRegistry.TAGS.forTag(PonderTag.DISPLAY_TARGETS)
.add(AllBlocks.ORANGE_NIXIE_TUBE) .add(AllBlocks.ORANGE_NIXIE_TUBE)
.add(AllBlocks.DISPLAY_BOARD) .add(AllBlocks.DISPLAY_BOARD)