Skip to content

Commit

Permalink
Update to 1.19.3
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEpicBlock committed Jan 2, 2023
1 parent 8310a1f commit 7c4158f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.19
yarn_mappings=1.19+build.1
loader_version=0.14.6
minecraft_version=1.19.3
yarn_mappings=1.19.3+build.5
loader_version=0.14.12

# Mod Properties
mod_version = 0.3.3
mod_version = 0.3.4
maven_group = nl.theepicblock
archives_base_name = polyconfig

# Dependencies
fabric_version=0.55.1+1.19
fabric_version=0.71.0+1.19.3
polymc_version=5.2.4+1.19.1
2 changes: 1 addition & 1 deletion src/main/java/nl/theepicblock/polyconfig/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import dev.hbeck.kdl.objects.KDLNode;
import dev.hbeck.kdl.objects.KDLString;
import dev.hbeck.kdl.objects.KDLValue;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import nl.theepicblock.polyconfig.block.ConfigFormatException;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import io.github.theepicblock.polymc.api.block.BlockStateMerger;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.registry.Registries;
import net.minecraft.state.property.Property;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import nl.theepicblock.polyconfig.Utils;

import java.util.Map;
Expand All @@ -17,7 +17,7 @@ public class BlockNodeParser {
* @param resultMap the map in which the result will be added.
*/
public static void parseBlockNode(KDLNode node, Map<Identifier, BlockEntry> resultMap) throws ConfigFormatException {
Utils.getFromRegistry(Utils.getSingleArgNoProps(node).getAsString(), "block", Registry.BLOCK, (id, block, isRegex) -> {
Utils.getFromRegistry(Utils.getSingleArgNoProps(node).getAsString(), "block", Registries.BLOCK, (id, block, isRegex) -> {
if (isRegex) {
if (!resultMap.containsKey(id)) {
processBlock(id, block, node, resultMap, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.registry.Registries;
import net.minecraft.state.property.Property;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import nl.theepicblock.polyconfig.PolyConfig;
import nl.theepicblock.polyconfig.Utils;

Expand Down Expand Up @@ -85,7 +85,7 @@ private static BlockReplaceReference parseReplaceNode(KDLNode node) throws Confi
if (replacementArgType.equals("state")) {
var id = Identifier.tryParse(replacementArgAsString);
if (id == null) throw Utils.invalidId(replacementArgAsString);
var block = Registry.BLOCK.getOrEmpty(id).orElseThrow(() -> Utils.notFoundInRegistry(id, "block"));
var block = Registries.BLOCK.getOrEmpty(id).orElseThrow(() -> Utils.notFoundInRegistry(id, "block"));
var forcedValues = new ArrayList<Property.Value<?>>();

for (var entry : node.getProps().entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import dev.hbeck.kdl.objects.KDLNode;
import net.minecraft.entity.EntityType;
import net.minecraft.registry.Registries;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import nl.theepicblock.polyconfig.Utils;
import nl.theepicblock.polyconfig.block.ConfigFormatException;

Expand All @@ -18,7 +18,7 @@ public class EntityNodeParser {
* @param resultMap the map in which the result will be added.
*/
public static void parseEntityNode(KDLNode node, Map<Identifier, EntityEntry> resultMap) throws ConfigFormatException {
Utils.getFromRegistry(Utils.getSingleArgNoProps(node).getAsString(), "entity", Registry.ENTITY_TYPE, (id, entity, isRegex) -> {
Utils.getFromRegistry(Utils.getSingleArgNoProps(node).getAsString(), "entity", Registries.ENTITY_TYPE, (id, entity, isRegex) -> {
if (isRegex) {
if (!resultMap.containsKey(id)) {
processEntity(id, entity, node, resultMap, false);
Expand All @@ -41,7 +41,7 @@ private static void processEntity(Identifier moddedId, EntityType<?> moddedEntit
var baseEntityStr = Utils.getSingleArgNoProps(baseNodes.get(0)).getAsString().getValue();
var baseEntityId = Identifier.tryParse(baseEntityStr);
if (baseEntityId == null) throw Utils.invalidId(baseEntityStr);
var baseEntity = Registry.ENTITY_TYPE.getOrEmpty(baseEntityId)
var baseEntity = Registries.ENTITY_TYPE.getOrEmpty(baseEntityId)
.orElseThrow(() -> new ConfigFormatException("Couldn't find any entity matching "+baseEntityStr)
.withHelp("Try checking the spelling"));

Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"depends": {
"fabricloader": ">=0.14.6",
"java": ">=17",
"polymc": ">=5.2.3"
"polymc": ">=5.2.3",
"minecraft": ">=1.19.3"
}
}

0 comments on commit 7c4158f

Please sign in to comment.