Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Large entity hitbox not filling up entire space


Adityagupta
 Share

Recommended Posts

I have created an entity that is ~70 blocks tall and ~6 blocks wide, and I have set its hitbox so that when I press F3 + B, it fills up the entire entity. However, I can only interact (hit) the bottom ~4 blocks, and when I look too far up, the entity disappears entirely (I think this is because the subchunk in which those ~4 blocks are in is not loaded). I have noticed the same issue with the vanilla giant mob, which also disappears at certain angles and also has a bugged hitbox. I have seen a few threads about this same problem, but none of them had a solution for this problem.

 

Entity hitbox:

 

2019-04-01_22_48_52.thumb.png.1e1310783d3309941744a47f3a0b57af.png

 

Same view but a bit higher up:

 

2019-04-01_22_48_56.thumb.png.f806697be1cfbc292c0d5b0b69706c04.png

 

I tried setting ignoreFrustumCheck to true, as well as forcing some render methods to always return true for "should render", but none of that worked. The source code can be found here. The entity in question is here.

 

Any ideas?

Link to comment
Share on other sites

11 minutes ago, Adityagupta said:

when I look too far up, the entity disappears entirely

AFAIK this s due to the chunk(s) the entity is in is being culled; there is not much you can do about it.

One way too circumvent this problem would be to break your large entity into multiple smaller entity (like how "dragon" entities are handled in some mods).

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Link to comment
Share on other sites

1 minute ago, DavidM said:

AFAIK this s due to the chunk(s) the entity is in is being culled; there is not much you can do about it.

I know this is the problem, but wouldn't fixing the hitbox size put the entity in more chunks so it wouldn't be culled? Or can entities only be tied to a single chunk?

If there isn't a fix for the hitbox/culling, I'll just go with multiple parts. 

 

Also, I saw an issue on Advanced Rocketry for the same problem, and it said there was a pull request that fixed it, but the same issue seems to be happening here.

Link to comment
Share on other sites

While I haven't looked into the actual code for it, I believe MC entities are only tied to a single chunk (ie. the chunk containing their origin point), which would cause these kinds of issues (based on several related forum/chat posts I've seen).  Also, based on how the collision detection and several other systems work...
 

Going along with the "I've seen posts of" line of thought, I've seen several posts suggesting to do as DavidM said, and split your entity into smaller parts, basically improving the "granularity" of what's culled due to chunk culling.

 

Edit: I believe for entities which are holding still, you could just split the entity into one part per chunk, if you get my drift.  For large moving entities, I'm guessing it would be better to have a pre-defined set of parts instead of trying to constantly recalculate entity sections based on chunk boundaries in relation to the entity :P

Edited by Laike_Endaril
Link to comment
Share on other sites

46 minutes ago, Adityagupta said:

Could a possible solution be to constantly move the origin of the entity so that it's always in the frustum and simply translate the model so it looks like it's staying in the same place?

If I understood correctly, no.

Different players might be looking at different directions, but the entity can only have one position.

 

Even if the mod is for single player only, the position of an entity shouldn't be abused for cosmetic (rendering) purposes; the position of an entity does a lot more than "keeping the entity visible", and messing with it can break other things.

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Link to comment
Share on other sites

14 minutes ago, DavidM said:

Even if the mod is for single player only, the position of an entity shouldn't be abused for cosmetic (rendering) purposes; the position of an entity does a lot more than "keeping the entity visible", and messing with it can break other things.

Good point, I think I'll just stick with multiple parts. Are IEntityMultiPart and MultiPartEntityPart (the ones used in EntityDragon) the best for this or is there a better method?

Link to comment
Share on other sites

I did some more testing and I found the point in vanilla where the bug was fixed. The bug exists up to snapshot 19w05a, but in 19w06a, it seems to be fixed. I can't seem to find the exact bug that caused it (https://minecraft.gamepedia.com/19w06a#Fixes), so does anyone know if there is a way to find out and maybe implement that in my own code?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Seems like you have not deleted it at all.
    • Deleted everything under /world/serverconfig. Got the following crash report. The server created a few config files after running run.bat   ---- Minecraft Crash Report ---- // Shall we play a game? Time: 25/1/22, 7:03 pm Description: Exception in server tick loop net.minecraftforge.fml.config.ConfigFileTypeHandler$ConfigLoadingException: Failed loading config file tombstone-server.toml of type SERVER for modid tombstone at net.minecraftforge.fml.config.ConfigFileTypeHandler.lambda$reader$1(ConfigFileTypeHandler.java:61) ~[fmlcore-1.18.1-39.0.45.jar%2366!/:?] {} at net.minecraftforge.fml.config.ConfigTracker.openConfig(ConfigTracker.java:74) ~[fmlcore-1.18.1-39.0.45.jar%2366!/:?] {} at net.minecraftforge.fml.config.ConfigTracker.lambda$loadConfigs$1(ConfigTracker.java:64) ~[fmlcore-1.18.1-39.0.45.jar%2366!/:?] {} at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {} at java.util.Collections$SynchronizedCollection.forEach(Collections.java:2131) ~[?:?] {} at net.minecraftforge.fml.config.ConfigTracker.loadConfigs(ConfigTracker.java:64) ~[fmlcore-1.18.1-39.0.45.jar%2366!/:?] {} at net.minecraftforge.server.ServerLifecycleHooks.handleServerAboutToStart(ServerLifecycleHooks.java:94) ~[forge-1.18.1-39.0.45-universal.jar%2369!/:?] {re:classloading} at net.minecraft.server.dedicated.DedicatedServer.m_7038_(DedicatedServer.java:173) ~[server-1.18.1-20211210.034407-srg.jar%2365!/:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:644) ~[server-1.18.1-20211210.034407-srg.jar%2365!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerAccessor,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A} at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:258) ~[server-1.18.1-20211210.034407-srg.jar%2365!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerAccessor,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A} at java.lang.Thread.run(Thread.java:833) [?:?] {} Caused by: com.electronwill.nightconfig.core.io.ParsingException: Not enough data available at com.electronwill.nightconfig.core.io.ParsingException.notEnoughData(ParsingException.java:22) ~[core-3.6.4.jar%237!/:?] {} at com.electronwill.nightconfig.core.io.ReaderInput.directReadChar(ReaderInput.java:36) ~[core-3.6.4.jar%237!/:?] {} at com.electronwill.nightconfig.core.io.AbstractInput.readChar(AbstractInput.java:49) ~[core-3.6.4.jar%237!/:?] {} at com.electronwill.nightconfig.core.io.AbstractInput.readCharsUntil(AbstractInput.java:123) ~[core-3.6.4.jar%237!/:?] {} at com.electronwill.nightconfig.toml.TableParser.parseKey(TableParser.java:166) ~[toml-3.6.4.jar%238!/:?] {} at com.electronwill.nightconfig.toml.TableParser.parseDottedKey(TableParser.java:145) ~[toml-3.6.4.jar%238!/:?] {} at com.electronwill.nightconfig.toml.TableParser.parseNormal(TableParser.java:55) ~[toml-3.6.4.jar%238!/:?] {} at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:44) ~[toml-3.6.4.jar%238!/:?] {} at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:37) ~[toml-3.6.4.jar%238!/:?] {} at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:113) ~[core-3.6.4.jar%237!/:?] {} at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:219) ~[core-3.6.4.jar%237!/:?] {} at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:202) ~[core-3.6.4.jar%237!/:?] {} at com.electronwill.nightconfig.core.file.WriteSyncFileConfig.load(WriteSyncFileConfig.java:73) ~[core-3.6.4.jar%237!/:?] {} at com.electronwill.nightconfig.core.file.AutosaveCommentedFileConfig.load(AutosaveCommentedFileConfig.java:85) ~[core-3.6.4.jar%237!/:?] {} at net.minecraftforge.fml.config.ConfigFileTypeHandler.lambda$reader$1(ConfigFileTypeHandler.java:57) ~[fmlcore-1.18.1-39.0.45.jar%2366!/:?] {} ... 10 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.18.1 Minecraft Version ID: 1.18.1 Operating System: Windows 10 (amd64) version 10.0 Java Version: 17.0.2, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation Memory: 4887931664 bytes (4661 MiB) / 7516192768 bytes (7168 MiB) up to 8589934592 bytes (8192 MiB) CPUs: 16 Processor Vendor: AuthenticAMD Processor Name: AMD Ryzen 7 2700 Eight-Core Processor Identifier: AuthenticAMD Family 23 Model 8 Stepping 2 Microarchitecture: Zen+ Frequency (GHz): 3.20 Number of physical packages: 1 Number of physical CPUs: 8 Number of logical CPUs: 16 Graphics card #0 name: NVIDIA GeForce GTX 1660 Ti Graphics card #0 vendor: NVIDIA (0x10de) Graphics card #0 VRAM (MB): 4095.00 Graphics card #0 deviceId: 0x2182 Graphics card #0 versionInfo: DriverVersion=30.0.14.7111 Memory slot #0 capacity (MB): 16384.00 Memory slot #0 clockSpeed (GHz): 2.40 Memory slot #0 type: DDR4 Memory slot #1 capacity (MB): 16384.00 Memory slot #1 clockSpeed (GHz): 2.40 Memory slot #1 type: DDR4 Virtual memory max (MB): 34765.36 Virtual memory used (MB): 18578.55 Swap memory total (MB): 2048.00 Swap memory used (MB): 0.00 JVM Flags: 2 total; -Xmx8G -Xms7G Server Running: true Player Count: 0 / 20; [] Data Packs: vanilla, mod:mcwbridges, mod:enchdesc, mod:swingthroughgrass, mod:jei (incompatible), mod:flywheel, mod:patchouli, mod:create, mod:createdeco (incompatible), mod:clumps (incompatible), mod:cookingforblockheads, mod:storagedrawers (incompatible), mod:naturescompass (incompatible), mod:tombstone, mod:naturesaura (incompatible), mod:balm (incompatible), mod:jeresources, mod:forge, mod:aquaculture (incompatible), mod:cosmeticarmorreworked (incompatible), mod:valhelsia_core, mod:forbidden_arcanus, mod:createaddition (incompatible), mod:betteradvancements, mod:starlight, mod:mahoutsukai, mod:travelersbackpack Is Modded: Definitely; Server brand changed to 'forge' Type: Dedicated Server (map_server.txt) ModLauncher: 9.1.0+9.1.0+main.6690ee51 ModLauncher launch target: forgeserver ModLauncher naming: srg ModLauncher services: mixin PLUGINSERVICE eventbus PLUGINSERVICE object_holder_definalize PLUGINSERVICE runtime_enum_extender PLUGINSERVICE capability_token_subclass PLUGINSERVICE accesstransformer PLUGINSERVICE runtimedistcleaner PLUGINSERVICE mixin TRANSFORMATIONSERVICE fml TRANSFORMATIONSERVICE FML Language Providers: minecraft@1.0 javafml@null Mod List: server-1.18.1-20211210.034407-srg.jar |Minecraft |minecraft |1.18.1 |DONE |Manifest: NOSIGNATURE mcw-bridges-2.0.1-mc1.18.1.jar |Macaw's Bridges |mcwbridges |2.0.1 |DONE |Manifest: NOSIGNATURE EnchantmentDescriptions-Forge-1.18.1-9.0.9.jar |EnchantmentDescriptions |enchdesc |9.0.9 |DONE |Manifest: NOSIGNATURE swingthroughgrass-1.18.1-1.8.0.jar |SwingThroughGrass |swingthroughgrass |1.18.1-1.8.0 |DONE |Manifest: NOSIGNATURE jei-1.18.1-9.2.1.69.jar |Just Enough Items |jei |9.2.1.69 |DONE |Manifest: NOSIGNATURE flywheel-forge-1.18-0.5.1.jar |Flywheel |flywheel |1.18-0.5.1 |DONE |Manifest: NOSIGNATURE Patchouli-1.18.1-64.jar |Patchouli |patchouli |1.18.1-64 |DONE |Manifest: NOSIGNATURE create-mc1.18.1_v0.4c.jar |Create |create |0.4c |DONE |Manifest: NOSIGNATURE createdeco-1.2.3-1.18.jar |Create Deco |createdeco |1.2.3-1.18 |DONE |Manifest: NOSIGNATURE Clumps-forge-1.18.1-8.0.4.jar |Clumps |clumps |8.0.4 |DONE |Manifest: NOSIGNATURE cookingforblockheads-forge-1.18.1-11.1.0.jar |CookingForBlockheads |cookingforblockheads |11.1.0 |DONE |Manifest: NOSIGNATURE TravelersBackpack-1.18.1-7.0.1.jar |Traveler's Backpack |travelersbackpack |7.0.1 |DONE |Manifest: NOSIGNATURE StorageDrawers-1.18.1-10.1.1.jar |Storage Drawers |storagedrawers |10.1.1 |DONE |Manifest: NOSIGNATURE NaturesCompass-1.18.1-1.9.4-forge.jar |Nature's Compass |naturescompass |1.18.1-1.9.4-forge |DONE |Manifest: NOSIGNATURE tombstone-7.3.5-1.18.jar |Corail Tombstone |tombstone |7.3.5 |DONE |Manifest: NOSIGNATURE NaturesAura-35.4.jar |Nature's Aura |naturesaura |35.4 |DONE |Manifest: NOSIGNATURE starlight-1.0.0+forge.8f9b922.Aeiou.jar |Starlight |starlight |1.0.0+forge.4fd2e63 |DONE |Manifest: NOSIGNATURE mahoutsukai-1.18.1-v1.34.0.jar |Mahou Tsukai |mahoutsukai |1.18.1-v1.34.0 |DONE |Manifest: NOSIGNATURE balm-2.4.1+0.jar |Balm |balm |2.4.1+0 |DONE |Manifest: NOSIGNATURE JustEnoughResources-1.18.1-0.13.1.141.jar |Just Enough Resources |jeresources |0.13.1.141 |DONE |Manifest: NOSIGNATURE forge-1.18.1-39.0.45-universal.jar |Forge |forge |39.0.45 |DONE |Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90 Aquaculture-1.18.1-2.3.2.jar |Aquaculture 2 |aquaculture |1.18.1-2.3.2 |DONE |Manifest: NOSIGNATURE CosmeticArmorReworked-1.18.1-v1a.jar |CosmeticArmorReworked |cosmeticarmorreworked |1.18.1-v1a |DONE |Manifest: 5e:ed:25:99:e4:44:14:c0:dd:89:c1:a9:4c:10:b5:0d:e4:b1:52:50:45:82:13:d8:d0:32:89:67:56:57:01:53 valhelsia_core-1.18.1-0.3.2.jar |Valhelsia Core |valhelsia_core |1.18.1-0.3.2 |DONE |Manifest: NOSIGNATURE forbidden_arcanus-1.18.1-2.0.2.jar |Forbidden & Arcanus |forbidden_arcanus |1.18.1-2.0.2 |DONE |Manifest: NOSIGNATURE createaddition-1.18.1-20220111b.jar |Create Crafts & Additions |createaddition |1.18.1-20220111b |DONE |Manifest: NOSIGNATURE BetterAdvancements-1.18.1-0.1.2.122.jar |Better Advancements |betteradvancements |0.1.2.122 |DONE |Manifest: NOSIGNATURE Crash Report UUID: b2699892-9341-4ab3-ba51-522964c6bf58 FML: 39.0 Forge: net.minecraftforge:39.0.45  
    • modified config: when you change any value from it's default to a custom one
    • What do you mean by modified them? Do you mean that we have used the mods, and therefore there will be data in them, because if so, we've ben playing on this server for about a week. All/most the configs should be modified.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.