forked from gnembon/carpetmod
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update mod litematica-server-paster to v1.2.0
- Loading branch information
1 parent
9b332f9
commit 652c394
Showing
6 changed files
with
160 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
src/main/java/me/fallenbreath/lmspaster/network/LmsPasterPayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* This file is part of the Litematica Server Paster project, licensed under the | ||
* GNU Lesser General Public License v3.0 | ||
* | ||
* Copyright (C) 2023 Fallen_Breath and contributors | ||
* | ||
* Litematica Server Paster is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Litematica Server Paster is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with Litematica Server Paster. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package me.fallenbreath.lmspaster.network; | ||
|
||
import net.minecraft.nbt.NBTTagCompound; | ||
import net.minecraft.network.PacketBuffer; | ||
import net.minecraft.util.ResourceLocation; | ||
|
||
public class LmsPasterPayload | ||
{ | ||
public static final ResourceLocation ID = Network.CHANNEL; | ||
|
||
private final int id; | ||
private final NBTTagCompound nbt; | ||
|
||
public LmsPasterPayload(int id, NBTTagCompound nbt) | ||
{ | ||
this.id = id; | ||
this.nbt = nbt; | ||
} | ||
|
||
public LmsPasterPayload(PacketBuffer buf) | ||
{ | ||
this(buf.readVarInt(), buf.readCompoundTag()); | ||
} | ||
|
||
public int getPacketId() | ||
{ | ||
return this.id; | ||
} | ||
|
||
public NBTTagCompound getNbt() | ||
{ | ||
return this.nbt; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/me/fallenbreath/lmspaster/util/RegistryUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters