mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-10 06:16:31 +01:00
4b3a972b9b
Conflicts: src/main/java/com/simibubi/create/Create.java src/main/java/com/simibubi/create/CreateClient.java src/main/java/com/simibubi/create/compat/jei/category/CreateRecipeCategory.java src/main/java/com/simibubi/create/compat/jei/category/MechanicalCraftingCategory.java src/main/java/com/simibubi/create/compat/jei/category/SequencedAssemblyCategory.java src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerApplicationRecipe.java src/main/java/com/simibubi/create/content/contraptions/components/steam/whistle/WhistleTileEntity.java src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/IDisplayAssemblyExceptions.java src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueSelectionHandler.java src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FillingRecipe.java src/main/java/com/simibubi/create/content/contraptions/fluids/potion/PotionFluid.java src/main/java/com/simibubi/create/content/contraptions/fluids/potion/PotionFluidHandler.java src/main/java/com/simibubi/create/content/contraptions/fluids/tank/BoilerData.java src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleConfigScreen.java src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java src/main/java/com/simibubi/create/content/contraptions/goggles/IHaveGoggleInformation.java src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipe.java src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/InstructionSpeedModifiers.java src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftScreen.java src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltSlicer.java src/main/java/com/simibubi/create/content/curiosities/armor/BackTankUtil.java src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankArmorLayer.java src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandScreen.java src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoCannonItem.java src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperScreen.java src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperScreen.java src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BrassTunnelTileEntity.java src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteTileEntity.java src/main/java/com/simibubi/create/content/logistics/block/display/DisplayLinkScreen.java src/main/java/com/simibubi/create/content/logistics/block/display/source/AccumulatedItemCountDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/BoilerDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/DisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/EnchantPowerDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/FluidAmountDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/FluidListDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/ItemCountDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/ItemThoughputDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/KineticSpeedDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/NumericSingleLineDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/PercentOrProgressBarDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/RedstonePowerDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/ScoreboardDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/SingleLineDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/StationSummaryDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/StopWatchDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/TimeOfDayDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/display/source/ValueListDisplaySource.java src/main/java/com/simibubi/create/content/logistics/block/redstone/NixieTubeTileEntity.java src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchScreen.java src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerClientHandler.java src/main/java/com/simibubi/create/content/logistics/item/filter/AttributeFilterContainer.java src/main/java/com/simibubi/create/content/logistics/item/filter/AttributeFilterScreen.java src/main/java/com/simibubi/create/content/logistics/item/filter/FilterItem.java src/main/java/com/simibubi/create/content/logistics/item/filter/FilterScreen.java src/main/java/com/simibubi/create/content/logistics/item/filter/attribute/EnchantAttribute.java src/main/java/com/simibubi/create/content/logistics/item/filter/attribute/FluidContentsAttribute.java src/main/java/com/simibubi/create/content/logistics/item/filter/attribute/astralsorcery/AstralSorceryAmuletAttribute.java src/main/java/com/simibubi/create/content/logistics/item/filter/attribute/astralsorcery/AstralSorceryAttunementAttribute.java src/main/java/com/simibubi/create/content/logistics/item/filter/attribute/astralsorcery/AstralSorceryCrystalAttribute.java src/main/java/com/simibubi/create/content/logistics/item/filter/attribute/astralsorcery/AstralSorceryPerkGemAttribute.java src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntity.java src/main/java/com/simibubi/create/content/logistics/trains/entity/TrainStatus.java src/main/java/com/simibubi/create/content/logistics/trains/management/display/FlapDisplayTileEntity.java src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationMarker.java src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationScreen.java src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/TrainEditPacket.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/IScheduleInput.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/Schedule.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/ScheduleItem.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/ScheduleRuntime.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/ScheduleScreen.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/condition/CargoThresholdCondition.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/condition/FluidThresholdCondition.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/condition/ItemThresholdCondition.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/condition/PlayerPassengerCondition.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/condition/RedstoneLinkCondition.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/condition/TimeOfDayCondition.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/condition/TimedWaitCondition.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/destination/ChangeThrottleInstruction.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/destination/ChangeTitleInstruction.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/destination/DestinationInstruction.java src/main/java/com/simibubi/create/content/logistics/trains/management/schedule/destination/TextScheduleInstruction.java src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlock.java src/main/java/com/simibubi/create/content/schematics/ClientSchematicLoader.java src/main/java/com/simibubi/create/content/schematics/MaterialChecklist.java src/main/java/com/simibubi/create/content/schematics/ServerSchematicLoader.java src/main/java/com/simibubi/create/content/schematics/block/SchematicTableScreen.java src/main/java/com/simibubi/create/content/schematics/block/SchematicannonScreen.java src/main/java/com/simibubi/create/content/schematics/client/SchematicEditScreen.java src/main/java/com/simibubi/create/content/schematics/client/SchematicPromptScreen.java src/main/java/com/simibubi/create/content/schematics/client/SchematicRenderer.java src/main/java/com/simibubi/create/content/schematics/client/ToolSelectionScreen.java src/main/java/com/simibubi/create/content/schematics/item/SchematicItem.java src/main/java/com/simibubi/create/events/ClientEvents.java src/main/java/com/simibubi/create/foundation/advancement/CreateAdvancement.java src/main/java/com/simibubi/create/foundation/command/ClearBufferCacheCommand.java src/main/java/com/simibubi/create/foundation/command/CloneCommand.java src/main/java/com/simibubi/create/foundation/command/ConfigCommand.java src/main/java/com/simibubi/create/foundation/command/CouplingCommand.java src/main/java/com/simibubi/create/foundation/command/DumpRailwaysCommand.java src/main/java/com/simibubi/create/foundation/command/FixLightingCommand.java src/main/java/com/simibubi/create/foundation/command/FlySpeedCommand.java src/main/java/com/simibubi/create/foundation/command/HighlightCommand.java src/main/java/com/simibubi/create/foundation/command/KillTrainCommand.java src/main/java/com/simibubi/create/foundation/command/OverlayConfigCommand.java src/main/java/com/simibubi/create/foundation/command/ReplaceInCommandBlocksCommand.java src/main/java/com/simibubi/create/foundation/command/SConfigureConfigPacket.java src/main/java/com/simibubi/create/foundation/config/ui/BaseConfigScreen.java src/main/java/com/simibubi/create/foundation/config/ui/ConfigModListScreen.java src/main/java/com/simibubi/create/foundation/config/ui/ConfigScreenList.java src/main/java/com/simibubi/create/foundation/config/ui/HintableTextFieldWidget.java src/main/java/com/simibubi/create/foundation/config/ui/OpenCreateMenuButton.java src/main/java/com/simibubi/create/foundation/config/ui/SubMenuConfigScreen.java src/main/java/com/simibubi/create/foundation/config/ui/entries/NumberEntry.java src/main/java/com/simibubi/create/foundation/config/ui/entries/ValueEntry.java src/main/java/com/simibubi/create/foundation/gui/AbstractSimiScreen.java src/main/java/com/simibubi/create/foundation/gui/CreateMainMenuScreen.java src/main/java/com/simibubi/create/foundation/gui/ModularGuiLineBuilder.java src/main/java/com/simibubi/create/foundation/gui/element/TextStencilElement.java src/main/java/com/simibubi/create/foundation/gui/widget/AbstractSimiWidget.java src/main/java/com/simibubi/create/foundation/gui/widget/Label.java src/main/java/com/simibubi/create/foundation/gui/widget/ScrollInput.java src/main/java/com/simibubi/create/foundation/gui/widget/SelectionScrollInput.java src/main/java/com/simibubi/create/foundation/item/ItemDescription.java src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java src/main/java/com/simibubi/create/foundation/ponder/PonderTooltipHandler.java src/main/java/com/simibubi/create/foundation/ponder/content/DisplayScenes.java src/main/java/com/simibubi/create/foundation/ponder/content/RedstoneScenes.java src/main/java/com/simibubi/create/foundation/ponder/element/WorldSectionElement.java src/main/java/com/simibubi/create/foundation/ponder/ui/PonderTagIndexScreen.java src/main/java/com/simibubi/create/foundation/ponder/ui/PonderUI.java src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBox.java src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/edgeInteraction/EdgeInteractionRenderer.java src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringRenderer.java src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueRenderer.java src/main/java/com/simibubi/create/foundation/utility/Debug.java src/main/java/com/simibubi/create/foundation/utility/DynamicComponent.java src/main/java/com/simibubi/create/foundation/utility/FluidFormatter.java src/main/java/com/simibubi/create/foundation/utility/Lang.java src/main/java/com/simibubi/create/foundation/utility/LangBuilder.java
118 lines
5.6 KiB
Java
118 lines
5.6 KiB
Java
package com.simibubi.create;
|
|
|
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueSelectionHandler;
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.SBBContraptionManager;
|
|
import com.simibubi.create.content.contraptions.relays.encased.CasingConnectivity;
|
|
import com.simibubi.create.content.curiosities.bell.SoulPulseEffectHandler;
|
|
import com.simibubi.create.content.curiosities.weapons.PotatoCannonRenderHandler;
|
|
import com.simibubi.create.content.curiosities.zapper.ZapperRenderHandler;
|
|
import com.simibubi.create.content.logistics.trains.GlobalRailwayManager;
|
|
import com.simibubi.create.content.schematics.ClientSchematicLoader;
|
|
import com.simibubi.create.content.schematics.client.SchematicAndQuillHandler;
|
|
import com.simibubi.create.content.schematics.client.SchematicHandler;
|
|
import com.simibubi.create.foundation.ClientResourceReloadListener;
|
|
import com.simibubi.create.foundation.config.AllConfigs;
|
|
import com.simibubi.create.foundation.gui.UIRenderHelper;
|
|
import com.simibubi.create.foundation.ponder.content.PonderIndex;
|
|
import com.simibubi.create.foundation.ponder.element.WorldSectionElement;
|
|
import com.simibubi.create.foundation.render.CachedBufferer;
|
|
import com.simibubi.create.foundation.render.CreateContexts;
|
|
import com.simibubi.create.foundation.render.SuperByteBufferCache;
|
|
import com.simibubi.create.foundation.utility.Components;
|
|
import com.simibubi.create.foundation.utility.ModelSwapper;
|
|
import com.simibubi.create.foundation.utility.ghost.GhostBlocks;
|
|
import com.simibubi.create.foundation.utility.outliner.Outliner;
|
|
|
|
import net.minecraft.ChatFormatting;
|
|
import net.minecraft.client.GraphicsStatus;
|
|
import net.minecraft.client.Minecraft;
|
|
import net.minecraft.network.chat.ClickEvent;
|
|
import net.minecraft.network.chat.ComponentUtils;
|
|
import net.minecraft.network.chat.HoverEvent;
|
|
import net.minecraft.network.chat.MutableComponent;
|
|
import net.minecraftforge.eventbus.api.IEventBus;
|
|
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
|
|
|
public class CreateClient {
|
|
|
|
public static final SuperByteBufferCache BUFFER_CACHE = new SuperByteBufferCache();
|
|
public static final Outliner OUTLINER = new Outliner();
|
|
public static final GhostBlocks GHOST_BLOCKS = new GhostBlocks();
|
|
public static final ModelSwapper MODEL_SWAPPER = new ModelSwapper();
|
|
public static final CasingConnectivity CASING_CONNECTIVITY = new CasingConnectivity();
|
|
|
|
public static final ClientSchematicLoader SCHEMATIC_SENDER = new ClientSchematicLoader();
|
|
public static final SchematicHandler SCHEMATIC_HANDLER = new SchematicHandler();
|
|
public static final SchematicAndQuillHandler SCHEMATIC_AND_QUILL_HANDLER = new SchematicAndQuillHandler();
|
|
public static final SuperGlueSelectionHandler GLUE_HANDLER = new SuperGlueSelectionHandler();
|
|
|
|
public static final ZapperRenderHandler ZAPPER_RENDER_HANDLER = new ZapperRenderHandler();
|
|
public static final PotatoCannonRenderHandler POTATO_CANNON_RENDER_HANDLER = new PotatoCannonRenderHandler();
|
|
public static final SoulPulseEffectHandler SOUL_PULSE_EFFECT_HANDLER = new SoulPulseEffectHandler();
|
|
public static final GlobalRailwayManager RAILWAYS = new GlobalRailwayManager();
|
|
|
|
public static final ClientResourceReloadListener RESOURCE_RELOAD_LISTENER = new ClientResourceReloadListener();
|
|
|
|
public static void onCtorClient(IEventBus modEventBus, IEventBus forgeEventBus) {
|
|
modEventBus.addListener(CreateClient::clientInit);
|
|
modEventBus.addListener(AllParticleTypes::registerFactories);
|
|
modEventBus.addListener(CreateContexts::flwInit);
|
|
modEventBus.addListener(ContraptionRenderDispatcher::gatherContext);
|
|
|
|
MODEL_SWAPPER.registerListeners(modEventBus);
|
|
|
|
ZAPPER_RENDER_HANDLER.registerListeners(forgeEventBus);
|
|
POTATO_CANNON_RENDER_HANDLER.registerListeners(forgeEventBus);
|
|
}
|
|
|
|
public static void clientInit(final FMLClientSetupEvent event) {
|
|
BUFFER_CACHE.registerCompartment(CachedBufferer.GENERIC_TILE);
|
|
BUFFER_CACHE.registerCompartment(CachedBufferer.PARTIAL);
|
|
BUFFER_CACHE.registerCompartment(CachedBufferer.DIRECTIONAL_PARTIAL);
|
|
BUFFER_CACHE.registerCompartment(KineticTileEntityRenderer.KINETIC_TILE);
|
|
BUFFER_CACHE.registerCompartment(SBBContraptionManager.CONTRAPTION, 20);
|
|
BUFFER_CACHE.registerCompartment(WorldSectionElement.DOC_WORLD_SECTION, 20);
|
|
|
|
// AllFluids.assignRenderLayers();
|
|
AllBlockPartials.init();
|
|
AllStitchedTextures.init();
|
|
|
|
PonderIndex.register();
|
|
PonderIndex.registerTags();
|
|
|
|
UIRenderHelper.init();
|
|
}
|
|
|
|
public static void invalidateRenderers() {
|
|
BUFFER_CACHE.invalidate();
|
|
|
|
SCHEMATIC_HANDLER.updateRenderers();
|
|
ContraptionRenderDispatcher.reset();
|
|
}
|
|
|
|
public static void checkGraphicsFanciness() {
|
|
Minecraft mc = Minecraft.getInstance();
|
|
if (mc.player == null)
|
|
return;
|
|
|
|
if (mc.options.graphicsMode().get() != GraphicsStatus.FABULOUS)
|
|
return;
|
|
|
|
if (AllConfigs.CLIENT.ignoreFabulousWarning.get())
|
|
return;
|
|
|
|
MutableComponent text = ComponentUtils.wrapInSquareBrackets(Components.literal("WARN"))
|
|
.withStyle(ChatFormatting.GOLD)
|
|
.append(Components.literal(
|
|
" Some of Create's visual features will not be available while Fabulous graphics are enabled!"))
|
|
.withStyle(style -> style
|
|
.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/create dismissFabulousWarning"))
|
|
.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,
|
|
Components.literal("Click here to disable this warning"))));
|
|
|
|
mc.player.displayClientMessage(text, false);
|
|
}
|
|
|
|
}
|