Skip to content

Commit

Permalink
Merge branch '1.19.3'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/versions.json
#	CHANGELOG.md
#	fabric/build.gradle
  • Loading branch information
Faboslav committed Apr 10, 2023
2 parents 4b2858e + 6436358 commit b0ba287
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 51 deletions.
12 changes: 6 additions & 6 deletions .github/versions.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"1.19.4": "1.8.0",
"1.19.3": "1.8.0",
"1.19.2": "1.8.0",
"1.19.1": "1.8.0",
"1.19": "1.8.0",
"1.18.2": "1.4.6",
"1.19.4": "1.8.1",
"1.19.3": "1.8.1",
"1.19.2": "1.8.1",
"1.19.1": "1.8.1",
"1.19": "1.8.1",
"1.18.2": "1.4.7",
"1.18.1": "1.2.5",
"1.18": "1.2.5"
}
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
## mc1.19.4-1.8.1, April 10, 2023

- Tuff Golem can now be unglued with axe
- Fixed iceologer and illusioner spawns in raid based on the config

## mc1.19.4-1.8.0, March 20, 2023

- Ported to 1.19.4

## mc1.19.3-1.8.1, April 10, 2023

- Tuff Golem can now be unglued with axe
- Fixed iceologer and illusioner spawns in raid based on the config

## mc1.19.3-1.8.0, March 08, 2023

- Added Tuff Golem
Expand Down Expand Up @@ -44,6 +54,11 @@

- Ported to 1.19.3

## mc1.19.2-1.8.1, April 10, 2023

- Tuff Golem can now be unglued with axe
- Fixed iceologer and illusioner spawns in raid based on the config

## mc1.19.2-1.8.0, March 08, 2023

- Added Tuff Golem
Expand Down Expand Up @@ -158,6 +173,10 @@

- Fixed bug when copper blocks can not be waxed

## mc1.18.2-1.4.7, April 10, 2023

- Fixed iceologer and illusioner spawns in raid based on the config

## mc1.18.2-1.4.6, December 16, 2022

- Backported important fixes from 1.5.x/1.6.x mod versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,20 @@ public void readCustomDataFromNbt(NbtCompound nbt) {
}
}

private SoundEvent getGlueSound() {
return FriendsAndFoesSoundEvents.ENTITY_TUFF_GOLEM_GLUE.get();
private SoundEvent getGlueOnSound() {
return FriendsAndFoesSoundEvents.ENTITY_TUFF_GOLEM_GLUE_ON.get();
}

private void playGlueSound() {
this.playSound(this.getGlueSound(), 1.0F, 1.0F);
private void playGlueOnSound() {
this.playSound(this.getGlueOnSound(), 1.0F, 1.0F);
}

private SoundEvent getGlueOffSound() {
return FriendsAndFoesSoundEvents.ENTITY_TUFF_GOLEM_GLUE_OFF.get();
}

private void playGlueOffSound() {
this.playSound(this.getGlueOffSound(), 1.0F, 1.0F);
}

public SoundEvent getMoveSound() {
Expand Down Expand Up @@ -302,6 +310,8 @@ public ActionResult interactMob(
interactionResult = this.tryToInteractMobWithDye(player, itemStack);
} else if (itemInHand instanceof HoneycombItem) {
interactionResult = this.tryToInteractMobWithHoneycomb(player, itemStack);
} else if (itemInHand instanceof AxeItem) {
interactionResult = this.tryToInteractMobWithAxe(player, hand, itemStack);
}

if (interactionResult == false) {
Expand Down Expand Up @@ -370,12 +380,35 @@ private boolean tryToInteractMobWithHoneycomb(
itemStack.decrement(1);
}

this.playGlueSound();
this.playGlueOnSound();
this.spawnParticles(ParticleTypes.WAX_ON, 7);

return true;
}

private boolean tryToInteractMobWithAxe(
PlayerEntity player,
Hand hand,
ItemStack itemStack
) {
if (!this.isGlued()) {
return false;
}

this.setGlued(false);

this.playGlueOffSound();
this.spawnParticles(ParticleTypes.WAX_OFF, 7);

if (this.getWorld().isClient() == false && !player.getAbilities().creativeMode) {
itemStack.damage(1, player, (playerEntity) -> {
player.sendToolBreakStatus(hand);
});
}

return true;
}

private boolean tryToInteractMobWithItem(
PlayerEntity player,
ItemStack itemStack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public final class FriendsAndFoesSoundEvents
public static final Supplier<SoundEvent> ENTITY_MAULER_GROWL;
public static final Supplier<SoundEvent> ENTITY_MAULER_HURT;
public static final Supplier<SoundEvent> ENTITY_MOOBLOOM_CONVERT;
public static final Supplier<SoundEvent> ENTITY_TUFF_GOLEM_GLUE;
public static final Supplier<SoundEvent> ENTITY_TUFF_GOLEM_GLUE_ON;
public static final Supplier<SoundEvent> ENTITY_TUFF_GOLEM_GLUE_OFF;
public static final Supplier<SoundEvent> ENTITY_TUFF_GOLEM_HURT;
public static final Supplier<SoundEvent> ENTITY_TUFF_GOLEM_MOVE;
public static final Supplier<SoundEvent> ENTITY_TUFF_GOLEM_REPAIR;
Expand Down Expand Up @@ -82,7 +83,8 @@ public final class FriendsAndFoesSoundEvents
ENTITY_MAULER_GROWL = register("entity", "mauler.growl");
ENTITY_MAULER_HURT = register("entity", "mauler.hurt");
ENTITY_MOOBLOOM_CONVERT = register("entity", "moobloom.convert");
ENTITY_TUFF_GOLEM_GLUE = register("entity", "tuff_golem.glue");
ENTITY_TUFF_GOLEM_GLUE_ON = register("entity", "tuff_golem.glue_on");
ENTITY_TUFF_GOLEM_GLUE_OFF = register("entity", "tuff_golem.glue_off");
ENTITY_TUFF_GOLEM_HURT = register("entity", "tuff_golem.hurt");
ENTITY_TUFF_GOLEM_MOVE = register("entity", "tuff_golem.move");
ENTITY_TUFF_GOLEM_REPAIR = register("entity", "tuff_golem.repair");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@
"subtitle.entity.friendsandfoes.mauler.hurt": "Mauler hurts",
"subtitle.entity.friendsandfoes.moobloom.convert": "Moobloom transforms",
"subtitle.entity.friendsandfoes.shield_debris.impact": "Shield debris impacted",
"subtitle.entity.friendsandfoes.tuff_golem.glue": "Tuff Golem glued",
"subtitle.entity.friendsandfoes.tuff_golem.glue_on": "Tuff Golem glued",
"subtitle.entity.friendsandfoes.tuff_golem.glue_off": "Tuff Golem unglued",
"subtitle.entity.friendsandfoes.tuff_golem.hurt": "Tuff Golem hurts",
"subtitle.entity.friendsandfoes.tuff_golem.move": "Tuff Golem moves",
"subtitle.entity.friendsandfoes.tuff_golem.repair": "Tuff Golem repaired",
Expand Down
12 changes: 9 additions & 3 deletions common/src/main/resources/assets/friendsandfoes/sounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,17 @@
],
"subtitle": "subtitle.entity.friendsandfoes.moobloom.convert"
},
"entity.tuff_golem.glue": {
"entity.tuff_golem.glue_on": {
"sounds": [
"friendsandfoes:entity/tuff_golem/glue"
"friendsandfoes:entity/tuff_golem/glue_on"
],
"subtitle": "subtitle.entity.friendsandfoes.tuff_golem.glue"
"subtitle": "subtitle.entity.friendsandfoes.tuff_golem.glue_on"
},
"entity.tuff_golem.glue_off": {
"sounds": [
"friendsandfoes:entity/tuff_golem/glue_off"
],
"subtitle": "subtitle.entity.friendsandfoes.tuff_golem.glue_off"
},
"entity.tuff_golem.hurt": {
"sounds": [
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies {
modRuntimeOnly "curse.maven:lazydfu-433518:3821870"
// https://www.curseforge.com/minecraft/mc-mods/starlight/files
modRuntimeOnly "curse.maven:starlight-521783:3835973"
modRuntimeOnly "curse.maven:disablecustomworldsadvice-401978:4444372"
modRuntimeOnly "curse.maven:disablecustomworldsadvice-401978:3827588"

common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.faboslav.friendsandfoes.mixin.fabric;

import com.faboslav.friendsandfoes.FriendsAndFoes;
import com.faboslav.friendsandfoes.init.FriendsAndFoesEntityTypes;
import com.faboslav.friendsandfoes.util.CustomRaidMember;
import net.minecraft.entity.EntityType;
Expand Down Expand Up @@ -50,23 +51,27 @@ private static void friendsandfoes_addCustomRaidMembers(CallbackInfo ci) {
var raidMembers = new ArrayList<>(Arrays.asList(field_16632));
var lastRaidMember = raidMembers.get(raidMembers.size() - 1);

var iceologerRaidMember = newRaidMember(
CustomRaidMember.ICEOLOGER_INTERNAL_NAME,
lastRaidMember.ordinal() + 1,
FriendsAndFoesEntityTypes.ICEOLOGER.get(),
CustomRaidMember.ICEOLOGER_COUNT_IN_WAVE
);
CustomRaidMember.ICEOLOGER = iceologerRaidMember;
raidMembers.add(iceologerRaidMember);
if(FriendsAndFoes.getConfig().enableIceologerInRaids) {
var iceologerRaidMember = newRaidMember(
CustomRaidMember.ICEOLOGER_INTERNAL_NAME,
lastRaidMember.ordinal() + 1,
FriendsAndFoesEntityTypes.ICEOLOGER.get(),
CustomRaidMember.ICEOLOGER_COUNT_IN_WAVE
);
CustomRaidMember.ICEOLOGER = iceologerRaidMember;
raidMembers.add(iceologerRaidMember);
}

var illusionerRaidMember = newRaidMember(
CustomRaidMember.ILLUSIONER_INTERNAL_NAME,
lastRaidMember.ordinal() + 2,
EntityType.ILLUSIONER,
CustomRaidMember.ILLUSIONER_COUNT_IN_WAVE
);
CustomRaidMember.ILLUSIONER = illusionerRaidMember;
raidMembers.add(illusionerRaidMember);
if(FriendsAndFoes.getConfig().enableIllusionerInRaids) {
var illusionerRaidMember = newRaidMember(
CustomRaidMember.ILLUSIONER_INTERNAL_NAME,
lastRaidMember.ordinal() + 2,
EntityType.ILLUSIONER,
CustomRaidMember.ILLUSIONER_COUNT_IN_WAVE
);
CustomRaidMember.ILLUSIONER = illusionerRaidMember;
raidMembers.add(illusionerRaidMember);
}

field_16632 = raidMembers.toArray(new Raid.Member[0]);
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.configureondemand=false
# Mod
mod_name=Friends&Foes
mod_id=friendsandfoes
mod_version=1.8.0
mod_version=1.8.1
mod_author=Faboslav
mod_description=Adds outvoted and forgotten mobs from the mob votes in a believable vanilla plus style.
maven_group=com.faboslav.friendsandfoes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.faboslav.friendsandfoes.mixin.quilt;

import com.faboslav.friendsandfoes.FriendsAndFoes;
import com.faboslav.friendsandfoes.init.FriendsAndFoesEntityTypes;
import com.faboslav.friendsandfoes.util.CustomRaidMember;
import net.minecraft.entity.EntityType;
Expand Down Expand Up @@ -50,23 +51,27 @@ private static void friendsandfoes_addCustomRaidMembers(CallbackInfo ci) {
var raidMembers = new ArrayList<>(Arrays.asList(field_16632));
var lastRaidMember = raidMembers.get(raidMembers.size() - 1);

var iceologerRaidMember = newRaidMember(
CustomRaidMember.ICEOLOGER_INTERNAL_NAME,
lastRaidMember.ordinal() + 1,
FriendsAndFoesEntityTypes.ICEOLOGER.get(),
CustomRaidMember.ICEOLOGER_COUNT_IN_WAVE
);
CustomRaidMember.ICEOLOGER = iceologerRaidMember;
raidMembers.add(iceologerRaidMember);
if(FriendsAndFoes.getConfig().enableIceologerInRaids) {
var iceologerRaidMember = newRaidMember(
CustomRaidMember.ICEOLOGER_INTERNAL_NAME,
lastRaidMember.ordinal() + 1,
FriendsAndFoesEntityTypes.ICEOLOGER.get(),
CustomRaidMember.ICEOLOGER_COUNT_IN_WAVE
);
CustomRaidMember.ICEOLOGER = iceologerRaidMember;
raidMembers.add(iceologerRaidMember);
}

var illusionerRaidMember = newRaidMember(
CustomRaidMember.ILLUSIONER_INTERNAL_NAME,
lastRaidMember.ordinal() + 2,
EntityType.ILLUSIONER,
CustomRaidMember.ILLUSIONER_COUNT_IN_WAVE
);
CustomRaidMember.ILLUSIONER = illusionerRaidMember;
raidMembers.add(illusionerRaidMember);
if(FriendsAndFoes.getConfig().enableIllusionerInRaids) {
var illusionerRaidMember = newRaidMember(
CustomRaidMember.ILLUSIONER_INTERNAL_NAME,
lastRaidMember.ordinal() + 2,
EntityType.ILLUSIONER,
CustomRaidMember.ILLUSIONER_COUNT_IN_WAVE
);
CustomRaidMember.ILLUSIONER = illusionerRaidMember;
raidMembers.add(illusionerRaidMember);
}

field_16632 = raidMembers.toArray(new Raid.Member[0]);
}
Expand Down

0 comments on commit b0ba287

Please sign in to comment.