Power net is working (just)
This commit is contained in:
parent
67526480ad
commit
f966cdb632
4 changed files with 81 additions and 104 deletions
|
@ -18,8 +18,6 @@ public class TRTickHandler {
|
|||
|
||||
public Item previouslyWearing;
|
||||
|
||||
public static List<TRPowerNet> oldNets = new ArrayList<>();
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true)
|
||||
public void onPlayerTick(TickEvent.PlayerTickEvent e) {
|
||||
EntityPlayer player = e.player;
|
||||
|
@ -34,12 +32,6 @@ public class TRTickHandler {
|
|||
|
||||
@SubscribeEvent
|
||||
public void worldTick(TickEvent.WorldTickEvent e) {
|
||||
if(!oldNets.isEmpty()){
|
||||
for(TRPowerNet powerNet : oldNets){
|
||||
MinecraftForge.EVENT_BUS.unregister(powerNet);
|
||||
}
|
||||
oldNets.clear();
|
||||
}
|
||||
if(!e.world.isRemote)
|
||||
MinecraftForge.EVENT_BUS.post(new PowerTickEvent());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue