generated from kada49/ForgeTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
97 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,3 @@ | ||
# Template for a Minecraft Forge 1.8.9 Mod | ||
# DisableBurningAnimation | ||
|
||
## Usage | ||
This guide works with JetBrains' [IntelliJ IDEA Community Edition](https://www.jetbrains.com/idea/download/). | ||
|
||
There are two main ways to use template, choose the one that fits you best | ||
|
||
1. First Method | ||
* Click on the `Code` button [here](https://github.com/kada49/ForgeTemplate), then click "Download ZIP" or download it directly from [here](https://github.com/kada49/ForgeTemplate/archive/refs/heads/master.zip). | ||
* Extract the folder from the ZIP folder and open the project in IntelliJ IDEA | ||
2. Second Method | ||
* Click on the `Use this template` button [here](https://github.com/kada49/ForgeTemplate) or follow [this link](https://github.com/kada49/ForgeTemplate/generate). | ||
* Create your own project. | ||
* In IntelliJ IDEA open the project by copying your repository's URL, clicking `Get from VCS`, paste the URL and click `Clone`. | ||
|
||
When you opened the project replace the mod's name - `ForgeTemplate`, the mod id - `forgetemplate` and the mod version - `1.0` in the `gradle.properties` file and in the main mod class. | ||
Disables the burning animation overlay. Mostly used in the Hypixel SkyBlock Floor 7 Dungeon. Toggle with '/disableburninganimation' or '/dba'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ pluginManagement { | |
} | ||
} | ||
|
||
rootProject.name = "ForgeTemplate" | ||
rootProject.name = "DisableBurningAnimation" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package it.kada49; | ||
|
||
import net.minecraftforge.client.ClientCommandHandler; | ||
import net.minecraftforge.client.event.RenderBlockOverlayEvent; | ||
import net.minecraftforge.common.MinecraftForge; | ||
import net.minecraftforge.common.config.Configuration; | ||
import net.minecraftforge.common.config.Property; | ||
import net.minecraftforge.fml.common.Loader; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.common.Mod.EventHandler; | ||
import net.minecraftforge.fml.common.event.FMLInitializationEvent; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
|
||
import java.io.File; | ||
|
||
|
||
@Mod(name = "DisableBurningAnimation", modid = "disableburninganimation", version = "1.0", updateJSON = "https://kada49.github.io/json/DisableBurningAnimation-updateJson.json") | ||
public class DisableBurningAnimation { | ||
|
||
public static Property ENABLED; | ||
public static Configuration CONFIG; | ||
|
||
@EventHandler | ||
@SuppressWarnings("unused") | ||
public void init(FMLInitializationEvent event) { | ||
ClientCommandHandler.instance.registerCommand(new ToggleCommand()); | ||
|
||
MinecraftForge.EVENT_BUS.register(this); | ||
|
||
File configFile = new File(Loader.instance().getConfigDir(), "disableburninganimation.cfg"); | ||
CONFIG = new Configuration(configFile); | ||
CONFIG.load(); | ||
ENABLED = CONFIG.get("General", "burningEnabled", true); | ||
CONFIG.save(); | ||
} | ||
|
||
@SubscribeEvent | ||
@SuppressWarnings("unused") | ||
public void blockOverlayEvent(RenderBlockOverlayEvent event) { | ||
if (event.overlayType == RenderBlockOverlayEvent.OverlayType.FIRE && !ENABLED.getBoolean()) { | ||
event.setCanceled(true); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package it.kada49; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.command.CommandBase; | ||
import net.minecraft.command.ICommandSender; | ||
import net.minecraft.util.ChatComponentText; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import static it.kada49.DisableBurningAnimation.CONFIG; | ||
import static it.kada49.DisableBurningAnimation.ENABLED; | ||
|
||
public class ToggleCommand extends CommandBase { | ||
@Override | ||
public String getCommandName() { | ||
return "disableburninganimation"; | ||
} | ||
|
||
@Override | ||
public String getCommandUsage(ICommandSender sender) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void processCommand(ICommandSender sender, String[] args) { | ||
ENABLED.set(!ENABLED.getBoolean()); | ||
CONFIG.save(); | ||
|
||
Minecraft.getMinecraft().thePlayer.addChatComponentMessage(new ChatComponentText("Burning Animation " + (ENABLED.getBoolean() ? "enabled" : "disabled"))); | ||
} | ||
|
||
@Override | ||
public List<String> getCommandAliases() { | ||
List<String> aliases = new ArrayList<>(); | ||
aliases.add("dba"); | ||
return aliases; | ||
} | ||
|
||
@Override | ||
public int getRequiredPermissionLevel() { | ||
return 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters