mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-25 06:27:41 +01:00
Forge Proofing
- Updated to Forge 28.0.45, Fixes #5 - Tidied up mods.toml and build.gradle
This commit is contained in:
parent
488c1a1374
commit
f67a61290f
17 changed files with 94 additions and 118 deletions
76
build.gradle
76
build.gradle
|
@ -13,35 +13,20 @@ apply plugin: 'net.minecraftforge.gradle'
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
version = '0.0.4'
|
version = '0.0.5'
|
||||||
group = 'com.simibubi.create' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
group = 'com.simibubi.create'
|
||||||
archivesBaseName = 'create'
|
archivesBaseName = 'create'
|
||||||
|
|
||||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
// The mappings can be changed at any time, and must be in the following format.
|
mappings channel: 'snapshot', version: '20190806-1.14.3'
|
||||||
// snapshot_YYYYMMDD Snapshot are built nightly.
|
|
||||||
// stable_# Stables are built at the discretion of the MCP team.
|
|
||||||
// Use non-default mappings at your own risk. they may not always work.
|
|
||||||
// Simply re-run your setup task after changing the mappings to update your workspace.
|
|
||||||
mappings channel: 'snapshot', version: '20190725-1.14.3'
|
|
||||||
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
|
||||||
|
|
||||||
// accessTransformer = file('build/resources/main/META-INF/accesstransformer.cfg')
|
|
||||||
|
|
||||||
// Default run configurations.
|
|
||||||
// These can be tweaked, removed, or duplicated as needed.
|
|
||||||
runs {
|
runs {
|
||||||
client {
|
createDev {
|
||||||
workingDirectory project.file('run')
|
workingDirectory project.file('run')
|
||||||
|
|
||||||
// Recommended logging data for a userdev environment
|
|
||||||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||||
|
|
||||||
// Recommended logging level for the console
|
|
||||||
property 'forge.logging.console.level', 'debug'
|
property 'forge.logging.console.level', 'debug'
|
||||||
|
|
||||||
mods {
|
mods {
|
||||||
create {
|
create {
|
||||||
source sourceSets.main
|
source sourceSets.main
|
||||||
|
@ -49,15 +34,9 @@ minecraft {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
createSimi {
|
||||||
workingDirectory project.file('run')
|
workingDirectory project.file('run')
|
||||||
|
property 'forge.logging.console.level', 'info'
|
||||||
// Recommended logging data for a userdev environment
|
|
||||||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
||||||
|
|
||||||
// Recommended logging level for the console
|
|
||||||
property 'forge.logging.console.level', 'debug'
|
|
||||||
|
|
||||||
mods {
|
mods {
|
||||||
create {
|
create {
|
||||||
source sourceSets.main
|
source sourceSets.main
|
||||||
|
@ -65,17 +44,21 @@ minecraft {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data {
|
createServer {
|
||||||
workingDirectory project.file('run')
|
workingDirectory project.file('run')
|
||||||
|
property 'forge.logging.console.level', 'info'
|
||||||
|
mods {
|
||||||
|
create {
|
||||||
|
source sourceSets.main
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Recommended logging data for a userdev environment
|
createData {
|
||||||
|
workingDirectory project.file('run')
|
||||||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||||
|
|
||||||
// Recommended logging level for the console
|
|
||||||
property 'forge.logging.console.level', 'debug'
|
property 'forge.logging.console.level', 'debug'
|
||||||
|
|
||||||
args '--mod', 'create', '--all', '--output', file('src/generated/resources/')
|
args '--mod', 'create', '--all', '--output', file('src/generated/resources/')
|
||||||
|
|
||||||
mods {
|
mods {
|
||||||
create {
|
create {
|
||||||
source sourceSets.main
|
source sourceSets.main
|
||||||
|
@ -86,32 +69,9 @@ minecraft {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
|
minecraft 'net.minecraftforge:forge:1.14.4-28.0.45'
|
||||||
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
|
|
||||||
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
|
|
||||||
minecraft 'net.minecraftforge:forge:1.14.4-28.0.14'
|
|
||||||
|
|
||||||
// You may put jars on which you depend on in ./libs or you may define them like so..
|
|
||||||
// compile "some.group:artifact:version:classifier"
|
|
||||||
// compile "some.group:artifact:version"
|
|
||||||
|
|
||||||
// Real examples
|
|
||||||
// compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
|
|
||||||
// compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
|
|
||||||
|
|
||||||
// The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
|
|
||||||
// provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
|
||||||
|
|
||||||
// These dependencies get remapped to your current MCP mappings
|
|
||||||
// deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
|
||||||
|
|
||||||
// For more info...
|
|
||||||
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
|
||||||
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Example for how to get properties into the manifest for reading by the runtime..
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes([
|
attributes([
|
||||||
|
|
|
@ -12,7 +12,7 @@ public class AdvancementListener {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onAdvancementGet(AdvancementEvent event) {
|
public static void onAdvancementGet(AdvancementEvent event) {
|
||||||
PlayerEntity player = event.getEntityPlayer();
|
PlayerEntity player = event.getPlayer();
|
||||||
if (player == null)
|
if (player == null)
|
||||||
return;
|
return;
|
||||||
if (player.getServer() == null)
|
if (player.getServer() == null)
|
||||||
|
@ -36,9 +36,9 @@ public class AdvancementListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void unlockWhen(String advancement, ResourceLocation recipe, AdvancementEvent event) {
|
private static void unlockWhen(String advancement, ResourceLocation recipe, AdvancementEvent event) {
|
||||||
AdvancementManager advancements = event.getEntityPlayer().getServer().getAdvancementManager();
|
AdvancementManager advancements = event.getPlayer().getServer().getAdvancementManager();
|
||||||
if (event.getAdvancement() == advancements.getAdvancement(new ResourceLocation(advancement)))
|
if (event.getAdvancement() == advancements.getAdvancement(new ResourceLocation(advancement)))
|
||||||
event.getEntityPlayer().unlockRecipes(new ResourceLocation[] { recipe });
|
event.getPlayer().unlockRecipes(new ResourceLocation[] { recipe });
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ResourceLocation recipeOf(AllItems item) {
|
private static ResourceLocation recipeOf(AllItems item) {
|
||||||
|
|
|
@ -25,7 +25,9 @@ import net.minecraftforge.fml.network.IContainerFactory;
|
||||||
public enum AllContainers {
|
public enum AllContainers {
|
||||||
|
|
||||||
SchematicTable(SchematicTableContainer::new),
|
SchematicTable(SchematicTableContainer::new),
|
||||||
Schematicannon(SchematicannonContainer::new);
|
Schematicannon(SchematicannonContainer::new),
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
public ContainerType<? extends Container> type;
|
public ContainerType<? extends Container> type;
|
||||||
private IFactory<?> factory;
|
private IFactory<?> factory;
|
||||||
|
|
|
@ -39,7 +39,9 @@ public enum AllItems {
|
||||||
TREE_FERTILIZER(new TreeFertilizerItem(standardProperties())),
|
TREE_FERTILIZER(new TreeFertilizerItem(standardProperties())),
|
||||||
EMPTY_BLUEPRINT(new Item(standardProperties().maxStackSize(1))),
|
EMPTY_BLUEPRINT(new Item(standardProperties().maxStackSize(1))),
|
||||||
BLUEPRINT_AND_QUILL(new BlueprintAndQuillItem(standardProperties().maxStackSize(1))),
|
BLUEPRINT_AND_QUILL(new BlueprintAndQuillItem(standardProperties().maxStackSize(1))),
|
||||||
BLUEPRINT(new BlueprintItem(standardProperties()));
|
BLUEPRINT(new BlueprintItem(standardProperties())),
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
public Item item;
|
public Item item;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,9 @@ import net.minecraftforge.event.RegistryEvent;
|
||||||
|
|
||||||
public enum AllRecipes {
|
public enum AllRecipes {
|
||||||
|
|
||||||
Placement_Handgun_Upgrade(BuilderGunUpgradeRecipe.Serializer::new);
|
Placement_Handgun_Upgrade(BuilderGunUpgradeRecipe.Serializer::new),
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
public IRecipeSerializer<?> serializer;
|
public IRecipeSerializer<?> serializer;
|
||||||
public Supplier<IRecipeSerializer<?>> supplier;
|
public Supplier<IRecipeSerializer<?>> supplier;
|
||||||
|
|
|
@ -5,7 +5,9 @@ import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public enum AllSpecialTextures {
|
public enum AllSpecialTextures {
|
||||||
|
|
||||||
Selection("selection.png");
|
Selection("selection.png"),
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
public static final String ASSET_PATH = "textures/special/";
|
public static final String ASSET_PATH = "textures/special/";
|
||||||
private ResourceLocation location;
|
private ResourceLocation location;
|
||||||
|
|
|
@ -17,6 +17,9 @@ import net.minecraft.item.crafting.IRecipeSerializer;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.event.RegistryEvent;
|
import net.minecraftforge.event.RegistryEvent;
|
||||||
|
import net.minecraftforge.event.TickEvent.ClientTickEvent;
|
||||||
|
import net.minecraftforge.event.TickEvent.Phase;
|
||||||
|
import net.minecraftforge.event.TickEvent.ServerTickEvent;
|
||||||
import net.minecraftforge.eventbus.api.IEventBus;
|
import net.minecraftforge.eventbus.api.IEventBus;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.DistExecutor;
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
@ -24,8 +27,6 @@ import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
|
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent.ServerTickEvent;
|
|
||||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||||
import net.minecraftforge.fml.event.server.FMLServerStoppingEvent;
|
import net.minecraftforge.fml.event.server.FMLServerStoppingEvent;
|
||||||
|
@ -37,7 +38,7 @@ public class Create {
|
||||||
|
|
||||||
public static final String ID = "create";
|
public static final String ID = "create";
|
||||||
public static final String NAME = "Create";
|
public static final String NAME = "Create";
|
||||||
public static final String VERSION = "0.0.4";
|
public static final String VERSION = "0.0.5";
|
||||||
|
|
||||||
public static Logger logger = LogManager.getLogger();
|
public static Logger logger = LogManager.getLogger();
|
||||||
|
|
||||||
|
@ -76,6 +77,8 @@ public class Create {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onTick(ServerTickEvent event) {
|
public static void onTick(ServerTickEvent event) {
|
||||||
|
if (event.phase == Phase.START)
|
||||||
|
return;
|
||||||
sSchematicLoader.tick();
|
sSchematicLoader.tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,6 +90,11 @@ public class Create {
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onClientTick(ClientTickEvent event) {
|
public static void onClientTick(ClientTickEvent event) {
|
||||||
|
if (event.phase == Phase.START)
|
||||||
|
return;
|
||||||
|
if (cSchematicLoader == null)
|
||||||
|
return;
|
||||||
|
|
||||||
cSchematicLoader.tick();
|
cSchematicLoader.tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
import net.minecraftforge.event.TickEvent.ClientTickEvent;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
|
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
@EventBusSubscriber(value = Dist.CLIENT)
|
@EventBusSubscriber(value = Dist.CLIENT)
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class FilesHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String slug(String name) {
|
public static String slug(String name) {
|
||||||
return name.toLowerCase().replace(' ', '_');
|
return name.toLowerCase().replace(' ', '_').replace('!', '_').replace('?', '_');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean saveTagCompoundAsJson(CompoundNBT compound, String path) {
|
public static boolean saveTagCompoundAsJson(CompoundNBT compound, String path) {
|
||||||
|
|
|
@ -35,11 +35,12 @@ import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.client.event.RenderSpecificHandEvent;
|
import net.minecraftforge.client.event.RenderSpecificHandEvent;
|
||||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||||
|
import net.minecraftforge.event.TickEvent.ClientTickEvent;
|
||||||
|
import net.minecraftforge.event.TickEvent.Phase;
|
||||||
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
|
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
|
||||||
import net.minecraftforge.eventbus.api.EventPriority;
|
import net.minecraftforge.eventbus.api.EventPriority;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@EventBusSubscriber(value = Dist.CLIENT)
|
@EventBusSubscriber(value = Dist.CLIENT)
|
||||||
|
@ -108,6 +109,8 @@ public class BuilderGunHandler {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onClientTick(ClientTickEvent event) {
|
public static void onClientTick(ClientTickEvent event) {
|
||||||
|
if (event.phase == Phase.START)
|
||||||
|
return;
|
||||||
if (cachedBeams == null)
|
if (cachedBeams == null)
|
||||||
cachedBeams = new LinkedList<>();
|
cachedBeams = new LinkedList<>();
|
||||||
ClientWorld world = Minecraft.getInstance().world;
|
ClientWorld world = Minecraft.getInstance().world;
|
||||||
|
|
|
@ -102,4 +102,9 @@ public class BuilderGunUpgradeRecipe implements ICraftingRecipe {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canFit(int width, int height) {
|
||||||
|
return recipe.canFit(width, height);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,8 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
||||||
public void tick() {
|
public void tick() {
|
||||||
|
|
||||||
SchematicannonTileEntity te = container.getTileEntity();
|
SchematicannonTileEntity te = container.getTileEntity();
|
||||||
for (int replaceMode = 0; replaceMode < replaceLevelButtons.size(); replaceMode++)
|
replaceLevelIndicators.get(0).state = te.replaceMode == 0 ? State.ON : State.OFF;
|
||||||
|
for (int replaceMode = 1; replaceMode < replaceLevelButtons.size(); replaceMode++)
|
||||||
replaceLevelIndicators.get(replaceMode).state = replaceMode <= te.replaceMode ? State.ON : State.OFF;
|
replaceLevelIndicators.get(replaceMode).state = replaceMode <= te.replaceMode ? State.ON : State.OFF;
|
||||||
|
|
||||||
skipMissingIndicator.state = te.skipMissing ? State.ON : State.OFF;
|
skipMissingIndicator.state = te.skipMissing ? State.ON : State.OFF;
|
||||||
|
|
|
@ -17,8 +17,8 @@ import com.simibubi.create.foundation.gui.TextInputPromptScreen;
|
||||||
import com.simibubi.create.foundation.utility.FilesHelper;
|
import com.simibubi.create.foundation.utility.FilesHelper;
|
||||||
import com.simibubi.create.foundation.utility.KeyboardHelper;
|
import com.simibubi.create.foundation.utility.KeyboardHelper;
|
||||||
import com.simibubi.create.foundation.utility.RaycastHelper;
|
import com.simibubi.create.foundation.utility.RaycastHelper;
|
||||||
import com.simibubi.create.foundation.utility.TessellatorHelper;
|
|
||||||
import com.simibubi.create.foundation.utility.RaycastHelper.PredicateTraceResult;
|
import com.simibubi.create.foundation.utility.RaycastHelper.PredicateTraceResult;
|
||||||
|
import com.simibubi.create.foundation.utility.TessellatorHelper;
|
||||||
|
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -46,10 +46,11 @@ import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.client.event.GuiScreenEvent.MouseScrollEvent;
|
import net.minecraftforge.client.event.GuiScreenEvent.MouseScrollEvent;
|
||||||
import net.minecraftforge.client.event.InputEvent.MouseInputEvent;
|
import net.minecraftforge.client.event.InputEvent.MouseInputEvent;
|
||||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||||
|
import net.minecraftforge.event.TickEvent.ClientTickEvent;
|
||||||
|
import net.minecraftforge.event.TickEvent.Phase;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
|
|
||||||
|
|
||||||
@EventBusSubscriber(value = Dist.CLIENT, bus = Bus.FORGE)
|
@EventBusSubscriber(value = Dist.CLIENT, bus = Bus.FORGE)
|
||||||
public class BlueprintAndQuillHandler {
|
public class BlueprintAndQuillHandler {
|
||||||
|
@ -257,6 +258,8 @@ public class BlueprintAndQuillHandler {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onClientTick(ClientTickEvent event) {
|
public static void onClientTick(ClientTickEvent event) {
|
||||||
|
if (event.phase == Phase.START)
|
||||||
|
return;
|
||||||
if (!active())
|
if (!active())
|
||||||
return;
|
return;
|
||||||
ClientPlayerEntity player = Minecraft.getInstance().player;
|
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||||
|
|
|
@ -39,10 +39,11 @@ import net.minecraftforge.client.event.InputEvent.MouseInputEvent;
|
||||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||||
|
import net.minecraftforge.event.TickEvent.ClientTickEvent;
|
||||||
|
import net.minecraftforge.event.TickEvent.Phase;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
|
|
||||||
|
|
||||||
@EventBusSubscriber(value = Dist.CLIENT, bus = Bus.FORGE)
|
@EventBusSubscriber(value = Dist.CLIENT, bus = Bus.FORGE)
|
||||||
public class BlueprintHandler {
|
public class BlueprintHandler {
|
||||||
|
@ -77,6 +78,8 @@ public class BlueprintHandler {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onClientTick(ClientTickEvent event) {
|
public static void onClientTick(ClientTickEvent event) {
|
||||||
|
if (event.phase == Phase.START)
|
||||||
|
return;
|
||||||
ClientPlayerEntity player = Minecraft.getInstance().player;
|
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||||
|
|
||||||
if (player == null)
|
if (player == null)
|
||||||
|
|
|
@ -36,10 +36,11 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.client.ForgeHooksClient;
|
import net.minecraftforge.client.ForgeHooksClient;
|
||||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||||
import net.minecraftforge.client.model.data.EmptyModelData;
|
import net.minecraftforge.client.model.data.EmptyModelData;
|
||||||
|
import net.minecraftforge.event.TickEvent;
|
||||||
|
import net.minecraftforge.event.TickEvent.ClientTickEvent;
|
||||||
|
import net.minecraftforge.event.TickEvent.Phase;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
|
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
@EventBusSubscriber(Dist.CLIENT)
|
@EventBusSubscriber(Dist.CLIENT)
|
||||||
|
@ -91,6 +92,8 @@ public class SchematicHologram {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onClientTickEvent(final ClientTickEvent event) {
|
public static void onClientTickEvent(final ClientTickEvent event) {
|
||||||
|
if (event.phase == Phase.START)
|
||||||
|
return;
|
||||||
if (instance != null && instance.active) {
|
if (instance != null && instance.active) {
|
||||||
final Minecraft minecraft = Minecraft.getInstance();
|
final Minecraft minecraft = Minecraft.getInstance();
|
||||||
if (event.phase != TickEvent.Phase.END)
|
if (event.phase != TickEvent.Phase.END)
|
||||||
|
|
|
@ -27,13 +27,14 @@ import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||||
import net.minecraftforge.client.model.data.EmptyModelData;
|
import net.minecraftforge.client.model.data.EmptyModelData;
|
||||||
|
import net.minecraftforge.event.TickEvent.ClientTickEvent;
|
||||||
|
import net.minecraftforge.event.TickEvent.Phase;
|
||||||
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
|
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
|
||||||
import net.minecraftforge.event.world.BlockEvent.EntityPlaceEvent;
|
import net.minecraftforge.event.world.BlockEvent.EntityPlaceEvent;
|
||||||
import net.minecraftforge.eventbus.api.EventPriority;
|
import net.minecraftforge.eventbus.api.EventPriority;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
|
|
||||||
|
|
||||||
@EventBusSubscriber(bus = Bus.FORGE)
|
@EventBusSubscriber(bus = Bus.FORGE)
|
||||||
public class SymmetryHandler {
|
public class SymmetryHandler {
|
||||||
|
@ -113,6 +114,8 @@ public class SymmetryHandler {
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onClientTick(ClientTickEvent event) {
|
public static void onClientTick(ClientTickEvent event) {
|
||||||
|
if (event.phase == Phase.START)
|
||||||
|
return;
|
||||||
Minecraft mc = Minecraft.getInstance();
|
Minecraft mc = Minecraft.getInstance();
|
||||||
ClientPlayerEntity player = mc.player;
|
ClientPlayerEntity player = mc.player;
|
||||||
|
|
||||||
|
|
|
@ -1,47 +1,26 @@
|
||||||
# This is an example mods.toml file. It contains the data relating to the loading mods.
|
modLoader="javafml"
|
||||||
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
|
loaderVersion="[28,)"
|
||||||
# The overall format is standard TOML format, v0.5.0.
|
#issueTrackerURL=""
|
||||||
# Note that there are a couple of TOML lists in this file.
|
|
||||||
# Find more information on toml format here: https://github.com/toml-lang/toml
|
[[mods]]
|
||||||
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
|
modId="create"
|
||||||
modLoader="javafml" #mandatory
|
version="0.0.4"
|
||||||
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
|
displayName="Create"
|
||||||
loaderVersion="[26,)" #mandatory (26 is current forge version)
|
#updateJSONURL=""
|
||||||
# A URL to refer people to when problems occur with this mod
|
authors="simibubi"
|
||||||
#issueTrackerURL=""#optional
|
|
||||||
# A list of mods - how many allowed here is determined by the individual mod loader
|
|
||||||
[[mods]] #mandatory
|
|
||||||
# The modid of the mod
|
|
||||||
modId="create" #mandatory
|
|
||||||
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
|
|
||||||
version="0.0.4" #mandatory
|
|
||||||
# A display name for the mod
|
|
||||||
displayName="Create" #mandatory
|
|
||||||
# A URL to query for updates for this mod. See the JSON update specification <here>
|
|
||||||
#updateJSONURL=""#optional
|
|
||||||
# A URL for the "homepage" for this mod, displayed in the mod UI
|
|
||||||
# A file name (in the root of the mod JAR) containing a logo for display
|
|
||||||
# A text field displayed in the mod UI
|
|
||||||
authors="simibubi" #optional
|
|
||||||
# The description text for the mod (multi line!) (#mandatory)
|
|
||||||
description='''
|
description='''
|
||||||
A handful of additions to aid the creative survivalist.'''
|
A handful of additions to aid the creative survivalist.'''
|
||||||
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
|
|
||||||
[[dependencies.examplemod]] #optional
|
[[dependencies.create]]
|
||||||
# the modid of the dependency
|
modId="forge"
|
||||||
modId="forge" #mandatory
|
mandatory=true
|
||||||
# Does this dependency have to exist - if not, ordering below must be specified
|
versionRange="[28.0.45,)"
|
||||||
mandatory=true #mandatory
|
|
||||||
# The version range of the dependency
|
|
||||||
versionRange="[27,)" #mandatory
|
|
||||||
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
|
|
||||||
ordering="NONE"
|
ordering="NONE"
|
||||||
# Side this dependency is applied on - BOTH, CLIENT or SERVER
|
|
||||||
side="BOTH"
|
side="BOTH"
|
||||||
# Here's another dependency
|
|
||||||
[[dependencies.examplemod]]
|
[[dependencies.create]]
|
||||||
modId="minecraft"
|
modId="minecraft"
|
||||||
mandatory=true
|
mandatory=true
|
||||||
versionRange="[1.14.3]"
|
versionRange="[1.14.4]"
|
||||||
ordering="NONE"
|
ordering="NONE"
|
||||||
side="BOTH"
|
side="BOTH"
|
Loading…
Reference in a new issue