Update to 1.21.4
This commit is contained in:
parent
fb52a6580f
commit
00fef620d5
@ -3,19 +3,19 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://modmuss50.me/fabric.html
|
# check these on https://modmuss50.me/fabric.html
|
||||||
|
|
||||||
minecraft_version=1.21.3
|
minecraft_version=1.21.4
|
||||||
yarn_mappings=1.21.3+build.2
|
yarn_mappings=1.21.4+build.1
|
||||||
loader_version=0.16.9
|
loader_version=0.16.9
|
||||||
|
|
||||||
# Fabric API
|
# Fabric API
|
||||||
fabric_version=0.107.0+1.21.3
|
fabric_version=0.110.5+1.21.4
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=3.3.1
|
mod_version=3.3.2
|
||||||
maven_group=systems.brn
|
maven_group=systems.brn
|
||||||
archives_base_name=Serverstorage
|
archives_base_name=Serverstorage
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
polymer_version=0.10.1+1.21.3
|
polymer_version=0.11.0+1.21.4-rc1
|
||||||
server_translations_api_version=2.4.0+1.21.2-rc1
|
server_translations_api_version=2.4.0+1.21.2-rc1
|
||||||
servergui_version=1.7.2+1.21.2
|
servergui_version=1.8.1+1.21.4
|
@ -2,7 +2,6 @@ package systems.brn.serverstorage.items;
|
|||||||
|
|
||||||
import eu.pb4.polymer.core.api.item.PolymerBlockItem;
|
import eu.pb4.polymer.core.api.item.PolymerBlockItem;
|
||||||
import eu.pb4.polymer.core.api.item.PolymerItem;
|
import eu.pb4.polymer.core.api.item.PolymerItem;
|
||||||
import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils;
|
|
||||||
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
|
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
@ -23,7 +22,7 @@ public class SimpleBlockItem extends PolymerBlockItem implements PolymerItem {
|
|||||||
|
|
||||||
public SimpleBlockItem(Item.Settings settings, Block block, Identifier identifier) {
|
public SimpleBlockItem(Item.Settings settings, Block block, Identifier identifier) {
|
||||||
super(block, settings, Items.BARRIER);
|
super(block, settings, Items.BARRIER);
|
||||||
this.polymerModel = PolymerResourcePackUtils.getBridgedModelId(identifier.withPath("item/" + identifier.getPath()));
|
this.polymerModel = identifier.withPath("item/" + identifier.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2,7 +2,6 @@ package systems.brn.serverstorage.items;
|
|||||||
|
|
||||||
import eu.pb4.polymer.core.api.item.PolymerItem;
|
import eu.pb4.polymer.core.api.item.PolymerItem;
|
||||||
import eu.pb4.polymer.core.api.item.SimplePolymerItem;
|
import eu.pb4.polymer.core.api.item.SimplePolymerItem;
|
||||||
import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils;
|
|
||||||
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
|
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemGroup;
|
import net.minecraft.item.ItemGroup;
|
||||||
@ -25,7 +24,7 @@ public class SimpleItem extends SimplePolymerItem implements PolymerItem {
|
|||||||
|
|
||||||
public SimpleItem(Settings settings, Identifier identifier) {
|
public SimpleItem(Settings settings, Identifier identifier) {
|
||||||
super(settings, Items.STICK);
|
super(settings, Items.STICK);
|
||||||
this.polymerModel = PolymerResourcePackUtils.getBridgedModelId(identifier.withPath("item/" + identifier.getPath()));
|
this.polymerModel = identifier.withPath("item/" + identifier.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -152,7 +152,7 @@ public class Util {
|
|||||||
|
|
||||||
// Count the occurrences of each ingredient in the recipe
|
// Count the occurrences of each ingredient in the recipe
|
||||||
for (Ingredient ingredient : recipe.value().getIngredientPlacement().getIngredients()) {
|
for (Ingredient ingredient : recipe.value().getIngredientPlacement().getIngredients()) {
|
||||||
for (RegistryEntry<Item> item : ingredient.getMatchingItems()) {
|
for (RegistryEntry<Item> item : ingredient.getMatchingItems().toList()) {
|
||||||
ingredientCounts.put(item.value(), ingredientCounts.getOrDefault(item.value(), 0) + 1);
|
ingredientCounts.put(item.value(), ingredientCounts.getOrDefault(item.value(), 0) + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -163,7 +163,7 @@ public class Util {
|
|||||||
int totalAvailable = 0;
|
int totalAvailable = 0;
|
||||||
HashMap<ItemStack, Integer> inputsTemp = new HashMap<>();
|
HashMap<ItemStack, Integer> inputsTemp = new HashMap<>();
|
||||||
|
|
||||||
for (RegistryEntry<Item> item : ingredient.getMatchingItems()) {
|
for (RegistryEntry<Item> item : ingredient.getMatchingItems().toList()) {
|
||||||
for (Map.Entry<ItemStack, Integer> entry : itemStackMap.entrySet()) {
|
for (Map.Entry<ItemStack, Integer> entry : itemStackMap.entrySet()) {
|
||||||
ItemStack inventoryStack = entry.getKey();
|
ItemStack inventoryStack = entry.getKey();
|
||||||
int inventoryCount = entry.getValue();
|
int inventoryCount = entry.getValue();
|
||||||
|
@ -167,7 +167,7 @@ public class CraftingScreen extends PagedGui implements Searchable {
|
|||||||
ItemStack playerStack = playerInventory.getStack(i);
|
ItemStack playerStack = playerInventory.getStack(i);
|
||||||
if (ingredient.test(playerStack)) {
|
if (ingredient.test(playerStack)) {
|
||||||
ItemStack stackToRemove = playerStack.copy();
|
ItemStack stackToRemove = playerStack.copy();
|
||||||
for (RegistryEntry<Item> matchingItemx : ingredient.getMatchingItems()) {
|
for (RegistryEntry<Item> matchingItemx : ingredient.getMatchingItems().toList()) {
|
||||||
Item matchingItem = matchingItemx.value();
|
Item matchingItem = matchingItemx.value();
|
||||||
if (matchingItem == stackToRemove.getItem()) {
|
if (matchingItem == stackToRemove.getItem()) {
|
||||||
stackToRemove.setCount(1); // Set count to ingredient requirement
|
stackToRemove.setCount(1); // Set count to ingredient requirement
|
||||||
@ -179,7 +179,7 @@ public class CraftingScreen extends PagedGui implements Searchable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check storage network
|
// Check storage network
|
||||||
for (RegistryEntry<Item> itemx : ingredient.getMatchingItems()) {
|
for (RegistryEntry<Item> itemx : ingredient.getMatchingItems().toList()) {
|
||||||
Item item = itemx.value();
|
Item item = itemx.value();
|
||||||
if (this.storageScreen.getNetwork().canRemove(item.getDefaultStack())) {
|
if (this.storageScreen.getNetwork().canRemove(item.getDefaultStack())) {
|
||||||
ItemStack stackToRemove = item.getDefaultStack();
|
ItemStack stackToRemove = item.getDefaultStack();
|
||||||
|
Loading…
Reference in New Issue
Block a user