mirror of
				https://github.com/Aust1n46/VentureChat.git
				synced 2025-11-04 08:32:28 +00:00 
			
		
		
		
	Support 1.19.1
This commit is contained in:
		
							parent
							
								
									2a7599f04b
								
							
						
					
					
						commit
						51d32ce765
					
				@ -430,7 +430,11 @@ public class Format {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	public static PacketContainer createPacketPlayOutChat(String json) {
 | 
						public static PacketContainer createPacketPlayOutChat(String json) {
 | 
				
			||||||
		final PacketContainer container;
 | 
							final PacketContainer container;
 | 
				
			||||||
		if (VersionHandler.isUnder_1_19()) {
 | 
							if (VersionHandler.isAbove_1_19()) {
 | 
				
			||||||
 | 
								container = new PacketContainer(PacketType.Play.Server.SYSTEM_CHAT);
 | 
				
			||||||
 | 
								container.getStrings().write(0, json);
 | 
				
			||||||
 | 
								container.getBooleans().write(0, false);
 | 
				
			||||||
 | 
							} else if (VersionHandler.isUnder_1_19()) {
 | 
				
			||||||
			WrappedChatComponent component = WrappedChatComponent.fromJson(json);
 | 
								WrappedChatComponent component = WrappedChatComponent.fromJson(json);
 | 
				
			||||||
			container = new PacketContainer(PacketType.Play.Server.CHAT);
 | 
								container = new PacketContainer(PacketType.Play.Server.CHAT);
 | 
				
			||||||
			container.getModifier().writeDefaults();
 | 
								container.getModifier().writeDefaults();
 | 
				
			||||||
@ -445,7 +449,11 @@ public class Format {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	public static PacketContainer createPacketPlayOutChat(WrappedChatComponent component) {
 | 
						public static PacketContainer createPacketPlayOutChat(WrappedChatComponent component) {
 | 
				
			||||||
		final PacketContainer container;
 | 
							final PacketContainer container;
 | 
				
			||||||
		if (VersionHandler.isUnder_1_19()) {
 | 
							if (VersionHandler.isAbove_1_19()) {
 | 
				
			||||||
 | 
								container = new PacketContainer(PacketType.Play.Server.SYSTEM_CHAT);
 | 
				
			||||||
 | 
								container.getStrings().write(0, component.getJson());
 | 
				
			||||||
 | 
								container.getBooleans().write(0, false);
 | 
				
			||||||
 | 
							} else if (VersionHandler.isUnder_1_19()) {
 | 
				
			||||||
			container = new PacketContainer(PacketType.Play.Server.CHAT);
 | 
								container = new PacketContainer(PacketType.Play.Server.CHAT);
 | 
				
			||||||
			container.getModifier().writeDefaults();
 | 
								container.getModifier().writeDefaults();
 | 
				
			||||||
			container.getChatComponents().write(0, component);
 | 
								container.getChatComponents().write(0, component);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user