American2050
Members-
Posts
553 -
Joined
Everything posted by American2050
-
So I'm slowly getting back into modding for 1.14.4 and of course, a lot of things have changed and I have many questions for sure and will have even more. This is a simple one to get more information about the TOML file. We can read on it: # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it version="${file.jarVersion}" #mandatory What are and where can I find the "well known" ${} variables. And what would be the best way to not hardcode that value but be able to read it from one of the .java files in my mod structure?
-
Thanks. Yes I think the problem was that IntelliJ was trying to use Java 11 instead of 8.
-
I remember seen this error in the past, but in other projects I have set up, the errors are no longer present, and I don't know what I'm missing or what fixed it. Why is all this showing underlined in red? I understand it's because import java.util.stream.Collectors; can't be resolved. But I don't understand how to fix it.
-
I think this is related to now blocks using loot tables to pick the drops from, but I can't find where the vanilla blocks drops are specified. In Eclipse I check on Referenced Libraries -> Forge 1.14.4 .... -> net -> Minecraft -> And I get lost, the resources folders is there, but it's probably not the one I'm looking for. Any idea where can I check this? Thanks a lot.
-
https://www.minecraft.net/en-us/article/minecraft-snapshot-19w36a CHANGES IN 19W36A Obfuscation maps are now published with all future releases of the game I'm not sure what this exactly means, and what changes (if any) we would expect to see on Forge.
-
I have few questions about changes on 1.13.2 I remember with previous versions, after running "gradlew setupDecompWorkspace" and "gradlew eclipse" I was able to open that directory on Eclipse and everything was ready to go. Now in 1.13.2 apparently all we need to do is "gradlew eclipse" and "gradlew genEclipseRuns" However after doing that and opening the folder where we run this lines, no environment is ready, but instead we need to open the parent folder and then import that folder where we run de commands as a new project. While this leaves "everything" ready to start working. There are no "Run as" options, even when runClient.launch and runServer.launch files are there. What steps am I doing wrong, or what am I missing? Thanks a lot.
-
Exact same question so I guess I rather bump than creating a duplicate.
-
Thanks.
-
So I was getting into modding once again, but I noticed many things have changed. So even when I was going to skip 1.13.2 I decided to create a project with this version as it's what the documentation is up to. What I have noticed after starting is that it seams that it's not really up to date, unless I'm missing something. For example the Documentation mentions that @Mod accepts different parameters, but in my case, it only accepts "modid" It also mentions a mcmod.info file. But in the example that file isn't there, and what we find is a mods.toml file with information about the mod. Should I not pay attention to the documentation and find out about all the changes somewhere else?
-
Try with: worldIn.playSound(player, pos, SoundHandler.record1, SoundCategory.RECORDS, 1.0f, 1.0f); Also I believe you don't need the .ogg when creating the Sounds. public class CreateSoundEvent extends SoundEvent { public CreateSoundEvent(String name) { super(new ResourceLocation(ModInfo.MODID, name)); this.setRegistryName(new ResourceLocation(ModInfo.MODID, name)); ModSounds.SOUNDS.add(this); } }
-
I am having a problem with a mod I tried time ago. Thanks to the help of the people here in the forum I was finally able to make a World Generator, that generates a world of 1 chunk. However I'm noticing some problems. One of them... I am using something like this to know what chunk is the world spawn chunk, and generate a chunk only on that case Something like this: public Chunk generateChunk(int x, int z) { int xCoord = this.world.getSpawnPoint().getX(); int zCoord = this.world.getSpawnPoint().getZ(); int xChunk = xCoord / 16; if (xCoord < 0) { xChunk--; } int zChunk = zCoord / 16; if (zCoord < 0) { zChunk--; } LogHelper.info("SpawnCoord X: " + xCoord + " SpawnCoord Z: " + zCoord); LogHelper.info("Gen Chunk X: " + x + " Gen Chunk Z: " + z); LogHelper.info("Match Chunk X: " + xChunk + " Match Chunk Z: " + zChunk); if (x == xChunk && z == zChunk) { LogHelper.info("MATCH!!!"); Here you can see a log with the problem: https://pastebin.com/HFM0FFwi What's the problem? Well, xCoord and zCoord are both 0 until this happens: [17:01:26] [Server thread/INFO] [com.mramericanmike.onechunk.LogHelper]: SpawnCoord X: 0 SpawnCoord Z: 0 [17:01:26] [Server thread/INFO] [com.mramericanmike.onechunk.LogHelper]: Gen Chunk X: -29 Gen Chunk Z: -57 [17:01:26] [Server thread/INFO] [com.mramericanmike.onechunk.LogHelper]: Match Chunk X: 0 Match Chunk Z: 0 [17:01:26] [Server thread/INFO] [FML]: Loading dimension 5 (New World) (net.minecraft.server.integrated.IntegratedServer@671cdf59) [17:01:27] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@671cdf59) [17:01:27] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@671cdf59) [17:01:27] [Server thread/INFO] [com.mramericanmike.onechunk.LogHelper]: SpawnCoord X: -430 SpawnCoord Z: -859 [17:01:27] [Server thread/INFO] [com.mramericanmike.onechunk.LogHelper]: Gen Chunk X: -39 Gen Chunk Z: -66 [17:01:27] [Server thread/INFO] [com.mramericanmike.onechunk.LogHelper]: Match Chunk X: -27 Match Chunk Z: -54 So what's the problem? Well, sometimes the generation, for example, for the chunk -27/-54 happens while the coords are still 0 so the chunk never gets generated. Don't know what I can do to avoid this. It's like this.world.getSpawnPoint().getX() doesn't return the correct value until the world gets loaded, but how is it that it's already generating if it's not even loaded. Can I get those spawn coords in a different way? Another problem. How can I fix the respawn of a player, because I'm still not 100% sure if they will respawn the whole time inside the same chunk, can I force that, at least until a player sleeps?
-
Thanks you so much. Yes doing some Google I found out that existed. I'm heading in the right direction and I believe I have everything sorted out. Just some minor problems here and there, like noticing that the method that handles inserting items into my TE doesn't care about checking on my Slot class if Item is Valid for Slot. I would think that's something they would do by default but apparently not, unless I'm missing something. I also need to implement some stuff that I'm not 100% sure how yet, but I will let you guys know once I get there. Thanks once again for the great help and patience always provided.
-
Ohh ok. Perfect. Now one question. I had "Slots" on my Container for the TE and this container took IInventory in order to add the slots when using public ContainerCardBox(InventoryPlayer invPlayer, IInventory inventory, EntityPlayer playerIn) { ..... this.addSlotToContainer(new SlotCardBoxCards(inventory, m, 8 + m * 36, 18)); Now I don't have IInventory anymore, as that was my TE implementing IInventory, thing that I'm not supposed to do anymore. How do I go around this? Because Slot needs an IInventory.
-
Thanks, I think I get the idea. Just one thing I'm not sure now. I still have to implement both IItemHandler and also ICapabilityProvider on my TileEntity right?
-
I am already extending TileEntityLockableLoot that class extends TileEntityLockable that implements ILockableContainer that extends IInventory What would be a better alternative to have the basics of what a chest should have.
-
Thanks you. Do I also need ISidedInventory or that's only in the case I want to only allow certain things coming from X side or been taken from X side?
-
I have a simple question, I'm making a custom chest for a mod, I want to know, what should I implement or take into account to make pipes from any mod be able to interact with my chest with no conflicts. Thanks a lot.
-
[1.12.2] Rendering block as inventory Item
American2050 replied to American2050's topic in Modder Support
Yes, it's exactly like a Shulker Box from Minecraft. As for now what I was doing is setting the textures like for other blocks, with .json files. But I believe that's not the optimal way to do it. Specially because the block also has "facing" properties. (Block on inventory doesn't need to change orientation at all) -
[1.12.2] Rendering block as inventory Item
American2050 replied to American2050's topic in Modder Support
Well, in my case I don't have .json files as what is rendering the TileEntity is a TileEntitySpecialRenderer Class -
I have a TileEntity Block in my mod that I am registering with the ClientRegistry#bindTileEntitySpecialRenderer What I'm not sure now is how to I register the items for that block to render correctly when on inventory. Any guidance would we appreciate. Thanks a lot. PS: On some old mod I had in 1.7.10 there was an IItemRenderer I remember
-
[1.12.2] How does receiveClientEvent works?
American2050 replied to American2050's topic in Modder Support
Ohh ok, I see now how they call it. Not that I want to use it, I was just seen how Vanilla does it and apply it to my Block. (There must be a reason on why the call each method in the locations they call it) Like why wouldn't they just call the Open GUI, the notification for Animations to let know it's OPENING and the PlaySound of the Shulker Box all in the same place, I don't know, why they do it like this? I don't think it's "just because" doesn't make much sense to me, I would just call everything from "onBlockActivated" -
[1.12.2] Checking if the player's inventory is full?
American2050 replied to Differentiation's topic in Modder Support
Only for the 27? Not the 9 on hotbar? InventoryPlayer has a method called .getFirstEmptyStack() it will return -1 if no slot is empty. Now for what you need, if it has to be only on the 27 slots not the hotbar, I guess you can loop yourself and check for ItemStack.isEmpty() if they never empty, then you know the inventory is full. -
[1.12.2] How does receiveClientEvent works?
American2050 replied to American2050's topic in Modder Support
So, it's only called on World addBlockEvent? How that gets triggered when opening a Shulker Box? (Or for the case, how do I make so it triggers on my code when I right click my block) What you mean with no use BlockContainer? On my block I have this method @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty[] { FACING }); } That is okey to use? -
I was looking at the TileEntityShulkerBox and I saw the method receiveClientEvent that decides when to start the OPENING / CLOSING animation of the Shulker Box. My question is... What triggers this? I was trying to implement this on my own TE but that method I don't think it's getting called at all. What does Minecraft do with that block for it to get called? PS: In the meanwhile I just moved the OPENING / CLOSING to the openInventory / closeInventory and while it is working, not sure it's the best way.