mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Merge remote-tracking branch 'origin/mc1.20.1/dev' into mc1.21.1/dev
# Conflicts: # .github/workflows/build.yml # .github/workflows/release.yml # build.gradle # gradle.properties # src/main/java/com/simibubi/create/content/equipment/potatoCannon/AllPotatoProjectileBlockHitActions.java # src/main/java/com/simibubi/create/content/equipment/tool/CardboardSwordItem.java # src/main/java/com/simibubi/create/content/fluids/potion/PotionMixingRecipes.java # src/main/java/com/simibubi/create/content/logistics/factoryBoard/FactoryPanelBehaviour.java # src/main/java/com/simibubi/create/content/logistics/factoryBoard/FactoryPanelScreen.java # src/main/java/com/simibubi/create/content/logistics/packager/PackagerBlock.java # src/main/java/com/simibubi/create/content/logistics/stockTicker/StockKeeperCategoryScreen.java # src/main/java/com/simibubi/create/content/logistics/stockTicker/StockKeeperRequestScreen.java # src/main/java/com/simibubi/create/content/trains/entity/ArrivalSoundQueue.java # src/main/java/com/simibubi/create/infrastructure/debugInfo/DebugInformation.java # src/main/resources/META-INF/mods.toml
This commit is contained in:
commit
5734f4b119
21 changed files with 147 additions and 99 deletions
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -10,10 +10,7 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
run: echo "JAVA_HOME=$JAVA_HOME_21_X64" >> "$GITHUB_ENV"
|
||||||
with:
|
|
||||||
distribution: 'temurin'
|
|
||||||
java-version: '21'
|
|
||||||
|
|
||||||
- name: ModDevGradle Cache
|
- name: ModDevGradle Cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
@ -35,4 +32,5 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: Artifacts
|
||||||
path: build/libs/
|
path: build/libs/
|
||||||
|
|
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
|
@ -10,10 +10,7 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
run: echo "JAVA_HOME=$JAVA_HOME_21_X64" >> "$GITHUB_ENV"
|
||||||
with:
|
|
||||||
distribution: 'temurin'
|
|
||||||
java-version: '21'
|
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v4
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
|
15
build.gradle
15
build.gradle
|
@ -233,6 +233,15 @@ tasks.named("sourcesJar") {
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final slimJar = tasks.register("slimJar", Jar) {
|
||||||
|
archiveClassifier = "slim"
|
||||||
|
from sourceSets.main.output
|
||||||
|
manifest.attributes([
|
||||||
|
"Git-Hash": gitHash
|
||||||
|
])
|
||||||
|
}
|
||||||
|
obfuscation.reobfuscate(slimJar, sourceSets.main)
|
||||||
|
|
||||||
var generateModMetadata = tasks.register("generateModMetadata", ProcessResources) {
|
var generateModMetadata = tasks.register("generateModMetadata", ProcessResources) {
|
||||||
var replaceProperties = [
|
var replaceProperties = [
|
||||||
mod_version : mod_version,
|
mod_version : mod_version,
|
||||||
|
@ -262,6 +271,10 @@ publishing {
|
||||||
register('mavenJava', MavenPublication) {
|
register('mavenJava', MavenPublication) {
|
||||||
artifactId base.archivesName.get()
|
artifactId base.archivesName.get()
|
||||||
from components.java
|
from components.java
|
||||||
|
|
||||||
|
artifact(tasks.jar) {
|
||||||
|
classifier = "all"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -284,7 +297,7 @@ publishing {
|
||||||
}
|
}
|
||||||
|
|
||||||
publishMods {
|
publishMods {
|
||||||
file = jar.archiveFile
|
file = reobfJar.archiveFile
|
||||||
changelog = ChangelogText.getChangelogText(project).toString()
|
changelog = ChangelogText.getChangelogText(project).toString()
|
||||||
type = STABLE
|
type = STABLE
|
||||||
displayName = "$mod_name $mod_version for mc$minecraft_version"
|
displayName = "$mod_name $mod_version for mc$minecraft_version"
|
||||||
|
|
13
changelog.md
13
changelog.md
|
@ -1,3 +1,16 @@
|
||||||
|
------------------------------------------------------
|
||||||
|
Create 6.0.1
|
||||||
|
------------------------------------------------------
|
||||||
|
|
||||||
|
#### Bug Fixes
|
||||||
|
|
||||||
|
- Fixed crash when using factory gauges
|
||||||
|
- Fixed debug info command not translating the graphics mode text
|
||||||
|
- Fixed cardboard sword not being able to damage arthropod mobs other than the spider
|
||||||
|
- Fixed a crash that occurred when placing a stock link on a re-packager
|
||||||
|
- Fixed an issue where wearing diving boots and sprinting would force you into the swim position and then out of it
|
||||||
|
right away
|
||||||
|
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
Create 6.0.0
|
Create 6.0.0
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
|
|
|
@ -23,8 +23,8 @@ registrate_version = MC1.21-1.3.0+62
|
||||||
|
|
||||||
# Dependency Versions
|
# Dependency Versions
|
||||||
flywheel_minecraft_version = 1.21.1
|
flywheel_minecraft_version = 1.21.1
|
||||||
flywheel_version = 1.0.0-9
|
flywheel_version = 1.0.0-10
|
||||||
vanillin_version = 1.0.0-beta-9
|
vanillin_version = 1.0.0-beta-10
|
||||||
flywheel_version_range = [1.0.0,2.0)
|
flywheel_version_range = [1.0.0,2.0)
|
||||||
ponder_version = 1.0.39
|
ponder_version = 1.0.39
|
||||||
jei_minecraft_version = 1.21.1
|
jei_minecraft_version = 1.21.1
|
||||||
|
|
|
@ -14,6 +14,8 @@ import com.simibubi.create.content.contraptions.behaviour.MovementContext;
|
||||||
import com.simibubi.create.foundation.utility.worldWrappers.WrappedBlockAndTintGetter;
|
import com.simibubi.create.foundation.utility.worldWrappers.WrappedBlockAndTintGetter;
|
||||||
import com.simibubi.create.foundation.virtualWorld.VirtualRenderWorld;
|
import com.simibubi.create.foundation.virtualWorld.VirtualRenderWorld;
|
||||||
|
|
||||||
|
import net.minecraftforge.client.model.data.ModelData;
|
||||||
|
|
||||||
import dev.engine_room.flywheel.api.material.CardinalLightingMode;
|
import dev.engine_room.flywheel.api.material.CardinalLightingMode;
|
||||||
import dev.engine_room.flywheel.api.model.Model;
|
import dev.engine_room.flywheel.api.model.Model;
|
||||||
import dev.engine_room.flywheel.api.task.Plan;
|
import dev.engine_room.flywheel.api.task.Plan;
|
||||||
|
@ -132,7 +134,7 @@ public class ContraptionVisual<E extends AbstractContraptionEntity> extends Abst
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
protected <T extends BlockEntity> void setupVisualizer(T be, float partialTicks) {
|
protected <T extends BlockEntity> void setupVisualizer(T be, float partialTicks) {
|
||||||
BlockEntityVisualizer<? super T> visualizer = (BlockEntityVisualizer<? super T>) VisualizerRegistry.getVisualizer(be.getType());
|
BlockEntityVisualizer<? super T> visualizer = (BlockEntityVisualizer<? super T>) VisualizerRegistry.getVisualizer(be.getType());
|
||||||
if (visualizer == null) {
|
if (visualizer == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -182,17 +184,17 @@ public class ContraptionVisual<E extends AbstractContraptionEntity> extends Abst
|
||||||
@Override
|
@Override
|
||||||
public Plan<TickableVisual.Context> planTick() {
|
public Plan<TickableVisual.Context> planTick() {
|
||||||
return NestedPlan.of(
|
return NestedPlan.of(
|
||||||
ForEachPlan.of(() -> actors, ActorVisual::tick),
|
ForEachPlan.of(() -> actors, ActorVisual::tick),
|
||||||
tickableVisuals
|
tickableVisuals
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Plan<DynamicVisual.Context> planFrame() {
|
public Plan<DynamicVisual.Context> planFrame() {
|
||||||
return NestedPlan.of(
|
return NestedPlan.of(
|
||||||
RunnablePlan.of(this::beginFrame),
|
RunnablePlan.of(this::beginFrame),
|
||||||
ForEachPlan.of(() -> actors, ActorVisual::beginFrame),
|
ForEachPlan.of(() -> actors, ActorVisual::beginFrame),
|
||||||
dynamicVisuals
|
dynamicVisuals
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +203,7 @@ public class ContraptionVisual<E extends AbstractContraptionEntity> extends Abst
|
||||||
setEmbeddingMatrices(partialTick);
|
setEmbeddingMatrices(partialTick);
|
||||||
|
|
||||||
if (hasMovedSections()) {
|
if (hasMovedSections()) {
|
||||||
sectionCollector.sections(collectLightSections());
|
sectionCollector.sections(collectLightSections());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasMovedBlocks()) {
|
if (hasMovedBlocks()) {
|
||||||
|
@ -282,13 +284,13 @@ public class ContraptionVisual<E extends AbstractContraptionEntity> extends Abst
|
||||||
int maxY = maxLight(boundingBox.maxY);
|
int maxY = maxLight(boundingBox.maxY);
|
||||||
int maxZ = maxLight(boundingBox.maxZ);
|
int maxZ = maxLight(boundingBox.maxZ);
|
||||||
|
|
||||||
return minBlock != BlockPos.asLong(minX, minY, minZ) || maxBlock != BlockPos.asLong(maxX, maxY, maxZ);
|
return minBlock != BlockPos.asLong(minX, minY, minZ) || maxBlock != BlockPos.asLong(maxX, maxY, maxZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean hasMovedSections() {
|
protected boolean hasMovedSections() {
|
||||||
var boundingBox = entity.getBoundingBox();
|
var boundingBox = entity.getBoundingBox();
|
||||||
|
|
||||||
var minSectionX = minLightSection(boundingBox.minX);
|
var minSectionX = minLightSection(boundingBox.minX);
|
||||||
var minSectionY = minLightSection(boundingBox.minY);
|
var minSectionY = minLightSection(boundingBox.minY);
|
||||||
var minSectionZ = minLightSection(boundingBox.minZ);
|
var minSectionZ = minLightSection(boundingBox.minZ);
|
||||||
int maxSectionX = maxLightSection(boundingBox.maxX);
|
int maxSectionX = maxLightSection(boundingBox.maxX);
|
||||||
|
|
|
@ -22,12 +22,12 @@ import net.minecraft.world.phys.BlockHitResult;
|
||||||
import net.neoforged.neoforge.common.SpecialPlantable;
|
import net.neoforged.neoforge.common.SpecialPlantable;
|
||||||
|
|
||||||
public class AllPotatoProjectileBlockHitActions {
|
public class AllPotatoProjectileBlockHitActions {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
register("plant_crop", PlantCrop.CODEC);
|
register("plant_crop", PlantCrop.CODEC);
|
||||||
register("place_block_on_ground", PlaceBlockOnGround.CODEC);
|
register("place_block_on_ground", PlaceBlockOnGround.CODEC);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,17 @@ import com.simibubi.create.AllItems;
|
||||||
import com.simibubi.create.AllSoundEvents;
|
import com.simibubi.create.AllSoundEvents;
|
||||||
import com.simibubi.create.foundation.item.render.SimpleCustomRenderer;
|
import com.simibubi.create.foundation.item.render.SimpleCustomRenderer;
|
||||||
|
|
||||||
import net.createmod.catnip.platform.CatnipServices;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraft.core.Holder;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraft.server.level.ServerLevel;
|
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
|
||||||
|
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||||
|
import net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickBlock;
|
||||||
|
import net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickBlock.Action;
|
||||||
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.LogicalSide;
|
||||||
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
|
import net.minecraftforge.network.PacketDistributor;
|
||||||
|
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
|
@ -19,26 +27,17 @@ import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
import net.minecraft.world.entity.MobCategory;
|
import net.minecraft.world.entity.MobCategory;
|
||||||
|
import net.minecraft.world.entity.MobType;
|
||||||
import net.minecraft.world.entity.ai.attributes.Attributes;
|
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||||
import net.minecraft.world.entity.monster.Spider;
|
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.ItemStack.TooltipPart;
|
||||||
import net.minecraft.world.item.SwordItem;
|
import net.minecraft.world.item.SwordItem;
|
||||||
import net.minecraft.world.item.crafting.RecipeType;
|
import net.minecraft.world.item.crafting.RecipeType;
|
||||||
import net.minecraft.world.item.enchantment.Enchantment;
|
import net.minecraft.world.item.enchantment.Enchantment;
|
||||||
import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
||||||
import net.minecraft.world.item.enchantment.Enchantments;
|
import net.minecraft.world.item.enchantment.Enchantments;
|
||||||
|
|
||||||
import net.neoforged.api.distmarker.Dist;
|
|
||||||
import net.neoforged.api.distmarker.OnlyIn;
|
|
||||||
import net.neoforged.bus.api.EventPriority;
|
|
||||||
import net.neoforged.bus.api.SubscribeEvent;
|
|
||||||
import net.neoforged.fml.LogicalSide;
|
|
||||||
import net.neoforged.fml.common.EventBusSubscriber;
|
|
||||||
import net.neoforged.neoforge.client.extensions.common.IClientItemExtensions;
|
|
||||||
import net.neoforged.neoforge.event.entity.player.AttackEntityEvent;
|
|
||||||
import net.neoforged.neoforge.event.entity.player.PlayerInteractEvent;
|
|
||||||
|
|
||||||
@EventBusSubscriber
|
@EventBusSubscriber
|
||||||
public class CardboardSwordItem extends SwordItem {
|
public class CardboardSwordItem extends SwordItem {
|
||||||
|
|
||||||
|
@ -73,7 +72,7 @@ public class CardboardSwordItem extends SwordItem {
|
||||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||||
public static void cardboardSwordsCannotHurtYou(AttackEntityEvent event) {
|
public static void cardboardSwordsCannotHurtYou(AttackEntityEvent event) {
|
||||||
Player attacker = event.getEntity();
|
Player attacker = event.getEntity();
|
||||||
if (!(event.getTarget() instanceof LivingEntity target) || target == null || target instanceof Spider)
|
if (!(event.getTarget() instanceof LivingEntity target) || target == null || target.getMobType() == MobType.ARTHROPOD)
|
||||||
return;
|
return;
|
||||||
ItemStack stack = attacker.getItemInHand(InteractionHand.MAIN_HAND);
|
ItemStack stack = attacker.getItemInHand(InteractionHand.MAIN_HAND);
|
||||||
if (!(AllItems.CARDBOARD_SWORD.isIn(stack)))
|
if (!(AllItems.CARDBOARD_SWORD.isIn(stack)))
|
||||||
|
|
|
@ -25,6 +25,7 @@ import net.minecraft.world.item.alchemy.Potion;
|
||||||
import net.minecraft.world.item.alchemy.PotionBrewing;
|
import net.minecraft.world.item.alchemy.PotionBrewing;
|
||||||
import net.minecraft.world.item.alchemy.PotionContents;
|
import net.minecraft.world.item.alchemy.PotionContents;
|
||||||
import net.minecraft.world.item.crafting.Ingredient;
|
import net.minecraft.world.item.crafting.Ingredient;
|
||||||
|
|
||||||
import net.minecraft.world.item.crafting.RecipeHolder;
|
import net.minecraft.world.item.crafting.RecipeHolder;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,10 @@ import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
|
||||||
import com.simibubi.create.foundation.damageTypes.CreateDamageSources;
|
import com.simibubi.create.foundation.damageTypes.CreateDamageSources;
|
||||||
|
|
||||||
import net.createmod.catnip.animation.AnimationTickHolder;
|
import net.createmod.catnip.animation.AnimationTickHolder;
|
||||||
import net.createmod.catnip.nbt.NBTHelper;
|
|
||||||
import net.createmod.catnip.math.VecHelper;
|
|
||||||
import net.createmod.catnip.animation.LerpedFloat;
|
import net.createmod.catnip.animation.LerpedFloat;
|
||||||
import net.createmod.catnip.animation.LerpedFloat.Chaser;
|
import net.createmod.catnip.animation.LerpedFloat.Chaser;
|
||||||
|
import net.createmod.catnip.math.VecHelper;
|
||||||
|
import net.createmod.catnip.nbt.NBTHelper;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.HolderLookup;
|
import net.minecraft.core.HolderLookup;
|
||||||
import net.minecraft.core.particles.ParticleTypes;
|
import net.minecraft.core.particles.ParticleTypes;
|
||||||
|
|
|
@ -48,6 +48,11 @@ import com.simibubi.create.foundation.blockEntity.behaviour.ValueSettingsFormatt
|
||||||
import com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour;
|
import com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour;
|
||||||
import com.simibubi.create.foundation.utility.CreateLang;
|
import com.simibubi.create.foundation.utility.CreateLang;
|
||||||
|
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
import net.minecraftforge.network.NetworkHooks;
|
||||||
|
|
||||||
import net.createmod.catnip.animation.LerpedFloat;
|
import net.createmod.catnip.animation.LerpedFloat;
|
||||||
import net.createmod.catnip.animation.LerpedFloat.Chaser;
|
import net.createmod.catnip.animation.LerpedFloat.Chaser;
|
||||||
import net.createmod.catnip.codecs.CatnipCodecUtils;
|
import net.createmod.catnip.codecs.CatnipCodecUtils;
|
||||||
|
@ -734,13 +739,16 @@ public class FactoryPanelBehaviour extends FilteringBehaviour implements MenuPro
|
||||||
}
|
}
|
||||||
|
|
||||||
RequestPromiseQueue promises = Create.LOGISTICS.getQueuedPromises(network);
|
RequestPromiseQueue promises = Create.LOGISTICS.getQueuedPromises(network);
|
||||||
|
if (promises == null)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (forceClearPromises) {
|
if (forceClearPromises) {
|
||||||
promises.forceClear(item);
|
promises.forceClear(item);
|
||||||
resetTimerSlightly();
|
resetTimerSlightly();
|
||||||
}
|
}
|
||||||
forceClearPromises = false;
|
forceClearPromises = false;
|
||||||
|
|
||||||
return promises == null ? 0 : promises.getTotalPromisedAndRemoveExpired(item, getPromiseExpiryTimeInTicks());
|
return promises.getTotalPromisedAndRemoveExpired(item, getPromiseExpiryTimeInTicks());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetTimer() {
|
public void resetTimer() {
|
||||||
|
|
|
@ -46,6 +46,7 @@ import net.minecraft.world.item.crafting.CraftingRecipe;
|
||||||
import net.minecraft.world.item.crafting.Ingredient;
|
import net.minecraft.world.item.crafting.Ingredient;
|
||||||
import net.minecraft.world.item.crafting.RecipeHolder;
|
import net.minecraft.world.item.crafting.RecipeHolder;
|
||||||
import net.minecraft.world.item.crafting.RecipeType;
|
import net.minecraft.world.item.crafting.RecipeType;
|
||||||
|
|
||||||
import net.minecraft.world.item.crafting.ShapedRecipe;
|
import net.minecraft.world.item.crafting.ShapedRecipe;
|
||||||
|
|
||||||
public class FactoryPanelScreen extends AbstractSimiScreen {
|
public class FactoryPanelScreen extends AbstractSimiScreen {
|
||||||
|
|
|
@ -11,6 +11,11 @@ import com.simibubi.create.foundation.block.IBE;
|
||||||
import com.simibubi.create.foundation.block.WrenchableDirectionalBlock;
|
import com.simibubi.create.foundation.block.WrenchableDirectionalBlock;
|
||||||
import com.simibubi.create.foundation.utility.CreateLang;
|
import com.simibubi.create.foundation.utility.CreateLang;
|
||||||
|
|
||||||
|
import net.minecraftforge.common.capabilities.Capability;
|
||||||
|
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||||
|
import net.minecraftforge.common.util.FakePlayer;
|
||||||
|
import net.minecraftforge.items.IItemHandler;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
|
@ -87,7 +92,7 @@ public class PackagerBlock extends WrenchableDirectionalBlock implements IBE<Pac
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.getStateForPlacement(context).setValue(POWERED, context.getLevel()
|
return super.getStateForPlacement(context).setValue(POWERED, context.getLevel()
|
||||||
.hasNeighborSignal(context.getClickedPos()))
|
.hasNeighborSignal(context.getClickedPos()))
|
||||||
.setValue(FACING, preferredFacing);
|
.setValue(FACING, preferredFacing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +102,7 @@ public class PackagerBlock extends WrenchableDirectionalBlock implements IBE<Pac
|
||||||
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
|
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
|
||||||
if (AllBlocks.FACTORY_GAUGE.isIn(stack))
|
if (AllBlocks.FACTORY_GAUGE.isIn(stack))
|
||||||
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
|
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
|
||||||
if (AllBlocks.STOCK_LINK.isIn(stack) && !state.getValue(LINKED))
|
if (AllBlocks.STOCK_LINK.isIn(stack) && !(state.hasProperty(LINKED) && state.getValue(LINKED)))
|
||||||
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
|
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
|
||||||
if (AllBlocks.PACKAGE_FROGPORT.isIn(stack))
|
if (AllBlocks.PACKAGE_FROGPORT.isIn(stack))
|
||||||
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
|
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
|
||||||
|
@ -146,14 +151,14 @@ public class PackagerBlock extends WrenchableDirectionalBlock implements IBE<Pac
|
||||||
public void onNeighborChange(BlockState state, LevelReader level, BlockPos pos, BlockPos neighbor) {
|
public void onNeighborChange(BlockState state, LevelReader level, BlockPos pos, BlockPos neighbor) {
|
||||||
super.onNeighborChange(state, level, pos, neighbor);
|
super.onNeighborChange(state, level, pos, neighbor);
|
||||||
if (neighbor.relative(state.getOptionalValue(FACING)
|
if (neighbor.relative(state.getOptionalValue(FACING)
|
||||||
.orElse(Direction.UP))
|
.orElse(Direction.UP))
|
||||||
.equals(pos))
|
.equals(pos))
|
||||||
withBlockEntityDo(level, pos, PackagerBlockEntity::triggerStockCheck);
|
withBlockEntityDo(level, pos, PackagerBlockEntity::triggerStockCheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void neighborChanged(BlockState state, Level worldIn, BlockPos pos, Block blockIn, BlockPos fromPos,
|
public void neighborChanged(BlockState state, Level worldIn, BlockPos pos, Block blockIn, BlockPos fromPos,
|
||||||
boolean isMoving) {
|
boolean isMoving) {
|
||||||
if (worldIn.isClientSide)
|
if (worldIn.isClientSide)
|
||||||
return;
|
return;
|
||||||
boolean previouslyPowered = state.getValue(POWERED);
|
boolean previouslyPowered = state.getValue(POWERED);
|
||||||
|
@ -197,12 +202,12 @@ public class PackagerBlock extends WrenchableDirectionalBlock implements IBE<Pac
|
||||||
@Override
|
@Override
|
||||||
public int getAnalogOutputSignal(BlockState pState, Level pLevel, BlockPos pPos) {
|
public int getAnalogOutputSignal(BlockState pState, Level pLevel, BlockPos pPos) {
|
||||||
return getBlockEntityOptional(pLevel, pPos).map(pbe -> {
|
return getBlockEntityOptional(pLevel, pPos).map(pbe -> {
|
||||||
boolean empty = pbe.inventory.getStackInSlot(0)
|
boolean empty = pbe.inventory.getStackInSlot(0)
|
||||||
.isEmpty();
|
.isEmpty();
|
||||||
if (pbe.animationTicks != 0)
|
if (pbe.animationTicks != 0)
|
||||||
empty = false;
|
empty = false;
|
||||||
return empty ? 0 : 15;
|
return empty ? 0 : 15;
|
||||||
})
|
})
|
||||||
.orElse(0);
|
.orElse(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import net.minecraft.core.GlobalPos;
|
import net.minecraft.core.GlobalPos;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
@ -38,12 +40,12 @@ public class GlobalLogisticsManager {
|
||||||
LogisticsNetwork network = logisticsNetworks.get(networkId);
|
LogisticsNetwork network = logisticsNetworks.get(networkId);
|
||||||
return network == null || network.owner == null || network.owner.equals(player.getUUID());
|
return network == null || network.owner == null || network.owner.equals(player.getUUID());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isLockable(UUID networkId) {
|
public boolean isLockable(UUID networkId) {
|
||||||
LogisticsNetwork network = logisticsNetworks.get(networkId);
|
LogisticsNetwork network = logisticsNetworks.get(networkId);
|
||||||
return network != null;
|
return network != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isLocked(UUID networkId) {
|
public boolean isLocked(UUID networkId) {
|
||||||
LogisticsNetwork network = logisticsNetworks.get(networkId);
|
LogisticsNetwork network = logisticsNetworks.get(networkId);
|
||||||
return network != null && network.locked;
|
return network != null && network.locked;
|
||||||
|
@ -86,6 +88,7 @@ public class GlobalLogisticsManager {
|
||||||
return logisticsNetwork.totalLinks.size() - logisticsNetwork.loadedLinks.size();
|
return logisticsNetwork.totalLinks.size() - logisticsNetwork.loadedLinks.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
public RequestPromiseQueue getQueuedPromises(UUID networkId) {
|
public RequestPromiseQueue getQueuedPromises(UUID networkId) {
|
||||||
return !logisticsNetworks.containsKey(networkId) ? null : logisticsNetworks.get(networkId).panelPromises;
|
return !logisticsNetworks.containsKey(networkId) ? null : logisticsNetworks.get(networkId).panelPromises;
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,6 @@ public class StockKeeperCategoryScreen extends AbstractSimiContainerScreen<Stock
|
||||||
if (!empty) {
|
if (!empty) {
|
||||||
String value = editorEditBox.getValue();
|
String value = editorEditBox.getValue();
|
||||||
stackInSlot.set(DataComponents.CUSTOM_NAME, value.isBlank() ? null : Component.literal(value));
|
stackInSlot.set(DataComponents.CUSTOM_NAME, value.isBlank() ? null : Component.literal(value));
|
||||||
|
|
||||||
if (editingIndex == -1)
|
if (editingIndex == -1)
|
||||||
schedule.add(stackInSlot);
|
schedule.add(stackInSlot);
|
||||||
else
|
else
|
||||||
|
|
|
@ -1012,7 +1012,7 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
||||||
public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) {
|
public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) {
|
||||||
boolean lmb = pButton == GLFW.GLFW_MOUSE_BUTTON_LEFT;
|
boolean lmb = pButton == GLFW.GLFW_MOUSE_BUTTON_LEFT;
|
||||||
boolean rmb = pButton == GLFW.GLFW_MOUSE_BUTTON_RIGHT;
|
boolean rmb = pButton == GLFW.GLFW_MOUSE_BUTTON_RIGHT;
|
||||||
|
|
||||||
// Search
|
// Search
|
||||||
if (rmb && searchBox.isMouseOver(pMouseX, pMouseY)) {
|
if (rmb && searchBox.isMouseOver(pMouseX, pMouseY)) {
|
||||||
searchBox.setValue("");
|
searchBox.setValue("");
|
||||||
|
@ -1021,7 +1021,7 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
||||||
searchBox.setFocused(true);
|
searchBox.setFocused(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addressBox.isFocused()) {
|
if (addressBox.isFocused()) {
|
||||||
if (addressBox.isHovered())
|
if (addressBox.isHovered())
|
||||||
return addressBox.mouseClicked(pMouseX, pMouseY, pButton);
|
return addressBox.mouseClicked(pMouseX, pMouseY, pButton);
|
||||||
|
@ -1077,17 +1077,17 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
||||||
int indexOf = entry.targetBECategory;
|
int indexOf = entry.targetBECategory;
|
||||||
if (indexOf >= blockEntity.categories.size())
|
if (indexOf >= blockEntity.categories.size())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!entry.hidden) {
|
if (!entry.hidden) {
|
||||||
hiddenCategories.add(indexOf);
|
hiddenCategories.add(indexOf);
|
||||||
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 1f, 1.5f);
|
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 1f, 1.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
hiddenCategories.remove(indexOf);
|
hiddenCategories.remove(indexOf);
|
||||||
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 1f, 0.675f);
|
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 1f, 0.675f);
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshSearchNextTick = true;
|
refreshSearchNextTick = true;
|
||||||
moveToTopNextTick = false;
|
moveToTopNextTick = false;
|
||||||
return true;
|
return true;
|
||||||
|
@ -1157,6 +1157,7 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
||||||
public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) {
|
public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) {
|
||||||
if (addressBox.mouseScrolled(mouseX, mouseY, scrollX, scrollY))
|
if (addressBox.mouseScrolled(mouseX, mouseY, scrollX, scrollY))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
Couple<Integer> hoveredSlot = getHoveredSlot((int) mouseX, (int) mouseY);
|
Couple<Integer> hoveredSlot = getHoveredSlot((int) mouseX, (int) mouseY);
|
||||||
boolean noHover = hoveredSlot == noneHovered;
|
boolean noHover = hoveredSlot == noneHovered;
|
||||||
|
|
||||||
|
@ -1333,7 +1334,7 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
||||||
continue;
|
continue;
|
||||||
forcedEntries.add(toOrder.stack.copy(), -1 - Math.max(0, countOf - toOrder.count));
|
forcedEntries.add(toOrder.stack.copy(), -1 - Math.max(0, countOf - toOrder.count));
|
||||||
}
|
}
|
||||||
|
|
||||||
PackageOrder craftingRequest = PackageOrder.empty();
|
PackageOrder craftingRequest = PackageOrder.empty();
|
||||||
if (canRequestCraftingPackage && !itemsToOrder.isEmpty() && !recipesToOrder.isEmpty())
|
if (canRequestCraftingPackage && !itemsToOrder.isEmpty() && !recipesToOrder.isEmpty())
|
||||||
if (recipesToOrder.get(0).recipe instanceof CraftingRecipe cr)
|
if (recipesToOrder.get(0).recipe instanceof CraftingRecipe cr)
|
||||||
|
@ -1467,7 +1468,7 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
canRequestCraftingPackage = false;
|
canRequestCraftingPackage = false;
|
||||||
if (recipesToOrder.size() != 1)
|
if (recipesToOrder.size() != 1)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -13,8 +13,8 @@ import com.simibubi.create.content.contraptions.Contraption;
|
||||||
import com.simibubi.create.content.decoration.steamWhistle.WhistleBlock;
|
import com.simibubi.create.content.decoration.steamWhistle.WhistleBlock;
|
||||||
import com.simibubi.create.content.decoration.steamWhistle.WhistleBlock.WhistleSize;
|
import com.simibubi.create.content.decoration.steamWhistle.WhistleBlock.WhistleSize;
|
||||||
|
|
||||||
import net.createmod.catnip.nbt.NBTHelper;
|
|
||||||
import net.createmod.catnip.data.Pair;
|
import net.createmod.catnip.data.Pair;
|
||||||
|
import net.createmod.catnip.nbt.NBTHelper;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.nbt.NbtUtils;
|
import net.minecraft.nbt.NbtUtils;
|
||||||
|
@ -135,8 +135,7 @@ public class ArrivalSoundQueue {
|
||||||
if (state.getBlock() instanceof NoteBlock nb) {
|
if (state.getBlock() instanceof NoteBlock nb) {
|
||||||
float f = (float) Math.pow(2, (state.getValue(NoteBlock.NOTE) - 12) / 12.0);
|
float f = (float) Math.pow(2, (state.getValue(NoteBlock.NOTE) - 12) / 12.0);
|
||||||
playSimple(entity, state.getValue(NoteBlock.INSTRUMENT)
|
playSimple(entity, state.getValue(NoteBlock.INSTRUMENT)
|
||||||
.getSoundEvent()
|
.getSoundEvent().value(), 1, f);
|
||||||
.value(), 1, f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.getBlock() instanceof WhistleBlock && info.nbt() != null) {
|
if (state.getBlock() instanceof WhistleBlock && info.nbt() != null) {
|
||||||
|
|
|
@ -184,12 +184,12 @@ public class CarriageContraption extends Contraption {
|
||||||
|
|
||||||
return super.capture(world, pos);
|
return super.capture(world, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockEntity readBlockEntity(Level level, StructureBlockInfo info, CompoundTag tag) {
|
protected BlockEntity readBlockEntity(Level level, StructureBlockInfo info, CompoundTag tag) {
|
||||||
if (info.state().getBlock() instanceof AbstractBogeyBlock<?> bogey && !bogey.captureBlockEntityForTrain())
|
if (info.state().getBlock() instanceof AbstractBogeyBlock<?> bogey && !bogey.captureBlockEntityForTrain())
|
||||||
return null; // Bogeys are typically rendered by the carriage contraption, not the BE
|
return null; // Bogeys are typically rendered by the carriage contraption, not the BE
|
||||||
|
|
||||||
return super.readBlockEntity(level, info, tag);
|
return super.readBlockEntity(level, info, tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,13 +88,13 @@ public interface ValueSettingsBehaviour extends ClipboardCloneable {
|
||||||
default boolean bypassesInput(ItemStack mainhandItem) {
|
default boolean bypassesInput(ItemStack mainhandItem) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
default boolean mayInteract(Player player) {
|
default boolean mayInteract(Player player) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
default int netId() {
|
default int netId() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,15 @@ package com.simibubi.create.foundation.mixin.client;
|
||||||
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
|
|
||||||
import net.minecraft.client.multiplayer.ClientLevel;
|
import net.minecraft.client.multiplayer.ClientLevel;
|
||||||
import net.minecraft.client.player.AbstractClientPlayer;
|
import net.minecraft.client.player.AbstractClientPlayer;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
|
||||||
@Mixin(LocalPlayer.class)
|
@Mixin(LocalPlayer.class)
|
||||||
public abstract class HeavyBootsOnPlayerMixin extends AbstractClientPlayer {
|
public abstract class HeavyBootsOnPlayerMixin extends AbstractClientPlayer {
|
||||||
|
@ -16,8 +18,10 @@ public abstract class HeavyBootsOnPlayerMixin extends AbstractClientPlayer {
|
||||||
super(level, profile);
|
super(level, profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ModifyReturnValue(method = "isUnderWater()Z", at = @At("RETURN"))
|
@Inject(method = "isUnderWater()Z", at = @At("HEAD"), cancellable = true)
|
||||||
private boolean create$noSwimmingWithHeavyBootsOn(boolean original) {
|
public void create$noSwimmingWithHeavyBootsOn(CallbackInfoReturnable<Boolean> cir) {
|
||||||
return getPersistentData().contains("HeavyBoots") || original;
|
CompoundTag persistentData = getPersistentData();
|
||||||
|
if (persistentData.contains("HeavyBoots"))
|
||||||
|
cir.setReturnValue(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,11 @@ import com.simibubi.create.infrastructure.debugInfo.element.DebugInfoSection;
|
||||||
import com.simibubi.create.infrastructure.debugInfo.element.InfoElement;
|
import com.simibubi.create.infrastructure.debugInfo.element.InfoElement;
|
||||||
import com.simibubi.create.infrastructure.debugInfo.element.InfoEntry;
|
import com.simibubi.create.infrastructure.debugInfo.element.InfoEntry;
|
||||||
|
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
import net.minecraftforge.fml.ModList;
|
||||||
|
import net.minecraftforge.forgespi.language.IModInfo;
|
||||||
|
|
||||||
import dev.engine_room.flywheel.api.Flywheel;
|
import dev.engine_room.flywheel.api.Flywheel;
|
||||||
import dev.engine_room.flywheel.api.backend.Backend;
|
import dev.engine_room.flywheel.api.backend.Backend;
|
||||||
import dev.engine_room.flywheel.api.backend.BackendManager;
|
import dev.engine_room.flywheel.api.backend.BackendManager;
|
||||||
|
@ -68,45 +73,45 @@ public class DebugInformation {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
DebugInfoSection.builder(Create.NAME)
|
DebugInfoSection.builder(Create.NAME)
|
||||||
.put("Mod Version", CreateBuildInfo.VERSION)
|
.put("Mod Version", CreateBuildInfo.VERSION)
|
||||||
.put("NeoForge Version", getVersionOfMod("neoforge"))
|
.put("NeoForge Version", getVersionOfMod("neoforge"))
|
||||||
.put("Minecraft Version", SharedConstants.getCurrentVersion().getName())
|
.put("Minecraft Version", SharedConstants.getCurrentVersion().getName())
|
||||||
.buildTo(DebugInformation::registerBothInfo);
|
.buildTo(DebugInformation::registerBothInfo);
|
||||||
|
|
||||||
CatnipServices.PLATFORM.executeOnClientOnly(() -> () -> {
|
CatnipServices.PLATFORM.executeOnClientOnly(() -> () -> {
|
||||||
DebugInfoSection.builder("Graphics")
|
DebugInfoSection.builder("Graphics")
|
||||||
.put("Flywheel Version", ModList.get()
|
.put("Flywheel Version", ModList.get()
|
||||||
.getModContainerById(Flywheel.ID)
|
.getModContainerById(Flywheel.ID)
|
||||||
.map(c -> c.getModInfo()
|
.map(c -> c.getModInfo()
|
||||||
.getVersion()
|
.getVersion()
|
||||||
.toString())
|
.toString())
|
||||||
.orElse("None"))
|
.orElse("None"))
|
||||||
.put("Flywheel Backend", () -> Backend.REGISTRY.getIdOrThrow(BackendManager.currentBackend()).toString())
|
.put("Flywheel Backend", () -> Backend.REGISTRY.getIdOrThrow(BackendManager.currentBackend()).toString())
|
||||||
.put("OpenGL Renderer", GlUtil::getRenderer)
|
.put("OpenGL Renderer", GlUtil::getRenderer)
|
||||||
.put("OpenGL Version", GlUtil::getOpenGLVersion)
|
.put("OpenGL Version", GlUtil::getOpenGLVersion)
|
||||||
.put("Graphics Mode", () -> Minecraft.getInstance().options.graphicsMode().get().getKey())
|
.put("Graphics Mode", () -> I18n.get(Minecraft.getInstance().options.graphicsMode().get().getKey()))
|
||||||
.buildTo(DebugInformation::registerClientInfo);
|
.buildTo(DebugInformation::registerClientInfo);
|
||||||
});
|
});
|
||||||
|
|
||||||
DebugInfoSection.builder("System Information")
|
DebugInfoSection.builder("System Information")
|
||||||
.put("Operating System", SystemReportAccessor.getOPERATING_SYSTEM())
|
.put("Operating System", SystemReportAccessor.getOPERATING_SYSTEM())
|
||||||
.put("Java Version", SystemReportAccessor.getJAVA_VERSION())
|
.put("Java Version", SystemReportAccessor.getJAVA_VERSION())
|
||||||
.put("JVM Flags", getMcSystemInfo("JVM Flags"))
|
.put("JVM Flags", getMcSystemInfo("JVM Flags"))
|
||||||
.put("Memory", () -> getMcSystemInfo("Memory"))
|
.put("Memory", () -> getMcSystemInfo("Memory"))
|
||||||
.put("Total Memory", getTotalRam())
|
.put("Total Memory", getTotalRam())
|
||||||
.put("CPU", getCpuInfo())
|
.put("CPU", getCpuInfo())
|
||||||
.putAll(listAllGraphicsCards())
|
.putAll(listAllGraphicsCards())
|
||||||
.buildTo(DebugInformation::registerBothInfo);
|
.buildTo(DebugInformation::registerBothInfo);
|
||||||
|
|
||||||
DebugInfoSection.builder("Other Mods")
|
DebugInfoSection.builder("Other Mods")
|
||||||
.putAll(listAllOtherMods())
|
.putAll(listAllOtherMods())
|
||||||
.buildTo(DebugInformation::registerBothInfo);
|
.buildTo(DebugInformation::registerBothInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getVersionOfMod(String id) {
|
public static String getVersionOfMod(String id) {
|
||||||
return ModList.get().getModContainerById(id)
|
return ModList.get().getModContainerById(id)
|
||||||
.map(mod -> mod.getModInfo().getVersion().toString())
|
.map(mod -> mod.getModInfo().getVersion().toString())
|
||||||
.orElse("None");
|
.orElse("None");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Collection<InfoElement> listAllOtherMods() {
|
public static Collection<InfoElement> listAllOtherMods() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue