Skip to content

Commit

Permalink
Finish 1.20 update
Browse files Browse the repository at this point in the history
  • Loading branch information
Patbox committed Jun 27, 2023
1 parent f8fd416 commit 3ca6730
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 242 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mod_menu_version=5.0.2
port_version=1


polymer_version=0.4.2+1.19.4
sgui_version=1.2.1+1.19.3
translation_version=2.0.0-beta.2+1.19.4-pre2
polymer_version=0.5.3+1.20.1
sgui_version=1.2.2+1.20
translation_version=2.0.0+1.20
pda_version=0.2.2+1.19.3
4 changes: 2 additions & 2 deletions src/main/java/dev/emi/trinkets/api/TrinketsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public static Optional<TrinketComponent> getTrinketComponent(LivingEntity living
* called in the callback of {@link ItemStack#damage(int, LivingEntity, Consumer)}
*/
public static void onTrinketBroken(ItemStack stack, SlotReference ref, LivingEntity entity) {
if (!entity.world.isClient) {
if (entity.world instanceof ServerWorld world) {
if (!entity.getWorld().isClient) {
if (entity.getWorld() instanceof ServerWorld world) {
for(int i = 0; i < 5; ++i) {
Vec3d vec3d = new Vec3d(((double)entity.getRandom().nextFloat() - 0.5D) * 0.1D, Math.random() * 0.1D + 0.1D, 0.0D);
vec3d = vec3d.rotateX(-entity.getPitch() * 0.017453292F);
Expand Down
100 changes: 0 additions & 100 deletions src/main/java/dev/emi/trinkets/mixin/HandledScreenMixin.java

This file was deleted.

98 changes: 0 additions & 98 deletions src/main/java/dev/emi/trinkets/mixin/InventoryScreenMixin.java

This file was deleted.

6 changes: 0 additions & 6 deletions src/main/java/dev/emi/trinkets/mixin/LivingEntityMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
import dev.emi.trinkets.api.TrinketInventory;
import dev.emi.trinkets.api.TrinketsApi;
import dev.emi.trinkets.api.event.TrinketDropCallback;
import net.fabricmc.fabric.api.networking.v1.PacketByteBufs;
import net.fabricmc.fabric.api.networking.v1.PlayerLookup;
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
Expand All @@ -39,9 +36,6 @@
import net.minecraft.entity.attribute.EntityAttributeModifier;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.GameRules;

Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/java/dev/emi/trinkets/poly/TrinketsPoly.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static int toggleCompactCommand(CommandContext<ServerCommandSource> ctx)

var isCompact = !getIsCompact(player);

ctx.getSource().sendFeedback(Text.translatable("trinkets.command.compact." + isCompact), false);
ctx.getSource().sendFeedback(() -> Text.translatable("trinkets.command.compact." + isCompact), false);

PlayerDataApi.setGlobalDataFor(player, COMPACT_SETTING, NbtByte.of(isCompact));

Expand Down

0 comments on commit 3ca6730

Please sign in to comment.