mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Patch Production II
- Fixed crash when shift-clicking items in the package filter UI #7497 - Fixed crash caused by the create menu button when loaded too early #7521 - Safety check for fan processing type view crashing #7499 (Might be a concurrency issue, maybe investigate this further)
This commit is contained in:
parent
91b6072f21
commit
e0ab2796bd
4 changed files with 18 additions and 6 deletions
|
@ -7,8 +7,8 @@ org.gradle.caching = true
|
||||||
|
|
||||||
# mod version info
|
# mod version info
|
||||||
# build_info_mod_version is the version that gets filled into CreateBuildInfo.java
|
# build_info_mod_version is the version that gets filled into CreateBuildInfo.java
|
||||||
mod_version = 6.0.0
|
mod_version = 6.0.1
|
||||||
build_info_mod_version = 6.0.0
|
build_info_mod_version = 6.0.1
|
||||||
artifact_minecraft_version = 1.20.1
|
artifact_minecraft_version = 1.20.1
|
||||||
|
|
||||||
minecraft_version = 1.20.1
|
minecraft_version = 1.20.1
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class FanProcessingTypeRegistry {
|
||||||
|
|
||||||
@UnmodifiableView
|
@UnmodifiableView
|
||||||
public static List<FanProcessingType> getSortedTypesView() {
|
public static List<FanProcessingType> getSortedTypesView() {
|
||||||
if (sortedTypes == null) {
|
if (sortedTypes == null || sortedTypesView == null) {
|
||||||
sortedTypes = new ReferenceArrayList<>();
|
sortedTypes = new ReferenceArrayList<>();
|
||||||
|
|
||||||
CreateBuiltInRegistries.FAN_PROCESSING_TYPE.forEach(sortedTypes::add);
|
CreateBuiltInRegistries.FAN_PROCESSING_TYPE.forEach(sortedTypes::add);
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.simibubi.create.AllMenuTypes;
|
||||||
import net.minecraft.client.gui.components.EditBox;
|
import net.minecraft.client.gui.components.EditBox;
|
||||||
import net.minecraft.network.FriendlyByteBuf;
|
import net.minecraft.network.FriendlyByteBuf;
|
||||||
import net.minecraft.world.entity.player.Inventory;
|
import net.minecraft.world.entity.player.Inventory;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.inventory.MenuType;
|
import net.minecraft.world.inventory.MenuType;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraftforge.items.ItemStackHandler;
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
@ -62,5 +63,10 @@ public class PackageFilterMenu extends AbstractFilterMenu {
|
||||||
filterItem.getOrCreateTag()
|
filterItem.getOrCreateTag()
|
||||||
.putString("Address", address);
|
.putString("Address", address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack quickMoveStack(Player playerIn, int index) {
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ import net.minecraft.client.gui.screens.PauseScreen;
|
||||||
import net.minecraft.client.gui.screens.Screen;
|
import net.minecraft.client.gui.screens.Screen;
|
||||||
import net.minecraft.client.gui.screens.TitleScreen;
|
import net.minecraft.client.gui.screens.TitleScreen;
|
||||||
import net.minecraft.client.resources.language.I18n;
|
import net.minecraft.client.resources.language.I18n;
|
||||||
|
import net.minecraft.client.resources.model.BakedModel;
|
||||||
import net.minecraft.network.chat.CommonComponents;
|
import net.minecraft.network.chat.CommonComponents;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
|
||||||
|
@ -30,15 +31,20 @@ import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
|
|
||||||
public class OpenCreateMenuButton extends Button {
|
public class OpenCreateMenuButton extends Button {
|
||||||
|
|
||||||
public static final ItemStack ICON = AllItems.GOGGLES.asStack();
|
|
||||||
|
|
||||||
public OpenCreateMenuButton(int x, int y) {
|
public OpenCreateMenuButton(int x, int y) {
|
||||||
super(x, y, 20, 20, CommonComponents.EMPTY, OpenCreateMenuButton::click, DEFAULT_NARRATION);
|
super(x, y, 20, 20, CommonComponents.EMPTY, OpenCreateMenuButton::click, DEFAULT_NARRATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderString(GuiGraphics graphics, Font pFont, int pColor) {
|
public void renderString(GuiGraphics graphics, Font pFont, int pColor) {
|
||||||
graphics.renderItem(ICON, getX() + 2, getY() + 2);
|
ItemStack icon = AllItems.GOGGLES.asStack();
|
||||||
|
BakedModel bakedmodel = Minecraft.getInstance()
|
||||||
|
.getItemRenderer()
|
||||||
|
.getModel(icon, Minecraft.getInstance().level, Minecraft.getInstance().player, 0);
|
||||||
|
if (bakedmodel == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
graphics.renderItem(icon, getX() + 2, getY() + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void click(Button b) {
|
public static void click(Button b) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue