Skip to content

Commit

Permalink
1.18.2 update
Browse files Browse the repository at this point in the history
  • Loading branch information
Draylar committed Apr 9, 2022
1 parent f74abf5 commit cc500b9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 32 deletions.
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.18.1
yarn_mappings=1.18.1+build.22
loader_version=0.13.1
fabric_version=0.46.4+1.18
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.2
loader_version=0.13.3
fabric_version=0.48.0+1.18.2

# Mod Properties
mod_version=1.6.0
mod_version=1.7.0
maven_group=draylar
archives_base_name=gate-of-babylon

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand han

@Override
public boolean canRepair(ItemStack stack, ItemStack ingredient) {
return ItemTags.PLANKS.contains(ingredient.getItem()) || super.canRepair(stack, ingredient);
return ingredient.isIn(ItemTags.PLANKS) || super.canRepair(stack, ingredient);
}

public static DyeColor getColor(ItemStack stack) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/draylar/gateofbabylon/item/WaraxeItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand han
}

public void spawnEntity(ServerWorld world, Vec3d pos, LivingEntity source, BlockState state) {
FallingBlockEntity spawn = new FallingBlockEntity(world, pos.getX(), pos.getY(), pos.getZ(), state);
FallingBlockEntity spawn = FallingBlockEntityAccessor.createFallingBlockEntity(world, pos.getX(), pos.getY(), pos.getZ(), state);

// setup velocity
Vec3d difference = pos.subtract(source.getPos()).multiply(.1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
package draylar.gateofbabylon.mixin;

import net.minecraft.block.BlockState;
import net.minecraft.entity.FallingBlockEntity;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
import org.spongepowered.asm.mixin.gen.Invoker;

@Mixin(FallingBlockEntity.class)
public interface FallingBlockEntityAccessor {

@Invoker("<init>")
static FallingBlockEntity createFallingBlockEntity(World world, double x, double y, double z, BlockState block) {
throw new UnsupportedOperationException();
}

@Accessor
void setDestroyedOnLanding(boolean destroyedOnLanding);
}

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/gate-of-babylon.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"EnchantmentHelperMixin",
"EnchantmentMixin",
"FallingBlockEntityAccessor",
"FallingBlockEntityMixin",
"MobEntityMixin",
"PersistentProjectileEntityMixin",
"PlayerEntityLungeMixin",
Expand Down

0 comments on commit cc500b9

Please sign in to comment.