mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 06:53:20 +00:00
Forge 1.19.3
Created a CreativeModeTabEvent to register creative mode tabs and populate entries per tab Moved datapack registries to DataPackRegistryEvent.NewRegistry event instead of tying them to ForgeRegistry Made it easier for mods to datagen datapack builtin entries with DatapackBuiltinEntriesProvider Provided access to lookupProvider for datagen Updated dependencies to match versions used by vanilla and update JarJar to 0.3.18 Added a test mod for the new CreativeModeTabEvent Throws better error message for Forge registries in tag datagen Deleted ForgeRegistryTagsProvider Updated ClientChatReceivedEvent and ServerChatEvent for Mojang changes Added patches for both sign related methods in ModelLayers Changed RegisterShadersEvent to use ResourceProvider Migrated old Mojang math types to JOML Co-authored-by: Marc Hermans <[email protected]> Co-authored-by: LexManos <[email protected]> Co-authored-by: sciwhiz12 <[email protected]> Co-authored-by: coehlrich <[email protected]>
This commit is contained in:
1 parent
617ecb7ad3
commit
8255d7aed3
726 files changed
+7615
-6653
No files matched your search
@@ -8,6 +8,7 @@ package net.minecraftforge.fluids;
|
||||
import com.mojang.serialization.Codec;
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
@@ -15,7 +16,6 @@ import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class FluidStack
|
||||
|
||||
public static final Codec<FluidStack> CODEC = RecordCodecBuilder.create(
|
||||
instance -> instance.group(
|
||||
Registry.FLUID.byNameCodec().fieldOf("FluidName").forGetter(FluidStack::getFluid),
|
||||
BuiltInRegistries.FLUID.byNameCodec().fieldOf("FluidName").forGetter(FluidStack::getFluid),
|
||||
Codec.INT.fieldOf("Amount").forGetter(FluidStack::getAmount),
|
||||
CompoundTag.CODEC.optionalFieldOf("Tag").forGetter(stack -> Optional.ofNullable(stack.getTag()))
|
||||
).apply(instance, (fluid, amount, tag) -> {
|
||||
|
||||
@@ -7,6 +7,7 @@ package net.minecraftforge.fluids;
|
||||
|
||||
import java.util.Optional;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
@@ -75,15 +76,15 @@ public abstract class ForgeFlowingFluid extends FlowingFluid
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canConvertToSource()
|
||||
protected boolean canConvertToSource(Level level)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConvertToSource(FluidState state, LevelReader reader, BlockPos pos)
|
||||
public boolean canConvertToSource(FluidState state, Level level, BlockPos pos)
|
||||
{
|
||||
return this.getFluidType().canConvertToSource(state, reader, pos);
|
||||
return this.getFluidType().canConvertToSource(state, level, pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user