Modify lex's data handler to use proper mod lifecycle event mechanisms

instead. New Lifecycle Event for requesting data harvesting. Mods will
be constructed, the registry will fire, and then a new Data event will
fire. Submit new data tag files to the data gatherer if you wish.
The game will shutdown after this. No other mod elements will happen.

Signed-off-by: cpw <[email protected]>
This commit is contained in:
cpw committed 2019-06-15 21:24:45 -04:00
1 parent 37a896fe1b
commit d821514372
8 files changed
+147 -83

No files matched your search

@@ -1,50 +0,0 @@
/*
* Minecraft Forge
* Copyright (c) 2016-2019.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.event;
import net.minecraft.data.DataGenerator;
import net.minecraftforge.eventbus.api.Event;
public class GatherDataEvent extends Event
{
private final DataGenerator generator;
private final boolean server;
private final boolean client;
private final boolean dev;
private final boolean reports;
private final boolean validate;
public GatherDataEvent(DataGenerator gen, boolean server, boolean client, boolean dev, boolean reports, boolean validate)
{
this.generator = gen;
this.server = server;
this.client = client;
this.dev = dev;
this.reports = reports;
this.validate = validate;
}
public DataGenerator getGenerator() { return this.generator; }
public boolean includeServer() { return this.server; }
public boolean includeClient() { return this.client; }
public boolean includeDev() { return this.dev; }
public boolean includeReports() { return this.reports; }
public boolean validate() { return this.validate; }
}