Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Fluids #55

Open
wants to merge 4 commits into
base: 1.20
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 65 additions & 60 deletions src/main/java/com/tterrag/registrate/AbstractRegistrate.java
Original file line number Diff line number Diff line change
Expand Up @@ -1022,160 +1022,165 @@ public <T extends BlockEntity, P> BlockEntityBuilder<T, P> blockEntity(P parent,

// Fluids

public FluidBuilder<ForgeFlowingFluid.Flowing, S> fluid() {
public FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, S> fluid() {
return fluid(self());
}

public FluidBuilder<ForgeFlowingFluid.Flowing, S> fluid(FluidBuilder.FluidTypeFactory typeFactory) {
public FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, S> fluid(FluidBuilder.FluidTypeFactory typeFactory) {
return fluid(self(), typeFactory);
}

public FluidBuilder<ForgeFlowingFluid.Flowing, S> fluid(NonNullSupplier<FluidType> fluidType) {
public FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, S> fluid(NonNullSupplier<FluidType> fluidType) {
return fluid(self(), fluidType);
}

public FluidBuilder<ForgeFlowingFluid.Flowing, S> fluid(ResourceLocation stillTexture, ResourceLocation flowingTexture) {
public FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, S> fluid(ResourceLocation stillTexture, ResourceLocation flowingTexture) {
return fluid(self(), stillTexture, flowingTexture);
}

public FluidBuilder<ForgeFlowingFluid.Flowing, S> fluid(ResourceLocation stillTexture, ResourceLocation flowingTexture, FluidBuilder.FluidTypeFactory typeFactory) {
public FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, S> fluid(ResourceLocation stillTexture, ResourceLocation flowingTexture, FluidBuilder.FluidTypeFactory typeFactory) {
return fluid(self(), stillTexture, flowingTexture, typeFactory);
}

public FluidBuilder<ForgeFlowingFluid.Flowing, S> fluid(ResourceLocation stillTexture, ResourceLocation flowingTexture, NonNullSupplier<FluidType> fluidType) {
public FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, S> fluid(ResourceLocation stillTexture, ResourceLocation flowingTexture, NonNullSupplier<FluidType> fluidType) {
return fluid(self(), stillTexture, flowingTexture, fluidType);
}

public <T extends ForgeFlowingFluid> FluidBuilder<T, S> fluid(ResourceLocation stillTexture, ResourceLocation flowingTexture,
NonNullFunction<ForgeFlowingFluid.Properties, T> fluidFactory) {
return fluid(self(), stillTexture, flowingTexture, fluidFactory);
public <TSource extends ForgeFlowingFluid, TFlowing extends ForgeFlowingFluid> FluidBuilder<TSource, TFlowing, S>
fluid(ResourceLocation stillTexture, ResourceLocation flowingTexture, NonNullFunction<ForgeFlowingFluid.Properties, TSource> sourceFactory,
NonNullFunction<ForgeFlowingFluid.Properties, TFlowing> flowingFactory) {
return fluid(self(), stillTexture, flowingTexture, sourceFactory, flowingFactory);
}

public <T extends ForgeFlowingFluid> FluidBuilder<T, S> fluid(ResourceLocation stillTexture, ResourceLocation flowingTexture,
FluidBuilder.FluidTypeFactory typeFactory, NonNullFunction<ForgeFlowingFluid.Properties, T> fluidFactory) {
return fluid(self(), stillTexture, flowingTexture, typeFactory, fluidFactory);
public <TSource extends ForgeFlowingFluid, TFlowing extends ForgeFlowingFluid> FluidBuilder<TSource, TFlowing, S>
fluid(ResourceLocation stillTexture, ResourceLocation flowingTexture, FluidBuilder.FluidTypeFactory typeFactory, NonNullFunction<ForgeFlowingFluid.Properties, TSource> sourceFactory,
NonNullFunction<ForgeFlowingFluid.Properties, TFlowing> flowingFactory) {
return fluid(self(), stillTexture, flowingTexture, typeFactory, sourceFactory, flowingFactory);
}

public <T extends ForgeFlowingFluid> FluidBuilder<T, S> fluid(ResourceLocation stillTexture, ResourceLocation flowingTexture,
NonNullSupplier<FluidType> fluidType, NonNullFunction<ForgeFlowingFluid.Properties, T> fluidFactory) {
return fluid(self(), stillTexture, flowingTexture, fluidType, fluidFactory);
public <TSource extends ForgeFlowingFluid, TFlowing extends ForgeFlowingFluid> FluidBuilder<TSource, TFlowing, S>
fluid(ResourceLocation stillTexture, ResourceLocation flowingTexture, NonNullSupplier<FluidType> fluidType, NonNullFunction<ForgeFlowingFluid.Properties, TSource> sourceFactory,
NonNullFunction<ForgeFlowingFluid.Properties, TFlowing> flowingFactory) {
return fluid(self(), stillTexture, flowingTexture, fluidType, sourceFactory, flowingFactory);
}

public FluidBuilder<ForgeFlowingFluid.Flowing, S> fluid(String name) {
public FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, S> fluid(String name) {
return fluid(self(), name);
}

public FluidBuilder<ForgeFlowingFluid.Flowing, S> fluid(String name, FluidBuilder.FluidTypeFactory typeFactory) {
public FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, S> fluid(String name, FluidBuilder.FluidTypeFactory typeFactory) {
return fluid(self(), name, typeFactory);
}

public FluidBuilder<ForgeFlowingFluid.Flowing, S> fluid(String name, NonNullSupplier<FluidType> fluidType) {
public FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, S> fluid(String name, NonNullSupplier<FluidType> fluidType) {
return fluid(self(), name, fluidType);
}

public FluidBuilder<ForgeFlowingFluid.Flowing, S> fluid(String name, ResourceLocation stillTexture, ResourceLocation flowingTexture) {
public FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, S> fluid(String name, ResourceLocation stillTexture, ResourceLocation flowingTexture) {
return fluid(self(), name, stillTexture, flowingTexture);
}

public FluidBuilder<ForgeFlowingFluid.Flowing, S> fluid(String name, ResourceLocation stillTexture, ResourceLocation flowingTexture, FluidBuilder.FluidTypeFactory typeFactory) {
public FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, S> fluid(String name, ResourceLocation stillTexture, ResourceLocation flowingTexture, FluidBuilder.FluidTypeFactory typeFactory) {
return fluid(self(), name, stillTexture, flowingTexture, typeFactory);
}

public FluidBuilder<ForgeFlowingFluid.Flowing, S> fluid(String name, ResourceLocation stillTexture, ResourceLocation flowingTexture, NonNullSupplier<FluidType> fluidType) {
public FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, S> fluid(String name, ResourceLocation stillTexture, ResourceLocation flowingTexture, NonNullSupplier<FluidType> fluidType) {
return fluid(self(), name, stillTexture, flowingTexture, fluidType);
}

public <T extends ForgeFlowingFluid> FluidBuilder<T, S> fluid(String name, ResourceLocation stillTexture, ResourceLocation flowingTexture,
NonNullFunction<ForgeFlowingFluid.Properties, T> fluidFactory) {
return fluid(self(), name, stillTexture, flowingTexture, fluidFactory);
public <TSource extends ForgeFlowingFluid, TFlowing extends ForgeFlowingFluid, P> FluidBuilder<TSource, TFlowing, S> fluid(String name, ResourceLocation stillTexture, ResourceLocation flowingTexture,
NonNullFunction<ForgeFlowingFluid.Properties, TSource> sourceFactory, NonNullFunction<ForgeFlowingFluid.Properties, TFlowing> flowingFactory) {
return fluid(self(), name, stillTexture, flowingTexture, sourceFactory, flowingFactory);
}

public <T extends ForgeFlowingFluid> FluidBuilder<T, S> fluid(String name, ResourceLocation stillTexture, ResourceLocation flowingTexture,
FluidBuilder.FluidTypeFactory typeFactory, NonNullFunction<ForgeFlowingFluid.Properties, T> fluidFactory) {
return fluid(self(), name, stillTexture, flowingTexture, typeFactory, fluidFactory);
public <TSource extends ForgeFlowingFluid, TFlowing extends ForgeFlowingFluid, P> FluidBuilder<TSource, TFlowing, S> fluid(String name, ResourceLocation stillTexture, ResourceLocation flowingTexture,
FluidBuilder.FluidTypeFactory typeFactory, NonNullFunction<ForgeFlowingFluid.Properties, TSource> sourceFactory, NonNullFunction<ForgeFlowingFluid.Properties, TFlowing> flowingFactory) {
return fluid(self(), name, stillTexture, flowingTexture, typeFactory, sourceFactory, flowingFactory);
}

public <T extends ForgeFlowingFluid> FluidBuilder<T, S> fluid(String name, ResourceLocation stillTexture, ResourceLocation flowingTexture,
NonNullSupplier<FluidType> fluidType, NonNullFunction<ForgeFlowingFluid.Properties, T> fluidFactory) {
return fluid(self(), name, stillTexture, flowingTexture, fluidType, fluidFactory);
public <TSource extends ForgeFlowingFluid, TFlowing extends ForgeFlowingFluid, P> FluidBuilder<TSource, TFlowing, S> fluid(String name, ResourceLocation stillTexture, ResourceLocation flowingTexture,
NonNullSupplier<FluidType> fluidType, NonNullFunction<ForgeFlowingFluid.Properties, TSource> sourceFactory, NonNullFunction<ForgeFlowingFluid.Properties, TFlowing> flowingFactory) {
return fluid(self(), name, stillTexture, flowingTexture, fluidType, sourceFactory, flowingFactory);
}

public <P> FluidBuilder<ForgeFlowingFluid.Flowing, P> fluid(P parent) {
public <P> FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, P> fluid(P parent) {
return fluid(parent, currentName());
}

public <P> FluidBuilder<ForgeFlowingFluid.Flowing, P> fluid(P parent, FluidBuilder.FluidTypeFactory typeFactory) {
public <P> FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, P> fluid(P parent, FluidBuilder.FluidTypeFactory typeFactory) {
return fluid(parent, currentName(), typeFactory);
}

public <P> FluidBuilder<ForgeFlowingFluid.Flowing, P> fluid(P parent, NonNullSupplier<FluidType> fluidType) {
public <P> FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, P> fluid(P parent, NonNullSupplier<FluidType> fluidType) {
return fluid(parent, currentName(), fluidType);
}

public <P> FluidBuilder<ForgeFlowingFluid.Flowing, P> fluid(P parent, ResourceLocation stillTexture, ResourceLocation flowingTexture) {
public <P> FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, P> fluid(P parent, ResourceLocation stillTexture, ResourceLocation flowingTexture) {
return fluid(parent, currentName(), stillTexture, flowingTexture);
}

public <P> FluidBuilder<ForgeFlowingFluid.Flowing, P> fluid(P parent, ResourceLocation stillTexture, ResourceLocation flowingTexture, FluidBuilder.FluidTypeFactory typeFactory) {
public <P> FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, P> fluid(P parent, ResourceLocation stillTexture, ResourceLocation flowingTexture, FluidBuilder.FluidTypeFactory typeFactory) {
return fluid(parent, currentName(), stillTexture, flowingTexture, typeFactory);
}

public <P> FluidBuilder<ForgeFlowingFluid.Flowing, P> fluid(P parent, ResourceLocation stillTexture, ResourceLocation flowingTexture, NonNullSupplier<FluidType> fluidType) {
public <P> FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, P> fluid(P parent, ResourceLocation stillTexture, ResourceLocation flowingTexture, NonNullSupplier<FluidType> fluidType) {
return fluid(parent, currentName(), stillTexture, flowingTexture, fluidType);
}

public <T extends ForgeFlowingFluid, P> FluidBuilder<T, P> fluid(P parent, ResourceLocation stillTexture, ResourceLocation flowingTexture,
NonNullFunction<ForgeFlowingFluid.Properties, T> fluidFactory) {
return fluid(parent, currentName(), stillTexture, flowingTexture, fluidFactory);
public <TSource extends ForgeFlowingFluid, TFlowing extends ForgeFlowingFluid, P> FluidBuilder<TSource, TFlowing, P> fluid(P parent, ResourceLocation stillTexture, ResourceLocation flowingTexture,
NonNullFunction<ForgeFlowingFluid.Properties, TSource> sourceFactory, NonNullFunction<ForgeFlowingFluid.Properties, TFlowing> flowingFactory) {
return fluid(parent, currentName(), stillTexture, flowingTexture, sourceFactory, flowingFactory);
}

public <T extends ForgeFlowingFluid, P> FluidBuilder<T, P> fluid(P parent, ResourceLocation stillTexture, ResourceLocation flowingTexture,
FluidBuilder.FluidTypeFactory typeFactory, NonNullFunction<ForgeFlowingFluid.Properties, T> fluidFactory) {
return fluid(parent, currentName(), stillTexture, flowingTexture, typeFactory, fluidFactory);
public <TSource extends ForgeFlowingFluid, TFlowing extends ForgeFlowingFluid, P> FluidBuilder<TSource, TFlowing, P> fluid(P parent, ResourceLocation stillTexture, ResourceLocation flowingTexture,
FluidBuilder.FluidTypeFactory typeFactory, NonNullFunction<ForgeFlowingFluid.Properties, TSource> sourceFactory, NonNullFunction<ForgeFlowingFluid.Properties, TFlowing> flowingFactory) {
return fluid(parent, currentName(), stillTexture, flowingTexture, typeFactory, sourceFactory, flowingFactory);
}

public <T extends ForgeFlowingFluid, P> FluidBuilder<T, P> fluid(P parent, ResourceLocation stillTexture, ResourceLocation flowingTexture,
NonNullSupplier<FluidType> fluidType, NonNullFunction<ForgeFlowingFluid.Properties, T> fluidFactory) {
return fluid(parent, currentName(), stillTexture, flowingTexture, fluidType, fluidFactory);
public <TSource extends ForgeFlowingFluid, TFlowing extends ForgeFlowingFluid, P> FluidBuilder<TSource, TFlowing, P> fluid(P parent, ResourceLocation stillTexture, ResourceLocation flowingTexture,
NonNullSupplier<FluidType> fluidType, NonNullFunction<ForgeFlowingFluid.Properties, TSource> sourceFactory, NonNullFunction<ForgeFlowingFluid.Properties, TFlowing> flowingFactory) {
return fluid(parent, currentName(), stillTexture, flowingTexture, fluidType, sourceFactory, flowingFactory);
}

public <P> FluidBuilder<ForgeFlowingFluid.Flowing, P> fluid(P parent, String name) {
public <P> FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, P> fluid(P parent, String name) {
return fluid(parent, name, new ResourceLocation(getModid(), "block/" + currentName() + "_still"), new ResourceLocation(getModid(), "block/" + currentName() + "_flow"));
}

public <P> FluidBuilder<ForgeFlowingFluid.Flowing, P> fluid(P parent, String name, FluidBuilder.FluidTypeFactory typeFactory) {
public <P> FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, P> fluid(P parent, String name, FluidBuilder.FluidTypeFactory typeFactory) {
return fluid(parent, name, new ResourceLocation(getModid(), "block/" + currentName() + "_still"), new ResourceLocation(getModid(), "block/" + currentName() + "_flow"), typeFactory);
}

public <P> FluidBuilder<ForgeFlowingFluid.Flowing, P> fluid(P parent, String name, NonNullSupplier<FluidType> fluidType) {
public <P> FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, P> fluid(P parent, String name, NonNullSupplier<FluidType> fluidType) {
return fluid(parent, name, new ResourceLocation(getModid(), "block/" + currentName() + "_still"), new ResourceLocation(getModid(), "block/" + currentName() + "_flow"), fluidType);
}

public <P> FluidBuilder<ForgeFlowingFluid.Flowing, P> fluid(P parent, String name, ResourceLocation stillTexture, ResourceLocation flowingTexture) {
public <P> FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, P> fluid(P parent, String name, ResourceLocation stillTexture, ResourceLocation flowingTexture) {
return entry(name, callback -> FluidBuilder.create(this, parent, name, callback, stillTexture, flowingTexture));
}

public <P> FluidBuilder<ForgeFlowingFluid.Flowing, P> fluid(P parent, String name, ResourceLocation stillTexture, ResourceLocation flowingTexture, FluidBuilder.FluidTypeFactory typeFactory) {
public <P> FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, P> fluid(P parent, String name, ResourceLocation stillTexture, ResourceLocation flowingTexture, FluidBuilder.FluidTypeFactory typeFactory) {
return entry(name, callback -> FluidBuilder.create(this, parent, name, callback, stillTexture, flowingTexture, typeFactory));
}

public <P> FluidBuilder<ForgeFlowingFluid.Flowing, P> fluid(P parent, String name, ResourceLocation stillTexture, ResourceLocation flowingTexture, NonNullSupplier<FluidType> fluidType) {
public <P> FluidBuilder<ForgeFlowingFluid.Source, ForgeFlowingFluid.Flowing, P> fluid(P parent, String name, ResourceLocation stillTexture, ResourceLocation flowingTexture, NonNullSupplier<FluidType> fluidType) {
return entry(name, callback -> FluidBuilder.create(this, parent, name, callback, stillTexture, flowingTexture, fluidType));
}

public <T extends ForgeFlowingFluid, P> FluidBuilder<T, P> fluid(P parent, String name, ResourceLocation stillTexture, ResourceLocation flowingTexture,
NonNullFunction<ForgeFlowingFluid.Properties, T> fluidFactory) {
return entry(name, callback -> FluidBuilder.create(this, parent, name, callback, stillTexture, flowingTexture, fluidFactory));
public <TSource extends ForgeFlowingFluid, TFlowing extends ForgeFlowingFluid, P> FluidBuilder<TSource, TFlowing, P>
fluid(P parent, String name, ResourceLocation stillTexture, ResourceLocation flowingTexture, NonNullFunction<ForgeFlowingFluid.Properties, TSource> sourceFactory, NonNullFunction<ForgeFlowingFluid.Properties, TFlowing> flowingFactory) {
return entry(name, callback -> FluidBuilder.create(this, parent, name, callback, stillTexture, flowingTexture, sourceFactory, flowingFactory));
}

public <T extends ForgeFlowingFluid, P> FluidBuilder<T, P> fluid(P parent, String name, ResourceLocation stillTexture, ResourceLocation flowingTexture,
FluidBuilder.FluidTypeFactory typeFactory, NonNullFunction<ForgeFlowingFluid.Properties, T> fluidFactory) {
return entry(name, callback -> FluidBuilder.create(this, parent, name, callback, stillTexture, flowingTexture, typeFactory, fluidFactory));
public <TSource extends ForgeFlowingFluid, TFlowing extends ForgeFlowingFluid, P> FluidBuilder<TSource, TFlowing, P>
fluid(P parent, String name, ResourceLocation stillTexture, ResourceLocation flowingTexture, FluidBuilder.FluidTypeFactory typeFactory, NonNullFunction<ForgeFlowingFluid.Properties, TSource> sourceFactory,
NonNullFunction<ForgeFlowingFluid.Properties, TFlowing> flowingFactory) {
return entry(name, callback -> FluidBuilder.create(this, parent, name, callback, stillTexture, flowingTexture, typeFactory, sourceFactory, flowingFactory));
}

public <T extends ForgeFlowingFluid, P> FluidBuilder<T, P> fluid(P parent, String name, ResourceLocation stillTexture, ResourceLocation flowingTexture,
NonNullSupplier<FluidType> fluidType, NonNullFunction<ForgeFlowingFluid.Properties, T> fluidFactory) {
return entry(name, callback -> FluidBuilder.create(this, parent, name, callback, stillTexture, flowingTexture, fluidType, fluidFactory));
public <TSource extends ForgeFlowingFluid, TFlowing extends ForgeFlowingFluid, P> FluidBuilder<TSource, TFlowing, P>
fluid(P parent, String name, ResourceLocation stillTexture, ResourceLocation flowingTexture, NonNullSupplier<FluidType> fluidType, NonNullFunction<ForgeFlowingFluid.Properties, TSource> sourceFactory,
NonNullFunction<ForgeFlowingFluid.Properties, TFlowing> flowingFactory) {
return entry(name, callback -> FluidBuilder.create(this, parent, name, callback, stillTexture, flowingTexture, fluidType, sourceFactory, flowingFactory));
}

// Menu
Expand Down
Loading