/
Belyash5
/
Flu
Обзор
Документация
Войти
/
Belyash5
/
Flu
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/main/java/com/hbm/tileentity/network/TileEntityCableSwitch.java
21 строка
606 B
Boblet
go go gadget: detonate nutsack
10 мар 2025, 18:57
10 мар 2025, 18:57
565d5c1
Код
Авторство
О чём код?
package com.hbm.tileentity.network; import api.hbm.energymk2.Nodespace; public class TileEntityCableSwitch extends TileEntityCableBaseNT { public void updateState() { //if the meta is 0 (OFF) and there is a net present, destroy and de-reference it. //that should be all, since the state being 0 also prevents the TE from updating and joining the new net. if(this.getBlockMetadata() == 0 && this.node != null) { Nodespace.destroyNode(worldObj, xCoord, yCoord, zCoord); this.node = null; } } @Override public boolean shouldCreateNode() { return this.getBlockMetadata() == 1; } }