Jump to content

Toma™

Members
  • Posts

    80
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Toma™

  1. Hi, since I plan on adding quite a lot of blocks into the game, I don't feel like manually writing .json files for them. However I've run into issue - I don't know how to do it. To be more specific I've been able to automatically create block model and item model files also with basic blockstate file, but I've wanted to do it even for blocks with multiple properties, like PropertyDirection and PropertyBool for example (for single property it's simple). I can't really figure out how to do it for multiple properties so I'm looking for someone who knows how to and is willing to give me a few hints about this.
  2. Alright, I'm working on one project which has some kind of "core" mod (functions etc). I was always able to update the dependency version using the build.gradle where I change the deobfcompile line. Never had single problem. But suddenly, after updating to new version I got 403 Forbidden access error. So I deleted everything, cloned the workspace from github and rebuild the workspace with dependency without problems (but with the older version). Then I have tried to repeat the process again, but it has ended with the same result as before. I have no idea what the problem could be. This is the only dependency which causes problems. We're using github releases system for this. I have access to the repository, I can view it from any browser (but it's private) I'm pretty bad with all this gradle stuff so if someone knows what's the problem and how to solve it, please help me, I will appreciate that LOG:
  3. Hello, I've recently found issue with my sounds. They're being played so I guess I did everything the right way. I know that minecraft sounds are directional/stereo (I don't know the correct term) because I cannot pinpoint entity location without issues, but when I play my sound, it always feels like it's coming from the client position so it makes it hard to realize where the sound is coming from. I noticed there are few other sound classes like Positioned sound, but minecraft uses that only for records, so I guess the issue is somewhere else. I just have no idea how to get this done. Does anybody know something about this?
  4. Okay, I have tried that, but my entity is still disapearing under some angles for some reason. I added that boolean into constructor and that's all. I've been looking into it's usage and it appears only the Dragon entity from Minecraft is using that and I did exactly the same implementation.
  5. On client side you can get the player from Minecraft class - Minecraft.getMinecraft().player
  6. Hello, I created quite large entity which can be ridden by 32 players, however I found issue with it's rendering... When I'm looking around the entity it stops rendering under some angles. I have tried setting it's size to big number to cover whole entity so when you look at the entity you should be able to see it's bounding box. That didn't help. Is there some way to get around this? I could post some code, but I think this is built in somewhere in Minecraft by default.
  7. To get blockstate use Block#getDefaultState() Block is the block you want to place, you can get it from block list like Blocks class To get block by registry name, try going through ForgeRegistry
  8. There should be method in TileEntity called shouldRefresh (atleast in 1.12). Try overriding that I'm stupid, and I can't read...
  9. For saving data you need Capability. After that is completed you can save any data you want. After button is clicked you will have to notify server about data change using packet.
  10. It appears that moving whole movement logic on server pretty much solved the issue. However the entity still sometimes rubberbands, but I guess thats because of it's speed. I changed the updateFrequency to 1. Thanks a lot for help
  11. Okay, thanks for suggestion and information, I thought updateFrequency is how often is entity being updated... Anyway, I have tried pretty much all values ranging from 1 to 80 and every time I had issues. When I used 1 from what I remember the entity was rubberbanding quite a lot. I will try to move the motion logic on server, to see if it helps, although I'm pretty sure I've seen someone comment here about how it is important to handle motion logic on both sides, and I don't really think there would be different calculations on server and client (but I'm not expert at all). I was even debugging all motion related variables to see if they're the same and they were. I will try to move it on server, if it improves at least a bit I will be happy. Thanks for a lot of information
  12. Hello, I've created custom vehicle entity which is controllable. However I have quite big issue - as soon as I attempt to drive, the entity teleports back few times and then starts moving (while sometimes teleporting a bit). Also when I dismount the entity, it starts teleporting every second until it loses it's velocity. I have been reading few threads about this, but nothing worked. I made whole entity move on both sides, even started sending input packets to have most precise calculations, but nothing works. I'm out of ideas. I have been playing quite a lot with the updateFrequency on registration, but couldn't find anything what would work perfectly, it always had some kind of teleportation issues. For registration I use the forge event and entry system, with tracking range of 256 blocks and update frequency of 20. If it's helpful there's the entity code: Input is being taken from ClientTickEvent and is synced throught packet to the entity - not sure if it's good idea, but I gave it a try, since nothing seemed to work
  13. As I'm thinking about it, I won't be able to have 2 corners inside the map because I have 2 squares and one of them is misplaced from the center, so having making this would be impossible right?
  14. I think you misunderstood my post a bit. What I meant is this: - I have map where I defined the map center (zone minimal offset) and map size (zone maximal offset). Then random zone center is calculated based on these values -> Zone center is between these 2 points. - The default zone size is the map size multiplied by 2 - But since the map is being offset from the map center, the zone corners don't cover all maps corners (obviously). So I'm looking for a way to calculate the new zone size based on the map size*2 and the zone's offset from the map center. I've been trying some triangle math here, but that didn't work. I'm trying to always have 2 corners of the zone cover 2 corners of the map and the other 2 zone corners to stick away from the map. So far I managed to get it to work with 1 side of the zone, but now I'm completely lost. I will post GitHub link to my first post with updated code & my attempts.
  15. Use the ModelRegistryEvent to register all your item models
  16. Hello everyone, I'm attempting to create shrinking zone system (like pubg and other BRs). I'm working on way to control it throught commands and in order to save it all I've made capability just for that. It all works fine. When creating the map you have to specify the map center and map size. When you run command to start the game, center of world border is calculated based on these values. But I need to have dynamic size of the world border to prevent it blocking some parts of the map. I have tried few things, but nothing was precise. So I am asking the Minecraft community if somebody is more experienced with all this maths stuff to help me with this. I want to be able to have always 2 sides of the map inside the border (I know I can't have all on square map with offset world border - so the other 2 sides of the border will be longer than the map size, but that doesn't matter). So what I have tried (the part of the code responsible for calculating the border size and center) : GitHub
  17. Okay, I will try that. I have tried comparing the bullet Y position with Entity eye height on hit, but that seems to work only after 1 tick after spawning which might be issue in close range fights (especially when the velocity is quite huge).
  18. I've been playing a bit with raytraceresults for my EntityBullet logic and I was messing with the vectors you get when you hit something. I've found that I can use RayTraceResult#hitVec to get exact coordinates of hit, but it works only for blocks. I wanted to use it for entities to be able to calculate damage based on the position of the hit, but it always get's the entity position rather than the hit position. Is there some way to calculate it on the entity/entity hitbox?
  19. About the ghost item - Are you spawning it on server? This applies for the other methods you have tried too
  20. You can get the stack you want to remove and use the shrink method to remove the itemstack from inventory. Or you can use InventoryPlayer#clearMatchingItems.
  21. Also you could use one of the TickEvents, like PlayerTickEvent and check from there if the player is sneaking.
  22. Yeah, I heard about it too, but isn't it really meant only for work with flans mod? I don't really know, I have worked with it only once and it looks like it's done only for the flans mod because of some different rendering stuff which wouldn't work with other mods unless I would create or copy flan's model rendering system.
  23. Yeah, the BlockBench has the feature and it looks like it was added recently. Thanks for your help
  24. Well I like the .java models for creating stuff like weapons and some stuff like that, for me it feels like it's easier work with that. Thanks about the answer, I'll take a look at the BlockBench, last time I used it, there was no java option, but that might be because I was using the web app.
  25. Hello, I have simple question for you all: Do you know some good .java model creators? Thanks for answers.
×
×
  • Create New...

Important Information

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