Skip to content

Commit

Permalink
Merge branch 'VazkiiMods:1.20.x' into 1.20.x
Browse files Browse the repository at this point in the history
  • Loading branch information
blagdorfinguy authored Jan 10, 2024
2 parents 4e99671 + ad60a12 commit 55a18b9
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package vazkii.botania.fabric.mixin;

import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.level.block.PowderSnowBlock;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import vazkii.botania.common.handler.EquipmentHandler;
import vazkii.botania.common.item.BotaniaItems;

@Mixin(PowderSnowBlock.class)
public class PowderSnowBlockMixin {
@Inject(method = "canEntityWalkOnPowderSnow", at = @At("RETURN"), cancellable = true)
private static void canWalkOnPowderSnowWithBotaniaItems(Entity entity, CallbackInfoReturnable<Boolean> cir) {
if (!cir.getReturnValueZ() && entity instanceof LivingEntity living
&& (living.getItemBySlot(EquipmentSlot.FEET).is(BotaniaItems.manaweaveBoots)
|| !EquipmentHandler.findOrEmpty(BotaniaItems.icePendant, living).isEmpty())) {
cir.setReturnValue(true);
}
}
}
3 changes: 2 additions & 1 deletion Fabric/src/main/resources/botania_fabric.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"package": "vazkii.botania.fabric.mixin",
"mixins": [
"AbstractFurnaceBlockEntityFabricAccessor",
"BucketItemFabricAccessor",
"AbstractMinecartFabricMixin",
"AnvilMenuFabricMixin",
"AxeItemFabricMixin",
"BeaconBlockEntityFabricMixin",
"BucketItemFabricAccessor",
"EnchantmentFabricMixin",
"EnchantmentMenuFabricMixin",
"EnderManFabricMixin",
Expand All @@ -21,6 +21,7 @@
"LivingEntityFabricMixin",
"PiglinAiFabricMixin",
"PlayerFabricMixin",
"PowderSnowBlockMixin",
"RepairItemRecipeFabricMixin",
"ResultSlotFabricMixin",
"ServerPlayerGameModeFabricMixin"
Expand Down
2 changes: 1 addition & 1 deletion Forge/src/main/resources/META-INF/accesstransformer.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public net.minecraft.client.gui.screens.worldselection.WorldPreset <init>(Ljava/lang/String;)V
public net.minecraft.client.renderer.RenderType$CompositeRenderType
public net.minecraft.core.registries.BuiltInRegistries$RegistryBootstrap
private-f net.minecraft.world.level.block.piston.PistonStructureResolver pistonPos
private-f net.minecraft.world.level.block.piston.PistonStructureResolver f_60410_ # pistonPos

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,9 @@ public void readPacketNBT(CompoundTag cmp) {
}
}

@Override
public boolean onlyOpCanSetNbt() {
// targeting Create here, sorry about any instances of https://xkcd.com/1172/
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
Expand All @@ -24,6 +25,7 @@
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.client.core.proxy.ClientProxy;
import vazkii.botania.client.lib.ResourcesLib;
import vazkii.botania.common.annotations.SoftImplement;
import vazkii.botania.common.item.BotaniaItems;
import vazkii.botania.common.item.equipment.armor.manasteel.ManasteelArmorItem;
import vazkii.botania.xplat.XplatAbstractions;
Expand Down Expand Up @@ -105,4 +107,9 @@ public void addArmorSetDescription(ItemStack stack, List<Component> list) {
list.add(Component.translatable("botania.armorset.manaweave.desc0").withStyle(ChatFormatting.GRAY));
list.add(Component.translatable("botania.armorset.manaweave.desc1").withStyle(ChatFormatting.GRAY));
}

@SoftImplement("IForgeItem")
public boolean canWalkOnPowderedSnow(ItemStack stack, LivingEntity wearer) {
return stack.is(BotaniaItems.manaweaveBoots);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import vazkii.botania.client.core.handler.MiscellaneousModels;
import vazkii.botania.client.render.AccessoryRenderRegistry;
import vazkii.botania.client.render.AccessoryRenderer;
import vazkii.botania.common.annotations.SoftImplement;
import vazkii.botania.common.proxy.Proxy;
import vazkii.botania.mixin.BiomeAccessor;

Expand Down Expand Up @@ -73,6 +74,12 @@ public void onWornTick(ItemStack stack, LivingEntity entity) {
}
}

// called via Curio API on Forge
@SoftImplement("IForgeItem")
public boolean canWalkOnPowderedSnow(ItemStack stack, LivingEntity wearer) {
return true;
}

public static class Renderer implements AccessoryRenderer {
@Override
public void doRender(HumanoidModel<?> bipedModel, ItemStack stack, LivingEntity living, PoseStack ms, MultiBufferSource buffers, int light, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public void buildRecipes(Consumer<FinishedRecipe> consumer) {
consumer.accept(stonecutting(BotaniaBlocks.livingrock, BotaniaBlocks.livingrockBrickStairs));
consumer.accept(stonecutting(BotaniaBlocks.livingrock, BotaniaBlocks.livingrockBrickWall));
consumer.accept(stonecutting(BotaniaBlocks.livingrock, BotaniaBlocks.livingrockBrickChiseled));
consumer.accept(stonecutting(BotaniaBlocks.livingrock, BotaniaBlocks.livingrockSlate));
consumer.accept(stonecutting(BotaniaBlocks.livingrockPolished, BotaniaBlocks.livingrockPolishedSlab, 2));
consumer.accept(stonecutting(BotaniaBlocks.livingrockPolished, BotaniaBlocks.livingrockPolishedStairs));
consumer.accept(stonecutting(BotaniaBlocks.livingrockPolished, BotaniaBlocks.livingrockPolishedWall));
Expand Down
4 changes: 3 additions & 1 deletion contributors.properties
Original file line number Diff line number Diff line change
Expand Up @@ -916,4 +916,6 @@ crowmaki=10
muri_flavo=5
badsbee=10
guildes_=pollidisiac

kboogenerate64=0
scribe0fdays=3
skalleton=9
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ org.gradle.jvmargs=-Xmx3G \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED

minecraft_version=1.20.1
build_number=443
build_number=444
group=vazkii.botania
mod_name=Botania
12 changes: 12 additions & 0 deletions web/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ and start a new "Upcoming" section.

{% include changelog_header.html version="Upcoming" %}

* Add: Stonecutting recipe for livingrock slate (it was previously uncraftable, oops)

---

{% include changelog_header.html version="1.20.1-443" %}

* Change: Manaweave boots and Snowflake pendant now let you walk on powder snow (Wormbo)
* Fix: Crash related to PistonStructureResolverMixin on Forge (Wormbo)
* Fix: Cellular blocks can no longer be placed with age. Prevents a way of cheesing the dandelifeon using create (Wormbo)

---

{% include changelog_header.html version="1.20.1-442" %}

* Relaxed forge version requirement to 47.1.3
Expand Down

0 comments on commit 55a18b9

Please sign in to comment.