Skip to content

Commit

Permalink
updated to 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Oct 28, 2023
1 parent 31e190b commit 229e8af
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation("com.blamejared.crafttweaker:CraftTweaker-fabric-1.18.2:${project.crafttweaker_version}")
modImplementation("com.blamejared.crafttweaker:CraftTweaker-fabric-1.19.2:${project.crafttweaker_version}")
}

processResources {
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.3
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.3
loader_version=0.14.6

# Mod Properties
Expand All @@ -13,5 +13,5 @@ maven_group = trinsdar
archives_base_name = ct-fabric-fluid-support

# Dependencies
fabric_version=0.53.0+1.18.2
crafttweaker_version=9.1.162
fabric_version=0.76.0+1.19.2
crafttweaker_version=10.1.50
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.blamejared.crafttweaker.api.annotation.ZenRegister;
import com.blamejared.crafttweaker.platform.Services;
import com.blamejared.crafttweaker_annotations.annotations.Document;
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceLocation;
import org.openzen.zencode.java.ZenCodeType;

Expand All @@ -22,7 +23,7 @@ public static boolean validateFluidStack(String tokens) {
return false;
}

if(Services.REGISTRY.fluids().containsKey(resourceLocation)) {
if(Registry.FLUID.containsKey(resourceLocation)) {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import com.blamejared.crafttweaker.api.annotation.ZenRegister;
import com.blamejared.crafttweaker.api.bracket.CommandStringDisplayable;
import com.blamejared.crafttweaker.api.data.IData;
import com.blamejared.crafttweaker.api.data.MapData;
import com.blamejared.crafttweaker.platform.Services;
import com.blamejared.crafttweaker_annotations.annotations.Document;
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.material.Fluid;
import org.openzen.zencode.java.ZenCodeType;
Expand All @@ -25,7 +27,7 @@ public interface IFluidStack extends CommandStringDisplayable {
@ZenCodeType.Getter("registryName")
default ResourceLocation getRegistryName() {

return Services.REGISTRY.getRegistryKey(getFluid());
return Registry.FLUID.getKey(getFluid());
}

/**
Expand Down Expand Up @@ -128,7 +130,7 @@ default long getAmount() {
*/
@ZenCodeType.Getter("tag")
@ZenCodeType.Method
MapData getTag();
IData getTag();

/**
* Sets the tag for the FluidStack.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.blamejared.crafttweaker.api.fluid;

import com.blamejared.crafttweaker.api.data.IData;
import com.blamejared.crafttweaker.api.data.MapData;
import com.blamejared.crafttweaker.api.data.base.converter.tag.TagToDataConverter;
import com.blamejared.crafttweaker.api.data.converter.tag.TagToDataConverter;
import net.minecraft.core.Registry;
import net.minecraft.world.level.material.Fluid;
import org.openzen.zencode.java.ZenCodeType;
Expand All @@ -28,7 +29,7 @@ public String getCommandString() {
.append(">");

if(getInternal().hasTag()) {
MapData data = TagToDataConverter.convertCompound(getInternal().tag()).copyInternal();
IData data = TagToDataConverter.convert(getInternal().tag()).copyInternal();
if(!data.isEmpty()) {
builder.append(".withTag(");
builder.append(data.asString());
Expand Down Expand Up @@ -109,9 +110,9 @@ public IFluidStack withTag(@ZenCodeType.Nullable MapData tag) {
}

@Override
public MapData getTag() {
public IData getTag() {

return TagToDataConverter.convertCompound(getInternal().tag());
return TagToDataConverter.convert(getInternal().tag());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.blamejared.crafttweaker.api.fluid;

import com.blamejared.crafttweaker.api.data.IData;
import com.blamejared.crafttweaker.api.data.MapData;
import com.blamejared.crafttweaker.api.data.base.converter.tag.TagToDataConverter;
import com.blamejared.crafttweaker.api.data.converter.tag.TagToDataConverter;
import net.minecraft.core.Registry;
import net.minecraft.world.level.material.Fluid;
import org.openzen.zencode.java.ZenCodeType;
Expand Down Expand Up @@ -69,9 +70,8 @@ public IFluidStack withTag(MapData tag) {
}

@Override
public MapData getTag() {

return TagToDataConverter.convertCompound(getInternal().tag());
public IData getTag() {
return TagToDataConverter.convert(getInternal().tag());
}

@Override
Expand Down Expand Up @@ -102,7 +102,7 @@ public String getCommandString() {
stringBuilder.append(">");

if(getInternal().hasTag()) {
MapData data = TagToDataConverter.convertCompound(getInternal().tag()).copyInternal();
IData data = TagToDataConverter.convert(getInternal().tag()).copyInternal();
if(!data.isEmpty()) {
stringBuilder.append(".withTag(");
stringBuilder.append(data.asString());
Expand Down

0 comments on commit 229e8af

Please sign in to comment.