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

Return true for isItemEqual() with any itemDamage


grand_mind1
 Share

Recommended Posts

Theoretically == is faster than instanceof, but in practice it does not matter.

 

This is pretty much true.  You'd have to be calling instanceof like 10,000 times a tick to see a difference.  There are other, similar "micro optimizations" you can make as well, for instance using ++i instead of i++ (because of the way values are returned, i++ has to use a little extra stack space and a pop).  But for the most part you'd only notice a difference when it's being used tens, if not hundreds, of thousands of times every frame.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

for instance using ++i instead of i++ (because of the way values are returned, i++ has to use a little extra stack space and a pop)

Actually javac compiles these two to the same thing:

int i = 1;
i++;

int i = 1;
++i;

 

If the value is not used, it does not matter.

 

Ah, cool.  The last time I saw the test done for various ways was on AS3 (which does create a temporary variable).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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

    • [minecraft/Chunk]: Tried to load a block entity for block Block{minecraft:smithing_table} but failed at location BlockPos{x=-2, y=38, z=-123}   This error is spammed in my server in different xyz positions Help, manny thanx
    • https://imgur.com/a/GfHOP5o   https://imgur.com/a/RVCm4bg   why am i getting these errors now?  
    • (i want to draw my texture in all the screen) MatrixStack matrixStack = new MatrixStack(); mc.getTextureManager().bindTexture(MYOVERLAYTEXTURE); //AbstractGui.blit(stack, x, y, offsetX, offsetY, width, height, textureSizeX, textureSizeY); AbstractGui.blit(stack,0, 0, 0, 0, 1920,1080,1920, 1080); mc.getTextureManager().bindTexture(AbstractGui.GUI_ICONS_LOCATION);  
    • I have the same error as original post   ---- Minecraft Crash Report ---- // You should try our sister game, Minceraft! Time: 25/01/22, 11:04 a. m. Description: Exception in server tick loop java.lang.NoSuchMethodError: 'net.minecraft.nbt.CompoundTag net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity.save(net.minecraft.nbt.CompoundTag)'     at snownee.jade.addon.vanilla.FurnaceProvider.appendServerData(FurnaceProvider.java:56) ~[Jade-1.18-4.1.1.jar%2369!/:4.1.1] {re:classloading}     at snownee.jade.addon.vanilla.FurnaceProvider.appendServerData(FurnaceProvider.java:21) ~[Jade-1.18-4.1.1.jar%2369!/:4.1.1] {re:classloading}     at mcp.mobius.waila.network.RequestTilePacket$Handler.lambda$onMessage$0(RequestTilePacket.java:62) ~[Jade-1.18-4.1.1.jar%2369!/:4.1.1] {re:classloading}     at net.minecraftforge.network.NetworkEvent$Context.enqueueWork(NetworkEvent.java:222) ~[forge-1.18.1-39.0.59-universal.jar%2386!/:?] {re:classloading}     at mcp.mobius.waila.network.RequestTilePacket$Handler.onMessage(RequestTilePacket.java:46) ~[Jade-1.18-4.1.1.jar%2369!/:4.1.1] {re:classloading}     at net.minecraftforge.network.simple.IndexedMessageCodec.lambda$tryDecode$3(IndexedMessageCodec.java:128) ~[forge-1.18.1-39.0.59-universal.jar%2386!/:?] {re:classloading}     at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {re:mixin}     at net.minecraftforge.network.simple.IndexedMessageCodec.tryDecode(IndexedMessageCodec.java:128) ~[forge-1.18.1-39.0.59-universal.jar%2386!/:?] {re:classloading}     at net.minecraftforge.network.simple.IndexedMessageCodec.consume(IndexedMessageCodec.java:162) ~[forge-1.18.1-39.0.59-universal.jar%2386!/:?] {re:classloading}     at net.minecraftforge.network.simple.SimpleChannel.networkEventListener(SimpleChannel.java:82) ~[forge-1.18.1-39.0.59-universal.jar%2386!/:?] {re:mixin,re:classloading}     at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247) ~[eventbus-5.0.3.jar%232!/:?] {}     at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239) ~[eventbus-5.0.3.jar%232!/:?] {}     at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.3.jar%232!/:?] {}     at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.3.jar%232!/:?] {}     at net.minecraftforge.network.NetworkInstance.dispatch(NetworkInstance.java:82) ~[forge-1.18.1-39.0.59-universal.jar%2386!/:?] {re:classloading}     at net.minecraftforge.network.NetworkHooks.lambda$onCustomPayload$1(NetworkHooks.java:89) ~[forge-1.18.1-39.0.59-universal.jar%2386!/:?] {re:classloading}     at java.util.Optional.map(Optional.java:260) ~[?:?] {re:mixin}     at net.minecraftforge.network.NetworkHooks.onCustomPayload(NetworkHooks.java:89) ~[forge-1.18.1-39.0.59-universal.jar%2386!/:?] {re:classloading}     at net.minecraft.server.network.ServerGamePacketListenerImpl.m_7423_(ServerGamePacketListenerImpl.java:1416) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:classloading}     at net.minecraft.network.protocol.game.ServerboundCustomPayloadPacket.m_5797_(ServerboundCustomPayloadPacket.java:35) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:classloading}     at net.minecraft.network.protocol.game.ServerboundCustomPayloadPacket.m_5797_(ServerboundCustomPayloadPacket.java:8) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:classloading}     at net.minecraft.network.protocol.PacketUtils.m_131356_(PacketUtils.java:21) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:classloading}     at net.minecraft.server.TickTask.run(TickTask.java:18) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:classloading,re:mixin}     at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:151) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}     at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:classloading,re:mixin}     at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:765) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {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_6367_(MinecraftServer.java:161) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {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.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:125) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:748) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {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_7245_(MinecraftServer.java:742) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {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.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:110) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:727) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {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_130011_(MinecraftServer.java:672) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {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) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {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) [?:?] {} 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.1, Microsoft     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft     Memory: 1169352216 bytes (1115 MiB) / 4294967296 bytes (4096 MiB) up to 4294967296 bytes (4096 MiB)     CPUs: 4     Processor Vendor: GenuineIntel     Processor Name: Intel(R) Core(TM) i3-8130U CPU @ 2.20GHz     Identifier: Intel64 Family 6 Model 142 Stepping 10     Microarchitecture: Coffee Lake     Frequency (GHz): 2,21     Number of physical packages: 1     Number of physical CPUs: 2     Number of logical CPUs: 4     Virtual memory max (MB): 14192,81     Virtual memory used (MB): 9898,88     Swap memory total (MB): 2048,00     Swap memory used (MB): 439,65     JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx4G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     Server Running: true     Player Count: 1 / 8; [ServerPlayer['Bioares'/239, l='ServerLevel[MundoB]', x=1952.24, y=69.06, z=399.19]]     Data Packs: vanilla, mod:mcwbridges, mod:inventorysorter (incompatible), mod:repurposed_structures, mod:jmi, mod:jade, mod:treeharvester, mod:jei (incompatible), mod:goblintraders (incompatible), mod:curios, mod:collective, mod:journeymap, mod:ctm (incompatible), mod:cookingforblockheads, mod:elevatorid, mod:gobber2 (incompatible), mod:tombstone, mod:sophisticatedbackpacks (incompatible), mod:guardvillagers (incompatible), mod:cfm (incompatible), mod:balm (incompatible), mod:jeresources, mod:forge, mod:appleskin (incompatible), mod:supplementaries (incompatible), mod:selene (incompatible)     Type: Integrated Server (map_client.txt)     Is Modded: Definitely; Client brand changed to 'forge'; Server brand changed to 'forge'     ModLauncher: 9.1.0+9.1.0+main.6690ee51     ModLauncher launch target: forgeclient     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:          client-1.18.1-20211210.034407-srg.jar             |Minecraft                     |minecraft                     |1.18.1              |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f         mcw-bridges-2.0.1-mc1.18.1.jar                    |Macaw's Bridges               |mcwbridges                    |2.0.1               |DONE      |Manifest: NOSIGNATURE         inventorysorter-1.18-19.0.0.jar                   |Simple Inventory Sorter       |inventorysorter               |19.0.0              |DONE      |Manifest: NOSIGNATURE         repurposed_structures_forge-4.1.0+1.18.1.jar      |Repurposed Structures         |repurposed_structures         |4.1.0+1.18.1        |DONE      |Manifest: NOSIGNATURE         jmi-1.18.1-0.6-33.jar                             |JourneyMap Integration        |jmi                           |1.18.1-0.6-33       |DONE      |Manifest: NOSIGNATURE         Jade-1.18-4.1.1.jar                               |Jade                          |jade                          |4.1.1               |DONE      |Manifest: NOSIGNATURE         treeharvester_1.18.1-4.2.jar                      |Tree Harvester                |treeharvester                 |4.2                 |DONE      |Manifest: NOSIGNATURE         jei-1.18.1-9.2.2.74.jar                           |Just Enough Items             |jei                           |9.2.2.74            |DONE      |Manifest: NOSIGNATURE         goblintraders-1.7.0-1.18.1.jar                    |Goblin Traders                |goblintraders                 |1.7.0               |DONE      |Manifest: NOSIGNATURE         curios-forge-1.18.1-5.0.5.1.jar                   |Curios API                    |curios                        |1.18.1-5.0.5.1      |DONE      |Manifest: NOSIGNATURE         collective-1.18.1-3.8.jar                         |Collective                    |collective                    |3.8                 |DONE      |Manifest: NOSIGNATURE         journeymap-1.18.1-5.8.0beta11.jar                 |Journeymap                    |journeymap                    |5.8.0beta11         |DONE      |Manifest: NOSIGNATURE         CTM-1.18-1.1.3+1.jar                              |ConnectedTexturesMod          |ctm                           |1.18-1.1.3+1        |DONE      |Manifest: NOSIGNATURE         cookingforblockheads-forge-1.18.1-11.1.0.jar      |CookingForBlockheads          |cookingforblockheads          |11.1.0              |DONE      |Manifest: NOSIGNATURE         elevatorid-1.18-1.8.3.jar                         |Elevator Mod                  |elevatorid                    |1.18-1.8.3          |DONE      |Manifest: NOSIGNATURE         Gobber2-Forge-1.18.1-2.6.11.jar                   |Gobber 2                      |gobber2                       |2.6.11              |DONE      |Manifest: NOSIGNATURE         tombstone-7.3.5-1.18.jar                          |Corail Tombstone              |tombstone                     |7.3.5               |DONE      |Manifest: NOSIGNATURE         sophisticatedbackpacks-1.18.1-3.15.1.505.jar      |Sophisticated Backpacks       |sophisticatedbackpacks        |1.18.1-3.15.1.505   |DONE      |Manifest: NOSIGNATURE         guardvillagers-1.18.1.4.0.jar                     |Guard Villagers               |guardvillagers                |1.4.0               |DONE      |Manifest: NOSIGNATURE         furniture-7.0.0-pre27-1.18.1.jar                  |MrCrayfish's Furniture Mod    |cfm                           |7.0.0-pre27         |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.138.jar         |Just Enough Resources         |jeresources                   |0.13.1.138          |DONE      |Manifest: NOSIGNATURE         forge-1.18.1-39.0.59-universal.jar                |Forge                         |forge                         |39.0.59             |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         appleskin-forge-mc1.18-2.2.0.jar                  |AppleSkin                     |appleskin                     |2.2.0               |DONE      |Manifest: NOSIGNATURE         supplementaries-1.18.1-1.1.8.jar                  |Supplementaries               |supplementaries               |1.1.7               |DONE      |Manifest: NOSIGNATURE         selene-1.18-1.12.0.jar                            |Selene                        |selene                        |1.18-1.12.0         |DONE      |Manifest: NOSIGNATURE     Crash Report UUID: 0640ba16-130b-452a-a254-082e142e2cce     FML: 39.0     Forge: net.minecraftforge:39.0.59
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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