Revert "[ci skip] Add LiquidBlock.arch$getFluid and fix MixinFoodPropertiesBuilder (#314)" (#315)

This reverts commit 21bed670de.
This commit is contained in:
shedaniel
2022-08-11 19:04:34 +08:00
committed by GitHub
parent 21bed670de
commit ab80a6a77f
17 changed files with 0 additions and 353 deletions

View File

@@ -1,22 +1,3 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.extensions.injected; package dev.architectury.extensions.injected;
import dev.architectury.hooks.fluid.FluidBucketHooks; import dev.architectury.hooks.fluid.FluidBucketHooks;

View File

@@ -1,30 +0,0 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.extensions.injected;
import dev.architectury.hooks.fluid.LiquidBlockHooks;
import net.minecraft.world.level.block.LiquidBlock;
import net.minecraft.world.level.material.FlowingFluid;
public interface InjectedLiquidBlockExtension {
default FlowingFluid arch$getFluid() {
return LiquidBlockHooks.getFluid((LiquidBlock) this);
}
}

View File

@@ -1,38 +0,0 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.hooks.fluid;
import dev.architectury.injectables.annotations.ExpectPlatform;
import net.minecraft.world.level.block.LiquidBlock;
import net.minecraft.world.level.material.FlowingFluid;
public final class LiquidBlockHooks {
/**
* Returns the fluid contained in the liquid block.
* This requires special handling since forge defers the fiuid.
*
* @param block the liquid block
* @return the fluid contained in the liquid block
*/
@ExpectPlatform
public static FlowingFluid getFluid(LiquidBlock block) {
throw new AssertionError();
}
}

View File

@@ -1,22 +1,3 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.mixin.inject; package dev.architectury.mixin.inject;
import dev.architectury.extensions.injected.InjectedBlockExtension; import dev.architectury.extensions.injected.InjectedBlockExtension;

View File

@@ -1,22 +1,3 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.mixin.inject; package dev.architectury.mixin.inject;
import dev.architectury.extensions.injected.InjectedBucketItemExtension; import dev.architectury.extensions.injected.InjectedBucketItemExtension;

View File

@@ -1,22 +1,3 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.mixin.inject; package dev.architectury.mixin.inject;
import dev.architectury.extensions.injected.InjectedEntityTypeExtension; import dev.architectury.extensions.injected.InjectedEntityTypeExtension;

View File

@@ -1,22 +1,3 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.mixin.inject; package dev.architectury.mixin.inject;
import dev.architectury.extensions.injected.InjectedFluidExtension; import dev.architectury.extensions.injected.InjectedFluidExtension;

View File

@@ -1,28 +0,0 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.mixin.inject;
import dev.architectury.extensions.injected.InjectedFoodPropertiesBuilderExtension;
import net.minecraft.world.food.FoodProperties;
import org.spongepowered.asm.mixin.Mixin;
@Mixin(FoodProperties.Builder.class)
public class MixinFoodPropertiesBuilder implements InjectedFoodPropertiesBuilderExtension {
}

View File

@@ -1,22 +1,3 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.mixin.inject; package dev.architectury.mixin.inject;
import dev.architectury.extensions.injected.InjectedGameEventExtension; import dev.architectury.extensions.injected.InjectedGameEventExtension;

View File

@@ -1,22 +1,3 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.mixin.inject; package dev.architectury.mixin.inject;
import dev.architectury.extensions.injected.InjectedItemExtension; import dev.architectury.extensions.injected.InjectedItemExtension;

View File

@@ -1,28 +0,0 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.mixin.inject;
import dev.architectury.extensions.injected.InjectedLiquidBlockExtension;
import net.minecraft.world.level.block.LiquidBlock;
import org.spongepowered.asm.mixin.Mixin;
@Mixin(LiquidBlock.class)
public class MixinLiquidBlock implements InjectedLiquidBlockExtension {
}

View File

@@ -10,10 +10,8 @@
"inject.MixinBucketItem", "inject.MixinBucketItem",
"inject.MixinEntityType", "inject.MixinEntityType",
"inject.MixinFluid", "inject.MixinFluid",
"inject.MixinFoodPropertiesBuilder",
"inject.MixinGameEvent", "inject.MixinGameEvent",
"inject.MixinItem", "inject.MixinItem",
"inject.MixinLiquidBlock",
"MixinLightningBolt" "MixinLightningBolt"
], ],
"injectors": { "injectors": {

View File

@@ -21,9 +21,6 @@
], ],
"net/minecraft/class_4174$class_4175": [ "net/minecraft/class_4174$class_4175": [
"dev/architectury/extensions/injected/InjectedFoodPropertiesBuilderExtension" "dev/architectury/extensions/injected/InjectedFoodPropertiesBuilderExtension"
],
"net/minecraft/class_2404": [
"dev/architectury/extensions/injected/InjectedLiquidBlockExtension"
] ]
} }
} }

View File

@@ -1,30 +0,0 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.hooks.fluid.fabric;
import dev.architectury.mixin.fabric.LiquidBlockAccessor;
import net.minecraft.world.level.block.LiquidBlock;
import net.minecraft.world.level.material.FlowingFluid;
public class LiquidBlockHooksImpl {
public static FlowingFluid getFluid(LiquidBlock block) {
return ((LiquidBlockAccessor) block).getFluid();
}
}

View File

@@ -1,31 +0,0 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.mixin.fabric;
import net.minecraft.world.level.block.LiquidBlock;
import net.minecraft.world.level.material.FlowingFluid;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(LiquidBlock.class)
public interface LiquidBlockAccessor {
@Accessor("fluid")
FlowingFluid getFluid();
}

View File

@@ -28,7 +28,6 @@
"BucketItemAccessor", "BucketItemAccessor",
"ExplosionPreInvoker", "ExplosionPreInvoker",
"HorseTameInvoker", "HorseTameInvoker",
"LiquidBlockAccessor",
"LivingDeathInvoker", "LivingDeathInvoker",
"MixinBaseSpawner", "MixinBaseSpawner",
"MixinBlockItem", "MixinBlockItem",

View File

@@ -1,29 +0,0 @@
/*
* This file is part of architectury.
* Copyright (C) 2020, 2021, 2022 architectury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package dev.architectury.hooks.fluid.forge;
import net.minecraft.world.level.block.LiquidBlock;
import net.minecraft.world.level.material.FlowingFluid;
public class LiquidBlockHooksImpl {
public static FlowingFluid getFluid(LiquidBlock block) {
return block.getFluid();
}
}