Updated to work with 1.18.2.
This commit is contained in:
@@ -12,7 +12,7 @@ apply plugin: 'net.minecraftforge.gradle'
|
|||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
version = '1.18.1-2.33'
|
version = '1.18-2.34'
|
||||||
group = 'nl.requios.effortlessbuilding' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
group = 'nl.requios.effortlessbuilding' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
archivesBaseName = 'effortlessbuilding'
|
archivesBaseName = 'effortlessbuilding'
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ minecraft {
|
|||||||
// stable_# Stables are built at the discretion of the MCP team.
|
// stable_# Stables are built at the discretion of the MCP team.
|
||||||
// Use non-default mappings at your own risk. they may not always work.
|
// Use non-default mappings at your own risk. they may not always work.
|
||||||
// Simply re-run your setup task after changing the mappings to update your workspace.
|
// Simply re-run your setup task after changing the mappings to update your workspace.
|
||||||
mappings channel: 'official', version: '1.18.1'
|
mappings channel: 'official', version: '1.18.2'
|
||||||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||||
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ dependencies {
|
|||||||
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
|
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
|
||||||
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
|
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
|
||||||
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
|
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
|
||||||
minecraft 'net.minecraftforge:forge:1.18.1-39.0.9'
|
minecraft 'net.minecraftforge:forge:1.18.2-40.0.19'
|
||||||
|
|
||||||
// Real mod deobf dependency examples - these get remapped to your current mappings
|
// Real mod deobf dependency examples - these get remapped to your current mappings
|
||||||
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
|
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package nl.requios.effortlessbuilding.helper;
|
package nl.requios.effortlessbuilding.helper;
|
||||||
|
|
||||||
import net.minecraft.advancements.CriteriaTriggers;
|
import net.minecraft.advancements.CriteriaTriggers;
|
||||||
|
import net.minecraft.core.Registry;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.tags.BlockTags;
|
import net.minecraft.tags.BlockTags;
|
||||||
import net.minecraft.tags.Tag;
|
import net.minecraft.tags.Tag;
|
||||||
@@ -233,7 +234,7 @@ public class SurvivalHelper {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//From EntityPlayer#canPlayerEdit
|
//From Player#mayUseItemAt
|
||||||
private static boolean canPlayerEdit(Player player, Level world, BlockPos pos, ItemStack stack) {
|
private static boolean canPlayerEdit(Player player, Level world, BlockPos pos, ItemStack stack) {
|
||||||
if (!world.mayInteract(player, pos)) return false;
|
if (!world.mayInteract(player, pos)) return false;
|
||||||
|
|
||||||
@@ -242,9 +243,8 @@ public class SurvivalHelper {
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
//Adventure mode
|
//Adventure mode
|
||||||
BlockInWorld blockworldstate = new BlockInWorld(world, pos, false);
|
BlockInWorld blockinworld = new BlockInWorld(world, pos, false);
|
||||||
return stack.hasAdventureModePlaceTagForBlock(world.getTagManager(), blockworldstate);
|
return stack.hasAdventureModePlaceTagForBlock(world.registryAccess().registryOrThrow(Registry.BLOCK_REGISTRY), blockinworld);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user