Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello :)

 

I am making a mod which using the IC2 api bug I got a problem. The tile entity seems not to be removing.

Here's my code:

https://gist.github.com/anonymous/8188707

I've already tried by using "world.removeBlockTileEntity(x, y, z)" but it's still giving me the same error...

When I place the block (Or any IC2 blocks) where I destroyed one of mine, i get this error in the logs:

2013-12-30 22:37:38 [Avertissement] [iC2] EnergyNet.addTileEntity: fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@85fc923 (fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@85fc923) is conflicting with fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@48cdb24 using the same position (already added, prev. te not removed, overlapping), aborting

 

If there is a cable next to this block, even if I break mine, the cable still seems to be connected.

 

Anybody can help me ? Thanks in advance

Ask the IC2 forum as most of us are unfamiliar with the API.

If you really want help, give that modder a thank you.

 

Modders LOVE thank yous.

EnergyNet has a remove tile entity method that you need to use when the block is broken.

  • Author

Ask the IC2 forum as most of us are unfamiliar with the API.

I've didn't found where to post :(

 

EnergyNet has a remove tile entity method that you need to use when the block is broken.

 

It seems that it doesn't contain it, here's my IEnergyNet class: https://gist.github.com/anonymous/8189898

I've found this on google which seems to have it but it also seems to be a bit old: http://atomicstrykers-minecraft-mods.googlecode.com/hg-history/853343e5b365415ccfc8583059ca7bf3d87ba538/PowerConverters/common/ic2/api/EnergyNet.java

 

I have an event which is supposed to do the same as EnergyNet.removeTileEntity() => EnergyTileUnloadEvent but it doesn't work. It is said in the comment that it should do the same as the method but the method doesn't exists anymore:

 * Every energy tile which wants to get disconnected from the IC2 Energy
* Network has to either post this event or alternatively call
* EnergyNet.removeTileEntity().

 

Edit2:

If I post the event in breakBlock I have this error when I destroy then replace the block

2013-12-31 00:32:40 [Avertissement] [iC2] EnergyNet.removeTileEntity: fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@24ed3cfa (fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@24ed3cfa) wasn't found (added), skipping
2013-12-31 00:32:55 [Avertissement] [iC2] EnergyNet.addTileEntity: fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@69217a9c (fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@69217a9c) is conflicting with fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@24ed3cfa using the same position (already added, prev. te not removed, overlapping), aborting

EnergyTileUnloadEvent is what I meant. I used it before in block break and it worked fine.

  • Author

Okay I found the bug. I was posting the events in the "updateEntity" and "invalidate" methods of the TileEntity. I moved them in the "onBlockAdded" and "breakBlock" events and now it works fine. Thank you :D

Guest
This topic is now closed to further replies.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.