Jump to content

Why Modded Minecraft Uses So Much Memory?


Interplay

Recommended Posts

Hello!!

 

I'm here today because I want to know what the heavens is going on here. Take a look at these images:

 

 

Don't worry about that pink and black blocks back there. That is from Tinkers.

Look at the memory usage at the top right corner... But, ok... What is going on is:

I just got into the curseforge.net and downloaded any mods that I found cool and nice.

Put them together and run the game. During the loading, its everything ok. Everything runs smoothly...But, when the mods finnish loading, the main menu screen, takes about 5 minutes to appear. And after that point that takes about 5 minutes, Everything starts to run smoothly again... When I click to create a new world, this process also takes about 5 minutes. And only then I am inside the game. BUT.... Every 10~20 seconds, my game freezes and come back to run smoothly again, but only for about 10~20 seconds... And this stays like this forever...

I mean: Runs smoothly for like 10~20 seconds, freezes for about 10 seconds, runs smoothly for like 10~20 seconds, then freeezes again, runs smoothly again, freezes again, and so on...

Well... What I have tried:

 

  • I increased the amount of memory to Minecraft, as you can see in the screenshot.
  • I downloaded the latest versions of all the mods that I'm using. (latest until the moment of this post).
  • I downloaded the latest version of my Graphics Card Driver.
  • I already have the latest java version (1.8.0_151). Well... At least the newest version that comes automaticly when you download from the main page of downloads in Java.com.
  • I also tried with the lowest video configs in Minecraft.

 

But still...

 

I have this setup:

QuadCore Intel Core i5-4460, 3400 MHz

Memory Kingston HyperX [x2] 8130 MB (DDR3-1600 DDR3 SDRAM)

Graphics Card AMD Radeon R7 200 Series (2 GB)

 

And I have these Mods:

 

Spoiler

| ID                      | Version                  | Source                                          
| minecraft               | 1.12.2                   | minecraft.jar                                   
| mcp                     | 9.42                     | minecraft.jar                                   
| FML                     | 8.0.99.99                | forge-1.12.2-14.23.1.2562.jar
| forge                   | 14.23.1.2562             | forge-1.12.2-14.23.1.2562.jar
| ivtoolkit               | 1.3.3-1.12               | minecraft.jar                                   
| elucore                 | 1.0                      | minecraft.jar                                   
| mercurius_updater       | 1.0                      | MercuriusUpdater-1.12.2.jar                     
| movillages              | 1.5.4                    | [1.12]MoVillages-1.5.4.jar                      
| appliedenergistics2     | rv5-stable-3             | appliedenergistics2-rv5-stable-3.jar            
| bdlib                   | 1.14.3.10                | bdlib-1.14.3.10-mc1.12.2.jar                    
| ae2stuff                | 0.7.0.4                  | ae2stuff-0.7.0.4-mc1.12.2.jar                   
| ambientsounds           | 2.0.0                    | AmbientSounds v2.1.2 mc1.12.2.jar               
| tammodized              | 0.15.3                   | TamModized-1.12.1-0.15.3.jar                    
| aov                     | 0.8.1                    | Angel of Vengeance-1.12-0.8.1.jar               
| baubles                 | 1.5.1                    | Baubles-1.12-1.5.1.jar                          
| flyringbaublemod        | 0.3.0_1.12-306787e       | angelRingToBauble-1.12-0.3.0.46+306787e.jar     
| botania                 | r1.10-352                | Botania r1.10-352.jar                           
| craftstudioapi          | 1.0.0                    | CraftStudio-1.0.0.93-mc1.12-alpha.jar           
| animania                | 1.4.2                    | animania-1.12.2-1.4.2.jar                       
| animatedcrosshair       | 1.0                      | AnimatedCrosshair1.12-1.0.jar                   
| crafttweaker            | 4.0.10                   | CraftTweaker2-1.12-4.0.10.jar                   
| mtlib                   | @VERSION@                | MTLib-3.0.1.jar                                 
| modtweaker              | 4.0.5                    | modtweaker-4.0.5.jar                            
| jei                     | 4.8.5.135                | jei_1.12.2-4.8.5.135.jar                        
| appleskin               | 1.0.9                    | AppleSkin-mc1.12-1.0.9.jar                      
| morphtool               | 1.2-16                   | Morph-o-Tool-1.2-16.jar                         
| psi                     | r1.1-59                  | Psi-r1.1-59.jar                                 
| autoreglib              | 1.3-15                   | AutoRegLib-1.3-15.jar                           
| autowalk                | 1.1                      | autowalk-1.12.2-1.0.jar                         
| ichunutil               | 7.1.3                    | iChunUtil-1.12.2-7.1.3.jar                      
| backtools               | 7.0.0                    | BackTools-1.12.2-7.0.0.jar                      
| betteradvancements      | 0.0.5.17                 | BetterAdvancements-1.12.2-0.0.5.17.jar          
| betteragriculture       | 1.2.1                    | betteragriculture-1.12.2-1.2.1.jar              
| betterbuilderswands     | 0.11.1                   | BetterBuildersWands-1.12-0.11.1.245+69d0d70.jar 
| betterunderground       | 1.0.6                    | betterunderground-1.0.6.jar                     
| bibliocraft             | 2.4.3                    | BiblioCraft[v2.4.3][MC1.12.0].jar               
| bibliotheca             | 1.1.1-1.12.2             | bibliotheca-1.1.1-1.12.2.jar                    
| ic2                     | 2.8.16-ex112             | industrialcraft-2-2.8.16-ex112.jar
| mantle                  | 1.12-1.3.1.21            | Mantle-1.12-1.3.1.21.jar                        
| natura                  | 1.12-4.3.0.23            | natura-1.12-4.3.0.23.jar                        
| forestry                | 5.7.0.214                | forestry_1.12.2-5.7.0.214.jar                   
| binniecore              | unspecified              | binnie-mods-1.12.2-2.5.0.106.jar                
| binniedesign            | 1.0                      | binnie-mods-1.12.2-2.5.0.106.jar                
| genetics                | 2.5.0.106                | binnie-mods-1.12.2-2.5.0.106.jar                
| botany                  | 2.5.0.106                | binnie-mods-1.12.2-2.5.0.106.jar                
| extrabees               | 2.5.0.106                | binnie-mods-1.12.2-2.5.0.106.jar                
| extratrees              | 2.5.0.106                | binnie-mods-1.12.2-2.5.0.106.jar                
| biomesoplenty           | 7.0.1.2310               | BiomesOPlenty-1.12.2-7.0.1.2310-universal.jar   
| blockcraftery           | 0.1.3                    | blockcraftery-0.1.3.jar                         
| blur                    | 1.0.4-14                 | Blur-1.0.4-14.jar                               
| codechickenlib          | 3.1.3.313                | CodeChickenLib-1.12-3.1.3.313-universal.jar
| redstoneflux            | 2.0.1                    | RedstoneFlux-1.12-2.0.1.2-universal.jar
| brandonscore            | 2.3.4                    | BrandonsCore-1.12-2.3.4.134-universal.jar       
| buildcraftlib           | 7.99.12                  | buildcraft-7.99.12.jar                          
| buildcraftcore          | 7.99.12                  | buildcraft-7.99.12.jar                          
| buildcraftbuilders      | 7.99.12                  | buildcraft-7.99.12.jar                          
| buildcraftenergy        | 7.99.12                  | buildcraft-7.99.12.jar                          
| buildcraftfactory       | 7.99.12                  | buildcraft-7.99.12.jar                          
| buildcraftrobotics      | 7.99.12                  | buildcraft-7.99.12.jar                          
| buildcraftsilicon       | 7.99.12                  | buildcraft-7.99.12.jar                          
| buildcrafttransport     | 7.99.12                  | buildcraft-7.99.12.jar                          
| car                     | 1.2.10                   | car-1.2.10.jar                                  
| careerbees              | 1.0                      | careerbees-0.0.1.jar                            
| carryon                 | 1.7                      | CarryOn MC1.12 v1.7.jar                         
| ceanimals               | 1.4.0                    | ceanimals-1.12-1.4.0.jar                        
| chameleon               | 1.12-4.1.3               | Chameleon-1.12-4.1.3.jar                        
| chickenchunks           | 2.4.0.70                 | ChickenChunks-1.12-2.4.0.70-universal.jar
| ctm                     | MC1.12-0.2.3.9           | CTM-MC1.12-0.2.3.9.jar                          
| chisel                  | MC1.12-0.1.0.22          | Chisel-MC1.12-0.1.0.22.jar                      
| chiselsandbits          | 14.11                    | chiselsandbits-14.11.jar                        
| cofhcore                | 4.3.7                    | CoFHCore-1.12.2-4.3.7.25-universal.jar          
| cofhworld               | 1.0.2                    | CoFHWorld-1.12.2-1.0.2.10-universal.jar         
| colytra                 | 1.0.4.2                  | colytra-1.12.2-1.0.4.2.jar
| storagedrawers          | 1.12-5.2.5               | StorageDrawers-1.12.1-5.3.3.jar                 
| refinedstorage          | 1.5.27                   | refinedstorage-1.5.27.jar
| compactmachines3        | 3.0.3                    | compactmachines3-1.12.2-3.0.3-b169.jar          
| compactsolars           | 1.12.2-5.0.17.340        | CompactSolars-1.12.2-5.0.17.340-universal.jar   
| computercraft           | 1.80pr1                  | ComputerCraft1.80pr1.jar                        
| cosmeticarmorreworked   | 1.12.2-v1                | CosmeticArmorReworked-1.12.2-v1.jar
| ctgui                   | 1.0.0                    | CraftTweaker2-1.12-4.0.10.jar                   
| crafttweakerjei         | 2.0.0                    | CraftTweaker2-1.12-4.0.10.jar                   
| cultivatedtech          | 17w48-B-1.12.2           | Cultivated Tech-17w48-B-1.12.2.jar              
| custombackgrounds       | 1.0                      | CustomBackgrounds-MC1.12-1.1.1.jar              
| ptrmodellib             | 1.0.0                    | Decocraft-2.5.2_1.12.2.jar                      
| props                   | 2.5.2                    | Decocraft-2.5.2_1.12.2.jar                      
| defiledlands            | 1.2.0                    | defiledlands-1.12.2-1.2.0.jar                   
| densemetals             | 1.0.2                    | densemetals-1.12.2-1.0.2.jar                    
| dirt2path               | 1.7.0                    | dirt2path-1.7.0.jar                             
| thermalfoundation       | 2.3.7                    | ThermalFoundation-1.12.2-2.3.7.18-universal.jar 
| draconicevolution       | 2.3.5                    | Draconic-Evolution-1.12-2.3.5.269-universal.jar 
| thermalexpansion        | 5.3.7                    | ThermalExpansion-1.12.2-5.3.7.31-universal.jar  
| dyndyn                  | 1.12.2-1.8               | DynamicDynamos-1.12.2-1.8.jar                   
| dsurround               | 3.4.7.2                  | DynamicSurroundings-1.12.2-3.4.7.2.jar
| presets                 | 3.4.7.2                  | DynamicSurroundings-1.12.2-3.4.7.2.jar          
| ecomod                  | 1.12.2-1.2.2.0           | EcologyMod-1.12.2-1.2.2.0.jar                   
| elevatorid              | 1.3.5                    | ElevatorMod-1.12.2-1.3.5.jar                    
| emberroot               | 1.3.2                    | EmberRootZoo-1.12-1.3.2.jar                     
| embers                  | 0.230                    | embers-0.230.jar                                
| enderstorage            | 2.4.0.122                | EnderStorage-1.12-2.4.0.122-universal.jar
| enderzoo                | 1.12.1-1.4.0.49          | EnderZoo-1.12.1-1.4.0.49.jar                    
| tconstruct              | 1.12-2.8.0.45            | TConstruct-1.12-2.8.0.45.jar                    
| immersiveengineering    | 0.12-75                  | ImmersiveEngineering-0.12-75.jar
| mekanism                | 1.12.2-9.4.3.329-thiakil | Mekanism-1.12.2-9.4.3.329-thiakil.jar           
| exchangers              | 1.12-2.5.2               | Exchangers-1.12-2.5.2.jar                       
| extraalchemy            | 0.3.6-release            | extraalchemy-0.3.6-release.jar                  
| extracells              | 2.5.9                    | ExtraCells-1.12.2-2.5.9a45.jar                  
| zerocore                | 1.12-0.1.1.0             | zerocore-1.12-0.1.1.0.jar                       
| bigreactors             | 1.12-0.4.5.44            | ExtremeReactors-1.12-0.4.5.44.jar               
| fairylights             | 2.1.1                    | fairylights-2.1.1-1.12.jar                      
| fastleafdecay           | v14                      | FastLeafDecay-v14.jar                           
| forgelin                | 1.6.0                    | Forgelin-1.6.0.jar                              
| gendustry               | 1.6.5.6                  | gendustry-1.6.5.6-mc1.12.2.jar                  
| pressure                | 1.3.1.9                  | pressure-1.3.1.9-mc1.12.2.jar                   
| advgenerators           | 0.9.20.10                | generators-0.9.20.10-mc1.12.2.jar               
| gravestone              | 1.10.0                   | gravestone-1.10.0.jar                           
| thaumicpotatoes         | 1.4.1                    | ThaumicPotatoes2-1.12.2-1.4.1.jar               
| guideapi                | 1.12-2.1.4-57            | Guide-API-1.12-2.1.4-57.jar                     
| hardcoredarkness        | 2.0                      | HardcoreDarkness-MC1.12.2-2.0.jar
| hats                    | 7.0.0                    | Hats-1.12.2-7.0.2.jar                           
| helpfixer               | 1.12.1-1.5.18            | HelpFixer-1.12.1-1.5.18.jar                     
| immersivepetroleum      | @VERSION@                | immersivepetroleum-1.12.2-1.1.5.jar             
| immersivetech           | 1.3.4                    | immersivetech-1.12-1.3.4.jar                    
| industrialexpansion     | 1.2.4                    | IndustrialExpansion-1.2.4.jar                   
| teslacorelib            | 1.0.11                   | tesla-core-lib-1.12-1.0.11.jar                  
| industrialforegoing     | 1.12.2-1.12.2            | industrialforegoing-1.12.2-1.5.13-103.jar       
| industrialwires         | 1.6-23                   | IndustrialWires-1.6-23.jar
| oreberries              | 0.4.0                    | oreberries-1.12.x-0.4.0.jar                     
| rftools                 | 7.15                     | rftools-1.12-7.15.jar                           
| integrationforegoing    | 1.12-1.3.1               | IntegrationForegoing-1.12-1.3.1.jar             
| inventorytweaks         | 1.63+release.109.220f184 | InventoryTweaks-1.63.jar
| ironbackpacks           | 1.12.2-3.0.2-3           | IronBackpacks-1.12.2-3.0.2-3.jar                
| ironchest               | 1.12.2-7.0.34.820        | ironchest-1.12.2-7.0.34.820.jar                 
| jeibees                 | 0.9.0.5                  | jeibees-0.9.0.5-mc1.12.2.jar                    
| jeiintegration          | 1.5.1.36                 | jeiintegration_1.12.2-1.5.1.36.jar              
| jepb                    | 1.2.1                    | jepb-1.12-1.2.1.jar                             
| jaff                    | 1.7_for_1.12             | JustAFewFish-1.7_for_1.12.jar                   
| jeresources             | 0.8.6.33                 | JustEnoughResources-1.12.2-0.8.6.33.jar         
| lostcities              | 1.0.2                    | lostcities-1.12-1.0.2.jar                       
| lunatriuscore           | 1.2.0.42                 | LunatriusCore-1.12.2-1.2.0.42-universal.jar     
| magipsi                 | 1.3                      | MagicalPsi-1.3.jar                              
| magicbees               | 1.0                      | MagicBees-1.12-3.1.7.jar                        
| modelloader             | 1.0.5                    | modelloader-1.0.5.jar                           
| magneticraft            | 2.0.3                    | Magneticraft_1.12-2.0.3.jar                     
| malisiscore             | 1.12.2-6.3.0             | malisiscore-1.12.2-6.3.0.jar                    
| malisisdoors            | 1.12.2-7.2.0             | malisisdoors-1.12.2-7.2.0.jar                   
| radixcore               | 1.12.x-2.2.1             | RadixCore-1.12.x-2.2.1-universal.jar            
| mca                     | 1.12.2-5.3.1             | MCA-1.12.x-5.3.1-universal.jar                  
| mekanismgenerators      | 9.4.3                    | Mekanism-1.12.2-9.4.3.329-thiakil.jar           
| mekanismtools           | 9.4.3                    | Mekanism-1.12.2-9.4.3.329-thiakil.jar           
| testdummy               | 1.12                     | MmmMmmMmmMmm-1.12-1.14.jar                      
| mob_mash                | 2.1                      | Mob Mash-2.1.jar                                
| reborncore              | 3.5.1.166                | RebornCore-1.12.2-3.5.1.166-universal.jar
| techreborn              | 2.10.0.364               | TechReborn-1.12.2-2.10.0.364-universal.jar
| morebees                | 1.12.2-1.4.4             | morebees-1.12.2-1.4.4.jar                       
| nuclearcraft            | 2.6                      | NuclearCraft-2.6--1.12.2.jar                    
| p455w0rdslib            | 2.0.24                   | p455w0rdslib-1.12-2.0.24.jar                    
| desertcraft             | 1.11a                    | Pam's DesertCraft 1.12a.jar                     
| harvestcraft            | 1.12.2a                  | Pam's HarvestCraft 1.12.2a.jar                  
| portalgun               | 7.0.0                    | PortalGun-1.12.2-7.0.1.jar                      
| rebornstorage           | 1.0.0                    | RebornStorage-1.12.2-3.0.2.32.jar               
| reccomplex              | 1.4.6                    | RecurrentComplex-1.4.6.jar                      
| redstonearsenal         | 2.3.7                    | RedstoneArsenal-1.12.2-2.3.7.18-universal.jar   
| refinedstorageaddons    | 0.2                      | refinedstorageaddons-0.2.jar                    
| rftoolscontrol          | 1.7.0                    | rftoolsctrl-1.12-1.7.0.jar                      
| roguelike               | 1.8.0                    | RoguelikeDungeons-1.12.2-1.8.0.jar              
| roots                   | 0.103                    | roots-2-0.103.jar                               
| schematica              | 1.8.0.167                | Schematica-1.12.2-1.8.0.167-universal.jar       
| signals                 | 1.0                      | Signals-1.12.2-1.2.0-3-universal.jar            
| sit                     | v1.0                     | sit-1.12.x-v1.0.jar                             
| soundphysics            | 1.0.4                    | Sound-Physics-1.12.2.jar                        
| spartanshields          | 1.3a                     | SpartanShields-1.12-1.3a.jar                    
| stevescarts             | ${version}               | StevesCarts-1.12.2-2.4.12.62.jar                
| streak                  | 7.0.0                    | Streak-1.12.2-7.0.0.jar                         
| thermalcultivation      | 0.1.2                    | ThermalCultivation-1.12.2-0.1.2.8-universal.jar 
| thermaldynamics         | 2.3.7                    | ThermalDynamics-1.12.2-2.3.7.14-universal.jar   
| tinkersdefense          | 1.4.2.4a                 | tinkersdefense-1.4.2.4a.jar                     
| tinyreactors            | 1.12                     | tinyreactors-1.12-0.5.3.jar                     
| torchmaster             | 1.6.1.53                 | torchmaster_1.12.2-1.6.1.53.jar
| traverse                | 1.3.1                    | Traverse-1.12.1-1.3.1.jar                       
| twilightforest          | 3.5.263                  | twilightforest-1.12.2-3.5.263-universal.jar     
| universalremote         | 1.12-0.9.9               | UniversalRemote-1.12-0.9.9.jar                  
| waddles                 | 0.5.6                    | Waddles-1.12.2-0.5.6.jar                        
| wearablebackpacks       | 3.1.0                    | WearableBackpacks-1.12.2-3.1.0.jar              
| wct                     | 3.8.55                   | WirelessCraftingTerminal-1.12.2-3.8.55.jar      
| wolfarmor               | 1.12.2-2.1.0-RELEASE     | wolfarmor-1.12.2-2.1.0.24-RELEASE.jar           
| elulib                  | 0.1.11                   | elulib-0.1.11.jar                               
| teslacorelib_registries | 1.0.11                   | tesla-core-lib-1.12-1.0.11.jar   

 

 

 

And this is the log file that was generated while I was taking these screenshots:

https://pastebin.com/F39ch7rS

 

If anyone could help me, I will be glad.

Edited by Interplay
Link to comment
Share on other sites

  • 2 weeks later...

I am not saying that this is Forge fault.

I just want to know how can I fix this kind of things.

Everyone knows that Minecraft alone don't need too much memory. (And running Minecraft with forge is the same as Minecraft alone [in terms of memory usage]). So, your answer is not a valid.

 

Well... It looks like that, when I added Foamfix, it really fixed it! This mod is awesome. And what I think is more funny is the description of the mod:

"Questionable 'performance improvements' that are not in Forge for probably very good reasons."

LOL... But even so... I mean: Why would someone add things that will decrease performance? (Intentionally?)

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • They were already updated, and just to double check I even did a cleanup and fresh update from that same page. I'm quite sure drivers are not the problem here. 
    • i tried downloading the drivers but it says no AMD graphics hardware has been detected    
    • Update your AMD/ATI drivers - get the drivers from their website - do not update via system  
    • As the title says i keep on crashing on forge 1.20.1 even without any mods downloaded, i have the latest drivers (nvidia) and vanilla minecraft works perfectly fine for me logs: https://pastebin.com/5UR01yG9
    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
  • Topics

×
×
  • Create New...

Important Information

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