Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
Update to Forge 36.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Romaindu35 committed Sep 4, 2021
1 parent 2484da8 commit c0df81c
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ project(':forge') {
INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.2.6'
}

version = '1.16.5-36.2.2'
version = '1.16.5-36.2.4'
println('Forge Version: ' + version)

patcher {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
import net.minecraft.world.storage.FolderName;
import net.minecraft.world.storage.IWorldInfo;
import net.minecraft.world.storage.PlayerData;
@@ -85,735 +_,1155 @@
@@ -85,735 +_,1157 @@
import net.minecraftforge.api.distmarker.OnlyIn;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down Expand Up @@ -964,6 +964,7 @@
+ serverplaynethandler.func_147359_a(new SServerDifficultyPacket(iworldinfo.func_176130_y(), iworldinfo.func_176123_z()));
+ serverplaynethandler.func_147359_a(new SPlayerAbilitiesPacket(p_72355_2_.field_71075_bZ));
+ serverplaynethandler.func_147359_a(new SHeldItemChangePacket(p_72355_2_.field_71071_by.field_70461_c));
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.OnDatapackSyncEvent(this, p_72355_2_));
+ serverplaynethandler.func_147359_a(new SUpdateRecipesPacket(this.field_72400_f.func_199529_aN().func_199510_b()));
+ serverplaynethandler.func_147359_a(new STagsListPacket(this.field_72400_f.func_244266_aF()));
+ serverplaynethandler.func_147359_a(new SEntityStatusPacket(p_72355_2_, (byte) (serverworld1.func_82736_K().func_223586_b(GameRules.field_223612_o) ? 22 : 23))); // Paper - fix this rule not being initialized on the client
Expand Down Expand Up @@ -1960,6 +1961,7 @@
+ playeradvancements.func_240918_a_(this.field_72400_f.func_191949_aK());
+ }
+
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.OnDatapackSyncEvent(this, null));
+ this.func_148540_a(new STagsListPacket(this.field_72400_f.func_244266_aF()));
+ net.minecraftforge.fml.network.NetworkHooks.syncCustomTagTypes(this.field_72400_f.func_244266_aF());
+ SUpdateRecipesPacket supdaterecipespacket = new SUpdateRecipesPacket(this.field_72400_f.func_199529_aN().func_199510_b());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
for(int i = 0; i < textures.size(); i++)
{
TextureAtlasSprite tas = spriteGetter.apply(textures.get(i));
RenderType rt = getLayerRenderType(fullbrightLayers.contains(i));
builder.addQuads(rt, getQuadsForSprite(i, tas, transform, true));
boolean fullbright = fullbrightLayers.contains(i);
RenderType rt = getLayerRenderType(fullbright);
builder.addQuads(rt, getQuadsForSprite(i, tas, transform, fullbright));
}

return builder.build();
Expand Down
43 changes: 43 additions & 0 deletions src/main/java/net/minecraftforge/event/OnDatapackSyncEvent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package net.minecraftforge.event;

import javax.annotation.Nullable;

import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.server.management.PlayerList;
import net.minecraftforge.eventbus.api.Event;

/**
* Fires when a player joins the server or when the reload command is ran,
* before tags and crafting recipes are sent to the client. Send datapack data
* to clients when this event fires.
*/
public class OnDatapackSyncEvent extends Event
{
private final PlayerList playerList;
@Nullable
private final ServerPlayerEntity player;

public OnDatapackSyncEvent(PlayerList playerList, @Nullable ServerPlayerEntity player)
{
this.playerList = playerList;
this.player = player;
}

/**
* @return The server's player list to get a view of all players.
*/
public PlayerList getPlayerList()
{
return this.playerList;
}

/**
* @return The player to sync datapacks to. Null when syncing for all players,
* such as when the reload command runs.
*/
@Nullable
public ServerPlayerEntity getPlayer()
{
return this.player;
}
}

0 comments on commit c0df81c

Please sign in to comment.