21w19a
This commit is contained in:
1 parent
4542612bc8
commit
727bdd7b1a
8 files changed
+31
-30
No files matched your search
+3
-11
@@ -3,8 +3,8 @@ plugins {
|
|||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_16
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = JavaVersion.VERSION_16
|
||||||
|
|
||||||
archivesBaseName = project.archives_base_name
|
archivesBaseName = project.archives_base_name
|
||||||
version = project.minecraft_version+'-'+project.mod_version+'+v'+new Date().format('yyMMdd')
|
version = project.minecraft_version+'-'+project.mod_version+'+v'+new Date().format('yyMMdd')
|
||||||
@@ -52,16 +52,8 @@ tasks.withType(JavaCompile).configureEach {
|
|||||||
// If Javadoc is generated, this must be specified in that task too.
|
// If Javadoc is generated, this must be specified in that task too.
|
||||||
it.options.encoding = "UTF-8"
|
it.options.encoding = "UTF-8"
|
||||||
|
|
||||||
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
|
|
||||||
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
|
|
||||||
// We'll use that if it's available, but otherwise we'll use the older option.
|
|
||||||
def targetVersion = 8
|
|
||||||
if (JavaVersion.current().isJava9Compatible()) {
|
|
||||||
it.options.release = targetVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
// Minecraft 1.17 (21w19a) upwards uses Java 16.
|
// Minecraft 1.17 (21w19a) upwards uses Java 16.
|
||||||
//it.options.release = 16
|
it.options.release = 16
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
|||||||
+3
-3
@@ -4,10 +4,10 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
# or better: https://modmuss50.me/fabric.html
|
# or better: https://modmuss50.me/fabric.html
|
||||||
minecraft_version=21w18a
|
minecraft_version=21w19a
|
||||||
yarn_mappings=21w18a+build.10
|
yarn_mappings=21w19a+build.2
|
||||||
loader_version=0.11.3
|
loader_version=0.11.3
|
||||||
fabric_version=0.34.3+1.17
|
fabric_version=0.34.4+1.17
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.4.36
|
mod_version = 1.4.36
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ public class FeatureGenerator
|
|||||||
findFirst().map(Map.Entry::getValue).orElse(null);
|
findFirst().map(Map.Entry::getValue).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T extends FeatureConfig> StructureStart shouldStructureStartAt(ServerWorld world, BlockPos pos, StructureFeature<T> structure, boolean computeBox)
|
synchronized public static <T extends FeatureConfig> StructureStart shouldStructureStartAt(ServerWorld world, BlockPos pos, StructureFeature<T> structure, boolean computeBox)
|
||||||
{
|
{
|
||||||
long seed = world.getSeed();
|
long seed = world.getSeed();
|
||||||
ChunkGenerator generator = world.getChunkManager().getChunkGenerator();
|
ChunkGenerator generator = world.getChunkManager().getChunkGenerator();
|
||||||
|
|||||||
@@ -1,25 +1,31 @@
|
|||||||
package carpet.mixins;
|
package carpet.mixins;
|
||||||
|
|
||||||
import carpet.CarpetSettings;
|
import carpet.CarpetSettings;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Material;
|
import net.minecraft.block.Material;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.MiningToolItem;
|
||||||
import net.minecraft.item.PickaxeItem;
|
import net.minecraft.item.PickaxeItem;
|
||||||
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.tag.Tag;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
//import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
//import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
|
|
||||||
@Mixin(PickaxeItem.class)
|
@Mixin(PickaxeItem.class)
|
||||||
public class PickaxeItem_missingToolsMixin
|
public class PickaxeItem_missingToolsMixin extends MiningToolItem
|
||||||
{
|
{
|
||||||
@Redirect(method = "getMiningSpeedMultiplier", at = @At(
|
|
||||||
value = "INVOKE",
|
protected PickaxeItem_missingToolsMixin(float attackDamage, float attackSpeed, ToolMaterial material, Tag<Block> tag, Settings settings) {
|
||||||
target = "Lnet/minecraft/block/BlockState;getMaterial()Lnet/minecraft/block/Material;"
|
super(attackDamage, attackSpeed, material, tag, settings);
|
||||||
))
|
}
|
||||||
private Material getCustomMaterial(BlockState blockState)
|
|
||||||
{
|
@Override
|
||||||
Material material = blockState.getMaterial();
|
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) {
|
||||||
|
Material material = state.getMaterial();
|
||||||
if (CarpetSettings.missingTools && material == Material.GLASS)
|
if (CarpetSettings.missingTools && material == Material.GLASS)
|
||||||
material = Material.STONE;
|
return miningSpeed;
|
||||||
return material;
|
return super.getMiningSpeedMultiplier(stack, state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -189,7 +189,8 @@ public class FileArgument
|
|||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
{
|
{
|
||||||
throw new ThrowStatement("Unable to open zip file: "+zipContainer, Throwables.IO_EXCEPTION);
|
return null; // undr java 16 no file throws IOException - will take care of it later
|
||||||
|
//throw new ThrowStatement("Unable to open zip file: "+zipContainer, Throwables.IO_EXCEPTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return zfs.getPath(resource+(isFolder?"/":type.extension));
|
return zfs.getPath(resource+(isFolder?"/":type.extension));
|
||||||
|
|||||||
@@ -3,3 +3,4 @@ accessWidener v1 named
|
|||||||
accessible class net/minecraft/server/world/ThreadedAnvilChunkStorage$TicketManager
|
accessible class net/minecraft/server/world/ThreadedAnvilChunkStorage$TicketManager
|
||||||
accessible class net/minecraft/server/world/ServerLightingProvider$Stage
|
accessible class net/minecraft/server/world/ServerLightingProvider$Stage
|
||||||
accessible class net/minecraft/recipe/Ingredient$Entry
|
accessible class net/minecraft/recipe/Ingredient$Entry
|
||||||
|
accessible class net/minecraft/world/chunk/light/BlockLightStorage$Data
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"required": true,
|
"required": true,
|
||||||
"refmap": "fabric-carpet-refmap.json",
|
"refmap": "fabric-carpet-refmap.json",
|
||||||
"package": "carpet.mixins",
|
"package": "carpet.mixins",
|
||||||
"compatibilityLevel": "JAVA_8",
|
"compatibilityLevel": "JAVA_16",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"SpawnHelperInnerMixin",
|
"SpawnHelperInnerMixin",
|
||||||
"CommandManagerMixin",
|
"CommandManagerMixin",
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
"depends": {
|
"depends": {
|
||||||
"minecraft": "1.17.x",
|
"minecraft": "1.17.x",
|
||||||
"fabricloader": ">=0.7.1"
|
"fabricloader": ">=0.11.3",
|
||||||
|
"java": ">=16"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user