Skip to content

Commit

Permalink
Merge branch '1.20.6' into 1.21.1
Browse files Browse the repository at this point in the history
* 1.20.6:
  Fixed server crash
  3.0.5

# Conflicts:
#	neoforge/src/main/java/com/faboslav/friendsandfoes/neoforge/FriendsAndFoesNeoForge.java
  • Loading branch information
Faboslav committed Oct 13, 2024
2 parents caa4846 + 3cb66fb commit 6d86a3d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.0.5

- Fixed server crash

## 3.0.4

- Improved internal registries logic (Might fix some crashes)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.faboslav.friendsandfoes.common.events.client;

import com.faboslav.friendsandfoes.common.events.base.EventHandler;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.Block;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.fluid.Fluid;
Expand All @@ -15,6 +17,7 @@
* @author ThatGravyBoat
* <a href="https://github.com/Team-Resourceful/ResourcefulLib">https://github.com/Team-Resourceful/ResourcefulLib</a>
*/
@Environment(EnvType.CLIENT)
public record RegisterRenderLayersEvent(BiConsumer<Fluid, RenderLayer> fluid, BiConsumer<Block, RenderLayer> block)
{
public static final EventHandler<RegisterRenderLayersEvent> EVENT = new EventHandler<>();
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ org.gradle.caching=true
mod_java_version=21
mod_name=Friends & Foes
mod_id=friendsandfoes
mod_version=3.0.4
mod_version=3.0.5
mod_author=Faboslav
mod_description=Adds outvoted and forgotten mobs from the mob vote, expanding on their original concepts and introducing new vanilla-like features.
maven_group=com.faboslav.friendsandfoes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.faboslav.friendsandfoes.common.FriendsAndFoes;
import com.faboslav.friendsandfoes.common.events.AddItemGroupEntriesEvent;
import com.faboslav.friendsandfoes.common.events.entity.RegisterVillagerTradesEvent;
import com.faboslav.friendsandfoes.common.events.client.RegisterRenderLayersEvent;
import com.faboslav.friendsandfoes.common.events.lifecycle.*;
import com.faboslav.friendsandfoes.common.init.FriendsAndFoesStructurePoolElements;
import com.faboslav.friendsandfoes.common.util.ServerWorldSpawnersUtil;
Expand All @@ -14,7 +13,6 @@
import com.faboslav.friendsandfoes.neoforge.mixin.FireBlockAccessor;
import com.faboslav.friendsandfoes.neoforge.network.NeoForgeNetworking;
import net.minecraft.block.Blocks;
import net.minecraft.client.render.RenderLayers;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.mob.MobEntity;
import net.minecraft.registry.Registries;
Expand Down Expand Up @@ -71,8 +69,7 @@ private static void onSetup(final FMLCommonSetupEvent event) {

event.enqueueWork(() -> {
FriendsAndFoes.lateInit();

RegisterRenderLayersEvent.EVENT.invoke(new RegisterRenderLayersEvent(RenderLayers::setRenderLayer, RenderLayers::setRenderLayer));

RegisterFlammabilityEvent.EVENT.invoke(new RegisterFlammabilityEvent((item, igniteOdds, burnOdds) ->
((FireBlockAccessor) Blocks.FIRE).invokeRegisterFlammableBlock(item, igniteOdds, burnOdds)));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
import com.faboslav.friendsandfoes.common.FriendsAndFoes;
import com.faboslav.friendsandfoes.common.FriendsAndFoesClient;
import com.faboslav.friendsandfoes.common.config.ConfigScreenBuilder;
import com.faboslav.friendsandfoes.common.events.client.RegisterEntityLayersEvent;
import com.faboslav.friendsandfoes.common.events.client.RegisterEntityRenderersEvent;
import com.faboslav.friendsandfoes.common.events.client.RegisterItemColorEvent;
import com.faboslav.friendsandfoes.common.events.client.RegisterParticlesEvent;
import com.faboslav.friendsandfoes.common.events.client.*;
import com.faboslav.friendsandfoes.common.events.lifecycle.ClientSetupEvent;
import com.faboslav.friendsandfoes.common.init.FriendsAndFoesItems;
import com.faboslav.friendsandfoes.common.init.registry.RegistryEntry;
import com.faboslav.friendsandfoes.common.item.DispenserAddedSpawnEgg;
import net.minecraft.client.particle.ParticleFactory;
import net.minecraft.client.particle.SpriteProvider;
import net.minecraft.client.render.RenderLayers;
import net.minecraft.particle.ParticleEffect;
import net.minecraft.particle.ParticleType;
import net.neoforged.bus.api.IEventBus;
Expand All @@ -38,6 +37,9 @@ public static void init(IEventBus modEventBus, IEventBus eventBus) {
}

public static void onClientSetup(final FMLClientSetupEvent event) {
ClientSetupEvent.EVENT.invoke(new ClientSetupEvent(Runnable::run));
RegisterRenderLayersEvent.EVENT.invoke(new RegisterRenderLayersEvent(RenderLayers::setRenderLayer, RenderLayers::setRenderLayer));

event.enqueueWork(() -> {
if (ModList.get().isLoaded("cloth_config")) {
ModLoadingContext.get().registerExtensionPoint(IConfigScreenFactory.class, () -> (client, screen) -> {
Expand Down

0 comments on commit 6d86a3d

Please sign in to comment.