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
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
run: echo "JAVA_HOME=$JAVA_HOME_21_X64" >> "$GITHUB_ENV"
|
||||
|
||||
- name: ModDevGradle Cache
|
||||
uses: actions/cache@v4
|
||||
|
@ -35,4 +32,5 @@ jobs:
|
|||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Artifacts
|
||||
path: build/libs/
|
||||
|
|
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
|
@ -10,10 +10,7 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
run: echo "JAVA_HOME=$JAVA_HOME_21_X64" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup Gradle
|
||||
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 replaceProperties = [
|
||||
mod_version : mod_version,
|
||||
|
@ -262,6 +271,10 @@ publishing {
|
|||
register('mavenJava', MavenPublication) {
|
||||
artifactId base.archivesName.get()
|
||||
from components.java
|
||||
|
||||
artifact(tasks.jar) {
|
||||
classifier = "all"
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
|
@ -284,7 +297,7 @@ publishing {
|
|||
}
|
||||
|
||||
publishMods {
|
||||
file = jar.archiveFile
|
||||
file = reobfJar.archiveFile
|
||||
changelog = ChangelogText.getChangelogText(project).toString()
|
||||
type = STABLE
|
||||
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
|
||||
------------------------------------------------------
|
||||
|
|
|
@ -23,8 +23,8 @@ registrate_version = MC1.21-1.3.0+62
|
|||
|
||||
# Dependency Versions
|
||||
flywheel_minecraft_version = 1.21.1
|
||||
flywheel_version = 1.0.0-9
|
||||
vanillin_version = 1.0.0-beta-9
|
||||
flywheel_version = 1.0.0-10
|
||||
vanillin_version = 1.0.0-beta-10
|
||||
flywheel_version_range = [1.0.0,2.0)
|
||||
ponder_version = 1.0.39
|
||||
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.virtualWorld.VirtualRenderWorld;
|
||||
|
||||
import net.minecraftforge.client.model.data.ModelData;
|
||||
|
||||
import dev.engine_room.flywheel.api.material.CardinalLightingMode;
|
||||
import dev.engine_room.flywheel.api.model.Model;
|
||||
import dev.engine_room.flywheel.api.task.Plan;
|
||||
|
@ -132,7 +134,7 @@ public class ContraptionVisual<E extends AbstractContraptionEntity> extends Abst
|
|||
}
|
||||
|
||||
@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());
|
||||
if (visualizer == null) {
|
||||
return;
|
||||
|
@ -182,17 +184,17 @@ public class ContraptionVisual<E extends AbstractContraptionEntity> extends Abst
|
|||
@Override
|
||||
public Plan<TickableVisual.Context> planTick() {
|
||||
return NestedPlan.of(
|
||||
ForEachPlan.of(() -> actors, ActorVisual::tick),
|
||||
tickableVisuals
|
||||
ForEachPlan.of(() -> actors, ActorVisual::tick),
|
||||
tickableVisuals
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Plan<DynamicVisual.Context> planFrame() {
|
||||
return NestedPlan.of(
|
||||
RunnablePlan.of(this::beginFrame),
|
||||
ForEachPlan.of(() -> actors, ActorVisual::beginFrame),
|
||||
dynamicVisuals
|
||||
RunnablePlan.of(this::beginFrame),
|
||||
ForEachPlan.of(() -> actors, ActorVisual::beginFrame),
|
||||
dynamicVisuals
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -201,7 +203,7 @@ public class ContraptionVisual<E extends AbstractContraptionEntity> extends Abst
|
|||
setEmbeddingMatrices(partialTick);
|
||||
|
||||
if (hasMovedSections()) {
|
||||
sectionCollector.sections(collectLightSections());
|
||||
sectionCollector.sections(collectLightSections());
|
||||
}
|
||||
|
||||
if (hasMovedBlocks()) {
|
||||
|
@ -282,13 +284,13 @@ public class ContraptionVisual<E extends AbstractContraptionEntity> extends Abst
|
|||
int maxY = maxLight(boundingBox.maxY);
|
||||
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() {
|
||||
var boundingBox = entity.getBoundingBox();
|
||||
|
||||
var minSectionX = minLightSection(boundingBox.minX);
|
||||
var minSectionX = minLightSection(boundingBox.minX);
|
||||
var minSectionY = minLightSection(boundingBox.minY);
|
||||
var minSectionZ = minLightSection(boundingBox.minZ);
|
||||
int maxSectionX = maxLightSection(boundingBox.maxX);
|
||||
|
|
|
@ -22,12 +22,12 @@ import net.minecraft.world.phys.BlockHitResult;
|
|||
import net.neoforged.neoforge.common.SpecialPlantable;
|
||||
|
||||
public class AllPotatoProjectileBlockHitActions {
|
||||
|
||||
|
||||
static {
|
||||
register("plant_crop", PlantCrop.CODEC);
|
||||
register("place_block_on_ground", PlaceBlockOnGround.CODEC);
|
||||
}
|
||||
|
||||
|
||||
public static void init() {
|
||||
}
|
||||
|
||||
|
|
|
@ -8,9 +8,17 @@ import com.simibubi.create.AllItems;
|
|||
import com.simibubi.create.AllSoundEvents;
|
||||
import com.simibubi.create.foundation.item.render.SimpleCustomRenderer;
|
||||
|
||||
import net.createmod.catnip.platform.CatnipServices;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
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.util.Mth;
|
||||
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.LivingEntity;
|
||||
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.monster.Spider;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.ItemStack.TooltipPart;
|
||||
import net.minecraft.world.item.SwordItem;
|
||||
import net.minecraft.world.item.crafting.RecipeType;
|
||||
import net.minecraft.world.item.enchantment.Enchantment;
|
||||
import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
||||
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
|
||||
public class CardboardSwordItem extends SwordItem {
|
||||
|
||||
|
@ -73,7 +72,7 @@ public class CardboardSwordItem extends SwordItem {
|
|||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public static void cardboardSwordsCannotHurtYou(AttackEntityEvent event) {
|
||||
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;
|
||||
ItemStack stack = attacker.getItemInHand(InteractionHand.MAIN_HAND);
|
||||
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.PotionContents;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
|
||||
import net.minecraft.world.item.crafting.RecipeHolder;
|
||||
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 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.Chaser;
|
||||
import net.createmod.catnip.math.VecHelper;
|
||||
import net.createmod.catnip.nbt.NBTHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
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.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.Chaser;
|
||||
import net.createmod.catnip.codecs.CatnipCodecUtils;
|
||||
|
@ -734,13 +739,16 @@ public class FactoryPanelBehaviour extends FilteringBehaviour implements MenuPro
|
|||
}
|
||||
|
||||
RequestPromiseQueue promises = Create.LOGISTICS.getQueuedPromises(network);
|
||||
if (promises == null)
|
||||
return 0;
|
||||
|
||||
if (forceClearPromises) {
|
||||
promises.forceClear(item);
|
||||
resetTimerSlightly();
|
||||
}
|
||||
forceClearPromises = false;
|
||||
|
||||
return promises == null ? 0 : promises.getTotalPromisedAndRemoveExpired(item, getPromiseExpiryTimeInTicks());
|
||||
return promises.getTotalPromisedAndRemoveExpired(item, getPromiseExpiryTimeInTicks());
|
||||
}
|
||||
|
||||
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.RecipeHolder;
|
||||
import net.minecraft.world.item.crafting.RecipeType;
|
||||
|
||||
import net.minecraft.world.item.crafting.ShapedRecipe;
|
||||
|
||||
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.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.Direction;
|
||||
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()
|
||||
.hasNeighborSignal(context.getClickedPos()))
|
||||
.hasNeighborSignal(context.getClickedPos()))
|
||||
.setValue(FACING, preferredFacing);
|
||||
}
|
||||
|
||||
|
@ -97,7 +102,7 @@ public class PackagerBlock extends WrenchableDirectionalBlock implements IBE<Pac
|
|||
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
|
||||
if (AllBlocks.FACTORY_GAUGE.isIn(stack))
|
||||
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;
|
||||
if (AllBlocks.PACKAGE_FROGPORT.isIn(stack))
|
||||
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) {
|
||||
super.onNeighborChange(state, level, pos, neighbor);
|
||||
if (neighbor.relative(state.getOptionalValue(FACING)
|
||||
.orElse(Direction.UP))
|
||||
.orElse(Direction.UP))
|
||||
.equals(pos))
|
||||
withBlockEntityDo(level, pos, PackagerBlockEntity::triggerStockCheck);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, Level worldIn, BlockPos pos, Block blockIn, BlockPos fromPos,
|
||||
boolean isMoving) {
|
||||
boolean isMoving) {
|
||||
if (worldIn.isClientSide)
|
||||
return;
|
||||
boolean previouslyPowered = state.getValue(POWERED);
|
||||
|
@ -197,12 +202,12 @@ public class PackagerBlock extends WrenchableDirectionalBlock implements IBE<Pac
|
|||
@Override
|
||||
public int getAnalogOutputSignal(BlockState pState, Level pLevel, BlockPos pPos) {
|
||||
return getBlockEntityOptional(pLevel, pPos).map(pbe -> {
|
||||
boolean empty = pbe.inventory.getStackInSlot(0)
|
||||
.isEmpty();
|
||||
if (pbe.animationTicks != 0)
|
||||
empty = false;
|
||||
return empty ? 0 : 15;
|
||||
})
|
||||
boolean empty = pbe.inventory.getStackInSlot(0)
|
||||
.isEmpty();
|
||||
if (pbe.animationTicks != 0)
|
||||
empty = false;
|
||||
return empty ? 0 : 15;
|
||||
})
|
||||
.orElse(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.core.GlobalPos;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
|
@ -38,12 +40,12 @@ public class GlobalLogisticsManager {
|
|||
LogisticsNetwork network = logisticsNetworks.get(networkId);
|
||||
return network == null || network.owner == null || network.owner.equals(player.getUUID());
|
||||
}
|
||||
|
||||
|
||||
public boolean isLockable(UUID networkId) {
|
||||
LogisticsNetwork network = logisticsNetworks.get(networkId);
|
||||
return network != null;
|
||||
}
|
||||
|
||||
|
||||
public boolean isLocked(UUID networkId) {
|
||||
LogisticsNetwork network = logisticsNetworks.get(networkId);
|
||||
return network != null && network.locked;
|
||||
|
@ -86,6 +88,7 @@ public class GlobalLogisticsManager {
|
|||
return logisticsNetwork.totalLinks.size() - logisticsNetwork.loadedLinks.size();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public RequestPromiseQueue getQueuedPromises(UUID networkId) {
|
||||
return !logisticsNetworks.containsKey(networkId) ? null : logisticsNetworks.get(networkId).panelPromises;
|
||||
}
|
||||
|
|
|
@ -134,7 +134,6 @@ public class StockKeeperCategoryScreen extends AbstractSimiContainerScreen<Stock
|
|||
if (!empty) {
|
||||
String value = editorEditBox.getValue();
|
||||
stackInSlot.set(DataComponents.CUSTOM_NAME, value.isBlank() ? null : Component.literal(value));
|
||||
|
||||
if (editingIndex == -1)
|
||||
schedule.add(stackInSlot);
|
||||
else
|
||||
|
|
|
@ -1012,7 +1012,7 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
|||
public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) {
|
||||
boolean lmb = pButton == GLFW.GLFW_MOUSE_BUTTON_LEFT;
|
||||
boolean rmb = pButton == GLFW.GLFW_MOUSE_BUTTON_RIGHT;
|
||||
|
||||
|
||||
// Search
|
||||
if (rmb && searchBox.isMouseOver(pMouseX, pMouseY)) {
|
||||
searchBox.setValue("");
|
||||
|
@ -1021,7 +1021,7 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
|||
searchBox.setFocused(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (addressBox.isFocused()) {
|
||||
if (addressBox.isHovered())
|
||||
return addressBox.mouseClicked(pMouseX, pMouseY, pButton);
|
||||
|
@ -1077,17 +1077,17 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
|||
int indexOf = entry.targetBECategory;
|
||||
if (indexOf >= blockEntity.categories.size())
|
||||
continue;
|
||||
|
||||
|
||||
if (!entry.hidden) {
|
||||
hiddenCategories.add(indexOf);
|
||||
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 1f, 1.5f);
|
||||
}
|
||||
|
||||
|
||||
else {
|
||||
hiddenCategories.remove(indexOf);
|
||||
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 1f, 0.675f);
|
||||
}
|
||||
|
||||
|
||||
refreshSearchNextTick = true;
|
||||
moveToTopNextTick = false;
|
||||
return true;
|
||||
|
@ -1157,6 +1157,7 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
|||
public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) {
|
||||
if (addressBox.mouseScrolled(mouseX, mouseY, scrollX, scrollY))
|
||||
return true;
|
||||
|
||||
Couple<Integer> hoveredSlot = getHoveredSlot((int) mouseX, (int) mouseY);
|
||||
boolean noHover = hoveredSlot == noneHovered;
|
||||
|
||||
|
@ -1333,7 +1334,7 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
|||
continue;
|
||||
forcedEntries.add(toOrder.stack.copy(), -1 - Math.max(0, countOf - toOrder.count));
|
||||
}
|
||||
|
||||
|
||||
PackageOrder craftingRequest = PackageOrder.empty();
|
||||
if (canRequestCraftingPackage && !itemsToOrder.isEmpty() && !recipesToOrder.isEmpty())
|
||||
if (recipesToOrder.get(0).recipe instanceof CraftingRecipe cr)
|
||||
|
@ -1467,7 +1468,7 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
canRequestCraftingPackage = false;
|
||||
if (recipesToOrder.size() != 1)
|
||||
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.WhistleSize;
|
||||
|
||||
import net.createmod.catnip.nbt.NBTHelper;
|
||||
import net.createmod.catnip.data.Pair;
|
||||
import net.createmod.catnip.nbt.NBTHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.NbtUtils;
|
||||
|
@ -135,8 +135,7 @@ public class ArrivalSoundQueue {
|
|||
if (state.getBlock() instanceof NoteBlock nb) {
|
||||
float f = (float) Math.pow(2, (state.getValue(NoteBlock.NOTE) - 12) / 12.0);
|
||||
playSimple(entity, state.getValue(NoteBlock.INSTRUMENT)
|
||||
.getSoundEvent()
|
||||
.value(), 1, f);
|
||||
.getSoundEvent().value(), 1, f);
|
||||
}
|
||||
|
||||
if (state.getBlock() instanceof WhistleBlock && info.nbt() != null) {
|
||||
|
|
|
@ -184,12 +184,12 @@ public class CarriageContraption extends Contraption {
|
|||
|
||||
return super.capture(world, pos);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected BlockEntity readBlockEntity(Level level, StructureBlockInfo info, CompoundTag tag) {
|
||||
if (info.state().getBlock() instanceof AbstractBogeyBlock<?> bogey && !bogey.captureBlockEntityForTrain())
|
||||
return null; // Bogeys are typically rendered by the carriage contraption, not the BE
|
||||
|
||||
|
||||
return super.readBlockEntity(level, info, tag);
|
||||
}
|
||||
|
||||
|
|
|
@ -88,13 +88,13 @@ public interface ValueSettingsBehaviour extends ClipboardCloneable {
|
|||
default boolean bypassesInput(ItemStack mainhandItem) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
default boolean mayInteract(Player player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
default int netId() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,13 +2,15 @@ package com.simibubi.create.foundation.mixin.client;
|
|||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
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 net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.client.player.AbstractClientPlayer;
|
||||
import net.minecraft.client.player.LocalPlayer;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
||||
@Mixin(LocalPlayer.class)
|
||||
public abstract class HeavyBootsOnPlayerMixin extends AbstractClientPlayer {
|
||||
|
@ -16,8 +18,10 @@ public abstract class HeavyBootsOnPlayerMixin extends AbstractClientPlayer {
|
|||
super(level, profile);
|
||||
}
|
||||
|
||||
@ModifyReturnValue(method = "isUnderWater()Z", at = @At("RETURN"))
|
||||
private boolean create$noSwimmingWithHeavyBootsOn(boolean original) {
|
||||
return getPersistentData().contains("HeavyBoots") || original;
|
||||
@Inject(method = "isUnderWater()Z", at = @At("HEAD"), cancellable = true)
|
||||
public void create$noSwimmingWithHeavyBootsOn(CallbackInfoReturnable<Boolean> cir) {
|
||||
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.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.backend.Backend;
|
||||
import dev.engine_room.flywheel.api.backend.BackendManager;
|
||||
|
@ -68,45 +73,45 @@ public class DebugInformation {
|
|||
|
||||
static {
|
||||
DebugInfoSection.builder(Create.NAME)
|
||||
.put("Mod Version", CreateBuildInfo.VERSION)
|
||||
.put("NeoForge Version", getVersionOfMod("neoforge"))
|
||||
.put("Minecraft Version", SharedConstants.getCurrentVersion().getName())
|
||||
.buildTo(DebugInformation::registerBothInfo);
|
||||
.put("Mod Version", CreateBuildInfo.VERSION)
|
||||
.put("NeoForge Version", getVersionOfMod("neoforge"))
|
||||
.put("Minecraft Version", SharedConstants.getCurrentVersion().getName())
|
||||
.buildTo(DebugInformation::registerBothInfo);
|
||||
|
||||
CatnipServices.PLATFORM.executeOnClientOnly(() -> () -> {
|
||||
DebugInfoSection.builder("Graphics")
|
||||
.put("Flywheel Version", ModList.get()
|
||||
.getModContainerById(Flywheel.ID)
|
||||
.map(c -> c.getModInfo()
|
||||
.getVersion()
|
||||
.toString())
|
||||
.orElse("None"))
|
||||
.put("Flywheel Backend", () -> Backend.REGISTRY.getIdOrThrow(BackendManager.currentBackend()).toString())
|
||||
.put("OpenGL Renderer", GlUtil::getRenderer)
|
||||
.put("OpenGL Version", GlUtil::getOpenGLVersion)
|
||||
.put("Graphics Mode", () -> Minecraft.getInstance().options.graphicsMode().get().getKey())
|
||||
.buildTo(DebugInformation::registerClientInfo);
|
||||
.put("Flywheel Version", ModList.get()
|
||||
.getModContainerById(Flywheel.ID)
|
||||
.map(c -> c.getModInfo()
|
||||
.getVersion()
|
||||
.toString())
|
||||
.orElse("None"))
|
||||
.put("Flywheel Backend", () -> Backend.REGISTRY.getIdOrThrow(BackendManager.currentBackend()).toString())
|
||||
.put("OpenGL Renderer", GlUtil::getRenderer)
|
||||
.put("OpenGL Version", GlUtil::getOpenGLVersion)
|
||||
.put("Graphics Mode", () -> I18n.get(Minecraft.getInstance().options.graphicsMode().get().getKey()))
|
||||
.buildTo(DebugInformation::registerClientInfo);
|
||||
});
|
||||
|
||||
DebugInfoSection.builder("System Information")
|
||||
.put("Operating System", SystemReportAccessor.getOPERATING_SYSTEM())
|
||||
.put("Java Version", SystemReportAccessor.getJAVA_VERSION())
|
||||
.put("JVM Flags", getMcSystemInfo("JVM Flags"))
|
||||
.put("Memory", () -> getMcSystemInfo("Memory"))
|
||||
.put("Total Memory", getTotalRam())
|
||||
.put("CPU", getCpuInfo())
|
||||
.putAll(listAllGraphicsCards())
|
||||
.buildTo(DebugInformation::registerBothInfo);
|
||||
.put("Operating System", SystemReportAccessor.getOPERATING_SYSTEM())
|
||||
.put("Java Version", SystemReportAccessor.getJAVA_VERSION())
|
||||
.put("JVM Flags", getMcSystemInfo("JVM Flags"))
|
||||
.put("Memory", () -> getMcSystemInfo("Memory"))
|
||||
.put("Total Memory", getTotalRam())
|
||||
.put("CPU", getCpuInfo())
|
||||
.putAll(listAllGraphicsCards())
|
||||
.buildTo(DebugInformation::registerBothInfo);
|
||||
|
||||
DebugInfoSection.builder("Other Mods")
|
||||
.putAll(listAllOtherMods())
|
||||
.buildTo(DebugInformation::registerBothInfo);
|
||||
.putAll(listAllOtherMods())
|
||||
.buildTo(DebugInformation::registerBothInfo);
|
||||
}
|
||||
|
||||
public static String getVersionOfMod(String id) {
|
||||
return ModList.get().getModContainerById(id)
|
||||
.map(mod -> mod.getModInfo().getVersion().toString())
|
||||
.orElse("None");
|
||||
.map(mod -> mod.getModInfo().getVersion().toString())
|
||||
.orElse("None");
|
||||
}
|
||||
|
||||
public static Collection<InfoElement> listAllOtherMods() {
|
||||
|
|
Loading…
Add table
Reference in a new issue