-
Posts
3284 -
Joined
-
Last visited
-
Days Won
62
Everything posted by ChampionAsh5357
-
[1.15.2] [SOLVED] Armor that gives potion effect
ChampionAsh5357 replied to GAVINSIGHT's topic in Modder Support
https://mcforge.readthedocs.io/en/latest/concepts/sides/#worldisremote That should help you. -
[1.15.2] [SOLVED] Armor that gives potion effect
ChampionAsh5357 replied to GAVINSIGHT's topic in Modder Support
Are my eyes deceiving me or are you missing a bracket somewhere? Moreover, why are you removing the potion effect instead setting the effective time to something smaller. Third, potion effects should be added on the server side. -
[1.15.2] Write DimensionType instance to packet buffer.
ChampionAsh5357 replied to nanorover59's topic in Modder Support
DimensionType is a registry is it not? Use the registry name and pull the data from the registry afterwards. -
Probably true, you most likely didn't sync the data from the server to the client so the client remembers the items that were originally there without the update. If you have a container, it should be the same process as anything else to add the container to the gui. Telling us something is wrong without showing a reference is also not helpful since we have to guess on what to fix based on prior posts.
-
This is not a capability, the nbt data is only useful when saving or loading a world in this case. What you've done is literally nothing since the data will never be read.
-
Would you happen to be able to show your code? This is a very general statement. You should only need to store the UUID of the player.
-
[SOLVED] [1.15.2] Custom FillerBlockType for Ore Generation
ChampionAsh5357 replied to ModMCdl's topic in Modder Support
I think the correct implementation is something like this: public static final FillerBlockType VAR_NAME = FillerBlockType.create("VAR_NAME", constructor_variables...); The enumName refers to your own variable that you are creating. -
[SOLVED] [1.15.2] Custom FillerBlockType for Ore Generation
ChampionAsh5357 replied to ModMCdl's topic in Modder Support
If I remember correctly, the enumName is the name of the variable you are defining the enum value for (e.g. NATURAL_STONE, NETHERRACK). If it's not that, it probably is the name of the enum class. -
PlayerInteractEvent#EntityInteract with some clever usage of a capability on the creeper probably would work.
-
One of your ITextCompoments is incorrectly reading information. Maybe its an uninitialized string object within your tile entity. Maybe its the fact you have I18n on a variable in your container even though its client side only. You could easily put a breakpoint at all of your ITextComponent instances and find the location where it errors. I'm not sure where the exact error is, but your code seriously needs an overhaul to the current standard including no IInventory, TranslationTextComponent, etc.
-
A good thing to look at is the log since it does check if there is an error while parsing a blockstate in a certain space. Based on a quick glance, you seem to have a random structure block with no metadata in your nbt making it completely pointless. I didn't see anything wrong with the code itself, but I also have very limited knowledge on nbt loading of structure pieces. I still need to create some tests of my own.
-
When adding a structure, you must do two things. First, you must add the feature to every biome as you did. Then, you have to add the structure to the structure map using Biome#addStructure. I think that's it since everything else seems correct.
-
[1.15.2] Changing ForgeConfigSpec values in game.
ChampionAsh5357 replied to Squidsword's topic in Modder Support
Then yes, you would sync those values in a packet, except you're not changing the config variables. You're storing the result in wherever you are using the HUD. Basically, when turning on the hud, send a packet to the client from the server side containing the variables stored in the config. Then, store those values inside the HUD to be rendered. This way you are getting the variables from the server rather than the client. That's how I see it anyways. -
PlayerEntity capability is not persisted
ChampionAsh5357 replied to DARKHAWX's topic in Modder Support
You still need to sync the data between client and server when logging in. -
[1.15.2] Changing ForgeConfigSpec values in game.
ChampionAsh5357 replied to Squidsword's topic in Modder Support
I was saying that originally because I misunderstood your original intention. So, let's address it. If I understand this right, you want the dedicated server config to match the users own personal config file? I'm not sure why you would need to send a packet from server to client to recognize the change. My understanding of the config file is based in logical sides. There are two kinds of servers: IntegratedServer and DedicatedServer. The server uses the config file adjusted for common and server based code ignoring client (for obvious reasons). The need for updating the specific user is irrelevant since data such as what you are describing would be handled on the server side. If there is something that needs to require Minecraft to restart, then you would need to restart minecraft again to change them. You would need some instance of reflection to override that. Moreover, code would be handled by the server itself leaving only rendering details to be handled by the client making the whole point of a packet update seem quite useless especially since they're final values. I would recommend testing your mod using a server with a different configuration than the user and test it and see what results. If my understanding of config files is right, the server should reign over the user on a multiplayer world and only in a singleplayer world would the user's config be needed. -
[1.15.2] Changing ForgeConfigSpec values in game.
ChampionAsh5357 replied to Squidsword's topic in Modder Support
What's the point of having a configuration file if you want to change the variables within the code itself? Just create a temporary variable for testing purposes and change it to the config version once you have finished. -
[1.15.2] Registry Object not present. Why does this happen?
ChampionAsh5357 replied to superminerJG's topic in Modder Support
Just because you put a method in-between two registers doesn't mean anything. You're trying to register the BlockItem before the Blocks have even had a chance to be registered. If you want to register an item block the way you're doing it, you have to wait for each block to be registered and then activate your method. Otherwise, use the same instance of the block used when registering in your item. One of the easiest examples of registering the block and item at the same time is like so: private static <T extends Block> RegistryObject<T> register(String id, T block, @Nullable Function<T, BlockItem> item) { if(item != null) CustomItems.ITEMS.register(id, () -> item.apply(block)); return BLOCKS.register(id, () -> block); } -
If you have already created a block with a Container, you would know that using NetworkHooks#openGui is used to activate a container and its gui counterpart. Unless I'm mistaken, it should be the same process.
-
[1.14.4] Drop Itemstack next to player in world
ChampionAsh5357 replied to Delupara's topic in Modder Support
I mean that's what you use if you create an ItemEntity, set the position, and then spawn in the item. -
I implemented the fluid, now for the next step
ChampionAsh5357 replied to TheThorneCorporation's topic in Modder Support
If you can find the folder where you extracted the forge contents into, you are going to open up a command window (Command Prompt, Powershell, Terminal, etc.) and then type 'git init'. From there, its the same setup as you would a normal git repo for whatever website you are uploading to. -
I implemented the fluid, now for the next step
ChampionAsh5357 replied to TheThorneCorporation's topic in Modder Support
Use a transparent texture? As for a git repository, initialize the git repo in the folder that holds the build.gradle file and then repeat the process when you create a repo as normal.