Everything posted by BentiGorlich
-
[1.16.4] TileEntities created twice
Hello dear modders, I started to do stuff with tilentities and guis. My problem is, that i can't access the data on my tileentities from the gui, because it is not the same tile entity as the block i clicked on to open the gui. I have coordinates stored in an nbt integer array in a controller block and i want to display how many coordiantes i have stored on the gui. I created a `int ID` which is set in the constructor to check if it gets instantiated more than I would want, and I was right about that. Any idea why that is happening? In my screen class: @Override protected void drawGuiContainerForegroundLayer(MatrixStack matrixStack, int mouseX, int mouseY) { GateControllerContainer container = getContainer(); GateControllerTileEntity tileEntity = container.tileEntity; int placerCount = tileEntity.getPlacerCount(); font.drawString(matrixStack, title.getString(), 8.0f, 6.0f, 4210752); font.drawString(matrixStack, "Bound to " + placerCount + " placers", 8.0f, 50.0f, 4210752); font.drawString(matrixStack, playerInventory.getDisplayName().getString(), 8.0f, 70.0f, 4210752); } I set the tileEntitiy variable in my container class in its constructor And in my TileEntities class: @Override protected Container createMenu(int id, PlayerInventory player) { return new GateControllerContainer(id, player, this); } Thanks in advance for your tips
-
Acceptable Remote Version in 1.16.1
Ok nevermind, I got it: ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST, ()-> Pair.of(()->FMLNetworkConstants.IGNORESERVERONLY, (version, network) -> {return true;})); And my problem is solved now. Thanks for the help
-
Acceptable Remote Version in 1.16.1
I think that you mean someting like this: ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST, ...); But I don't know how the function/the second argument would look like. I also tried looking on the internet but didn't find anything related to that.
-
Acceptable Remote Version in 1.16.1
Thanks for the quick reply. It is working as serverside only. However in the multiplayer tab on the client ther server is shown as incompatible due to different mod lists... How do I get rid of that?
-
Acceptable Remote Version in 1.16.1
Hello Folks, I just tried to port my mod from 1.12.2 to 1.16.1. It is a serverside only mod, which doesn't (or shouldn't) be required on the client side. In 1.12.2 there was an attribute in the @mod annotation called "acceptable remote version". I set this to "*" and it worked. In 1.16 the annotation does not take any attribute other than the mod name. So is there another way of doing this? I didn't found anything on the internet regarding this and the only open source mod I know is Ender IO, which has not been ported to 1.16 (and is not serverside only) Thanks in advance :)
-
Creating Server only Mod
I'm just stupid... I forgot to save the class before building it ?♂️ So yeah it works. Thanks for the quick help ?
-
Creating Server only Mod
I finally got to try it. It didn't do the trick... I still get the same error message...
-
Creating Server only Mod
Thanks for he quick answer. I'll try that tomorrow.
-
Creating Server only Mod
Hello Forge Community, I have a relatively easy problem I think. I want to create a mod that monitors online players and saves them in a database. For that the client does not need to install the mod. I already have the arguments "serverSideOnly" and "canBeDeactivated" in the "@Mod" annotation set to true. When I try to connect with a client that doesn't have the mod installed I get a mod rejection error, because the mod is not installed. How can I fix this?
IPS spam blocked by CleanTalk.