Skip to content

Commit

Permalink
Merge branch '1.20.4' into 1.20.6
Browse files Browse the repository at this point in the history
* 1.20.4:
  Fixed aether incompatibility
  Compostable buttercup

# Conflicts:
#	common/src/main/java/com/faboslav/friendsandfoes/common/init/FriendsAndFoesItems.java
#	common/src/main/resources/friendsandfoes.accesswidener
#	fabric/src/main/java/com/faboslav/friendsandfoes/fabric/mixin/StructureEntityProcessorMixin.java
#	fabric/src/main/java/com/faboslav/friendsandfoes/fabric/world/processor/IceologerCabinArmorStandProcessor.java
#	fabric/src/main/java/com/faboslav/friendsandfoes/fabric/world/processor/IllusionerShackItemFrameProcessor.java
  • Loading branch information
Faboslav committed Nov 15, 2024
2 parents ee65c58 + 5dd822d commit df9399e
Show file tree
Hide file tree
Showing 9 changed files with 163 additions and 138 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 @@ -79,6 +79,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 @@ -5,6 +5,8 @@
import com.faboslav.friendsandfoes.common.init.registry.ResourcefulRegistries;
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.item.ArmorItem;
import net.minecraft.item.BlockItem;
Expand Down Expand Up @@ -65,4 +67,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 @@ -43,6 +43,7 @@ accessible field net/minecraft/item/ItemGroups SPAWN_EGGS Lnet/minecraft/registr
accessible field net/minecraft/item/ItemGroups OPERATOR Lnet/minecraft/registry/RegistryKey;
accessible field net/minecraft/item/ItemGroups INVENTORY Lnet/minecraft/registry/RegistryKey;
accessible method net/minecraft/entity/EntityPose <init> (Ljava/lang/String;II)V
accessible method net/minecraft/entity/effect/StatusEffect <init> (Lnet/minecraft/entity/effect/StatusEffectCategory;I)V
accessible field net/minecraft/block/Oxidizable OXIDATION_LEVEL_INCREASES Ljava/util/function/Supplier;
accessible field net/minecraft/block/Oxidizable OXIDATION_LEVEL_DECREASES Ljava/util/function/Supplier;
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 df9399e

Please sign in to comment.