Skip to content

Commit

Permalink
21w03a
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Jan 20, 2021
1 parent 92519af commit 36b77c3
Show file tree
Hide file tree
Showing 31 changed files with 41 additions and 39 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ plugins {
def ENV = System.getenv()

class Globals {
static def baseVersion = "0.29.4"
static def mcVersion = "20w51a"
static def baseVersion = "0.29.5"
static def mcVersion = "21w03a"
static def yarnVersion = "+build.1"
static def loaderVersion = "0.10.5+build.213"
}
Expand Down
2 changes: 1 addition & 1 deletion fabric-biome-api-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
archivesBaseName = "fabric-biome-api-v1"
version = getSubprojectVersion(project, "3.1.2")
version = getSubprojectVersion(project, "3.1.3")

minecraft {
accessWidener = file("src/main/resources/fabric-biome-api-v1.accesswidener")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public interface AddHillsLayerAccessor {
* <p>For example, it contains a mapping for 1 -> 129 where 1 is the raw id of plains, while 129 is the raw id
* of the sunflower plains, which is derived from plains.
*/
@Accessor("field_26727")
@Accessor("MUTATED_BIOMES")
static Int2IntMap getBaseToVariantMap() {
throw new AssertionError("mixin");
}
Expand Down
2 changes: 1 addition & 1 deletion fabric-item-api-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
archivesBaseName = "fabric-item-api-v1"
version = getSubprojectVersion(project, "1.2.2")
version = getSubprojectVersion(project, "1.2.3")

moduleDependencies(project, [
'fabric-api-base'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

@Mixin(LivingEntity.class)
abstract class LivingEntityMixin {
@Inject(method = "method_32326", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/item/ItemStack;getItem()Lnet/minecraft/item/Item;"), cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD)
@Inject(method = "getPreferredEquipmentSlot", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/item/ItemStack;getItem()Lnet/minecraft/item/Item;"), cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD)
private static void onGetPreferredEquipmentSlot(ItemStack stack, CallbackInfoReturnable<EquipmentSlot> info, Item item) {
EquipmentSlotProvider equipmentSlotProvider = ((ItemExtensions) item).fabric_getEquipmentSlotProvider();

Expand Down
2 changes: 1 addition & 1 deletion fabric-key-binding-api-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
archivesBaseName = "fabric-key-binding-api-v1"
version = getSubprojectVersion(project, "1.0.2")
version = getSubprojectVersion(project, "1.0.3")

dependencies {
testmodCompile project(path: ':fabric-api-base', configuration: 'dev')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package net.fabricmc.fabric.api.client.keybinding.v1;

import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;

import net.fabricmc.fabric.impl.client.keybinding.KeyBindingRegistryImpl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.option.KeyBinding;

import net.fabricmc.fabric.mixin.client.keybinding.KeyBindingAccessor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.option.KeyBinding;

@Mixin(KeyBinding.class)
public interface KeyBindingAccessor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;

@Mixin(KeyBinding.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import net.minecraft.client.options.GameOptions;
import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.option.GameOptions;
import net.minecraft.client.option.KeyBinding;

import net.fabricmc.fabric.impl.client.keybinding.KeyBindingRegistryImpl;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

import org.lwjgl.glfw.GLFW;

import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.options.StickyKeyBinding;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.option.StickyKeyBinding;
import net.minecraft.client.util.InputUtil;
import net.minecraft.text.LiteralText;

Expand Down
2 changes: 1 addition & 1 deletion fabric-keybindings-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
archivesBaseName = "fabric-keybindings-v0"
version = getSubprojectVersion(project, "0.2.1")
version = getSubprojectVersion(project, "0.2.2")

moduleDependencies(project, [
'fabric-key-binding-api-v1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package net.fabricmc.fabric.api.client.keybinding;

import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;
import net.minecraft.util.Identifier;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package net.fabricmc.fabric.api.client.keybinding;

import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.option.KeyBinding;

import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.fabricmc.fabric.impl.client.keybinding.KeyBindingRegistryImpl;
Expand Down
2 changes: 1 addition & 1 deletion fabric-lifecycle-events-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
archivesBaseName = "fabric-lifecycle-events-v1"
version = getSubprojectVersion(project, "1.4.1")
version = getSubprojectVersion(project, "1.4.2")

moduleDependencies(project, [
'fabric-api-base'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package net.fabricmc.fabric.mixin.event.lifecycle.client;

import java.util.BitSet;

import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
Expand Down Expand Up @@ -45,7 +47,7 @@ public abstract class ClientChunkManagerMixin {
private ClientWorld world;

@Inject(method = "loadChunkFromPacket", at = @At("TAIL"))
private void onChunkLoad(int x, int z, @Nullable BiomeArray biomes, PacketByteBuf buf, CompoundTag tag, int verticalStripBitmask, CallbackInfoReturnable<WorldChunk> info) {
private void onChunkLoad(int x, int z, @Nullable BiomeArray biomes, PacketByteBuf buf, CompoundTag tag, BitSet verticalStripBitmask, CallbackInfoReturnable<WorldChunk> info) {
ClientChunkEvents.CHUNK_LOAD.invoker().onChunkLoad(this.world, info.getReturnValue());
}

Expand Down
2 changes: 1 addition & 1 deletion fabric-networking-api-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
archivesBaseName = "fabric-networking-api-v1"
version = getSubprojectVersion(project, "1.0.2")
version = getSubprojectVersion(project, "1.0.3")

moduleDependencies(project, [
'fabric-api-base'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public static Collection<ServerPlayerEntity> tracking(Entity entity) {

if (manager instanceof ServerChunkManager) {
ThreadedAnvilChunkStorage storage = ((ServerChunkManager) manager).threadedAnvilChunkStorage;
EntityTrackerAccessor tracker = ((ThreadedAnvilChunkStorageAccessor) storage).getEntityTrackers().get(entity.getEntityId());
EntityTrackerAccessor tracker = ((ThreadedAnvilChunkStorageAccessor) storage).getEntityTrackers().get(entity.getId());

// return an immutable collection to guard against accidental removals.
if (tracker != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
@Mixin(MinecraftClient.class)
public interface MinecraftClientAccessor {
@Nullable
@Accessor
@Accessor("integratedServerConnection")
ClientConnection getConnection();
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.lwjgl.glfw.GLFW;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;
import net.minecraft.util.Identifier;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import org.lwjgl.glfw.GLFW;

import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;

import net.fabricmc.api.ClientModInitializer;
Expand Down
2 changes: 1 addition & 1 deletion fabric-resource-loader-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
archivesBaseName = "fabric-resource-loader-v0"
version = getSubprojectVersion(project, "0.4.2")
version = getSubprojectVersion(project, "0.4.3")

dependencies {
testmodCompile project(path: ':fabric-lifecycle-events-v1', configuration: 'dev')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
@Mixin(CreateWorldScreen.class)
public class CreateWorldScreenMixin {
@Shadow
private ResourcePackManager field_25792;
private ResourcePackManager packManager;

@Inject(method = "method_30296", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ResourcePackManager;scanPacks()V", shift = At.Shift.BEFORE))
private void onScanPacks(CallbackInfoReturnable<Pair<File, ResourcePackManager>> cir) {
// Allow to display built-in data packs in the data pack selection screen at world creation.
((ResourcePackManagerAccessor) this.field_25792).getProviders().add(new ModResourcePackCreator(ResourceType.SERVER_DATA));
((ResourcePackManagerAccessor) this.packManager).getProviders().add(new ModResourcePackCreator(ResourceType.SERVER_DATA));
}

@ModifyArg(method = "method_31130", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/world/CreateWorldScreen;<init>(Lnet/minecraft/client/gui/screen/Screen;Lnet/minecraft/resource/DataPackSettings;Lnet/minecraft/client/gui/screen/world/MoreOptionsDialog;)V"), index = 1)
@ModifyArg(method = "create", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/world/CreateWorldScreen;<init>(Lnet/minecraft/client/gui/screen/Screen;Lnet/minecraft/resource/DataPackSettings;Lnet/minecraft/client/gui/screen/world/MoreOptionsDialog;)V"), index = 1)
private static DataPackSettings onNew(DataPackSettings settings) {
ModResourcePackCreator modResourcePackCreator = new ModResourcePackCreator(ResourceType.SERVER_DATA);
List<ResourcePackProfile> moddedResourcePacks = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import net.minecraft.client.options.GameOptions;
import net.minecraft.client.option.GameOptions;
import net.minecraft.resource.ResourcePack;
import net.minecraft.resource.ResourcePackProfile;

Expand Down
2 changes: 1 addition & 1 deletion fabric-tool-attribute-api-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
archivesBaseName = "fabric-tool-attribute-api-v1"
version = getSubprojectVersion(project, "1.2.8")
version = getSubprojectVersion(project, "1.2.9")

dependencies {
testmodCompile project(path: ':fabric-object-builder-api-v1', configuration: 'dev')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public final class ToolManager {
* @return whether the tool is effective
*/
public static boolean handleIsEffectiveOn(BlockState state, ItemStack stack, @Nullable LivingEntity user) {
return stack.isEffectiveOn(state) || handleIsEffectiveOnIgnoresVanilla(state, stack, user, false);
return stack.isSuitableFor(state) || handleIsEffectiveOnIgnoresVanilla(state, stack, user, false);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public ActionResult isEffectiveOn(Tag<Item> tag, BlockState state, ItemStack sta
if (miningLevel < 0) return ActionResult.PASS;

ToolItem vanillaItem = getVanillaItem(miningLevel);
return vanillaItem.isEffectiveOn(state) ? ActionResult.SUCCESS : ActionResult.PASS;
return vanillaItem.isSuitableFor(state) ? ActionResult.SUCCESS : ActionResult.PASS;
}

return ActionResult.PASS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ public ActionResult isEffectiveOn(Tag<Item> tag, BlockState state, ItemStack sta

if (!(stack.getItem() instanceof DynamicAttributeTool)) {
if (!(stack.getItem() instanceof ShearsItem)) {
return vanillaItem.isEffectiveOn(state) ? ActionResult.SUCCESS : ActionResult.PASS;
return vanillaItem.isSuitableFor(state) ? ActionResult.SUCCESS : ActionResult.PASS;
} else {
return stack.getItem().isEffectiveOn(state) ? ActionResult.SUCCESS : ActionResult.PASS;
return stack.getItem().isSuitableFor(state) ? ActionResult.SUCCESS : ActionResult.PASS;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public abstract class MixinItemStack {
@Shadow
public abstract Item getItem();

@Inject(at = @At("RETURN"), method = "isEffectiveOn", cancellable = true)
@Inject(at = @At("RETURN"), method = "isSuitableFor", cancellable = true)
public void isEffectiveOn(BlockState state, CallbackInfoReturnable<Boolean> info) {
info.setReturnValue(ToolManager.handleIsEffectiveOnIgnoresVanilla(state, (ItemStack) (Object) this, null, info.getReturnValueZ()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ public void onInitialize() {
testPickaxe = Registry.register(Registry.ITEM, new Identifier("fabric-tool-attribute-api-v1-testmod", "test_pickaxe"), new TestTool(new Item.Settings(), FabricToolTags.PICKAXES, 2));
// Register a block that requires a shovel that is as strong or stronger than an iron one.
gravelBlock = Registry.register(Registry.BLOCK, new Identifier("fabric-tool-attribute-api-v1-testmod", "hardened_gravel_block"),
new Block(FabricBlockSettings.of(new FabricMaterialBuilder(MapColor.SAND).build(), MapColor.STONE)
new Block(FabricBlockSettings.of(new FabricMaterialBuilder(MapColor.PALE_YELLOW).build(), MapColor.STONE_GRAY)
.breakByTool(FabricToolTags.SHOVELS, 2)
.requiresTool()
.strength(0.6F)
.sounds(BlockSoundGroup.GRAVEL)));
Registry.register(Registry.ITEM, new Identifier("fabric-tool-attribute-api-v1-testmod", "hardened_gravel_block"), new BlockItem(gravelBlock, new Item.Settings()));
// Register a block that requires a pickaxe that is as strong or stronger than an iron one.
stoneBlock = Registry.register(Registry.BLOCK, new Identifier("fabric-tool-attribute-api-v1-testmod", "hardened_stone_block"),
new Block(FabricBlockSettings.of(Material.STONE, MapColor.STONE)
new Block(FabricBlockSettings.of(Material.STONE, MapColor.STONE_GRAY)
.breakByTool(FabricToolTags.PICKAXES, 2)
.requiresTool()
.strength(0.6F)
Expand Down Expand Up @@ -159,7 +159,7 @@ private void validate(MinecraftServer server) {
}

private void testToolOnBlock(ItemStack item, Block block, boolean inEffective, float inSpeed) {
boolean effective = item.isEffectiveOn(block.getDefaultState());
boolean effective = item.isSuitableFor(block.getDefaultState());
float speed = item.getMiningSpeedMultiplier(block.getDefaultState());

if (inEffective != effective) {
Expand Down

0 comments on commit 36b77c3

Please sign in to comment.