Skip to content

Commit

Permalink
Merge branch '1.19.2' into barnacle
Browse files Browse the repository at this point in the history
* 1.19.2:
  Fixed aether incompatibility
  Compostable buttercup
  Updated pt_br translation
  Updated changelog
  Fixed carpet incompability
  Updated/added translations
  3.0.6
  • Loading branch information
Faboslav committed Nov 15, 2024
2 parents 802ee43 + 076ec13 commit 6b3f1f4
Show file tree
Hide file tree
Showing 20 changed files with 603 additions and 248 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 3.0.6

- Fixed strong potion of reaching duration
- Fixed iceologer model
- Fixed carpet profiler incompatibility
- Fixed aether dungeons incompatibility
- Fixed buttercup not being compostable
- Added more config options
- Added zh_tw translations (Thanks to Lobster0228)
- Added fr_fr translations (Thanks to Franco227)
- Added pt_br translations (Thanks to demorogabrtz)
- Updated advancements
- Updated uk_ua translations (Thanks to unroman)

## 3.0.5

- Fixed server crash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public static void init() {

public static void lateInit() {
FriendsAndFoesBlockEntityTypes.lateInit();
FriendsAndFoesItems.registerCompostableItems();
BiomeModifications.addButtercupFeature();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.faboslav.friendsandfoes.common.client.render.entity.renderer;

import com.faboslav.friendsandfoes.common.FriendsAndFoes;
import com.faboslav.friendsandfoes.common.init.FriendsAndFoesEntityModelLayers;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.EntityRendererFactory.Context;
import net.minecraft.client.render.entity.IllagerEntityRenderer;
import net.minecraft.client.render.entity.feature.HeldItemFeatureRenderer;
import net.minecraft.client.render.entity.model.EntityModelLayers;
import net.minecraft.client.render.entity.model.IllagerEntityModel;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.mob.SpellcastingIllagerEntity;
Expand All @@ -17,7 +17,7 @@
public final class IceologerEntityRenderer<T extends SpellcastingIllagerEntity> extends IllagerEntityRenderer<T>
{
public IceologerEntityRenderer(Context context) {
super(context, new IllagerEntityModel<>(context.getPart(EntityModelLayers.EVOKER)), 0.5F);
super(context, new IllagerEntityModel<>(context.getPart(FriendsAndFoesEntityModelLayers.ICEOLOGER_LAYER)), 0.5F);

this.addFeature(new HeldItemFeatureRenderer<>(this, context.getHeldItemRenderer())
{
Expand Down Expand Up @@ -45,6 +45,6 @@ public void render(

@Override
public Identifier getTexture(T entity) {
return FriendsAndFoes.makeID("textures/entity/illager/iceologer.png");
return FriendsAndFoes.makeID("textures/entity/illager/iceologer.png");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ public final class FriendsAndFoesConfig implements Config
@Description("Generate illusioner training grounds")
public boolean generateIllusionerTrainingGroundsStructure = true;

@Description("Maximum count of illusions")
public int maxIllusionsCount = 9;

@Description("Number of ticks before illusion will despawn (20 ticks = 1 second)")
public int illusionLifetimeTicks = 600;

@Description("Number of invisibility ticks (20 ticks = 1 second)")
public int invisibilityTicks = 60;

@Category("Zombie Horse")
@Description("Enable trap")
public boolean enableZombieHorseTrap = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.client.render.entity.model.CowEntityModel;
import net.minecraft.client.render.entity.model.EntityModelLayer;
import net.minecraft.client.render.entity.model.EntityModelLayers;
import net.minecraft.client.render.entity.model.IllagerEntityModel;

/**
* @see EntityModelLayers
Expand All @@ -19,6 +20,7 @@ public final class FriendsAndFoesEntityModelLayers
public static final EntityModelLayer COPPER_GOLEM_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("copper_golem"), "main");
public static final EntityModelLayer CRAB_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("crab"), "main");
public static final EntityModelLayer GLARE_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("glare"), "main");
public static final EntityModelLayer ICEOLOGER_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("iceologer"), "main");
public static final EntityModelLayer ICEOLOGER_ICE_CHUNK_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("iceologer_ice_chunk"), "main");
public static final EntityModelLayer MAULER_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("mauler"), "main");
public static final EntityModelLayer MOOBLOOM_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("moobloom"), "main");
Expand All @@ -31,6 +33,7 @@ public static void registerEntityLayers(RegisterEntityLayersEvent event) {
event.register(COPPER_GOLEM_LAYER, CopperGolemEntityModel::getTexturedModelData);
event.register(CRAB_LAYER, CrabEntityModel::getTexturedModelData);
event.register(GLARE_LAYER, GlareEntityModel::getTexturedModelData);
event.register(ICEOLOGER_LAYER, IllagerEntityModel::getTexturedModelData);
event.register(ICEOLOGER_ICE_CHUNK_LAYER, IceologerIceChunkModel::getTexturedModelData);
event.register(MAULER_LAYER, MaulerEntityModel::getTexturedModelData);
event.register(MOOBLOOM_LAYER, CowEntityModel::getTexturedModelData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.faboslav.friendsandfoes.common.init.registry.ResourcefulRegistry;
import com.faboslav.friendsandfoes.common.item.DispenserAddedSpawnEgg;
import com.faboslav.friendsandfoes.common.item.FriendsAndFoesArmorMaterials;
import net.minecraft.block.ComposterBlock;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.*;
Expand Down Expand Up @@ -63,4 +64,8 @@ public final class FriendsAndFoesItems

private FriendsAndFoesItems() {
}

public static void registerCompostableItems() {
ComposterBlock.registerCompostableItem(0.65F, FriendsAndFoesItems.BUTTERCUP.get());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ public final class FriendsAndFoesPotions

public static final RegistryEntry<Potion> REACHING = POTIONS.register("reaching", () -> new Potion(new StatusEffectInstance(FriendsAndFoesStatusEffects.REACH.get(), 72000)));
public static final RegistryEntry<Potion> LONG_REACHING = POTIONS.register("long_reaching", () -> new Potion("reaching", new StatusEffectInstance(FriendsAndFoesStatusEffects.REACH.get(), 144000)));
public static final RegistryEntry<Potion> STRONG_REACHING = POTIONS.register("strong_reaching", () -> new Potion("reaching", new StatusEffectInstance(FriendsAndFoesStatusEffects.REACH.get(), 1800, 1)));
public static final RegistryEntry<Potion> STRONG_REACHING = POTIONS.register("strong_reaching", () -> new Potion("reaching", new StatusEffectInstance(FriendsAndFoesStatusEffects.REACH.get(), 36000, 1)));
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.faboslav.friendsandfoes.common.mixin;

import com.faboslav.friendsandfoes.common.FriendsAndFoes;
import com.faboslav.friendsandfoes.common.config.FriendsAndFoesConfig;
import com.faboslav.friendsandfoes.common.entity.IllusionerEntityAccess;
import com.llamalad7.mixinextras.injector.WrapWithCondition;
import net.minecraft.entity.Entity;
Expand Down Expand Up @@ -41,9 +42,9 @@
@SuppressWarnings({"rawtypes", "unchecked"})
public abstract class IllusionerEntityMixin extends IllusionerSpellcastingIllagerEntityMixin implements RangedAttackMob, IllusionerEntityAccess
{
private static final int MAX_ILLUSIONS_COUNT = 9;
private static final int ILLUSION_LIFETIME_TICKS = 600;
private static final int INVISIBILITY_TICKS = 60;
private static final int MAX_ILLUSIONS_COUNT = FriendsAndFoes.getConfig().maxIllusionsCount;
private static final int ILLUSION_LIFETIME_TICKS = FriendsAndFoes.getConfig().illusionLifetimeTicks;
private static final int INVISIBILITY_TICKS = FriendsAndFoes.getConfig().invisibilityTicks;

private static final String IS_ILLUSION_NBT_NAME = "IsIllusion";
private static final String WAS_ATTACKED_NBT_NAME = "WasAttacked";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public void friendsandfoes_addZombieHorseSpawnEvent(
int j = chunkPos.getStartZ();
Profiler profiler = this.getProfiler();
profiler.push("thunder2");

if (
this.isRaining()
&& this.isThundering()
Expand All @@ -83,6 +84,8 @@ public void friendsandfoes_addZombieHorseSpawnEvent(

this.spawnEntity(lightningEntity);
}

profiler.pop();
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.yungnickyoung.minecraft.yungsapi.world.processor;
package com.faboslav.friendsandfoes.common.world.processor;

import net.minecraft.structure.StructurePlacementData;
import net.minecraft.structure.StructureTemplate.StructureEntityInfo;
Expand All @@ -7,7 +7,6 @@
import net.minecraft.world.ServerWorldAccess;

/**
* This is very important placeholder for compatibilitty (
* Originally from YUNG's API by.
* YUNGNICKYOUNG (https://github.com/YUNG-GANG/YUNGs-API)
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package com.faboslav.friendsandfoes.common.world.processor;

import net.minecraft.structure.StructurePlacementData;
import net.minecraft.structure.StructureTemplate;
import net.minecraft.util.Util;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.ServerWorldAccess;

import java.util.ArrayList;
import java.util.List;

/**
* Originally from YUNG's API by.
* YUNGNICKYOUNG (https://github.com/YUNG-GANG/YUNGs-API)
*/
public record StructureProcessingContext(
ServerWorldAccess serverWorldAccess,
StructurePlacementData structurePlacementData,
BlockPos structurePiecePos,
BlockPos structurePiecePivotPos,
List<StructureTemplate.StructureEntityInfo> rawEntityInfos)
{
public StructureProcessingContext(
ServerWorldAccess serverWorldAccess,
StructurePlacementData structurePlacementData,
BlockPos structurePiecePos,
BlockPos structurePiecePivotPos,
List<StructureTemplate.StructureEntityInfo> rawEntityInfos
) {
this.serverWorldAccess = serverWorldAccess;
this.structurePlacementData = structurePlacementData;
this.structurePiecePos = structurePiecePos;
this.structurePiecePivotPos = structurePiecePivotPos;
this.rawEntityInfos = Util.make(() -> {
List<StructureTemplate.StructureEntityInfo> list = new ArrayList<>(rawEntityInfos.size());
rawEntityInfos.forEach((entityInfo) ->
list.add(new StructureTemplate.StructureEntityInfo(entityInfo.pos, entityInfo.blockPos, entityInfo.nbt)));
return list;
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"advancements.nether.find_citadel.description": "Enter a Nether citadel",
"advancements.nether.kill_wildfire.title": "Drop it like it's hot",
"advancements.nether.kill_wildfire.description": "Kill the wildfire",
"advancements.nether.obtain_wildfire_crown.title": "Who's da New King of Hell?",
"advancements.nether.obtain_wildfire_crown.title": "Who's da New King of Nether?",
"advancements.nether.obtain_wildfire_crown.description": "Have a wildfire crown in your inventory",
"advancements.adventure.complete_hide_and_seek_game.title": "Hide and Seek",
"advancements.adventure.complete_hide_and_seek_game.description": "Find a rascal three times in its little game",
Expand Down Expand Up @@ -66,6 +66,7 @@
"entity.friendsandfoes.mauler": "Mauler",
"entity.friendsandfoes.tuff_golem": "Tuff Golem",
"entity.friendsandfoes.wildfire": "Wildfire",
"entity.friendsandfoes.player_illusion": "Player Illusion",
"effect.friendsandfoes.reach": "Reach",
"effect.friendsandfoes.reach.description": "Increases the range of block interaction.",
"item.friendsandfoes.buttercup": "Buttercup",
Expand Down
Loading

0 comments on commit 6b3f1f4

Please sign in to comment.