Skip to content

Commit

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

# Conflicts:
#	common/src/main/resources/friendsandfoes.accesswidener
  • Loading branch information
Faboslav committed Nov 15, 2024
2 parents ce0fff4 + 53dad76 commit 03cc563
Show file tree
Hide file tree
Showing 9 changed files with 158 additions and 139 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 @@ -78,6 +78,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.item.ArmorItem;
import net.minecraft.item.BlockItem;
Expand Down Expand Up @@ -66,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 @@ -34,6 +34,7 @@ accessible method net/minecraft/particle/DefaultParticleType <init> (Z)V
accessible method net/minecraft/block/ButtonBlock getClickSound (Z)Lnet/minecraft/sound/SoundEvent;
accessible method net/minecraft/entity/ai/brain/sensor/SensorType <init> (Ljava/util/function/Supplier;)V
accessible method net/minecraft/advancement/criterion/Criteria register (Ljava/lang/String;Lnet/minecraft/advancement/criterion/Criterion;)Lnet/minecraft/advancement/criterion/Criterion;
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 03cc563

Please sign in to comment.