Jump to content

Durand1w

Members
  • Posts

    39
  • Joined

  • Last visited

Everything posted by Durand1w

  1. I ended up using the methods that the command use to bypass the need to OP/deOP players. It works fine in single player, but I'm struggling to understand how to separate the scoreboard methods between server and client and to trigger a save of the value. I don't believe I need to create a custom packet handler, since there should be an existing method to write score updates. Item Code: When on a server, the client shows the change in score, plays the sound and shows the chat message with the correct score. It does not save and my score is reset when I relog. I know it is partly due to server vs. client. The server shows an error trying to run the Scoreboard scoreboard = (line 94) on the client side. I have attempted numerous If world.isRemote variations to reorganize the code, so I'm not sure if I'm missing a save statement or if I should be using ServerScoreboard or something else entirely. Server Log showing issue running scoreboard on client side: Image of what I have working: Scoreboard Testing Thanks for any assistance.
  2. Thanks for the fast reply. So then my problem is to OP and deOP players each time they use a coin with a banking station. I'm not sure if there is a way to avoid that since they could spam deposit a stack of coins. On using the scoreboard, it's mostly out of convenience. It already exists, it's light weight and eliminates the need for custom packets, mySQL database or other complication of the core game. It also increases the likelyhood of me supporting it easily between world upgrades. This game over the last 5.5 years has resulted in me learning to create and manage a community website, learn Gimp for texturing, and create over 600+ blocks/models between two mods for our small server. Those are not things you learn doing project technical support, but it's fun to see people build/adventure with the end result.
  3. Thanks in advance for your time. I have a few questions around the scoreboard system and implementing a currency system. At the moment, I already have 3 physical coins in game, a block that removes the coin and runs a set time command for users. I also have the scoreboard command working to add/remove points to the scoreboard on the list slot. But, I have a few questions which may make this effort void. -Is the scoreboard restricted to OPs on forge in multiplayer? -Does having the command execute from within the mod, change the players ability to have it execute? Minecraft.getMinecraft().thePlayer.sendChatMessage("/scoreboard players add " + playerIn.getName() + " Money 10"); -Is there a better approach than the command above (/trigger command or)? -Does anyone know of any issues with scoreboards for permanent worlds, rather than short minigames (value loss, resets)? Ideally, I want to replace our virtual Cauldron Vault economy with scoreboards and physical coins, but I need to ensure that I'm not on a wild goose chase or that players are going to be able to spam chat commands to get rich quick. Thanks for any suggestions/tips/known problems.
  4. I do know that if I substitute a vanilla sound in for the custom sound, it does not crash. Sorry if that was not clear earlier. I have also tried other working custom sounds, and they cause a crash as well when used. public static SoundType COINS = new SoundType(1.0F, 1.0F, coins_sliding, SoundEvents.BLOCK_WOOD_STEP, SoundEvents.BLOCK_WOOD_PLACE, SoundEvents.BLOCK_WOOD_HIT, SoundEvents.BLOCK_WOOD_FALL); At one point I thought that SoundTypes needed to be registered like SoundEvents, but I don't believe that is the case. If they did, then I would not expect the vanilla sounds to work in the statement above, nor have I found where they are registered like SoundEvents. Minecraft 1.10.2, Forge 12.18.1.2011 Thanks for any insights. I spent a large chunk of Sunday trying to identify my mistake or lack of understanding. Crash Log:
  5. I have two mods that have working Sound Events. I have encountered a situation where I would like to be able to define a custom Sound Type, as the available SoundTypes don't fit the block I have created. I have not been able to find a post or example so far to know if I'm missing a requirement. I have confirmed that the sound file itself works with OnBlockPlaced, so the sound file and the sounds.json file are fine. When I define a Custom SoundType, the vanilla action sounds work without issues. The custom action sound causes a null pointer exception. The log itself hasn't helped in identifying a cause. Eclipse shows the correct path, so it isn't an issue of not finding the sound file/file not found exception. Block Class: setSoundType(TyrDropSounds.COINS); Sounds Class: public static SoundEvent coins_sliding; coins_sliding = registerSound("coins_sliding"); public static SoundType COINS = new SoundType(1.0F, 1.0F, coins_sliding, SoundEvents.BLOCK_WOOD_STEP, SoundEvents.BLOCK_WOOD_PLACE, SoundEvents.BLOCK_WOOD_HIT, SoundEvents.BLOCK_WOOD_FALL); I'm wondering if there is something else that must be done for Custom SoundTypes or other information that may make this problematic, since I think the available sounds work for the vast majority of blocks. Chains and Coins are my only two use cases so far. Thanks for any info.
  6. Any suggestions or confirmation from the Forge team? It looks like Nuchaz logged a bug report that was assigned, but the owner hasn't been active for a few months. https://github.com/MinecraftForge/MinecraftForge/issues/3173
  7. Just that easy. Thank you sir! http://files.enjin.com/153233/images/forumposts/2016-09-30_18.34.38.png[/img]
  8. I think that is exactly what I need. Thank you!!! I wasn't aware of that after a lot of online searching.
  9. Yeah, that was my first hope. The issue is that even the iron parts are treated as transparency. If you move around the block, periodically parts of the iron will show the glass or candle inside. I tried redesigning it several times to try to avoid the issue with no luck. It also meant applying a texture to every part in the event that it would show through. That is something I'll have to clean-up in the block model later.
  10. I have a lantern block that I was hoping to use with stained glass, but the dilema is that CUTOUT, CUTOUT_MIPPED and TRANSPARENCY are defined at the block level, rather than as part of the .json model file by part. I'm hoping to have the glass use TRANSPARENCY, while the metal parts of the lantern are the default Solid (or CUTOUT). I thought this might have been possible using tintindex and iBlocks, which I have working for another block now, but I don't believe it can be used modified or used for that purpose. If anyone can verify if it is possible and suggest a direction, it's greatly appreciated. If it is not currently possible, that is okay as well since it will save me the time of chasing another solution. http://files.enjin.com/153233/images/forumposts/2016-09-28_06.29.38.png[/img] Thanks for all the great post and tutorials.
  11. Sorry for the late reply and thank you for the info. That confirms what I was able to find digging through the event classes for villagers. I wasn't able to find anything on the zombie sieges and thought maybe I was missing something.
  12. Hopefully these are quick questions. I haven't had any luck finding any these events in the code to use for two requested items. 1> Is there a zombie siege event available? 2> Is there a village cured event. I found the sound event that is played, but that doesn't provide a position to spawn in an item. If these hooks are available outside of the minecraft and forge event folders or if there is a different preferred method available for hooking into these, please let me know. Thanks for your time.
  13. Thank you for the link. Honestly, it is bad design. The good news is I'm aware of it, the bad news is the reasoning below. I have tried to avoid using metadata outside of the absolute need for it to create slab/double slabs. During upgrades you can still manually edit the level.dat if there are block id issues, which I had to perform for the last 1.6 to 1.7 update to keep our world from Beta. Metadata isn't as easily editted outside of entities and storage. I'm also not concerned with the maximum block limit as that has continued to increase over time. To your point, it is the use of instances where I'm lacking. 16x4 classes + 16x5 rendering files for a single set of colored blocks isn't sustainable over the long run if you want to do more than one set, so I have the need to find a better way.
  14. I currently have a 1.8 mod that has working slabs for all the colors of the existing hardened stained clay blocks. I am wondering if there are any suggestions on a better way to handle the class creation and block state files for color variations of blocks? Right now the mod has an Item, Slab, Half Slab and Double Slab class for each color which is 4 classes x 16 blocks. I also have a large mass of asset files for the rending. I could simply copy the same code to create the planned stained glass slabs, but wanted to see if there are any recommended approaches or suggestions. Thanks for any insight.
  15. For those tracking this issue, you can find the open issue below: https://github.com/MinecraftForge/MinecraftForge/issues/1687
  16. Thank you for posting this localtoast9001. It has been very helpful so far. Ragarding getID(), it does appear to be missing from the posted common block class. I believe this is the same as getName, but having seen another mod using it, I have not been able to determine what the function does that they are using since there are two name values (if statement required?). public String getID() { return func_176552_j() ? "slab_double" : "slab"; } I believe GamerUtility was the mod name he was using. On the HALF_META_BIT, I believe that should be a constant as well, but may be wrong. I have this currently defined in the common block class: private static final int HALF_META_BIT = 8; I do have normal blocks, stairs, walls and pillars working. If you have a question about stairs, send me a message and I might be able to point you in the right direction. Any information anyone can share on the points above is appreciated. Thanks!
  17. Thanks for posting. I managed to work through this part of it, but haven't quite got things working. This definitely helps though and I wanted to say thanks!
  18. At the moment, I have a working cube block and about 3 dozen stairs in the mod I am creating. I have been working on stone pillars and sandstone walls over the last several evenings and have a question. Is it the preferred method to use the BlockWall and BlockLog classes if you are creating the same model with a different block texture for walls and logs/pillars? Block and BlockStairs were straightforward, but both BlockLog and BlockWall have existing block variants in the classes (mossy cobblestone, cobblestone, etc). I have tried to override those classes, which was possible in one case, but not in regards to "public static enum EnumType implements IStringSerializable". Basically, I'm looking for direction on if I should try to write my own 'clean' BlockWall and BlockLog/Column class or if there is a way to override the existing variants in these classes to use the existing code. Thanks for any insights.
  19. Thanks for posting on this. Hopefully, we can get a getCareer method to go with the existing getProfession method as well.
  20. oh, the entity of the render class.... Thank you!!! http://s10.postimg.org/9e9hk40jd/2015_01_30_14_14_23.png[/img]
  21. I was able to get the block model to follow the player over the weekend. I did find a coding issue when there are multiple enderpad blocks... I set the pitch and yaw variables that I need in the renderer to static and used getEnderEyePitch and Yaw in the renderer to pull the variables down so I could use them in the rotation. The result is that each newly placed enderpad block updates itself to the player and the older blocks mimic the new block, rather than maintaining their own pitch and yaw based on the player. I don't believe writing NBT data is a good solution since this would involve countless updates per tick. I also haven't been able to find how this is performed for the enchantment table tile entity/special renderer (which is the same principle but only has one variable, not 2). The placement of the ender eye model in the block is only cosmetic and does not impact game play, so I don't believe packets are the solution? I'm trying to determine the best/better way to have each ender pad block model use it's own instance variables. I'm not sure this is needed, but I have posted what I have at the moment. TileEntityEnderPadEye RendererEnderPadEye
  22. Thank you! The EntityLookHelper looks like it has exactly the kind of existing classes I was hoping to use rather than attempt to write. Thanks for taking the time to point me in the right direction!
  23. hello, I'm working on my fourth mini-mod for our server and I have ran into a road block. I have a working glass block with particle effects that renders a smaller custom model inside of it which I can spin on all 3 axis. At this point, rather than having it just spin freely, I want it to face the nearest player within X blocks. For the model facing the nearest player inside the render class, what functions are available to be used? I have looked at the enchanting table (which is similar but only on one axis) as well as the mob AI faceplayer methods, but I feel like I am reinventing the wheel and likely missing a separate class that was designed specifically for rendered models. I have done some coding attempting to use the line below, but I'm hoping for a better method to look at rather than getting the x,y,z coordinates and trying to run the rotations using loops and some creative math. EntityPlayer entityplayer = this.worldObj.getClosestPlayer(this.xCoord, this.yCoord, this.zCoord, 8.0D); Please let me know if you have any suggestions. Thanks!
  24. I ventured away from my testing area and found that areas that had not loaded showed the items. I created another test world and implemented the ID fixes before logging into the world. Everything is as it should be minus 5 items I missed but quickly resolved thanks to our server shop. This is the last question on this I'll ask now that I have a method to manually get us update. For the level.dat in the world folder, is it identical (should it be) in any of the dimensions? We haven't done anything unique between them and by all appearances it looks the same. If it is, then I can just copy the finished world into the dimension folders to save time later. Thank you for your help!
  25. or if you can detail what Forge expects in terms of registering blocks correctly map them, then I'll reach out to Bloodshot since Mo'Creatures is on of the primary offenders.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.