Skip to content

Commit

Permalink
Merge branch '1.19.3' into 1.19.4-copper-golem
Browse files Browse the repository at this point in the history
* 1.19.3:
  fix

# Conflicts:
#	common/src/main/java/com/faboslav/friendsandfoes/entity/ai/goal/coppergolem/CopperGolemPressButtonGoal.java
#	common/src/main/resources/friendsandfoes-common.mixins.json
  • Loading branch information
Faboslav committed Nov 28, 2023
2 parents 3e8d67b + 38aa55b commit 4914696
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 180 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import net.fabricmc.api.Environment;
import net.minecraft.client.model.*;
import net.minecraft.entity.AnimationState;
import net.minecraft.nbt.NbtCompound;

@Environment(EnvType.CLIENT)
public final class CopperGolemEntityModel<T extends CopperGolemEntity> extends AnimatedEntityModel<T>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,19 @@
import net.minecraft.block.pattern.BlockPatternBuilder;
import net.minecraft.block.pattern.CachedBlockPosition;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.random.Random;
import net.minecraft.world.World;
import net.minecraft.world.WorldEvents;
import org.jetbrains.annotations.Nullable;
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.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import java.util.ArrayList;

@Mixin(LightningRodBlock.class)
public abstract class LightningRodBlockMixin extends LightningRodBlockBlockMixin implements Oxidizable
public abstract class LightningRodBlockMixin extends LightningRodBlockBlockMixin
{
@Nullable
private BlockPattern friendsandfoes_copperGolemPattern;
Expand Down Expand Up @@ -196,40 +193,4 @@ private boolean friendsandfoes_isCopperBlockWaxed(
|| blockState.isOf(FriendsAndFoesBlocks.WAXED_EXPOSED_LIGHTNING_ROD.get())
|| blockState.isOf(FriendsAndFoesBlocks.WAXED_OXIDIZED_LIGHTNING_ROD.get());
}

@Override
public void friendsandfoes_neighborUpdate(
BlockState state,
World world,
BlockPos pos,
Block sourceBlock,
BlockPos sourcePos,
boolean notify,
CallbackInfo ci
) {
this.friendsandfoes_tryToSpawnCopperGolem(
world,
pos
);
}

@Override
public void friendsandfoes_randomTick(
BlockState state,
ServerWorld world,
BlockPos pos,
Random random,
CallbackInfo ci
) {
this.tickDegradation(state, world, pos, random);
}

@Override
public void friendsandfoes_hasRandomTicks(
BlockState state, CallbackInfoReturnable<Boolean> cir
) {
if (cir.getReturnValue() == false) {
cir.setReturnValue(Oxidizable.getIncreasedOxidationBlock(state.getBlock()).isPresent());
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.faboslav.friendsandfoes.mixin;

import com.faboslav.friendsandfoes.block.Oxidizable;
import net.minecraft.block.LightningRodBlock;
import net.minecraft.block.RodBlock;
import org.spongepowered.asm.mixin.Mixin;

@Mixin(LightningRodBlock.class)
public abstract class LightningRodBlockOxidizableMixin extends RodBlock implements Oxidizable
{
public LightningRodBlockOxidizableMixin(Settings settings) {
super(settings);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"LightningRodBlockBlockMixin",
"LightningRodBlockDegradableMixin",
"LightningRodBlockMixin",
"LightningRodBlockOxidizableMixin",
"LimbAnimatorAccessor",
"PatrolSpawnerAccessor",
"PatrolSpawnerMixin",
Expand Down

0 comments on commit 4914696

Please sign in to comment.