Skip to content

Commit

Permalink
1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Faboslav committed Apr 1, 2022
1 parent 1619313 commit 97c0d5d
Show file tree
Hide file tree
Showing 9 changed files with 130 additions and 50 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## mc1.18.2-1.3.2, April 01, 2022

- Fixed crash related to the bees pollinating mooblooms
- Tweaked illusioner and iceologer spawns
- Iceologer can now walk on the powder snow
- Updated "Be Keeper" advancement

## mc1.18.2-1.3.1, Mar 31, 2022

- Fixed villagers disappearing due to disabled beekeeper villager profession
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,18 @@
import com.faboslav.friendsandfoes.entity.passive.ai.goal.BeePollinateMoobloomGoal;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.mob.Angerable;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.entity.passive.BeeEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
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;

@Mixin(BeeEntity.class)
public abstract class BeeEntityMixin extends AnimalEntity implements Angerable
public abstract class BeeEntityMixin extends AnimalEntity
{
@Shadow
@Nullable
private BlockPos hivePos;

@Shadow
abstract boolean isHiveValid();

BeePollinateMoobloomGoal pollinateMoobloomGoal;

public BeeEntityMixin(
Expand Down Expand Up @@ -58,30 +47,12 @@ public void damage(
if (this.isInvulnerableTo(source)) {
info.setReturnValue(false);
} else {
if (!this.world.isClient) {
if (
this.world.isClient() == false
&& this.pollinateMoobloomGoal != null
) {
this.pollinateMoobloomGoal.cancel();
}
}
}


/*
@Inject(
method = "isHiveValid",
at = @At("RETURN"),
cancellable = true
)
private void isHiveValid(
CallbackInfoReturnable<Boolean> cir
){
var isHiveValid = cir.getReturnValueZ();
if(isHiveValid) {
cir.setReturnValue(isHiveValid);
}
BlockEntity blockEntity = this.world.getBlockEntity(this.hivePos);
isHiveValid = blockEntity != null && blockEntity.getType() == ModBlockEntityTypes.FRIENDS_AND_FOES_BEEHIVES;
cir.setReturnValue(isHiveValid);
}*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public int spawn(ServerWorld world, boolean spawnMonsters, boolean spawnAnimals)

if (this.cooldown > 0) {
return 0;

}

this.cooldown += 12000 + random.nextInt(1200);
Expand All @@ -47,7 +46,7 @@ public int spawn(ServerWorld world, boolean spawnMonsters, boolean spawnAnimals)
if (
l < 5L
|| world.isDay() == false
|| random.nextInt(5) != 0
|| random.nextInt(5) != 3
) {
return 0;
}
Expand Down Expand Up @@ -84,7 +83,7 @@ public int spawn(ServerWorld world, boolean spawnMonsters, boolean spawnAnimals)
var precipitation = registryEntry.value().getPrecipitation();

if (
category != Biome.Category.TAIGA
category != Category.TAIGA
|| precipitation != Biome.Precipitation.SNOW
) {
return 0;
Expand All @@ -106,7 +105,7 @@ public int spawn(ServerWorld world, boolean spawnMonsters, boolean spawnAnimals)
return 0;
}

iceologer.setPatrolLeader(true);
iceologer.setPatrolLeader(false);
iceologer.setRandomPatrolTarget();
iceologer.setPosition(mutable.getX(), mutable.getY(), mutable.getZ());
iceologer.initialize(world, world.getLocalDifficulty(mutable), SpawnReason.PATROL, null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public int spawn(ServerWorld world, boolean spawnMonsters, boolean spawnAnimals)
if (
l < 5L
|| world.isDay() == false
|| random.nextInt(5) != 0
|| random.nextInt(5) != 3
) {
return 0;
}
Expand Down Expand Up @@ -105,7 +105,7 @@ public int spawn(ServerWorld world, boolean spawnMonsters, boolean spawnAnimals)
return 0;
}

illusioner.setPatrolLeader(true);
illusioner.setPatrolLeader(false);
illusioner.setRandomPatrolTarget();
illusioner.setPosition(mutable.getX(), mutable.getY(), mutable.getZ());
illusioner.initialize(world, world.getLocalDifficulty(mutable), SpawnReason.PATROL, null, null);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"advancements.husbandry.beehive.title": "Be Keeper",
"advancements.husbandry.beehive.description": "Obtain any type of beehive",
"advancements.husbandry.beehive.description": "Obtain all beehive types",
"advancements.adventure.kill_iceologer.title": "I was here",
"advancements.adventure.kill_iceologer.description": "Kill the iceologer",
"advancements.adventure.kill_illusioner.title": "World of illusion",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"advancements.husbandry.beehive.title": "守护者",
"advancements.husbandry.beehive.description": "获得任意类型的蜂箱",
"advancements.adventure.kill_illusioner.title": "幻术世界",
"advancements.adventure.kill_illusioner.description": "杀死幻术师真身",
"advancements.husbandry.shear_a_moobloom.title": "哞哞!",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,90 @@
"items": [
{
"items": [
"minecraft:beehive",
"friendsandfoes:acacia_beehive",
"friendsandfoes:birch_beehive",
"friendsandfoes:crimson_beehive",
"friendsandfoes:dark_oak_beehive",
"friendsandfoes:jungle_beehive",
"friendsandfoes:spruce_beehive",
"minecraft:beehive"
]
}
]
}
},
"acacia_beehive": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"friendsandfoes:acacia_beehive"
]
}
]
}
},
"birch_beehive": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"friendsandfoes:birch_beehive"
]
}
]
}
},
"crimson_beehive": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"friendsandfoes:crimson_beehive"
]
}
]
}
},
"dark_oak_beehive": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"friendsandfoes:dark_oak_beehive"
]
}
]
}
},
"jungle_beehive": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"friendsandfoes:jungle_beehive"
]
}
]
}
},
"spruce_beehive": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"friendsandfoes:spruce_beehive"
]
}
]
}
},
"warped_beehive": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"friendsandfoes:warped_beehive"
]
}
Expand All @@ -39,6 +116,27 @@
"requirements": [
[
"beehive"
],
[
"acacia_beehive"
],
[
"birch_beehive"
],
[
"crimson_beehive"
],
[
"dark_oak_beehive"
],
[
"jungle_beehive"
],
[
"spruce_beehive"
],
[
"warped_beehive"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"friendsandfoes:iceologer"
]
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ org.gradle.configureondemand=false
# Mod
mod_name=Friends&Foes
mod_id=friendsandfoes
mod_version=1.3.1
mod_version=1.3.2
mod_author=Faboslav
mod_description=Adds all eliminated mobs from the minecraft mob votes with rich lore.
maven_group=com.faboslav.friendsandfoes
Expand Down

0 comments on commit 97c0d5d

Please sign in to comment.