mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-01-07 19:28:58 +01:00
Filter for "Update 1.21" feature flag in classic creative screen
Updating the ItemRegistryDiff would cause the inventory to be broken on 1.21 feature pack servers
This commit is contained in:
parent
f105bd8667
commit
d6d3494ae6
@ -24,7 +24,9 @@ import de.florianmichael.viafabricplus.screen.VFPScreen;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.resource.featuretoggle.FeatureFlags;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -55,6 +57,7 @@ public class GridItemSelectionScreen extends VFPScreen {
|
||||
final List<Item> allowedItems = new ArrayList<>();
|
||||
// Calculate all visible items
|
||||
for (Item item : Registries.ITEM) {
|
||||
if (item == Items.AIR || item.getRequiredFeatures().contains(FeatureFlags.UPDATE_1_21)) continue;
|
||||
if (ItemRegistryDiff.keepItem(item)) {
|
||||
allowedItems.add(item);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user