Skip to content

Commit

Permalink
Merge branch '1.19.2' into 1.19.3
Browse files Browse the repository at this point in the history
* 1.19.2:
  Fixed aether incompatibility
  Compostable buttercup
  • Loading branch information
Faboslav committed Nov 15, 2024
2 parents 5cf7d1d + 076ec13 commit 21b483c
Show file tree
Hide file tree
Showing 9 changed files with 158 additions and 135 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
- 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,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
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.ArmorItem;
Expand Down Expand Up @@ -65,4 +66,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
@@ -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;
});
}
}
3 changes: 2 additions & 1 deletion common/src/main/resources/friendsandfoes.accesswidener
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ accessible field net/minecraft/item/ItemGroups COMBAT Lnet/minecraft/item/ItemGr
accessible method net/minecraft/block/ButtonBlock getClickSound (Z)Lnet/minecraft/sound/SoundEvent;
accessible method net/minecraft/particle/DefaultParticleType <init> (Z)V
accessible method net/minecraft/entity/ai/brain/sensor/SensorType <init> (Ljava/util/function/Supplier;)V
accessible method net/minecraft/entity/effect/StatusEffect <init> (Lnet/minecraft/entity/effect/StatusEffectCategory;I)V
accessible method net/minecraft/entity/effect/StatusEffect <init> (Lnet/minecraft/entity/effect/StatusEffectCategory;I)V
accessible method net/minecraft/block/ComposterBlock registerCompostableItem (FLnet/minecraft/item/ItemConvertible;)V
Loading

0 comments on commit 21b483c

Please sign in to comment.