mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-10-26 14:24:14 +00:00
Compare commits
40
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82ad40f1cf | ||
|
|
6d8b0a0e72 | ||
|
|
0937d7b2d6 | ||
|
|
99c3fb0b74 | ||
|
|
04c781df16 | ||
|
|
7fb5b8d3c7 | ||
|
|
8fc59e271e | ||
|
|
1ca5aff7d9 | ||
|
|
0e4101e4e5 | ||
|
|
c21e389db2 | ||
|
|
499dca4a7b | ||
|
|
dd9d3146ec | ||
|
|
6bb77d71b9 | ||
|
|
1515ce27d1 | ||
|
|
bc7929de29 | ||
|
|
c8dcdce141 | ||
|
|
95a25957d4 | ||
|
|
d7d6c4e0c0 | ||
|
|
b0bc154516 | ||
|
|
333fb4e274 | ||
|
|
5e504c7c10 | ||
|
|
b7bf08a178 | ||
|
|
a671627f0b | ||
|
|
40c064b8c7 | ||
|
|
8e9e1e98d7 | ||
|
|
a755869dbd | ||
|
|
0f3e15ce25 | ||
|
|
18cda6a4ee | ||
|
|
565fc72d24 | ||
|
|
e039519acf | ||
|
|
bf5f0bcb5b | ||
|
|
7bca3009b6 | ||
|
|
f7cac98ad5 | ||
|
|
07ed88515e | ||
|
|
46e5d8a785 | ||
|
|
2835b7a54e | ||
|
|
2331e33ebb | ||
|
|
1fa9420ec2 | ||
|
|
ee65279d0b | ||
|
|
8efee8630a |
No files matched your search
@@ -29,3 +29,4 @@ src/main/resources/mixins.*.json
|
||||
*.bat
|
||||
*.DS_Store
|
||||
!gradlew.bat
|
||||
layout.json
|
||||
+10
-24
@@ -4,29 +4,15 @@ dependencies {
|
||||
api("com.github.GTNewHorizons:BrandonsCore:1.2.0-GTNH:dev")
|
||||
api("curse.maven:cofh-lib-220333:2388748")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.9.16:api") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:OpenComputers:1.10.26-GTNH:api") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.6.44-GTNH:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:CodeChickenLib:1.3.0:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:inventory-tweaks:1.7.0:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.0.3:dev') {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.11.2:api") {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:OpenComputers:1.12.4-GTNH:api") {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.8.37-GTNH:dev") {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:CodeChickenCore:1.4.8:dev") {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:inventory-tweaks:1.7.1:dev") {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.2-GTNH:dev') {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.106:dev") {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:GTNHLib:0.8.6:dev") {transitive = false}
|
||||
|
||||
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("curse.maven:computercraft-67504:2269339") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") {transitive = false}
|
||||
compileOnly("curse.maven:computercraft-67504:2269339") {transitive = false}
|
||||
}
|
||||
+14
-6
@@ -14,7 +14,7 @@ modId = DraconicEvolution
|
||||
modGroup = com.brandon3055.draconicevolution
|
||||
|
||||
# Whether to use modGroup as the maven publishing group.
|
||||
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
|
||||
# When false, com.github.GTNewHorizons is used.
|
||||
useModGroupForPublishing = false
|
||||
|
||||
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||
@@ -50,10 +50,10 @@ enableGenericInjection = false
|
||||
# Generate a class with a String field for the mod version named as defined below.
|
||||
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
||||
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
||||
generateGradleTokenClass =
|
||||
generateGradleTokenClass = com.brandon3055.draconicevolution.DETags
|
||||
|
||||
# Name of the token containing the project's current version to generate/replace.
|
||||
gradleTokenVersion = GRADLETOKEN_VERSION
|
||||
gradleTokenVersion = VERSION
|
||||
|
||||
# [DEPRECATED] Mod ID replacement token.
|
||||
gradleTokenModId =
|
||||
@@ -70,7 +70,7 @@ gradleTokenGroupName =
|
||||
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
|
||||
# version in @Mod([...], version = VERSION, [...]).
|
||||
# Leave these properties empty to skip individual token replacements.
|
||||
replaceGradleTokenInFile = VersionHandler.java
|
||||
replaceGradleTokenInFile =
|
||||
|
||||
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
|
||||
# leave this property empty.
|
||||
@@ -96,7 +96,9 @@ usesMixinDebug = false
|
||||
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||
mixinPlugin =
|
||||
|
||||
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
|
||||
# Specify the package that contains all of your Mixins. The package must exist or
|
||||
# the build will fail. If you have a package property defined in your mixins.<modid>.json,
|
||||
# it must match with this or the build will fail.
|
||||
mixinsPackage =
|
||||
|
||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||
@@ -151,7 +153,7 @@ modrinthProjectId =
|
||||
# type can be one of [project, version],
|
||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
|
||||
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||
modrinthRelations =
|
||||
|
||||
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||
@@ -172,6 +174,12 @@ curseForgeRelations =
|
||||
# projects. New projects should not use this parameter.
|
||||
customArchiveBaseName = Draconic-Evolution
|
||||
|
||||
# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory.
|
||||
# runClientWorkingDirectory = run/client
|
||||
|
||||
# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory.
|
||||
# runServerWorkingDirectory = run/server
|
||||
|
||||
# Optional parameter to have the build automatically fail if an illegal version is used.
|
||||
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
|
||||
# The check is ONLY performed if the version is a git tag.
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -86,8 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -115,7 +114,7 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -206,7 +205,7 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
@@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
Vendored
+2
-2
@@ -70,11 +70,11 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.48'
|
||||
}
|
||||
|
||||
|
||||
@@ -59,15 +59,6 @@ public class DraconicEvolution {
|
||||
@Mod.EventHandler
|
||||
public static void preInit(final FMLPreInitializationEvent event) {
|
||||
if (debug) LogHelper.info("Initialization");
|
||||
|
||||
// event.getModMetadata().autogenerated = false;
|
||||
// event.getModMetadata().credits = "";
|
||||
// event.getModMetadata().description = "This is a mod originally made for the Tolkiencraft mod pack";
|
||||
// event.getModMetadata().authorList = Arrays.asList("brandon3055");
|
||||
// event.getModMetadata().logoFile = "banner.png";
|
||||
// event.getModMetadata().url = "http://www.brandon3055.com/";
|
||||
// event.getModMetadata().version = References.VERSION + "-MC1.7.10";
|
||||
|
||||
proxy.preInit(event);
|
||||
}
|
||||
|
||||
@@ -75,20 +66,14 @@ public class DraconicEvolution {
|
||||
public void init(final FMLInitializationEvent event) {
|
||||
if (debug) System.out.println("init()");
|
||||
proxy.init(event);
|
||||
|
||||
// ===
|
||||
|
||||
// ===
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void postInit(final FMLPostInitializationEvent event) {
|
||||
if (debug) System.out.println("postInit()");
|
||||
|
||||
proxy.postInit(event);
|
||||
}
|
||||
|
||||
// FMLInterModComms.sendMessage("DraconicEvolution", "addChestRecipe:item.coal", new ItemStack(Items.diamond, 2));
|
||||
@Mod.EventHandler
|
||||
public void processMessage(FMLInterModComms.IMCEvent event) {
|
||||
for (FMLInterModComms.IMCMessage m : event.getMessages()) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.brandon3055.draconicevolution.client;
|
||||
|
||||
import static com.brandon3055.draconicevolution.integration.nei.IMCForNEI.IMCSender;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.ISound;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
@@ -173,6 +175,7 @@ public class ClientProxy extends CommonProxy {
|
||||
registerRenderIDs();
|
||||
registerRendering();
|
||||
ResourceHandler.instance.tick(null);
|
||||
IMCSender();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+239
@@ -0,0 +1,239 @@
|
||||
package com.brandon3055.draconicevolution.client.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.common.container.ContainerDislocatorInhibitor;
|
||||
import com.brandon3055.draconicevolution.common.inventory.SlotFakeItem;
|
||||
import com.brandon3055.draconicevolution.common.lib.References;
|
||||
import com.brandon3055.draconicevolution.common.network.DislocatorInhibitorButtonPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.SlotFakeClickPacket;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileDislocatorInhibitor;
|
||||
|
||||
import codechicken.nei.VisiblityData;
|
||||
import codechicken.nei.api.INEIGuiHandler;
|
||||
import codechicken.nei.api.TaggedInventoryArea;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Optional.Interface(iface = "codechicken.nei.api.INEIGuiHandler", modid = "NotEnoughItems")
|
||||
public class GUIDislocatorInhibitor extends GuiContainer implements INEIGuiHandler {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
References.MODID.toLowerCase(),
|
||||
"textures/gui/Inhibitor.png");
|
||||
private int range = 5;
|
||||
private TileDislocatorInhibitor.ActivityControlType activityControlType = TileDislocatorInhibitor.ActivityControlType.ALWAYS_ACTIVE;
|
||||
private boolean whitelist = false;
|
||||
|
||||
private final ContainerDislocatorInhibitor container;
|
||||
|
||||
public GUIDislocatorInhibitor(InventoryPlayer playerInventory, TileDislocatorInhibitor inhibitor) {
|
||||
super(inhibitor.getGuiContainer(playerInventory));
|
||||
this.container = (ContainerDislocatorInhibitor) inventorySlots;
|
||||
|
||||
xSize = 176;
|
||||
ySize = 150;
|
||||
|
||||
syncWithServer();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
buttonList.clear();
|
||||
buttonList.add(new GuiButtonAHeight(0, guiLeft + 7, guiTop + 19, 18, 18, "-"));
|
||||
buttonList.add(new GuiButtonAHeight(1, guiLeft + 97, guiTop + 19, 18, 18, "+"));
|
||||
buttonList.add(new GuiButtonAHeight(2, guiLeft + 151, guiTop + 19, 18, 18, ""));
|
||||
buttonList.add(new GuiButtonAHeight(3, guiLeft + 151, guiTop + 41, 18, 18, ""));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("tile.draconicevolution:dislocatorInhibitor.name"),
|
||||
7,
|
||||
5,
|
||||
0x222222);
|
||||
drawGuiText();
|
||||
drawGreyOutSlots();
|
||||
drawButtonIcons();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
|
||||
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int x, int y, float partialTicks) {
|
||||
super.drawScreen(x, y, partialTicks);
|
||||
ArrayList<String> lines = new ArrayList<>();
|
||||
if (isButtonHovered(x, y, 7, 19, 18, 18)) {
|
||||
lines.add(StatCollector.translateToLocal("gui.de.dislocatorInhibitor.tooltip.range.decrease.txt"));
|
||||
} else if (isButtonHovered(x, y, 97, 19, 18, 18)) {
|
||||
lines.add(StatCollector.translateToLocal("gui.de.dislocatorInhibitor.tooltip.range.increase.txt"));
|
||||
} else if (isButtonHovered(x, y, 151, 19, 18, 18)) {
|
||||
switch (activityControlType) {
|
||||
case ALWAYS_ACTIVE -> lines
|
||||
.add(StatCollector.translateToLocal("gui.de.dislocatorInhibitor.tooltip.activity.always.txt"));
|
||||
case WITH_REDSTONE -> lines
|
||||
.add(StatCollector.translateToLocal("gui.de.dislocatorInhibitor.tooltip.activity.with.txt"));
|
||||
case WITHOUT_REDSTONE -> lines
|
||||
.add(StatCollector.translateToLocal("gui.de.dislocatorInhibitor.tooltip.activity.without.txt"));
|
||||
case NEVER_ACTIVE -> lines
|
||||
.add(StatCollector.translateToLocal("gui.de.dislocatorInhibitor.tooltip.activity.never.txt"));
|
||||
}
|
||||
lines.add(StatCollector.translateToLocal("gui.de.dislocatorInhibitor.tooltip.activity.cycle.txt"));
|
||||
} else if (isButtonHovered(x, y, 151, 41, 18, 18)) {
|
||||
if (whitelist) {
|
||||
lines.add(StatCollector.translateToLocal("gui.de.dislocatorInhibitor.tooltip.whitelist.txt"));
|
||||
} else {
|
||||
lines.add(StatCollector.translateToLocal("gui.de.dislocatorInhibitor.tooltip.blacklist.txt"));
|
||||
}
|
||||
}
|
||||
if (!lines.isEmpty()) {
|
||||
drawHoveringText(lines, x, y, fontRendererObj);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isButtonHovered(int mouseX, int mouseY, int buttonX, int buttonY, int width, int height) {
|
||||
return (mouseX >= buttonX + guiLeft && mouseX < buttonX + width + guiLeft)
|
||||
&& (mouseY >= buttonY + guiTop && mouseY < buttonY + height + guiTop);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleMouseClick(Slot slotIn, int slotId, int clickedButton, int clickType) {
|
||||
if (slotIn instanceof SlotFakeItem sfi) {
|
||||
DraconicEvolution.network.sendToServer(
|
||||
new SlotFakeClickPacket((byte) sfi.getSlotIndex(), this.mc.thePlayer.inventory.getItemStack()));
|
||||
} else {
|
||||
super.handleMouseClick(slotIn, slotId, clickedButton, clickType);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) {
|
||||
switch (button.id) {
|
||||
case 0 -> { // Range -
|
||||
range = Math.max(range - 1, TileDislocatorInhibitor.MINIMUM_RANGE);
|
||||
DraconicEvolution.network.sendToServer(new DislocatorInhibitorButtonPacket((byte) 0, (byte) range));
|
||||
}
|
||||
case 1 -> { // Range +
|
||||
range = Math.min(range + 1, TileDislocatorInhibitor.MAXIMUM_RANGE);
|
||||
DraconicEvolution.network.sendToServer(new DislocatorInhibitorButtonPacket((byte) 0, (byte) range));
|
||||
}
|
||||
case 2 -> { // Cycle Activity control
|
||||
activityControlType = activityControlType.getNext();
|
||||
byte controlMode = (byte) (activityControlType.ordinal());
|
||||
DraconicEvolution.network.sendToServer(new DislocatorInhibitorButtonPacket((byte) 1, controlMode));
|
||||
}
|
||||
case 3 -> { // Toggle Whitelist/Blacklist mode
|
||||
whitelist = !whitelist;
|
||||
byte whitelistMode = (byte) (whitelist ? 1 : 0);
|
||||
DraconicEvolution.network.sendToServer(new DislocatorInhibitorButtonPacket((byte) 2, whitelistMode));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisiblityData modifyVisiblity(GuiContainer gui, VisiblityData currentVisibility) {
|
||||
return currentVisibility;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Integer> getItemSpawnSlots(GuiContainer gui, ItemStack item) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaggedInventoryArea> getInventoryAreas(GuiContainer gui) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button) {
|
||||
if (gui instanceof GUIDislocatorInhibitor) {
|
||||
for (var slot : container.inventorySlots) {
|
||||
if (slot instanceof SlotFakeItem sfi) {
|
||||
if (sfi.isOverSlot(mousex - this.guiLeft, mousey - this.guiTop)) {
|
||||
draggedStack.stackSize = 0;
|
||||
DraconicEvolution.network
|
||||
.sendToServer(new SlotFakeClickPacket((byte) sfi.getSlotIndex(), draggedStack));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void drawGuiText() {
|
||||
fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("gui.de.dislocatorInhibitor.range.txt"),
|
||||
40,
|
||||
25,
|
||||
0x000000,
|
||||
false);
|
||||
fontRendererObj.drawString(String.valueOf(range), range < 10 ? 78 : 75, 25, 0x000000, false);
|
||||
}
|
||||
|
||||
private void drawButtonIcons() {
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
|
||||
// activity control button
|
||||
drawTexturedModalRect(151, 19, 0, 150 + (18 * activityControlType.ordinal()), 18, 18);
|
||||
|
||||
// whitelist button
|
||||
drawTexturedModalRect(151, 41, 18, 150 + (whitelist ? 0 : 18), 18, 18);
|
||||
}
|
||||
|
||||
private void drawGreyOutSlots() {
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5f);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
for (int i = 0; i < 8; i++) {
|
||||
drawTexturedModalRect(7 + i * 18, 41, 36, 150, 18, 18);
|
||||
}
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
|
||||
private void syncWithServer() {
|
||||
TileDislocatorInhibitor inhibitor = container.getTileEntity();
|
||||
whitelist = inhibitor.isWhitelist();
|
||||
range = inhibitor.getRange();
|
||||
activityControlType = inhibitor.getActivityControlType();
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import com.brandon3055.draconicevolution.client.gui.componentguis.GUIManual;
|
||||
import com.brandon3055.draconicevolution.client.gui.componentguis.GUIReactor;
|
||||
import com.brandon3055.draconicevolution.client.gui.componentguis.GUIToolConfig;
|
||||
import com.brandon3055.draconicevolution.common.container.ContainerAdvTool;
|
||||
import com.brandon3055.draconicevolution.common.container.ContainerDislocatorInhibitor;
|
||||
import com.brandon3055.draconicevolution.common.container.ContainerDissEnchanter;
|
||||
import com.brandon3055.draconicevolution.common.container.ContainerDraconiumChest;
|
||||
import com.brandon3055.draconicevolution.common.container.ContainerEnergyInfuser;
|
||||
@@ -20,6 +21,7 @@ import com.brandon3055.draconicevolution.common.container.ContainerSunDial;
|
||||
import com.brandon3055.draconicevolution.common.container.ContainerUpgradeModifier;
|
||||
import com.brandon3055.draconicevolution.common.container.ContainerWeatherController;
|
||||
import com.brandon3055.draconicevolution.common.inventory.InventoryTool;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileDislocatorInhibitor;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileDissEnchanter;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileDraconiumChest;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileEnergyInfuser;
|
||||
@@ -53,6 +55,7 @@ public class GuiHandler implements IGuiHandler {
|
||||
public static final int GUIID_FLOW_GATE = 13;
|
||||
public static final int GUIID_REACTOR = 14;
|
||||
public static final int GUIID_UPGRADE_MODIFIER = 15;
|
||||
public static final int GUIID_DISLOCATOR_INHIBITOR = 16;
|
||||
public static final int GUIID_CONTAINER_TEMPLATE = 100;
|
||||
|
||||
public GuiHandler() {
|
||||
@@ -116,6 +119,11 @@ public class GuiHandler implements IGuiHandler {
|
||||
return new ContainerUpgradeModifier(player.inventory, upgradeModifier);
|
||||
}
|
||||
}
|
||||
case GUIID_DISLOCATOR_INHIBITOR -> {
|
||||
if (tile instanceof TileDislocatorInhibitor inhibitor) {
|
||||
return new ContainerDislocatorInhibitor(player.inventory, inhibitor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -199,6 +207,11 @@ public class GuiHandler implements IGuiHandler {
|
||||
new ContainerUpgradeModifier(player.inventory, upgradeModifier));
|
||||
}
|
||||
}
|
||||
case GUIID_DISLOCATOR_INHIBITOR -> {
|
||||
if (tile instanceof TileDislocatorInhibitor inhibitor) {
|
||||
return new GUIDislocatorInhibitor(player.inventory, inhibitor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
+5
@@ -20,6 +20,7 @@ import com.brandon3055.brandonscore.client.utills.GuiHelper;
|
||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
||||
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
||||
import com.brandon3055.draconicevolution.common.container.ContainerReactor;
|
||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore.ReactorState;
|
||||
|
||||
@@ -205,6 +206,10 @@ public class GUIReactor extends GUIBase {
|
||||
100D) + "%");
|
||||
}
|
||||
text.add(core.convertedFuel + " / " + (core.convertedFuel + core.reactorFuel));
|
||||
text.add(
|
||||
"Full: " + (Utills.round(
|
||||
(float) (core.convertedFuel + core.reactorFuel) / ConfigHandler.reactorFuelStorage * 100,
|
||||
1000)) + "%");
|
||||
drawHoveringText(text, mouseX, mouseY, fontRendererObj);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import net.minecraft.client.settings.KeyBinding;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.lib.References;
|
||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -21,6 +22,7 @@ public final class KeyBindings {
|
||||
public static final KeyBinding toolProfileChange;
|
||||
public static final KeyBinding toggleFlight;
|
||||
public static final KeyBinding toggleMagnet;
|
||||
public static KeyBinding toggleMagnetSelfPickup;
|
||||
|
||||
static {
|
||||
placeItem = new KeyBinding("key.placeItem", Keyboard.KEY_V, References.MODNAME);
|
||||
@@ -28,6 +30,10 @@ public final class KeyBindings {
|
||||
toolProfileChange = new KeyBinding("key.toolProfileChange", Keyboard.KEY_NONE, References.MODNAME);
|
||||
toggleFlight = new KeyBinding("key.toggleFlight", Keyboard.KEY_NONE, References.MODNAME);
|
||||
toggleMagnet = new KeyBinding("key.toggleMagnet", Keyboard.KEY_NONE, References.MODNAME);
|
||||
if (ModHelper.isHodgepodgeLoaded) toggleMagnetSelfPickup = new KeyBinding(
|
||||
"key.toggleMagnetSelfPickup",
|
||||
Keyboard.KEY_NONE,
|
||||
References.MODNAME);
|
||||
}
|
||||
|
||||
private KeyBindings() {}
|
||||
@@ -38,5 +44,6 @@ public final class KeyBindings {
|
||||
ClientRegistry.registerKeyBinding(toolProfileChange);
|
||||
ClientRegistry.registerKeyBinding(toggleFlight);
|
||||
ClientRegistry.registerKeyBinding(toggleMagnet);
|
||||
if (ModHelper.isHodgepodgeLoaded) ClientRegistry.registerKeyBinding(toggleMagnetSelfPickup);
|
||||
}
|
||||
}
|
||||
+95
-67
@@ -1,11 +1,13 @@
|
||||
package com.brandon3055.draconicevolution.client.keybinding;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
|
||||
@@ -18,10 +20,12 @@ import com.brandon3055.draconicevolution.common.items.tools.Magnet;
|
||||
import com.brandon3055.draconicevolution.common.items.tools.baseclasses.ToolHandler;
|
||||
import com.brandon3055.draconicevolution.common.network.ButtonPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.MagnetTogglePacket;
|
||||
import com.brandon3055.draconicevolution.common.network.MagnetToggleSelfPickupPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.PlacedItemPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.TeleporterPacket;
|
||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.InventoryUtils;
|
||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.InputEvent;
|
||||
@@ -36,45 +40,60 @@ public class KeyInputHandler {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void onKeyInput(InputEvent.KeyInputEvent event) {
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if (KeyBindings.placeItem.isPressed()) {
|
||||
handlePlaceItemKey();
|
||||
} else if (KeyBindings.toolConfig.isPressed()) {
|
||||
DraconicEvolution.network.sendToServer(new ButtonPacket(ButtonPacket.ID_TOOLCONFIG, false));
|
||||
} else if (KeyBindings.toolProfileChange.isPressed() && Minecraft.getMinecraft().thePlayer != null
|
||||
&& Minecraft.getMinecraft().thePlayer.getItemInUse() == null) {
|
||||
DraconicEvolution.network
|
||||
.sendToServer(new ButtonPacket(ButtonPacket.ID_TOOL_PROFILE_CHANGE, false));
|
||||
handleToolConfigKey();
|
||||
} else if (KeyBindings.toolProfileChange.isPressed() && player != null && player.getItemInUse() == null) {
|
||||
handleToolProfileChangeKey(player);
|
||||
} else if (KeyBindings.toggleFlight.isPressed() && player != null) {
|
||||
handleToggleFlightKey(player);
|
||||
} else if (KeyBindings.toggleMagnet.isPressed()) {
|
||||
handleToggleMagnetKey(player);
|
||||
} else if (ModHelper.isHodgepodgeLoaded && KeyBindings.toggleMagnetSelfPickup.isPressed()) {
|
||||
handleToggleMagnetSelfPickup(player);
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack stack = Minecraft.getMinecraft().thePlayer.getHeldItem();
|
||||
if (stack != null && stack.getItem() instanceof IConfigurableItem
|
||||
&& ((IConfigurableItem) stack.getItem()).hasProfiles()) {
|
||||
int preset = ItemNBTHelper.getInteger(stack, "ConfigProfile", 0);
|
||||
if (++preset >= 5) preset = 0;
|
||||
ItemNBTHelper.setInteger(stack, "ConfigProfile", preset);
|
||||
}
|
||||
} else
|
||||
if (KeyBindings.toggleFlight.isPressed()) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
if (player.capabilities.allowFlying) {
|
||||
if (player.capabilities.isFlying) {
|
||||
player.capabilities.isFlying = false;
|
||||
} else {
|
||||
player.capabilities.isFlying = true;
|
||||
if (player.onGround) {
|
||||
player.setPosition(player.posX, player.posY + 0.05D, player.posZ);
|
||||
player.motionY = 0;
|
||||
}
|
||||
}
|
||||
player.sendPlayerAbilities();
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void onMouseInput(InputEvent.MouseInputEvent event) {
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if (KeyBindings.placeItem.isPressed()) {
|
||||
handlePlaceItemKey();
|
||||
} else if (KeyBindings.toolConfig.isPressed()) {
|
||||
handleToolConfigKey();
|
||||
} else if (KeyBindings.toolProfileChange.isPressed() && player != null) {
|
||||
handleToolProfileChangeKey(player);
|
||||
} else if (KeyBindings.toggleFlight.isPressed() && player != null) {
|
||||
handleToggleFlightKey(player);
|
||||
} else if (KeyBindings.toggleMagnet.isPressed()) {
|
||||
handleToggleMagnetKey(player);
|
||||
} else if (ModHelper.isHodgepodgeLoaded && KeyBindings.toggleMagnetSelfPickup.isPressed()) {
|
||||
handleToggleMagnetSelfPickup(player);
|
||||
}
|
||||
|
||||
if (player != null) {
|
||||
int change = Mouse.getEventDWheel();
|
||||
if (change == 0 || !player.isSneaking()) return;
|
||||
|
||||
if (change > 0) {
|
||||
ItemStack item = player.inventory.getStackInSlot(previousSlot(1, player.inventory.currentItem));
|
||||
if (item != null && Objects.equals(item.getItem(), ModItems.teleporterMKII)) {
|
||||
player.inventory.currentItem = previousSlot(1, player.inventory.currentItem);
|
||||
DraconicEvolution.network.sendToServer(new TeleporterPacket(TeleporterPacket.SCROLL, -1, false));
|
||||
}
|
||||
} else if (KeyBindings.toggleMagnet.isPressed()) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
Optional<ItemStack> magnetOptional = InventoryUtils.getItemInAnyPlayerInventory(player, Magnet.class);
|
||||
|
||||
if (magnetOptional.isPresent()) {
|
||||
DraconicEvolution.network.sendToServer(new MagnetTogglePacket());
|
||||
} else {
|
||||
ItemStack item = player.inventory.getStackInSlot(previousSlot(-1, player.inventory.currentItem));
|
||||
if (item != null && Objects.equals(item.getItem(), ModItems.teleporterMKII)) {
|
||||
player.inventory.currentItem = previousSlot(-1, player.inventory.currentItem);
|
||||
DraconicEvolution.network.sendToServer(new TeleporterPacket(TeleporterPacket.SCROLL, 1, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void handlePlaceItemKey() {
|
||||
@@ -87,45 +106,54 @@ public class KeyInputHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void onMouseInput(InputEvent.MouseInputEvent event) {
|
||||
if (KeyBindings.placeItem.isPressed()) {
|
||||
handlePlaceItemKey();
|
||||
} else if (KeyBindings.toolConfig.isPressed()) {
|
||||
DraconicEvolution.network.sendToServer(new ButtonPacket(ButtonPacket.ID_TOOLCONFIG, false));
|
||||
} else if (KeyBindings.toolProfileChange.isPressed() && Minecraft.getMinecraft().thePlayer != null) {
|
||||
DraconicEvolution.network.sendToServer(new ButtonPacket(ButtonPacket.ID_TOOL_PROFILE_CHANGE, false));
|
||||
private void handleToolConfigKey() {
|
||||
DraconicEvolution.network.sendToServer(new ButtonPacket(ButtonPacket.ID_TOOLCONFIG, false));
|
||||
}
|
||||
|
||||
ItemStack stack = Minecraft.getMinecraft().thePlayer.getHeldItem();
|
||||
if (stack != null && stack.getItem() instanceof IConfigurableItem
|
||||
&& ((IConfigurableItem) stack.getItem()).hasProfiles()) {
|
||||
int preset = ItemNBTHelper.getInteger(stack, "ConfigProfile", 0);
|
||||
if (++preset >= 5) preset = 0;
|
||||
ItemNBTHelper.setInteger(stack, "ConfigProfile", preset);
|
||||
}
|
||||
}
|
||||
private void handleToolProfileChangeKey(@Nonnull EntityClientPlayerMP player) {
|
||||
DraconicEvolution.network.sendToServer(new ButtonPacket(ButtonPacket.ID_TOOL_PROFILE_CHANGE, false));
|
||||
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
int change = Mouse.getEventDWheel();
|
||||
if (change == 0 || !player.isSneaking()) return;
|
||||
|
||||
if (change > 0) {
|
||||
ItemStack item = player.inventory.getStackInSlot(previouseSlot(1, player.inventory.currentItem));
|
||||
if (item != null && item.getItem().equals(ModItems.teleporterMKII)) {
|
||||
player.inventory.currentItem = previouseSlot(1, player.inventory.currentItem);
|
||||
DraconicEvolution.network.sendToServer(new TeleporterPacket(TeleporterPacket.SCROLL, -1, false));
|
||||
}
|
||||
} else {
|
||||
ItemStack item = player.inventory.getStackInSlot(previouseSlot(-1, player.inventory.currentItem));
|
||||
if (item != null && item.getItem().equals(ModItems.teleporterMKII)) {
|
||||
player.inventory.currentItem = previouseSlot(-1, player.inventory.currentItem);
|
||||
DraconicEvolution.network.sendToServer(new TeleporterPacket(TeleporterPacket.SCROLL, 1, false));
|
||||
}
|
||||
ItemStack stack = player.getHeldItem();
|
||||
if (stack != null && stack.getItem() instanceof IConfigurableItem
|
||||
&& ((IConfigurableItem) stack.getItem()).hasProfiles()) {
|
||||
int preset = ItemNBTHelper.getInteger(stack, "ConfigProfile", 0);
|
||||
if (++preset >= 5) preset = 0;
|
||||
ItemNBTHelper.setInteger(stack, "ConfigProfile", preset);
|
||||
}
|
||||
}
|
||||
|
||||
private int previouseSlot(int i, int c) {
|
||||
private void handleToggleFlightKey(@Nonnull EntityClientPlayerMP player) {
|
||||
if (player.capabilities.allowFlying) {
|
||||
if (player.capabilities.isFlying) {
|
||||
player.capabilities.isFlying = false;
|
||||
} else {
|
||||
player.capabilities.isFlying = true;
|
||||
if (player.onGround) {
|
||||
player.setPosition(player.posX, player.posY + 0.05D, player.posZ);
|
||||
player.motionY = 0;
|
||||
}
|
||||
}
|
||||
player.sendPlayerAbilities();
|
||||
}
|
||||
}
|
||||
|
||||
private void handleToggleMagnetKey(EntityClientPlayerMP player) {
|
||||
Optional<ItemStack> magnetOptional = InventoryUtils.getItemInAnyPlayerInventory(player, Magnet.class);
|
||||
|
||||
if (magnetOptional.isPresent()) {
|
||||
DraconicEvolution.network.sendToServer(new MagnetTogglePacket());
|
||||
}
|
||||
}
|
||||
|
||||
private void handleToggleMagnetSelfPickup(EntityClientPlayerMP player) {
|
||||
Optional<ItemStack> magnetOptional = InventoryUtils.getItemInAnyPlayerInventory(player, Magnet.class);
|
||||
|
||||
if (magnetOptional.isPresent()) {
|
||||
DraconicEvolution.network.sendToServer(new MagnetToggleSelfPickupPacket());
|
||||
}
|
||||
}
|
||||
|
||||
private int previousSlot(int i, int c) {
|
||||
if (c > 0 && c < 8) return c + i;
|
||||
if (c == 0 && i < 0) return 8;
|
||||
if (c == 8 && i > 0) return 0;
|
||||
|
||||
@@ -38,16 +38,20 @@ import com.brandon3055.draconicevolution.common.magic.PotionHandler;
|
||||
import com.brandon3055.draconicevolution.common.network.BlockUpdatePacket;
|
||||
import com.brandon3055.draconicevolution.common.network.ButtonPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.ContributorPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.DislocatorInhibitorButtonPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.GenericParticlePacket;
|
||||
import com.brandon3055.draconicevolution.common.network.ItemConfigPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.MagnetToggleAckPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.MagnetTogglePacket;
|
||||
import com.brandon3055.draconicevolution.common.network.MagnetToggleSelfPickupAckPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.MagnetToggleSelfPickupPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.MountUpdatePacket;
|
||||
import com.brandon3055.draconicevolution.common.network.ParticleGenPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.PlacedItemPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.PlayerDetectorButtonPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.PlayerDetectorStringPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.ShieldHitPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.SlotFakeClickPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.SpeedRequestPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.TeleporterPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.TileObjectPacket;
|
||||
@@ -56,6 +60,7 @@ import com.brandon3055.draconicevolution.common.tileentities.TileCKeyStone;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileChaosShard;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileContainerTemplate;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileCustomSpawner;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileDislocatorInhibitor;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileDissEnchanter;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileDraconiumChest;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileEnergyInfuser;
|
||||
@@ -151,7 +156,6 @@ public class CommonProxy {
|
||||
PotionHandler.init();
|
||||
CCOCIntegration.init();
|
||||
DragonChunkLoader.init();
|
||||
|
||||
LogHelper.info("Finished Initialization");
|
||||
}
|
||||
|
||||
@@ -163,111 +167,76 @@ public class CommonProxy {
|
||||
}
|
||||
|
||||
public void initializeNetwork() {
|
||||
// spotless:off
|
||||
DraconicEvolution.network = NetworkRegistry.INSTANCE.newSimpleChannel(DraconicEvolution.networkChannelName);
|
||||
DraconicEvolution.network.registerMessage(ButtonPacket.Handler.class, ButtonPacket.class, 0, Side.SERVER);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(ParticleGenPacket.Handler.class, ParticleGenPacket.class, 1, Side.SERVER);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(PlacedItemPacket.Handler.class, PlacedItemPacket.class, 2, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(
|
||||
PlayerDetectorButtonPacket.Handler.class,
|
||||
PlayerDetectorButtonPacket.class,
|
||||
3,
|
||||
Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(
|
||||
PlayerDetectorStringPacket.Handler.class,
|
||||
PlayerDetectorStringPacket.class,
|
||||
4,
|
||||
Side.SERVER);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(TeleporterPacket.Handler.class, TeleporterPacket.class, 5, Side.SERVER);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(TileObjectPacket.Handler.class, TileObjectPacket.class, 6, Side.CLIENT);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(MountUpdatePacket.Handler.class, MountUpdatePacket.class, 7, Side.CLIENT);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(MountUpdatePacket.Handler.class, MountUpdatePacket.class, 8, Side.SERVER);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(ItemConfigPacket.Handler.class, ItemConfigPacket.class, 9, Side.SERVER);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(TileObjectPacket.Handler.class, TileObjectPacket.class, 10, Side.SERVER);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(BlockUpdatePacket.Handler.class, BlockUpdatePacket.class, 11, Side.SERVER);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(SpeedRequestPacket.Handler.class, SpeedRequestPacket.class, 12, Side.SERVER);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(SpeedRequestPacket.Handler.class, SpeedRequestPacket.class, 13, Side.CLIENT);
|
||||
DraconicEvolution.network.registerMessage(ParticleGenPacket.Handler.class, ParticleGenPacket.class, 1, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(PlacedItemPacket.Handler.class, PlacedItemPacket.class, 2, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(PlayerDetectorButtonPacket.Handler.class, PlayerDetectorButtonPacket.class, 3, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(PlayerDetectorStringPacket.Handler.class, PlayerDetectorStringPacket.class, 4, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(TeleporterPacket.Handler.class, TeleporterPacket.class, 5, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(TileObjectPacket.Handler.class, TileObjectPacket.class, 6, Side.CLIENT);
|
||||
DraconicEvolution.network.registerMessage(MountUpdatePacket.Handler.class, MountUpdatePacket.class, 7, Side.CLIENT);
|
||||
DraconicEvolution.network.registerMessage(MountUpdatePacket.Handler.class, MountUpdatePacket.class, 8, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(ItemConfigPacket.Handler.class, ItemConfigPacket.class, 9, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(TileObjectPacket.Handler.class, TileObjectPacket.class, 10, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(BlockUpdatePacket.Handler.class, BlockUpdatePacket.class, 11, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(SpeedRequestPacket.Handler.class, SpeedRequestPacket.class, 12, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(SpeedRequestPacket.Handler.class, SpeedRequestPacket.class, 13, Side.CLIENT);
|
||||
DraconicEvolution.network.registerMessage(ToolModePacket.Handler.class, ToolModePacket.class, 14, Side.SERVER);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(GenericParticlePacket.Handler.class, GenericParticlePacket.class, 15, Side.CLIENT);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(ShieldHitPacket.Handler.class, ShieldHitPacket.class, 16, Side.CLIENT);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(ContributorPacket.Handler.class, ContributorPacket.class, 17, Side.CLIENT);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(ContributorPacket.Handler.class, ContributorPacket.class, 18, Side.SERVER);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(MagnetTogglePacket.Handler.class, MagnetTogglePacket.class, 19, Side.SERVER);
|
||||
DraconicEvolution.network
|
||||
.registerMessage(MagnetToggleAckPacket.Handler.class, MagnetToggleAckPacket.class, 20, Side.CLIENT);
|
||||
DraconicEvolution.network.registerMessage(GenericParticlePacket.Handler.class, GenericParticlePacket.class, 15, Side.CLIENT);
|
||||
DraconicEvolution.network.registerMessage(ShieldHitPacket.Handler.class, ShieldHitPacket.class, 16, Side.CLIENT);
|
||||
DraconicEvolution.network.registerMessage(ContributorPacket.Handler.class, ContributorPacket.class, 17, Side.CLIENT);
|
||||
DraconicEvolution.network.registerMessage(ContributorPacket.Handler.class, ContributorPacket.class, 18, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(MagnetTogglePacket.Handler.class, MagnetTogglePacket.class, 19, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(MagnetToggleAckPacket.Handler.class, MagnetToggleAckPacket.class, 20, Side.CLIENT);
|
||||
DraconicEvolution.network.registerMessage(DislocatorInhibitorButtonPacket.Handler.class, DislocatorInhibitorButtonPacket.class, 21, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(SlotFakeClickPacket.Handler.class, SlotFakeClickPacket.class, 22, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(MagnetToggleSelfPickupPacket.Handler.class, MagnetToggleSelfPickupPacket.class, 23, Side.SERVER);
|
||||
DraconicEvolution.network.registerMessage(MagnetToggleSelfPickupAckPacket.Handler.class, MagnetToggleSelfPickupAckPacket.class, 24, Side.CLIENT);
|
||||
// spotless:on
|
||||
}
|
||||
|
||||
public void registerTileEntities() {
|
||||
GameRegistry
|
||||
.registerTileEntity(TileWeatherController.class, References.RESOURCESPREFIX + "TileWeatherController");
|
||||
// spotless:off
|
||||
GameRegistry.registerTileEntity(TileWeatherController.class, References.RESOURCESPREFIX + "TileWeatherController");
|
||||
GameRegistry.registerTileEntity(TileSunDial.class, References.RESOURCESPREFIX + "TileSunDial");
|
||||
GameRegistry.registerTileEntity(TileGrinder.class, References.RESOURCESPREFIX + "TileGrinder");
|
||||
GameRegistry.registerTileEntity(TilePotentiometer.class, References.RESOURCESPREFIX + "TilePotentiometer");
|
||||
GameRegistry
|
||||
.registerTileEntity(TileParticleGenerator.class, References.RESOURCESPREFIX + "TileParticleGenerator");
|
||||
GameRegistry.registerTileEntity(TileParticleGenerator.class, References.RESOURCESPREFIX + "TileParticleGenerator");
|
||||
GameRegistry.registerTileEntity(TilePlayerDetector.class, References.RESOURCESPREFIX + "TilePlayerDetector");
|
||||
GameRegistry.registerTileEntity(
|
||||
TilePlayerDetectorAdvanced.class,
|
||||
References.RESOURCESPREFIX + "TilePlayerDetectorAdvanced");
|
||||
GameRegistry.registerTileEntity(TilePlayerDetectorAdvanced.class, References.RESOURCESPREFIX + "TilePlayerDetectorAdvanced");
|
||||
GameRegistry.registerTileEntity(TileEnergyInfuser.class, References.RESOURCESPREFIX + "TileEnergyInfuser");
|
||||
GameRegistry.registerTileEntity(TileCustomSpawner.class, References.RESOURCESPREFIX + "TileCustomSpawner");
|
||||
GameRegistry.registerTileEntity(TileGenerator.class, References.RESOURCESPREFIX + "TileGenerator");
|
||||
GameRegistry
|
||||
.registerTileEntity(TileEnergyStorageCore.class, References.RESOURCESPREFIX + "TileEnergyStorageCore");
|
||||
GameRegistry.registerTileEntity(TileEnergyStorageCore.class, References.RESOURCESPREFIX + "TileEnergyStorageCore");
|
||||
GameRegistry.registerTileEntity(TileEarth.class, References.RESOURCESPREFIX + "TileEarth");
|
||||
GameRegistry.registerTileEntity(
|
||||
TileInvisibleMultiblock.class,
|
||||
References.RESOURCESPREFIX + "TileInvisibleMultiblock");
|
||||
GameRegistry.registerTileEntity(TileInvisibleMultiblock.class, References.RESOURCESPREFIX + "TileInvisibleMultiblock");
|
||||
GameRegistry.registerTileEntity(TileEnergyPylon.class, References.RESOURCESPREFIX + "TileEnergyPylon");
|
||||
GameRegistry
|
||||
.registerTileEntity(TileEnderResurrection.class, References.RESOURCESPREFIX + "TileEnderResurrection");
|
||||
GameRegistry.registerTileEntity(TileEnderResurrection.class, References.RESOURCESPREFIX + "TileEnderResurrection");
|
||||
GameRegistry.registerTileEntity(TilePlacedItem.class, References.RESOURCESPREFIX + "TilePlacedItem");
|
||||
GameRegistry.registerTileEntity(TileCKeyStone.class, References.RESOURCESPREFIX + "TileCKeyStone");
|
||||
GameRegistry.registerTileEntity(TileDissEnchanter.class, References.RESOURCESPREFIX + "TileDissEnchanter");
|
||||
GameRegistry.registerTileEntity(TileTeleporterStand.class, References.RESOURCESPREFIX + "TileTeleporterStand");
|
||||
GameRegistry.registerTileEntity(TileDraconiumChest.class, References.RESOURCESPREFIX + "TileDraconiumChest");
|
||||
GameRegistry.registerTileEntity(TileEnergyRelay.class, References.RESOURCESPREFIX + "TileEnergyRelay");
|
||||
GameRegistry
|
||||
.registerTileEntity(TileEnergyTransceiver.class, References.RESOURCESPREFIX + "TileEnergyTransceiver");
|
||||
GameRegistry.registerTileEntity(
|
||||
TileWirelessEnergyTransceiver.class,
|
||||
References.RESOURCESPREFIX + "TileWirelessEnergyTransceiver");
|
||||
GameRegistry.registerTileEntity(
|
||||
TileDislocatorReceptacle.class,
|
||||
References.RESOURCESPREFIX + "TileDislocatorReceptacle");
|
||||
GameRegistry.registerTileEntity(TileEnergyTransceiver.class, References.RESOURCESPREFIX + "TileEnergyTransceiver");
|
||||
GameRegistry.registerTileEntity(TileWirelessEnergyTransceiver.class, References.RESOURCESPREFIX + "TileWirelessEnergyTransceiver");
|
||||
GameRegistry.registerTileEntity(TileDislocatorReceptacle.class, References.RESOURCESPREFIX + "TileDislocatorReceptacle");
|
||||
GameRegistry.registerTileEntity(TilePortalBlock.class, References.RESOURCESPREFIX + "TilePortalBlock");
|
||||
GameRegistry.registerTileEntity(TileReactorCore.class, References.RESOURCESPREFIX + "TileReactorCore");
|
||||
GameRegistry.registerTileEntity(TileFluxGate.class, References.RESOURCESPREFIX + "TileFluxGate");
|
||||
GameRegistry.registerTileEntity(TileFluidGate.class, References.RESOURCESPREFIX + "TileFluidGate");
|
||||
GameRegistry
|
||||
.registerTileEntity(TileReactorStabilizer.class, References.RESOURCESPREFIX + "TileReactorStabilizer");
|
||||
GameRegistry.registerTileEntity(
|
||||
TileReactorEnergyInjector.class,
|
||||
References.RESOURCESPREFIX + "TileReactorEnergyInjector");
|
||||
GameRegistry.registerTileEntity(TileReactorStabilizer.class, References.RESOURCESPREFIX + "TileReactorStabilizer");
|
||||
GameRegistry.registerTileEntity(TileReactorEnergyInjector.class, References.RESOURCESPREFIX + "TileReactorEnergyInjector");
|
||||
GameRegistry.registerTileEntity(TileChaosShard.class, References.RESOURCESPREFIX + "TileChaosShard");
|
||||
GameRegistry
|
||||
.registerTileEntity(TileUpgradeModifier.class, References.RESOURCESPREFIX + "TileEnhancementModifier");
|
||||
GameRegistry.registerTileEntity(TileUpgradeModifier.class, References.RESOURCESPREFIX + "TileEnhancementModifier");
|
||||
GameRegistry.registerTileEntity(TileDislocatorInhibitor.class, References.RESOURCESPREFIX + "TileDislocatorInhibitor");
|
||||
if (DraconicEvolution.debug) {
|
||||
GameRegistry.registerTileEntity(TileTestBlock.class, References.RESOURCESPREFIX + "TileTestBlock");
|
||||
GameRegistry.registerTileEntity(
|
||||
TileContainerTemplate.class,
|
||||
References.RESOURCESPREFIX + "TileContainerTemplate");
|
||||
GameRegistry.registerTileEntity(TileContainerTemplate.class, References.RESOURCESPREFIX + "TileContainerTemplate");
|
||||
}
|
||||
// spotless:on
|
||||
}
|
||||
|
||||
public void registerEventListeners(Side s) {
|
||||
@@ -307,78 +276,20 @@ public class CommonProxy {
|
||||
|
||||
// @Callback
|
||||
public void registerEntities() {
|
||||
EntityRegistry.registerModEntity(
|
||||
EntityCustomDragon.class,
|
||||
"EnderDragon",
|
||||
0,
|
||||
DraconicEvolution.instance,
|
||||
256,
|
||||
3,
|
||||
true);
|
||||
EntityRegistry.registerModEntity(
|
||||
EntityPersistentItem.class,
|
||||
"Persistent Item",
|
||||
1,
|
||||
DraconicEvolution.instance,
|
||||
32,
|
||||
5,
|
||||
true);
|
||||
EntityRegistry
|
||||
.registerModEntity(EntityDraconicArrow.class, "Arrow", 2, DraconicEvolution.instance, 32, 5, true);
|
||||
EntityRegistry
|
||||
.registerModEntity(EntityEnderArrow.class, "Ender Arrow", 3, DraconicEvolution.instance, 32, 1, true);
|
||||
// EntityRegistry.registerModEntity(EntityChaosDrill.class, "Chaos Drill", 4, DraconicEvolution.instance, 10, 5,
|
||||
// false);
|
||||
EntityRegistry.registerModEntity(
|
||||
EntityDragonHeart.class,
|
||||
"Dragon Heart Item",
|
||||
5,
|
||||
DraconicEvolution.instance,
|
||||
32,
|
||||
5,
|
||||
true);
|
||||
EntityRegistry.registerModEntity(
|
||||
EntityChaosGuardian.class,
|
||||
"ChaosGuardian",
|
||||
6,
|
||||
DraconicEvolution.instance,
|
||||
256,
|
||||
1,
|
||||
true);
|
||||
EntityRegistry.registerModEntity(
|
||||
EntityDragonProjectile.class,
|
||||
"DragonProjectile",
|
||||
7,
|
||||
DraconicEvolution.instance,
|
||||
256,
|
||||
1,
|
||||
true);
|
||||
EntityRegistry.registerModEntity(
|
||||
EntityChaosCrystal.class,
|
||||
"ChaosCrystal",
|
||||
8,
|
||||
DraconicEvolution.instance,
|
||||
256,
|
||||
5,
|
||||
false);
|
||||
EntityRegistry
|
||||
.registerModEntity(EntityChaosBolt.class, "ChaosBolt", 9, DraconicEvolution.instance, 32, 5, true);
|
||||
EntityRegistry.registerModEntity(
|
||||
EntityChaosVortex.class,
|
||||
"EntityChaosEnergyVortex",
|
||||
10,
|
||||
DraconicEvolution.instance,
|
||||
512,
|
||||
5,
|
||||
true);
|
||||
EntityRegistry.registerModEntity(
|
||||
EntityCustomArrow.class,
|
||||
"CustomArrow",
|
||||
11,
|
||||
DraconicEvolution.instance,
|
||||
128,
|
||||
1,
|
||||
true);
|
||||
// spotless:off
|
||||
EntityRegistry.registerModEntity(EntityCustomDragon.class, "EnderDragon", 0, DraconicEvolution.instance, 256, 3, true);
|
||||
EntityRegistry.registerModEntity(EntityPersistentItem.class, "Persistent Item", 1, DraconicEvolution.instance, 32, 5, true);
|
||||
EntityRegistry.registerModEntity(EntityDraconicArrow.class, "Arrow", 2, DraconicEvolution.instance, 32, 5, true);
|
||||
EntityRegistry.registerModEntity(EntityEnderArrow.class, "Ender Arrow", 3, DraconicEvolution.instance, 32, 1, true);
|
||||
// EntityRegistry.registerModEntity(EntityChaosDrill.class, "Chaos Drill", 4, DraconicEvolution.instance, 10, 5, false);
|
||||
EntityRegistry.registerModEntity(EntityDragonHeart.class, "Dragon Heart Item", 5, DraconicEvolution.instance, 32, 5, true);
|
||||
EntityRegistry.registerModEntity(EntityChaosGuardian.class, "ChaosGuardian", 6, DraconicEvolution.instance, 256, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityDragonProjectile.class, "DragonProjectile", 7, DraconicEvolution.instance, 256, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityChaosCrystal.class, "ChaosCrystal", 8, DraconicEvolution.instance, 256, 5, false);
|
||||
EntityRegistry.registerModEntity(EntityChaosBolt.class, "ChaosBolt", 9, DraconicEvolution.instance, 32, 5, true);
|
||||
EntityRegistry.registerModEntity(EntityChaosVortex.class, "EntityChaosEnergyVortex", 10, DraconicEvolution.instance, 512, 5, true);
|
||||
EntityRegistry.registerModEntity(EntityCustomArrow.class, "CustomArrow", 11, DraconicEvolution.instance, 128, 1, true);
|
||||
// spotless:on
|
||||
}
|
||||
|
||||
public ParticleEnergyBeam energyBeam(World worldObj, double x, double y, double z, double tx, double ty, double tz,
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.brandon3055.draconicevolution.common.blocks.SafetyFlame;
|
||||
import com.brandon3055.draconicevolution.common.blocks.TeleporterStand;
|
||||
import com.brandon3055.draconicevolution.common.blocks.TestBlock;
|
||||
import com.brandon3055.draconicevolution.common.blocks.XRayBlock;
|
||||
import com.brandon3055.draconicevolution.common.blocks.machine.DislocatorInhibitor;
|
||||
import com.brandon3055.draconicevolution.common.blocks.machine.DissEnchanter;
|
||||
import com.brandon3055.draconicevolution.common.blocks.machine.EnergyCrystal;
|
||||
import com.brandon3055.draconicevolution.common.blocks.machine.EnergyInfuser;
|
||||
@@ -90,6 +91,7 @@ public class ModBlocks {
|
||||
public static BlockDE reactorEnergyInjector;
|
||||
public static BlockDE chaosCrystal;
|
||||
public static BlockDE upgradeModifier;
|
||||
public static BlockDE dislocatorInhibitor;
|
||||
public static Block safetyFlame;
|
||||
public static Block chaosShardAtmos = new ChaosShardAtmos()
|
||||
.setBlockName(References.RESOURCESPREFIX + "chaosShardAtmos")
|
||||
@@ -133,6 +135,7 @@ public class ModBlocks {
|
||||
reactorEnergyInjector = new ReactorEnergyInjector();
|
||||
chaosCrystal = new ChaosCrystal();
|
||||
upgradeModifier = new UpgradeModifier();
|
||||
dislocatorInhibitor = new DislocatorInhibitor();
|
||||
|
||||
longRangeDislocator = new LongRangeDislocator();
|
||||
|
||||
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
package com.brandon3055.draconicevolution.common.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.client.gui.GuiHandler;
|
||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||
import com.brandon3055.draconicevolution.common.blocks.BlockDE;
|
||||
import com.brandon3055.draconicevolution.common.lib.References;
|
||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileDislocatorInhibitor;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class DislocatorInhibitor extends BlockDE implements ITileEntityProvider {
|
||||
|
||||
public DislocatorInhibitor() {
|
||||
this.setBlockName(Strings.dislocatorInhibitor);
|
||||
this.setCreativeTab(DraconicEvolution.tabBlocksItems);
|
||||
this.setStepSound(soundTypeStone);
|
||||
ModBlocks.register(this, DislocatorInhibitorItemBlock.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBlockSolid(IBlockAccess world, int x, int y, int z, int side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(int metadata) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
||||
return new TileDislocatorInhibitor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
private void updateRedstoneStatus(World world, int x, int y, int z) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (tile != null) {
|
||||
if (tile instanceof TileDislocatorInhibitor te) {
|
||||
if (te.isRedstoneActive() ^ world.isBlockIndirectlyGettingPowered(x, y, z)) {
|
||||
te.setRedstoneActive(world.isBlockIndirectlyGettingPowered(x, y, z));
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) {
|
||||
updateRedstoneStatus(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float prx,
|
||||
float pry, float prz) {
|
||||
|
||||
if (!world.isRemote) {
|
||||
FMLNetworkHandler
|
||||
.openGui(player, DraconicEvolution.instance, GuiHandler.GUIID_DISLOCATOR_INHIBITOR, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPostBlockPlaced(World world, int x, int y, int z, int meta) {
|
||||
updateRedstoneStatus(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World worldIn, int x, int y, int z, Block blockBroken, int meta) {
|
||||
TileEntity tile = worldIn.getTileEntity(x, y, z);
|
||||
if (tile != null) {
|
||||
if (tile instanceof TileDislocatorInhibitor) {
|
||||
((TileDislocatorInhibitor) tile).unregister();
|
||||
}
|
||||
}
|
||||
|
||||
super.breakBlock(worldIn, x, y, z, blockBroken, meta);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
blockIcon = iconRegister.registerIcon(References.RESOURCESPREFIX + "inhibitor_block");
|
||||
}
|
||||
|
||||
public static class DislocatorInhibitorItemBlock extends ItemBlock {
|
||||
|
||||
public DislocatorInhibitorItemBlock(Block block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack item, EntityPlayer player, List lines, boolean advanced) {
|
||||
lines.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("info.de.dislocatorInhibitor.txt"));
|
||||
super.addInformation(item, player, lines, advanced);
|
||||
}
|
||||
}
|
||||
}
|
||||
+22
-3
@@ -1,15 +1,19 @@
|
||||
package com.brandon3055.draconicevolution.common.blocks.multiblock;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||
import com.brandon3055.draconicevolution.common.blocks.BlockDE;
|
||||
import com.brandon3055.draconicevolution.common.blocks.BlockCustomDrop;
|
||||
import com.brandon3055.draconicevolution.common.lib.References;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore;
|
||||
|
||||
@@ -19,12 +23,12 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
/**
|
||||
* Created by Brandon on 16/6/2015.
|
||||
*/
|
||||
public class ReactorCore extends BlockDE implements ITileEntityProvider {
|
||||
public class ReactorCore extends BlockCustomDrop implements ITileEntityProvider {
|
||||
|
||||
public ReactorCore() {
|
||||
super(Material.iron);
|
||||
this.setCreativeTab(DraconicEvolution.tabBlocksItems);
|
||||
this.setBlockName("reactorCore");
|
||||
this.setHardness(100F);
|
||||
|
||||
ModBlocks.register(this);
|
||||
}
|
||||
@@ -81,4 +85,19 @@ public class ReactorCore extends BlockDE implements ITileEntityProvider {
|
||||
}
|
||||
super.breakBlock(world, x, y, z, blockBroken, metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean dropInventory() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean hasCustomDropps() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void getCustomTileEntityDrops(TileEntity te, List<ItemStack> droppes) {
|
||||
|
||||
}
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
package com.brandon3055.draconicevolution.common.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.inventory.SlotFakeItem;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileDislocatorInhibitor;
|
||||
|
||||
public class ContainerDislocatorInhibitor extends Container {
|
||||
|
||||
private TileDislocatorInhibitor inhibitor;
|
||||
|
||||
public ContainerDislocatorInhibitor(InventoryPlayer playerInventory, TileDislocatorInhibitor inhibitor) {
|
||||
this.inhibitor = inhibitor;
|
||||
|
||||
bindPlayerInventory(playerInventory);
|
||||
addContainerSlots(inhibitor);
|
||||
}
|
||||
|
||||
private void bindPlayerInventory(InventoryPlayer invPlayer) {
|
||||
for (int x = 0; x < 9; x++) {
|
||||
addSlotToContainer(new Slot(invPlayer, x, 8 + 18 * x, 126));
|
||||
}
|
||||
|
||||
for (int y = 0; y < 3; y++) {
|
||||
for (int x = 0; x < 9; x++) {
|
||||
addSlotToContainer(new Slot(invPlayer, x + y * 9 + 9, 8 + 18 * x, 68 + y * 18));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addContainerSlots(TileDislocatorInhibitor tileInhibitor) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
addSlotToContainer(new SlotFakeItem(tileInhibitor, i, 8 + 18 * i, 42));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return inhibitor.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDragIntoSlot(Slot p_94531_1_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot) {
|
||||
this.inhibitor.addItemFilter(player.inventory.getStackInSlot(slot));
|
||||
return null;
|
||||
}
|
||||
|
||||
public TileDislocatorInhibitor getTileEntity() {
|
||||
return inhibitor;
|
||||
}
|
||||
}
|
||||
+4
-2
@@ -12,6 +12,7 @@ import net.minecraft.item.ItemStack;
|
||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
||||
import com.brandon3055.draconicevolution.common.inventory.SlotOutput;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileDissEnchanter;
|
||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||
|
||||
public class ContainerDissEnchanter extends Container {
|
||||
|
||||
@@ -110,8 +111,9 @@ public class ContainerDissEnchanter extends Container {
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
return EnchantmentHelper.getEnchantments(stack).size() > 0
|
||||
|| ItemNBTHelper.getInteger(stack, "RepairCost", 0) > 0;
|
||||
return (EnchantmentHelper.getEnchantments(stack).size() > 0
|
||||
|| ItemNBTHelper.getInteger(stack, "RepairCost", 0) > 0)
|
||||
&& (!ModHelper.isGregTechEnchantmentItem(stack));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+19
-13
@@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||
import com.brandon3055.draconicevolution.common.ModItems;
|
||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.inventory.GenericInventory;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore.ReactorState;
|
||||
@@ -20,10 +21,15 @@ import com.brandon3055.draconicevolution.common.utills.OreDictionaryHelper;
|
||||
*/
|
||||
public class ContainerReactor extends ContainerDataSync {
|
||||
|
||||
private static final int maximumFuelStorage = 10368;
|
||||
private static final int nuggetFuelAmount = 16;
|
||||
private static final int ingotFuelAmount = nuggetFuelAmount * 9;
|
||||
private static final int blockFuelAmount = ingotFuelAmount * 9;
|
||||
public static final int maximumFuelStorage = ConfigHandler.reactorFuelStorage;
|
||||
public static final int nuggetFuelAmount = ConfigHandler.reactorFuelValue;
|
||||
public static final int ingotFuelAmount = nuggetFuelAmount * 9;
|
||||
public static final int blockFuelAmount = ingotFuelAmount * 9;
|
||||
public static final int tinyChaosAmount = ConfigHandler.reactorChaosValue;
|
||||
public static final int smallChaosAmount = tinyChaosAmount * 9;
|
||||
public static final int largeChaosAmount = smallChaosAmount * 9;
|
||||
public static final int fullChaosAmount = largeChaosAmount * 9;
|
||||
|
||||
private final TileReactorCore core;
|
||||
private final EntityPlayer player;
|
||||
private final GenericInventory ioSlots = new GenericInventory() {
|
||||
@@ -194,20 +200,20 @@ public class ContainerReactor extends ContainerDataSync {
|
||||
int stackSize = core.reactorFuel / nuggetFuelAmount;
|
||||
ioSlots.setInventorySlotContents(1, new ItemStack(ModItems.nugget, stackSize, 1));
|
||||
core.reactorFuel -= stackSize * nuggetFuelAmount;
|
||||
} else if (core.convertedFuel / ingotFuelAmount >= 64) {
|
||||
int stackSize = core.convertedFuel / blockFuelAmount;
|
||||
} else if (core.convertedFuel / smallChaosAmount >= 64) {
|
||||
int stackSize = core.convertedFuel / largeChaosAmount;
|
||||
stackSize = Math.min(64, stackSize);
|
||||
ioSlots.setInventorySlotContents(1, new ItemStack(ModItems.chaosFragment, stackSize, 2));
|
||||
core.convertedFuel -= stackSize * blockFuelAmount;
|
||||
} else if (core.convertedFuel >= ingotFuelAmount) {
|
||||
int stackSize = core.convertedFuel / ingotFuelAmount;
|
||||
core.convertedFuel -= stackSize * largeChaosAmount;
|
||||
} else if (core.convertedFuel >= smallChaosAmount) {
|
||||
int stackSize = core.convertedFuel / smallChaosAmount;
|
||||
stackSize = Math.min(64, stackSize);
|
||||
ioSlots.setInventorySlotContents(1, new ItemStack(ModItems.chaosFragment, stackSize, 1));
|
||||
core.convertedFuel -= stackSize * ingotFuelAmount;
|
||||
} else if (core.convertedFuel >= nuggetFuelAmount) {
|
||||
int stackSize = core.convertedFuel / nuggetFuelAmount;
|
||||
core.convertedFuel -= stackSize * smallChaosAmount;
|
||||
} else if (core.convertedFuel >= tinyChaosAmount) {
|
||||
int stackSize = core.convertedFuel / tinyChaosAmount;
|
||||
ioSlots.setInventorySlotContents(1, new ItemStack(ModItems.chaosFragment, stackSize, 0));
|
||||
core.convertedFuel -= stackSize * nuggetFuelAmount;
|
||||
core.convertedFuel -= stackSize * tinyChaosAmount;
|
||||
}
|
||||
}
|
||||
return super.slotClick(slot, button, mode, player);
|
||||
|
||||
@@ -30,6 +30,10 @@ public class ConfigHandler {
|
||||
public static boolean disableOreSpawnEnd;
|
||||
public static boolean disableOreSpawnOverworld;
|
||||
public static boolean disableOreSpawnNether;
|
||||
public static int oreWeightOverworld;
|
||||
public static int oreWeightNether;
|
||||
public static int oreWeightEnd;
|
||||
public static int oreWeightDefault;
|
||||
public static boolean dragonBreaksBlocks;
|
||||
public static boolean sumonRitualAccelerated;
|
||||
public static int[] dragonEggSpawnLocation;
|
||||
@@ -51,6 +55,8 @@ public class ConfigHandler {
|
||||
public static boolean enableFlight;
|
||||
private static String[] itemDislocatorBlacklist;
|
||||
public static Map<String, Integer> itemDislocatorBlacklistMap = new HashMap<String, Integer>();
|
||||
private static String[] itemDislocatorBlockBlacklist;
|
||||
public static Map<String, Integer> itemDislocatorBlockBlacklistMap = new HashMap<String, Integer>();
|
||||
public static boolean itemDislocatorDisableSound;
|
||||
|
||||
// spawner
|
||||
@@ -73,6 +79,11 @@ public class ConfigHandler {
|
||||
public static boolean enableReactorBigBoom;
|
||||
public static double reactorOutputMultiplier;
|
||||
public static double reactorFuelUsageMultiplier;
|
||||
public static boolean linearReactorFuelUsage;
|
||||
public static int reactorFuelStorage;
|
||||
public static int reactorFuelValue;
|
||||
public static int reactorChaosValue;
|
||||
public static boolean enableAutomation;
|
||||
|
||||
private static String[] defaultSpawnerList = new String[] { "ExampleMob1", "ExampleMob2",
|
||||
"ExampleMob3 (these examples can be deleted)" };
|
||||
@@ -177,6 +188,33 @@ public class ConfigHandler {
|
||||
"Disable Ore Spawn (Overworld)",
|
||||
false,
|
||||
"Set to true to prevent draconium ore from spawning in the overworld").getBoolean(false);
|
||||
oreWeightOverworld = config
|
||||
.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"Overworld Draconium Ore Weight",
|
||||
2,
|
||||
"Rarity of draconium ore in overworld (higher = more common), does not support fractions")
|
||||
.getInt(2);
|
||||
oreWeightNether = config
|
||||
.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"Nether Draconium Ore Weight",
|
||||
5,
|
||||
"Rarity of draconium ore in nether (higher = more common), does not support fractions")
|
||||
.getInt(5);
|
||||
oreWeightEnd = config
|
||||
.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"End Draconium Ore Weight",
|
||||
10,
|
||||
"Rarity of draconium ore in end (higher = more common), does not support fractions")
|
||||
.getInt(10);
|
||||
oreWeightDefault = config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"Default Draconium Ore Weight",
|
||||
2,
|
||||
"Rarity of draconium ore in other dimensions in whitelist (higher = more common), does not support fractions")
|
||||
.getInt(2);
|
||||
dragonBreaksBlocks = config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"Can dragon break blocks",
|
||||
@@ -267,7 +305,12 @@ public class ConfigHandler {
|
||||
"Item Dislocator Blacklist",
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
new String[] { "appliedenergistics2:item.ItemCrystalSeed" },
|
||||
"A list of items of items that should be ignored by the item dislocator. Use the items registry name e.g. minecraft:apple you can also add a meta value like so minecraft:wool|4");
|
||||
"A list of items that should be ignored by the item dislocator. Use the items registry name e.g. minecraft:apple you can also add a meta value like so minecraft:wool|4");
|
||||
itemDislocatorBlockBlacklist = config.getStringList(
|
||||
"Item Dislocator Block Blacklist",
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
new String[] { "Thaumcraft:blockAlchemyFurnace|0", "Botania:pool" },
|
||||
"A list of blocks that will cause items above or inside of them to be ignored by the item dislocator. Use the items registry name e.g. minecraft:apple you can also add a meta value like so minecraft:wool|4");
|
||||
itemDislocatorDisableSound = config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"Item Dislocator Disable Sound",
|
||||
@@ -319,13 +362,13 @@ public class ConfigHandler {
|
||||
true,
|
||||
"Setting this to false will reduce the reactor explosion to little more then a tnt blast")
|
||||
.getBoolean(true);
|
||||
reactorFuelUsageMultiplier = config.get(
|
||||
reactorFuelStorage = config.get(
|
||||
"Draconic Reactor",
|
||||
"FuelUsageMultiplier",
|
||||
1,
|
||||
"Use this to adjust how quickly the reactor uses fuel",
|
||||
"maxFuelStorage",
|
||||
10368,
|
||||
"Use this to adjust the maximum fuel storage of the reactor",
|
||||
0,
|
||||
1000000).getDouble(1);
|
||||
10000000).getInt(10368);
|
||||
reactorOutputMultiplier = config.get(
|
||||
"Draconic Reactor",
|
||||
"EnergyOutputMultiplier",
|
||||
@@ -333,7 +376,45 @@ public class ConfigHandler {
|
||||
"Use this to adjust the output of the reactor",
|
||||
0,
|
||||
1000000).getDouble(1);
|
||||
|
||||
reactorFuelUsageMultiplier = config.get(
|
||||
"Draconic Reactor",
|
||||
"FuelUsageMultiplier",
|
||||
1,
|
||||
"Use this to adjust how quickly the reactor uses fuel",
|
||||
0,
|
||||
1000000).getDouble(1);
|
||||
linearReactorFuelUsage = config.get(
|
||||
"Draconic Reactor",
|
||||
"linearReactorFuelUsage",
|
||||
linearReactorFuelUsage,
|
||||
"Sets whether the reactor should use linear (true) fuel usage formula or exponential (false)")
|
||||
.getBoolean(true);
|
||||
reactorFuelStorage = config.get(
|
||||
"Draconic Reactor",
|
||||
"maxFuelStorage",
|
||||
10368,
|
||||
"Use this to adjust the maximum fuel storage of the reactor",
|
||||
0,
|
||||
10000000).getInt(10368);
|
||||
reactorFuelValue = config.get(
|
||||
"Draconic Reactor",
|
||||
"awakenedDraconiumFuelValue",
|
||||
16,
|
||||
"Use this to adjust the fuel value of awakened draconium nugget",
|
||||
0,
|
||||
1000000).getInt(16);
|
||||
reactorChaosValue = config.get(
|
||||
"Draconic Reactor",
|
||||
"chaosShardOutputValue",
|
||||
16,
|
||||
"Use this to adjust how much fuel value one tiny chaos shard takes",
|
||||
0,
|
||||
1000000).getInt(16);
|
||||
enableAutomation = config.get(
|
||||
"Draconic Reactor",
|
||||
"enableAutomation",
|
||||
false,
|
||||
"Sets whether the reactor is automatable or not").getBoolean(false);
|
||||
disabledNamesList.clear();
|
||||
for (String s : disabledBlocksItems) {
|
||||
disabledNamesList.add(s);
|
||||
@@ -354,6 +435,16 @@ public class ConfigHandler {
|
||||
}
|
||||
}
|
||||
|
||||
itemDislocatorBlockBlacklistMap.clear();
|
||||
for (String s : itemDislocatorBlockBlacklist) {
|
||||
if (s.contains("|")) {
|
||||
itemDislocatorBlockBlacklistMap
|
||||
.put(s.substring(0, s.indexOf("|")), Integer.parseInt(s.substring(s.indexOf("|") + 1)));
|
||||
} else {
|
||||
itemDislocatorBlockBlacklistMap.put(s, -1);
|
||||
}
|
||||
}
|
||||
|
||||
if (disableLog) {
|
||||
disableLog = false;
|
||||
LogHelper.warn("###########################################");
|
||||
|
||||
@@ -609,6 +609,17 @@ public class CraftingHandler {
|
||||
"ingotDraconium",
|
||||
'C',
|
||||
ModItems.draconicCore);
|
||||
addOre(
|
||||
ModBlocks.dislocatorInhibitor,
|
||||
"IBI",
|
||||
"BDB",
|
||||
"IBI",
|
||||
'I',
|
||||
"ingotIron",
|
||||
'B',
|
||||
Blocks.iron_bars,
|
||||
'D',
|
||||
new ItemStack(ModItems.magnet, 1, 0));
|
||||
|
||||
// machines adv
|
||||
ItemStack mobSoul = new ItemStack(ModItems.mobSoul);
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.brandon3055.draconicevolution.common.inventory;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class SlotFakeItem extends Slot {
|
||||
|
||||
public SlotFakeItem(IInventory inventory, int id, int x, int y) {
|
||||
super(inventory, id, x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
// this is here so NEI CheatItemHandler does not eat the handleDragNDrop event
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSlotStackLimit() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public boolean isOverSlot(int mouseX, int mouseY) {
|
||||
if (xDisplayPosition < mouseX && mouseX <= xDisplayPosition + 18) {
|
||||
return yDisplayPosition < mouseY && mouseY <= yDisplayPosition + 18;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
+18
-2
@@ -55,6 +55,8 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.apiculture.IArmorApiarist;
|
||||
import forestry.api.core.IArmorNaturalist;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
@@ -68,9 +70,10 @@ import thaumcraft.api.nodes.IRevealer;
|
||||
@Interface(iface = "thaumcraft.api.IVisDiscountGear", modid = "Thaumcraft"),
|
||||
@Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"),
|
||||
@Interface(iface = "forestry.api.apiculture.IArmorApiarist", modid = "Forestry"),
|
||||
@Interface(iface = "forestry.api.core.IArmorNaturalist", modid = "Forestry") })
|
||||
@Interface(iface = "forestry.api.core.IArmorNaturalist", modid = "Forestry"),
|
||||
@Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh") })
|
||||
public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigurableItem, IInventoryTool, IGoggles,
|
||||
IVisDiscountGear, IRevealer, IUpgradableItem, ICustomArmor, IArmorNaturalist, IArmorApiarist {
|
||||
IVisDiscountGear, IRevealer, IUpgradableItem, ICustomArmor, IArmorNaturalist, IArmorApiarist, IHazardProtector {
|
||||
|
||||
// TODO Wings
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -374,6 +377,13 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigur
|
||||
list.add(new ItemConfigField(References.BOOLEAN_ID, slot, "ApiaristArmor").readFromItem(stack, true));
|
||||
}
|
||||
}
|
||||
if (Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi")) {
|
||||
for (Hazard value : Hazard.values()) {
|
||||
list.add(
|
||||
new ItemConfigField(References.BOOLEAN_ID, slot, ModHelper.getHazmatArmorConfigKey(value))
|
||||
.readFromItem(stack, true));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -645,4 +655,10 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigur
|
||||
public boolean protectPlayer(EntityPlayer entityPlayer, ItemStack itemStack, String s, boolean b) {
|
||||
return protectEntity(entityPlayer, itemStack, s, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "gregtech_nh")
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return IConfigurableItem.ProfileHelper.getBoolean(itemStack, ModHelper.getHazmatArmorConfigKey(hazard), true);
|
||||
}
|
||||
}
|
||||
+19
-2
@@ -40,12 +40,15 @@ import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
|
||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
@@ -55,9 +58,10 @@ import thaumcraft.api.aspects.Aspect;
|
||||
*/
|
||||
@Optional.InterfaceList(
|
||||
value = { @Optional.Interface(iface = "thaumcraft.api.IVisDiscountGear", modid = "Thaumcraft"),
|
||||
@Optional.Interface(iface = "thaumcraft.api.IWarpingGear", modid = "Thaumcraft"), })
|
||||
@Optional.Interface(iface = "thaumcraft.api.IWarpingGear", modid = "Thaumcraft"),
|
||||
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh") })
|
||||
public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurableItem, IInventoryTool, IUpgradableItem,
|
||||
ICustomArmor, IVisDiscountGear, IWarpingGear {
|
||||
ICustomArmor, IVisDiscountGear, IWarpingGear, IHazardProtector {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon helmIcon;
|
||||
@@ -269,6 +273,13 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurab
|
||||
.readFromItem(stack, 0f).setModifier("PLUSPERCENT"));
|
||||
list.add(new ItemConfigField(References.BOOLEAN_ID, slot, "ArmorSprintOnly").readFromItem(stack, false));
|
||||
}
|
||||
if (Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi")) {
|
||||
for (Hazard value : Hazard.values()) {
|
||||
list.add(
|
||||
new ItemConfigField(References.BOOLEAN_ID, slot, ModHelper.getHazmatArmorConfigKey(value))
|
||||
.readFromItem(stack, true));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -500,4 +511,10 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurab
|
||||
public int getWarp(ItemStack itemStack, EntityPlayer entityPlayer) {
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "gregtech_nh")
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return IConfigurableItem.ProfileHelper.getBoolean(itemStack, ModHelper.getHazmatArmorConfigKey(hazard), true);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.brandon3055.draconicevolution.common.items.tools;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -11,7 +15,9 @@ import net.minecraft.entity.item.EntityXPOrb;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
@@ -25,6 +31,12 @@ import com.brandon3055.draconicevolution.common.ModItems;
|
||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.items.ItemDE;
|
||||
import com.brandon3055.draconicevolution.common.lib.References;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileDislocatorInhibitor;
|
||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.InventoryUtils;
|
||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||
import com.gtnewhorizon.gtnhlib.GTNHLib;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
@@ -37,11 +49,25 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
*/
|
||||
|
||||
@Optional.Interface(iface = "baubles.api.IBauble", modid = "Baubles")
|
||||
public class Magnet extends ItemDE implements IBauble {
|
||||
public class Magnet extends ItemDE implements IBauble, IConfigurableItem {
|
||||
|
||||
private IIcon draconium;
|
||||
private IIcon awakened;
|
||||
|
||||
private enum SelfPickUpMode {
|
||||
|
||||
// enum order matters,
|
||||
// do not re-order
|
||||
ALWAYS,
|
||||
DELAY,
|
||||
NEVER;
|
||||
|
||||
public SelfPickUpMode next() {
|
||||
final SelfPickUpMode[] values = SelfPickUpMode.values();
|
||||
return values[(this.ordinal() + 1) % values.length];
|
||||
}
|
||||
}
|
||||
|
||||
public Magnet() {
|
||||
this.setUnlocalizedName("magnet");
|
||||
this.setCreativeTab(DraconicEvolution.tabBlocksItems);
|
||||
@@ -83,96 +109,193 @@ public class Magnet extends ItemDE implements IBauble {
|
||||
return isEnabled(stack);
|
||||
}
|
||||
|
||||
// This method uses the same algorithm as the magnet from AE2 Fluid Crafting
|
||||
// if changes are ever made, they should be made on both
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean hotbar) {
|
||||
if (!entity.isSneaking() && entity.ticksExisted % 5 == 0
|
||||
&& isEnabled(stack)
|
||||
&& entity instanceof EntityPlayer) {
|
||||
int range = stack.getItemDamage() == 0 ? 8 : 32;
|
||||
if (entity.ticksExisted % 5 != 0 || !(entity instanceof EntityPlayer player) || !isEnabled(stack)) {
|
||||
return;
|
||||
}
|
||||
if (IConfigurableItem.ProfileHelper.getBoolean(stack, References.MAGNET_SNEAK, true) && entity.isSneaking()) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<EntityItem> items = world.getEntitiesWithinAABB(
|
||||
EntityItem.class,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
entity.posX,
|
||||
entity.posY,
|
||||
entity.posZ,
|
||||
entity.posX,
|
||||
entity.posY,
|
||||
entity.posZ).expand(range, range, range));
|
||||
int range = stack.getItemDamage() == 0 ? 8 : 32;
|
||||
List<EntityItem> items = world.getEntitiesWithinAABB(
|
||||
EntityItem.class,
|
||||
AxisAlignedBB
|
||||
.getBoundingBox(player.posX, player.posY, player.posZ, player.posX, player.posY, player.posZ)
|
||||
.expand(range, range, range));
|
||||
|
||||
boolean playSound = false;
|
||||
// account for the server/client desync
|
||||
final double playerEyesPos = player.posY
|
||||
+ (world.isRemote ? player.getEyeHeight() - player.getDefaultEyeHeight() : player.getEyeHeight());
|
||||
final boolean skipPlayerCheck = world.playerEntities.size() < 2;
|
||||
final SelfPickUpMode selfPickupStatus = getSelfPickupStatus(stack);
|
||||
boolean playSound = false;
|
||||
|
||||
for (EntityItem item : items) {
|
||||
if (item.getEntityItem() == null) {
|
||||
continue;
|
||||
}
|
||||
for (EntityItem item : items) {
|
||||
if (item.getEntityItem() == null || ModHelper.isAE2EntityFloatingItem(item)
|
||||
|| TileDislocatorInhibitor.isBlockedByInhibitor(world, item)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String name = Item.itemRegistry.getNameForObject(item.getEntityItem().getItem());
|
||||
if (ConfigHandler.itemDislocatorBlacklistMap.containsKey(name)
|
||||
&& (ConfigHandler.itemDislocatorBlacklistMap.get(name) == -1
|
||||
|| ConfigHandler.itemDislocatorBlacklistMap.get(name)
|
||||
== item.getEntityItem().getItemDamage())) {
|
||||
continue;
|
||||
}
|
||||
String name = Item.itemRegistry.getNameForObject(item.getEntityItem().getItem());
|
||||
if (ConfigHandler.itemDislocatorBlacklistMap.containsKey(name)
|
||||
&& (ConfigHandler.itemDislocatorBlacklistMap.get(name) == -1
|
||||
|| ConfigHandler.itemDislocatorBlacklistMap.get(name)
|
||||
== item.getEntityItem().getItemDamage())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int x = (int) Math.floor(item.posX);
|
||||
int y = (int) Math.floor(item.posY);
|
||||
int z = (int) Math.floor(item.posZ);
|
||||
|
||||
Block block = world.getBlock(x, y, z);
|
||||
String blockName = Item.itemRegistry.getNameForObject(Item.getItemFromBlock(block));
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (ConfigHandler.itemDislocatorBlockBlacklistMap.containsKey(blockName)
|
||||
&& (ConfigHandler.itemDislocatorBlockBlacklistMap.get(blockName) == -1
|
||||
|| ConfigHandler.itemDislocatorBlockBlacklistMap.get(blockName) == meta)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
y--;
|
||||
|
||||
block = world.getBlock(x, y, z);
|
||||
blockName = Item.itemRegistry.getNameForObject(Item.getItemFromBlock(block));
|
||||
meta = world.getBlockMetadata(x, y, z);
|
||||
if (ConfigHandler.itemDislocatorBlockBlacklistMap.containsKey(blockName)
|
||||
&& (ConfigHandler.itemDislocatorBlockBlacklistMap.get(blockName) == -1
|
||||
|| ConfigHandler.itemDislocatorBlockBlacklistMap.get(blockName) == meta)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!skipPlayerCheck) {
|
||||
EntityPlayer closestPlayer = world.getClosestPlayerToEntity(item, range);
|
||||
if (closestPlayer == null || closestPlayer != player) continue;
|
||||
}
|
||||
|
||||
boolean doMove = true;
|
||||
if (ModHelper.isHodgepodgeLoaded && selfPickupStatus != SelfPickUpMode.ALWAYS) {
|
||||
boolean isOwnDrop = item.func_145800_j() != null
|
||||
&& item.func_145800_j().equals(player.getCommandSenderName());
|
||||
doMove = !isOwnDrop || selfPickupStatus == SelfPickUpMode.DELAY && item.delayBeforeCanPickup <= 0;
|
||||
}
|
||||
|
||||
if (doMove) {
|
||||
playSound = true;
|
||||
|
||||
if (item.delayBeforeCanPickup > 0) {
|
||||
item.delayBeforeCanPickup = 0;
|
||||
}
|
||||
item.delayBeforeCanPickup = 0;
|
||||
item.motionX = 0;
|
||||
item.motionY = 0;
|
||||
item.motionZ = 0;
|
||||
item.setPosition(
|
||||
entity.posX - 0.2 + (world.rand.nextDouble() * 0.4),
|
||||
entity.posY - 0.6,
|
||||
entity.posZ - 0.2 + (world.rand.nextDouble() * 0.4));
|
||||
}
|
||||
if (playSound && !ConfigHandler.itemDislocatorDisableSound) {
|
||||
world.playSoundAtEntity(
|
||||
entity,
|
||||
"random.orb",
|
||||
0.1F,
|
||||
0.5F * ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 2F));
|
||||
player.posX - 0.2 + (world.rand.nextDouble() * 0.4),
|
||||
playerEyesPos - 0.62, // 1 block above feet / "belt height"
|
||||
player.posZ - 0.2 + (world.rand.nextDouble() * 0.4));
|
||||
}
|
||||
}
|
||||
|
||||
if (!world.isRemote) {
|
||||
List<EntityXPOrb> xp = world.getEntitiesWithinAABB(
|
||||
EntityXPOrb.class,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
entity.posX,
|
||||
entity.posY,
|
||||
entity.posZ,
|
||||
entity.posX,
|
||||
entity.posY,
|
||||
entity.posZ).expand(4, 4, 4));
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
for (EntityXPOrb orb : xp) {
|
||||
if (orb.field_70532_c == 0 && orb.isEntityAlive()) {
|
||||
if (MinecraftForge.EVENT_BUS.post(new PlayerPickupXpEvent(player, orb))) continue;
|
||||
world.playSoundAtEntity(
|
||||
player,
|
||||
"random.orb",
|
||||
0.1F,
|
||||
0.5F * ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.8F));
|
||||
player.onItemPickup(orb, 1);
|
||||
player.addExperience(orb.xpValue);
|
||||
orb.setDead();
|
||||
if (playSound && !ConfigHandler.itemDislocatorDisableSound) {
|
||||
world.playSoundAtEntity(
|
||||
player,
|
||||
"random.orb",
|
||||
0.1F,
|
||||
0.5F * ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 2F));
|
||||
}
|
||||
|
||||
if (!world.isRemote) {
|
||||
List<EntityXPOrb> xp = world.getEntitiesWithinAABB(
|
||||
EntityXPOrb.class,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
player.posX,
|
||||
player.posY,
|
||||
player.posZ,
|
||||
player.posX,
|
||||
player.posY,
|
||||
player.posZ).expand(range, range, range));
|
||||
for (EntityXPOrb orb : xp) {
|
||||
if (orb.field_70532_c == 0 && orb.isEntityAlive()) {
|
||||
if (!skipPlayerCheck) {
|
||||
EntityPlayer closestPlayer = world.getClosestPlayerToEntity(orb, range);
|
||||
if (closestPlayer == null || closestPlayer != player) continue;
|
||||
}
|
||||
if (MinecraftForge.EVENT_BUS.post(new PlayerPickupXpEvent(player, orb))) continue;
|
||||
world.playSoundAtEntity(
|
||||
player,
|
||||
"random.orb",
|
||||
0.1F,
|
||||
0.5F * ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.8F));
|
||||
player.onItemPickup(orb, 1);
|
||||
player.addExperience(orb.xpValue);
|
||||
orb.setDead();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isEnabled(ItemStack itemStack) {
|
||||
return ItemNBTHelper.getBoolean(itemStack, "MagnetEnabled", false);
|
||||
// For backward compatibility
|
||||
if (ItemNBTHelper.verifyExistance(itemStack, "MagnetEnabled")) {
|
||||
final NBTTagCompound nbt = itemStack.getTagCompound();
|
||||
final boolean enabled = nbt.getBoolean("MagnetEnabled");
|
||||
IConfigurableItem.ProfileHelper.setBoolean(itemStack, References.ENABLED, enabled);
|
||||
nbt.removeTag("MagnetEnabled");
|
||||
return enabled;
|
||||
}
|
||||
return IConfigurableItem.ProfileHelper.getBoolean(itemStack, References.ENABLED, false);
|
||||
}
|
||||
|
||||
public static void toggle(ItemStack itemStack) {
|
||||
ItemNBTHelper.setBoolean(itemStack, "MagnetEnabled", !isEnabled(itemStack));
|
||||
final boolean enabled = isEnabled(itemStack);
|
||||
IConfigurableItem.ProfileHelper.setBoolean(itemStack, References.ENABLED, !enabled);
|
||||
}
|
||||
|
||||
public static void setStatus(ItemStack itemStack, boolean status) {
|
||||
ItemNBTHelper.setBoolean(itemStack, "MagnetEnabled", status);
|
||||
IConfigurableItem.ProfileHelper.setBoolean(itemStack, References.ENABLED, status);
|
||||
}
|
||||
|
||||
public static String getStatusString(ItemStack itemStack) {
|
||||
String status;
|
||||
if (isEnabled(itemStack)) {
|
||||
status = EnumChatFormatting.DARK_GREEN + StatCollector.translateToLocal("info.de.statusActive.txt");
|
||||
} else {
|
||||
status = EnumChatFormatting.RED + StatCollector.translateToLocal("info.de.statusInactive.txt");
|
||||
}
|
||||
return StatCollector.translateToLocal("info.de.status.txt") + ": " + status;
|
||||
}
|
||||
|
||||
public static short getSelfPickupStatusShort(ItemStack itemStack) {
|
||||
return ProfileHelper.getShort(itemStack, References.ENABLED_SELF_PICKUP, (short) 0);
|
||||
}
|
||||
|
||||
private static SelfPickUpMode getSelfPickupStatus(ItemStack itemStack) {
|
||||
final short mode = getSelfPickupStatusShort(itemStack);
|
||||
return SelfPickUpMode.values()[mode];
|
||||
}
|
||||
|
||||
public static void toggleSelfPickupStatus(ItemStack itemStack) {
|
||||
final SelfPickUpMode mode = getSelfPickupStatus(itemStack);
|
||||
IConfigurableItem.ProfileHelper
|
||||
.setShort(itemStack, References.ENABLED_SELF_PICKUP, (short) mode.next().ordinal());
|
||||
}
|
||||
|
||||
public static void setSelfPickupStatus(ItemStack itemStack, short status) {
|
||||
IConfigurableItem.ProfileHelper.setShort(itemStack, References.ENABLED_SELF_PICKUP, status);
|
||||
}
|
||||
|
||||
public static String getSelfPickupStatusString(ItemStack itemStack) {
|
||||
String status;
|
||||
switch (getSelfPickupStatus(itemStack)) {
|
||||
case DELAY -> status = EnumChatFormatting.YELLOW
|
||||
+ StatCollector.translateToLocal("info.de.selfPickupDelay.txt");
|
||||
case NEVER -> status = EnumChatFormatting.RED
|
||||
+ StatCollector.translateToLocal("info.de.selfPickupNever.txt");
|
||||
default -> status = EnumChatFormatting.DARK_GREEN
|
||||
+ StatCollector.translateToLocal("info.de.selfPickupAlways.txt");
|
||||
}
|
||||
return StatCollector.translateToLocal("info.de.selfPickup.txt") + ": " + status;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -192,6 +315,31 @@ public class Magnet extends ItemDE implements IBauble {
|
||||
+ InfoHelper.ITC()
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("info.de.blockRange.txt"));
|
||||
list.add(getStatusString(stack));
|
||||
if (ModHelper.isHodgepodgeLoaded) list.add(getSelfPickupStatusString(stack));
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "gtnhlib")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void renderHUDStatusChange() {
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
java.util.Optional<ItemStack> magnetOptional = InventoryUtils.getItemInAnyPlayerInventory(player, Magnet.class);
|
||||
magnetOptional.ifPresent(
|
||||
itemStack -> GTNHLib.proxy
|
||||
.printMessageAboveHotbar(EnumChatFormatting.GOLD + getStatusString(itemStack), 60, true, true));
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "gtnhlib")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void renderHUDSelfPickupStatusChange() {
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
java.util.Optional<ItemStack> magnetOptional = InventoryUtils.getItemInAnyPlayerInventory(player, Magnet.class);
|
||||
magnetOptional.ifPresent(
|
||||
itemStack -> GTNHLib.proxy.printMessageAboveHotbar(
|
||||
EnumChatFormatting.GOLD + getSelfPickupStatusString(itemStack),
|
||||
60,
|
||||
true,
|
||||
true));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -230,4 +378,17 @@ public class Magnet extends ItemDE implements IBauble {
|
||||
public boolean canUnequip(ItemStack itemstack, EntityLivingBase player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemConfigField> getFields(ItemStack stack, int slot) {
|
||||
List<ItemConfigField> fields = new ArrayList<>();
|
||||
fields.add(new ItemConfigField(References.BOOLEAN_ID, slot, References.ENABLED).readFromItem(stack, false));
|
||||
fields.add(new ItemConfigField(References.BOOLEAN_ID, slot, References.MAGNET_SNEAK).readFromItem(stack, true));
|
||||
return fields;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasProfiles() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+23
-7
@@ -14,6 +14,7 @@ import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -37,7 +38,6 @@ import com.brandon3055.draconicevolution.common.lib.References;
|
||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 2/01/2015. Modified by bartimaeusnek on 23/05/2018
|
||||
@@ -176,11 +176,13 @@ public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
for (int yPos = y + yOffset - yMin; yPos <= y + yOffset + yMax; yPos++) {
|
||||
for (int zPos = z - zMin; zPos <= z + zMax; zPos++) {
|
||||
TileEntity te = player.worldObj.getTileEntity(xPos, yPos, zPos);
|
||||
if (te != null && !ModHelper.isGregTechTileEntityOre(te)) {
|
||||
if (te != null) {
|
||||
if (player.worldObj.isRemote) {
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("msg.de.baseSafeAOW.txt"));
|
||||
} else((EntityPlayerMP) player).playerNetServerHandler
|
||||
.sendPacket(new S23PacketBlockChange(x, y, z, ((EntityPlayerMP) player).worldObj));
|
||||
} else {
|
||||
((EntityPlayerMP) player).playerNetServerHandler
|
||||
.sendPacket(new S23PacketBlockChange(x, y, z, player.worldObj));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -293,8 +295,19 @@ public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
|
||||
block.onBlockHarvested(world, x, y, z, meta, player);
|
||||
|
||||
ArrayList<ItemStack> drops = block
|
||||
.getDrops(world, x, y, z, meta, EnchantmentHelper.getFortuneModifier(player));
|
||||
ArrayList<ItemStack> drops = new ArrayList<>();
|
||||
|
||||
boolean silkTouchBreak = block.canSilkHarvest(world, player, x, y, z, meta)
|
||||
&& EnchantmentHelper.getSilkTouchModifier(player);
|
||||
|
||||
if (silkTouchBreak) {
|
||||
ItemStack silkTouchDrop = new ItemStack(Item.getItemFromBlock(block), 1, meta);
|
||||
drops.add(silkTouchDrop);
|
||||
} else {
|
||||
int fortuneLevel = EnchantmentHelper.getFortuneModifier(player);
|
||||
drops = block.getDrops(world, x, y, z, meta, fortuneLevel);
|
||||
}
|
||||
|
||||
for (ItemStack is : drops) {
|
||||
if (!player.inventory.addItemStackToInventory(is)) {
|
||||
if (world.getGameRules().getGameRuleBooleanValue("doTileDrops") && !world.restoringBlockSnapshots) {
|
||||
@@ -316,8 +329,11 @@ public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
||||
player.addExhaustion(-0.025F);
|
||||
if (block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)) > 0)
|
||||
|
||||
if (!silkTouchBreak && block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)) > 0) {
|
||||
player.addExperience(block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)));
|
||||
}
|
||||
|
||||
EntityPlayerMP mpPlayer = (EntityPlayerMP) player;
|
||||
mpPlayer.playerNetServerHandler.sendPacket(new S23PacketBlockChange(x, y, z, world));
|
||||
|
||||
|
||||
@@ -37,4 +37,7 @@ public final class References {
|
||||
public static final String OBLITERATE = "ToolVoidJunk";
|
||||
public static final String TREE_MODE = "AxeTreeMode";
|
||||
public static final String BASE_SAFE_AOE = "BaseSafeAOE";
|
||||
public static final String ENABLED = "Enabled";
|
||||
public static final String MAGNET_SNEAK = "MagnetSneak";
|
||||
public static final String ENABLED_SELF_PICKUP = "EnabledSelfPickup";
|
||||
}
|
||||
@@ -72,4 +72,5 @@ public class Strings { // public static Block name
|
||||
public static final String draconiumFluxCapacitorName = "draconiumFluxCapacitor";
|
||||
public static final String energyCrystalName = "energyCrystal";
|
||||
public static final String wrenchName = "wrench";
|
||||
public static final String dislocatorInhibitor = "dislocatorInhibitor";
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.brandon3055.draconicevolution.common.lib;
|
||||
|
||||
import com.brandon3055.draconicevolution.DETags;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 24/02/2015.
|
||||
*/
|
||||
public class VersionHandler {
|
||||
|
||||
public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
public static final String VERSION = DETags.VERSION;
|
||||
|
||||
public static final int SNAPSHOT = 0;
|
||||
public static final String MCVERSION = "1.7.10";
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.brandon3055.draconicevolution.common.network;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.container.ContainerDislocatorInhibitor;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileDislocatorInhibitor;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class DislocatorInhibitorButtonPacket implements IMessage {
|
||||
|
||||
private short index = 0;
|
||||
private short value = 0;
|
||||
|
||||
public DislocatorInhibitorButtonPacket() {}
|
||||
|
||||
public DislocatorInhibitorButtonPacket(byte index, short value) {
|
||||
this.index = index;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf bytes) {
|
||||
bytes.writeByte(index);
|
||||
bytes.writeByte(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf bytes) {
|
||||
index = bytes.readByte();
|
||||
value = bytes.readByte();
|
||||
}
|
||||
|
||||
public static class Handler implements IMessageHandler<DislocatorInhibitorButtonPacket, IMessage> {
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(DislocatorInhibitorButtonPacket message, MessageContext ctx) {
|
||||
if (!(ctx
|
||||
.getServerHandler().playerEntity.openContainer instanceof ContainerDislocatorInhibitor container)) {
|
||||
return null;
|
||||
}
|
||||
TileDislocatorInhibitor tile = container.getTileEntity();
|
||||
if (tile == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (message.index) {
|
||||
case 0 -> tile.setRange(message.value);
|
||||
case 1 -> tile.setActivityControl(message.value);
|
||||
case 2 -> tile.setWhitelist(message.value == 1);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
@@ -9,6 +9,7 @@ import net.minecraft.item.ItemStack;
|
||||
import com.brandon3055.draconicevolution.client.handler.ClientEventHandler;
|
||||
import com.brandon3055.draconicevolution.common.items.tools.Magnet;
|
||||
import com.brandon3055.draconicevolution.common.utills.InventoryUtils;
|
||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
@@ -49,6 +50,7 @@ public final class MagnetToggleAckPacket implements IMessage {
|
||||
ItemStack itemStack = magnetOptional.get();
|
||||
Magnet.setStatus(itemStack, message.status);
|
||||
ClientEventHandler.statusDisplayManager.startDrawing(itemStack.copy());
|
||||
if (ModHelper.isGTNHLibLoaded) Magnet.renderHUDStatusChange();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package com.brandon3055.draconicevolution.common.network;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.brandon3055.draconicevolution.client.handler.ClientEventHandler;
|
||||
import com.brandon3055.draconicevolution.common.items.tools.Magnet;
|
||||
import com.brandon3055.draconicevolution.common.utills.InventoryUtils;
|
||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public final class MagnetToggleSelfPickupAckPacket implements IMessage {
|
||||
|
||||
private short status;
|
||||
|
||||
public MagnetToggleSelfPickupAckPacket() {}
|
||||
|
||||
public MagnetToggleSelfPickupAckPacket(short status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
this.status = buf.readShort();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeShort(this.status);
|
||||
}
|
||||
|
||||
public static final class Handler implements IMessageHandler<MagnetToggleSelfPickupAckPacket, IMessage> {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IMessage onMessage(MagnetToggleSelfPickupAckPacket message, MessageContext ctx) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
Optional<ItemStack> magnetOptional = InventoryUtils.getItemInAnyPlayerInventory(player, Magnet.class);
|
||||
|
||||
if (magnetOptional.isPresent()) {
|
||||
ItemStack itemStack = magnetOptional.get();
|
||||
Magnet.setSelfPickupStatus(itemStack, message.status);
|
||||
ClientEventHandler.statusDisplayManager.startDrawing(itemStack.copy());
|
||||
if (ModHelper.isGTNHLibLoaded) Magnet.renderHUDSelfPickupStatusChange();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.brandon3055.draconicevolution.common.network;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.common.items.tools.Magnet;
|
||||
import com.brandon3055.draconicevolution.common.utills.InventoryUtils;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public final class MagnetToggleSelfPickupPacket implements IMessage {
|
||||
|
||||
public MagnetToggleSelfPickupPacket() {}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
public static final class Handler implements IMessageHandler<MagnetToggleSelfPickupPacket, IMessage> {
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(MagnetToggleSelfPickupPacket message, MessageContext ctx) {
|
||||
EntityPlayerMP player = ctx.getServerHandler().playerEntity;
|
||||
|
||||
Optional<ItemStack> magnetOptional = InventoryUtils.getItemInAnyPlayerInventory(player, Magnet.class);
|
||||
magnetOptional.ifPresent(itemStack -> {
|
||||
Magnet.toggleSelfPickupStatus(itemStack);
|
||||
DraconicEvolution.network.sendTo(
|
||||
new MagnetToggleSelfPickupAckPacket(Magnet.getSelfPickupStatusShort(itemStack)),
|
||||
player);
|
||||
});
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package com.brandon3055.draconicevolution.common.network;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.container.ContainerDislocatorInhibitor;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileDislocatorInhibitor;
|
||||
|
||||
import cpw.mods.fml.common.network.ByteBufUtils;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class SlotFakeClickPacket implements IMessage {
|
||||
|
||||
private short slotIndex = 0;
|
||||
private ItemStack stack;
|
||||
|
||||
public SlotFakeClickPacket() {}
|
||||
|
||||
public SlotFakeClickPacket(byte slotIndex, ItemStack stack) {
|
||||
this.slotIndex = slotIndex;
|
||||
this.stack = stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf bytes) {
|
||||
bytes.writeByte(slotIndex);
|
||||
ByteBufUtils.writeItemStack(bytes, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf bytes) {
|
||||
slotIndex = bytes.readByte();
|
||||
stack = ByteBufUtils.readItemStack(bytes);
|
||||
}
|
||||
|
||||
public static class Handler implements IMessageHandler<SlotFakeClickPacket, IMessage> {
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(SlotFakeClickPacket message, MessageContext ctx) {
|
||||
if (!(ctx
|
||||
.getServerHandler().playerEntity.openContainer instanceof ContainerDislocatorInhibitor container)) {
|
||||
return null;
|
||||
}
|
||||
TileDislocatorInhibitor tile = container.getTileEntity();
|
||||
if (tile == null) {
|
||||
return null;
|
||||
}
|
||||
tile.setFilterItem(message.slotIndex, message.stack);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+330
@@ -0,0 +1,330 @@
|
||||
package com.brandon3055.draconicevolution.common.tileentities;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||
import com.brandon3055.draconicevolution.common.container.ContainerDislocatorInhibitor;
|
||||
|
||||
public class TileDislocatorInhibitor extends TileEntity implements IInventory {
|
||||
|
||||
public static final int MAXIMUM_RANGE = 16;
|
||||
public static final int MINIMUM_RANGE = 1;
|
||||
public static final int FILTER_SLOTS = 8;
|
||||
public static final HashMap<World, HashSet<TileDislocatorInhibitor>> inhibitors = new HashMap<>();
|
||||
|
||||
private boolean redstoneActive = false;
|
||||
private ActivityControlType activityControlType = ActivityControlType.ALWAYS_ACTIVE;
|
||||
private boolean registered = false;
|
||||
private int range = 5;
|
||||
|
||||
private boolean whitelist = false;
|
||||
private final ItemStack[] filter = new ItemStack[FILTER_SLOTS];
|
||||
|
||||
public static boolean isBlockedByInhibitor(World world, EntityItem item) {
|
||||
HashSet<TileDislocatorInhibitor> list = inhibitors.get(world);
|
||||
if (list == null) {
|
||||
return false;
|
||||
}
|
||||
for (TileDislocatorInhibitor inhibitor : list) {
|
||||
if (!inhibitor.shouldBeActive()) {
|
||||
continue;
|
||||
}
|
||||
if (!inhibitor.isBlockingItem(item.getEntityItem())) {
|
||||
continue;
|
||||
}
|
||||
if (inhibitor.isInRange(item.posX, item.posY, item.posZ)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (!registered) {
|
||||
HashSet<TileDislocatorInhibitor> map = inhibitors.computeIfAbsent(this.worldObj, k -> new HashSet<>());
|
||||
map.add(this);
|
||||
registered = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void unregister() {
|
||||
if (inhibitors.containsKey(this.worldObj)) {
|
||||
HashSet<TileDislocatorInhibitor> list = inhibitors.get(this.worldObj);
|
||||
list.remove(this);
|
||||
if (list.isEmpty()) {
|
||||
inhibitors.remove(this.worldObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getRange() {
|
||||
return range;
|
||||
}
|
||||
|
||||
public void setRange(int value) {
|
||||
if (value > MAXIMUM_RANGE) {
|
||||
value = MINIMUM_RANGE;
|
||||
}
|
||||
if (value < MINIMUM_RANGE) {
|
||||
value = MAXIMUM_RANGE;
|
||||
}
|
||||
this.range = value;
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
public boolean isBlockingItem(ItemStack item) {
|
||||
boolean blocked = false;
|
||||
for (ItemStack itemStack : filter) {
|
||||
if (itemStack == null) {
|
||||
continue;
|
||||
}
|
||||
if (itemStack.isItemEqual(item)) {
|
||||
blocked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (whitelist) {
|
||||
return blocked;
|
||||
}
|
||||
return !blocked;
|
||||
}
|
||||
|
||||
public boolean shouldBeActive() {
|
||||
switch (activityControlType) {
|
||||
case NEVER_ACTIVE -> {
|
||||
return false;
|
||||
}
|
||||
case WITH_REDSTONE -> {
|
||||
return redstoneActive;
|
||||
}
|
||||
case WITHOUT_REDSTONE -> {
|
||||
return !redstoneActive;
|
||||
}
|
||||
default -> {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isInRange(double x, double y, double z) {
|
||||
return x >= this.xCoord - range && x <= this.xCoord + range + 1
|
||||
&& y >= this.yCoord - range
|
||||
&& y <= this.yCoord + range + 1
|
||||
&& z >= this.zCoord - range
|
||||
&& z <= this.zCoord + range + 1;
|
||||
}
|
||||
|
||||
public void setActivityControl(int index) {
|
||||
if (index < 0 || index >= ActivityControlType.values().length) {
|
||||
return;
|
||||
}
|
||||
this.activityControlType = ActivityControlType.values()[index];
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
public ActivityControlType getActivityControlType() {
|
||||
return activityControlType;
|
||||
}
|
||||
|
||||
public boolean isRedstoneActive() {
|
||||
return redstoneActive;
|
||||
}
|
||||
|
||||
public void setRedstoneActive(boolean redstoneActive) {
|
||||
this.redstoneActive = redstoneActive;
|
||||
}
|
||||
|
||||
public void setFilterItem(int slot, ItemStack item) {
|
||||
if (slot < 0 || slot >= FILTER_SLOTS) {
|
||||
return;
|
||||
}
|
||||
setInventorySlotContents(slot, item);
|
||||
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
public void addItemFilter(ItemStack itemStack) {
|
||||
if (itemStack == null) {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < FILTER_SLOTS; i++) {
|
||||
if (filter[i] == null) {
|
||||
setInventorySlotContents(i, itemStack);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isWhitelist() {
|
||||
return whitelist;
|
||||
}
|
||||
|
||||
public void setWhitelist(boolean value) {
|
||||
this.whitelist = value;
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal(ModBlocks.dislocatorInhibitor.getUnlocalizedName() + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return FILTER_SLOTS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int slotIn) {
|
||||
if (slotIn < 0 || slotIn >= FILTER_SLOTS) {
|
||||
return null;
|
||||
}
|
||||
return this.filter[slotIn];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int index, int count) {
|
||||
ItemStack item = this.filter[index];
|
||||
this.filter[index] = null;
|
||||
if (item == null) {
|
||||
return null;
|
||||
}
|
||||
item.stackSize = 0;
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int index) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int index, ItemStack stack) {
|
||||
if (stack != null) {
|
||||
this.filter[index] = stack.copy();
|
||||
this.filter[index].stackSize = 0;
|
||||
} else {
|
||||
this.filter[index] = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int index, ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public Container getGuiContainer(InventoryPlayer playerInventory) {
|
||||
return new ContainerDislocatorInhibitor(playerInventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
NBTTagCompound tagCompound = new NBTTagCompound();
|
||||
this.writeToNBT(tagCompound);
|
||||
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
readFromNBT(pkt.func_148857_g());
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound compound) {
|
||||
compound.setInteger("Range", range);
|
||||
compound.setBoolean("RedstoneAcitve", redstoneActive);
|
||||
compound.setString("ActivityControl", activityControlType.name());
|
||||
compound.setBoolean("Whitelist", whitelist);
|
||||
|
||||
int i = 0;
|
||||
for (ItemStack item : filter) {
|
||||
NBTTagCompound itemTag = new NBTTagCompound();
|
||||
if (item != null) {
|
||||
item.writeToNBT(itemTag);
|
||||
compound.setTag("Item" + i, itemTag);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
super.writeToNBT(compound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound compound) {
|
||||
range = compound.getInteger("Range");
|
||||
redstoneActive = compound.getBoolean("RedstoneAcitve");
|
||||
activityControlType = ActivityControlType.valueOf(compound.getString("ActivityControl"));
|
||||
whitelist = compound.getBoolean("Whitelist");
|
||||
|
||||
for (int i = 0; i < FILTER_SLOTS; i++) {
|
||||
NBTBase tag = compound.getTag("Item" + i);
|
||||
if (tag instanceof NBTTagCompound) {
|
||||
filter[i] = ItemStack.loadItemStackFromNBT((NBTTagCompound) tag);
|
||||
} else {
|
||||
filter[i] = null;
|
||||
}
|
||||
}
|
||||
super.readFromNBT(compound);
|
||||
}
|
||||
|
||||
public enum ActivityControlType {
|
||||
|
||||
ALWAYS_ACTIVE,
|
||||
WITH_REDSTONE,
|
||||
WITHOUT_REDSTONE,
|
||||
NEVER_ACTIVE;
|
||||
|
||||
public ActivityControlType getNext() {
|
||||
return switch (this) {
|
||||
case ALWAYS_ACTIVE -> ActivityControlType.WITH_REDSTONE;
|
||||
case WITH_REDSTONE -> ActivityControlType.WITHOUT_REDSTONE;
|
||||
case WITHOUT_REDSTONE -> ActivityControlType.NEVER_ACTIVE;
|
||||
default -> ActivityControlType.ALWAYS_ACTIVE;
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+144
-11
@@ -1,12 +1,23 @@
|
||||
package com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor;
|
||||
|
||||
import static com.brandon3055.draconicevolution.common.container.ContainerReactor.blockFuelAmount;
|
||||
import static com.brandon3055.draconicevolution.common.container.ContainerReactor.fullChaosAmount;
|
||||
import static com.brandon3055.draconicevolution.common.container.ContainerReactor.ingotFuelAmount;
|
||||
import static com.brandon3055.draconicevolution.common.container.ContainerReactor.maximumFuelStorage;
|
||||
import static com.brandon3055.draconicevolution.common.container.ContainerReactor.nuggetFuelAmount;
|
||||
import static com.brandon3055.draconicevolution.common.handler.ConfigHandler.linearReactorFuelUsage;
|
||||
import static com.brandon3055.draconicevolution.common.handler.ConfigHandler.reactorOutputMultiplier;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
@@ -24,12 +35,14 @@ import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.client.ReactorSound;
|
||||
import com.brandon3055.draconicevolution.client.gui.GuiHandler;
|
||||
import com.brandon3055.draconicevolution.client.render.particle.Particles;
|
||||
import com.brandon3055.draconicevolution.common.ModItems;
|
||||
import com.brandon3055.draconicevolution.common.blocks.multiblock.IReactorPart;
|
||||
import com.brandon3055.draconicevolution.common.blocks.multiblock.IReactorPart.ComparatorMode;
|
||||
import com.brandon3055.draconicevolution.common.blocks.multiblock.MultiblockHelper.TileLocation;
|
||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.lib.References;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileObjectSync;
|
||||
import com.brandon3055.draconicevolution.common.utills.OreDictionaryHelper;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
@@ -39,7 +52,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
/**
|
||||
* Created by Brandon on 16/6/2015.
|
||||
*/
|
||||
public class TileReactorCore extends TileObjectSync {
|
||||
public class TileReactorCore extends TileObjectSync implements IInventory {
|
||||
|
||||
public static final int MAXIMUM_PART_DISTANCE = 10;
|
||||
|
||||
@@ -86,6 +99,12 @@ public class TileReactorCore extends TileObjectSync {
|
||||
public int energySaturation = 0;
|
||||
public int maxEnergySaturation = 0;
|
||||
|
||||
public float fuelStorageRatio = (float) ConfigHandler.reactorFuelStorage / 10368; // To keep the temperature
|
||||
// increase unchanged from the
|
||||
// default config if it's changed
|
||||
|
||||
int excessFuel = 0;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private ReactorSound reactorSound;
|
||||
|
||||
@@ -110,6 +129,11 @@ public class TileReactorCore extends TileObjectSync {
|
||||
case ONLINE, STOPPING -> runTick();
|
||||
}
|
||||
|
||||
if (excessFuel > 0 || (reactorFuel + convertedFuel) < maximumFuelStorage) {
|
||||
int useExcessFuel = Math.min(maximumFuelStorage - (reactorFuel + convertedFuel), excessFuel);
|
||||
reactorFuel += useExcessFuel;
|
||||
excessFuel -= useExcessFuel;
|
||||
}
|
||||
detectAndSendChanges();
|
||||
}
|
||||
|
||||
@@ -145,8 +169,8 @@ public class TileReactorCore extends TileObjectSync {
|
||||
private void startingTick() {
|
||||
if (!startupInitialized) {
|
||||
int totalFuel = reactorFuel + convertedFuel;
|
||||
maxFieldCharge = totalFuel * 96.45061728395062 * 100;
|
||||
maxEnergySaturation = (int) (totalFuel * 96.45061728395062 * 1000);
|
||||
maxFieldCharge = (totalFuel / fuelStorageRatio) * 96.45061728395062 * 100;
|
||||
maxEnergySaturation = (int) ((totalFuel / fuelStorageRatio) * 96.45061728395062 * 1000);
|
||||
energySaturation = Math.min(energySaturation, maxEnergySaturation);
|
||||
fieldCharge = Math.min(fieldCharge, maxFieldCharge);
|
||||
startupInitialized = true;
|
||||
@@ -196,7 +220,7 @@ public class TileReactorCore extends TileObjectSync {
|
||||
}
|
||||
|
||||
// Energy Calculation
|
||||
int baseMaxRFt = (int) ((maxEnergySaturation / 1000D) * ConfigHandler.reactorOutputMultiplier * 1.5D);
|
||||
int baseMaxRFt = (int) ((maxEnergySaturation / 1000D) * reactorOutputMultiplier * 1.5D);
|
||||
int maxRFt = (int) (baseMaxRFt * (1D + conversion * 2));
|
||||
generationRate = (1D - saturation) * maxRFt;
|
||||
energySaturation += generationRate;
|
||||
@@ -215,12 +239,17 @@ public class TileReactorCore extends TileObjectSync {
|
||||
fieldCharge -= fieldDrain;
|
||||
|
||||
// Calculate Fuel Usage
|
||||
fuelUseRate = tempDrainFactor * (1D - saturation) * (0.001 * ConfigHandler.reactorFuelUsageMultiplier);
|
||||
if (linearReactorFuelUsage) {
|
||||
fuelUseRate = tempDrainFactor * (1D - saturation) * (0.001 * ConfigHandler.reactorFuelUsageMultiplier);
|
||||
} else {
|
||||
fuelUseRate = tempDrainFactor * (1D - Math.pow(Math.max(saturation - 0.1, 0), 0.3))
|
||||
* (0.001 * ConfigHandler.reactorFuelUsageMultiplier);
|
||||
}
|
||||
conversionUnit += fuelUseRate;
|
||||
if (conversionUnit >= 1 && reactorFuel > 0) {
|
||||
conversionUnit--;
|
||||
reactorFuel--;
|
||||
convertedFuel++;
|
||||
reactorFuel -= (int) conversionUnit;
|
||||
convertedFuel += (int) conversionUnit;
|
||||
conversionUnit -= (int) conversionUnit;
|
||||
}
|
||||
|
||||
if (fieldCharge <= 0 && !hasExploded) {
|
||||
@@ -231,7 +260,7 @@ public class TileReactorCore extends TileObjectSync {
|
||||
|
||||
private void goBoom() {
|
||||
if (ConfigHandler.enableReactorBigBoom) {
|
||||
float power = 2F + ((float) (convertedFuel + reactorFuel) / 10369F * 18F);
|
||||
float power = 2F + ((float) (convertedFuel + reactorFuel) / (maximumFuelStorage + 1F) * 18F);
|
||||
ProcessHandler.addProcess(new ReactorExplosion(worldObj, xCoord, yCoord, zCoord, power));
|
||||
sendObjectToClient(
|
||||
References.INT_ID,
|
||||
@@ -361,7 +390,7 @@ public class TileReactorCore extends TileObjectSync {
|
||||
energySaturation += energyInjected;
|
||||
} else if (reactionTemperature < 2000) {
|
||||
energyInjected = energyToInject;
|
||||
reactionTemperature += (double) energyInjected / (1000D + reactorFuel * 10);
|
||||
reactionTemperature += (double) energyInjected / (1000D + (reactorFuel / fuelStorageRatio) * 10);
|
||||
if (reactionTemperature > 2000) {
|
||||
reactionTemperature = 2000;
|
||||
}
|
||||
@@ -401,7 +430,7 @@ public class TileReactorCore extends TileObjectSync {
|
||||
}
|
||||
|
||||
public double getCoreRadius() {
|
||||
double volume = (double) (reactorFuel + convertedFuel) / 1296D;
|
||||
double volume = (double) (reactorFuel + convertedFuel) / (1296D * fuelStorageRatio);
|
||||
volume *= 1 + (reactionTemperature / maxReactTemperature) * 10D;
|
||||
return Math.cbrt(volume / (4D / 3D * Math.PI));
|
||||
}
|
||||
@@ -586,6 +615,7 @@ public class TileReactorCore extends TileObjectSync {
|
||||
compound.setInteger("maxEnergySaturation", maxEnergySaturation);
|
||||
compound.setInteger("reactorFuel", reactorFuel);
|
||||
compound.setInteger("convertedFuel", convertedFuel);
|
||||
compound.setInteger("excessFuel", excessFuel);
|
||||
compound.setDouble("reactionTemperature", reactionTemperature);
|
||||
compound.setDouble("maxReactTemperature", maxReactTemperature);
|
||||
compound.setDouble("fieldCharge", fieldCharge);
|
||||
@@ -613,6 +643,7 @@ public class TileReactorCore extends TileObjectSync {
|
||||
maxEnergySaturation = compound.getInteger("maxEnergySaturation");
|
||||
reactorFuel = compound.getInteger("reactorFuel");
|
||||
convertedFuel = compound.getInteger("convertedFuel");
|
||||
excessFuel = compound.getInteger("excessFuel");
|
||||
reactionTemperature = compound.getDouble("reactionTemperature");
|
||||
maxReactTemperature = compound.getDouble("maxReactTemperature");
|
||||
fieldCharge = compound.getDouble("fieldCharge");
|
||||
@@ -666,4 +697,106 @@ public class TileReactorCore extends TileObjectSync {
|
||||
}
|
||||
return new Object[] {};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
if (convertedFuel > fullChaosAmount) {
|
||||
return new ItemStack(ModItems.chaosShard, convertedFuel / fullChaosAmount);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int count) {
|
||||
if (convertedFuel > fullChaosAmount) {
|
||||
int chaosShardCount = Math.min((convertedFuel / fullChaosAmount), count);
|
||||
convertedFuel -= chaosShardCount * fullChaosAmount;
|
||||
return new ItemStack(ModItems.chaosShard, chaosShardCount);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int slot, ItemStack stack) {
|
||||
if (fuelValue(stack) > 0) {
|
||||
int fuelValue = fuelValue(stack) * stack.stackSize;
|
||||
if (fuelValue > maximumFuelStorage - (reactorFuel + convertedFuel)) {
|
||||
fuelValue -= maximumFuelStorage - (reactorFuel + convertedFuel);
|
||||
reactorFuel = maximumFuelStorage - convertedFuel;
|
||||
excessFuel += fuelValue;
|
||||
} else {
|
||||
reactorFuel += fuelValue;
|
||||
}
|
||||
} else if (stack != null) {
|
||||
convertedFuel = stack.stackSize * fullChaosAmount;
|
||||
} else {
|
||||
convertedFuel -= (convertedFuel / fullChaosAmount) * fullChaosAmount;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
if (worldObj == null) {
|
||||
return true;
|
||||
}
|
||||
if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) {
|
||||
return false;
|
||||
}
|
||||
return player.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.4) < 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
System.out.println("open");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
System.out.println("close");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, ItemStack item) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int fuelValue(ItemStack item) {
|
||||
Set<String> oreNames = OreDictionaryHelper.getOreNames(item);
|
||||
|
||||
if (oreNames.contains("blockDraconiumAwakened")) {
|
||||
return blockFuelAmount;
|
||||
}
|
||||
if (oreNames.contains("ingotDraconiumAwakened")) {
|
||||
return ingotFuelAmount;
|
||||
}
|
||||
if (oreNames.contains("nuggetDraconiumAwakened")) {
|
||||
return nuggetFuelAmount;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
+114
-1
@@ -1,5 +1,13 @@
|
||||
package com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor;
|
||||
|
||||
import static com.brandon3055.draconicevolution.common.container.ContainerReactor.fullChaosAmount;
|
||||
import static com.brandon3055.draconicevolution.common.container.ContainerReactor.maximumFuelStorage;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
@@ -11,7 +19,9 @@ import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.client.render.particle.ParticleReactorBeam;
|
||||
import com.brandon3055.draconicevolution.common.blocks.multiblock.IReactorPart;
|
||||
import com.brandon3055.draconicevolution.common.blocks.multiblock.MultiblockHelper.TileLocation;
|
||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore.ReactorState;
|
||||
import com.brandon3055.draconicevolution.common.utills.OreDictionaryHelper;
|
||||
import com.brandon3055.draconicevolution.integration.computers.IDEPeripheral;
|
||||
|
||||
import cofh.api.energy.IEnergyProvider;
|
||||
@@ -22,7 +32,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
/**
|
||||
* Created by brandon3055 on 5/7/2015.
|
||||
*/
|
||||
public class TileReactorStabilizer extends TileEntity implements IReactorPart, IEnergyProvider, IDEPeripheral {
|
||||
public class TileReactorStabilizer extends TileEntity
|
||||
implements IReactorPart, IEnergyProvider, IDEPeripheral, ISidedInventory {
|
||||
|
||||
public float coreRotation = 0F;
|
||||
public float ringRotation = 0F;
|
||||
@@ -229,4 +240,106 @@ public class TileReactorStabilizer extends TileEntity implements IReactorPart, I
|
||||
TileReactorCore core = getMaster();
|
||||
return core != null ? core.callMethod(methodName, args) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_) {
|
||||
int[] i = new int[getSizeInventory()];
|
||||
for (int i1 = 0; i1 < i.length; i1++) i[i1] = i1;
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int slot, ItemStack item, int side) {
|
||||
TileReactorCore core = getMaster();
|
||||
if (core != null) {
|
||||
return (ConfigHandler.enableAutomation && (core.reactorFuel + core.convertedFuel) < maximumFuelStorage);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slot, ItemStack item, int side) {
|
||||
TileReactorCore core = getMaster();
|
||||
if (core != null) {
|
||||
return (ConfigHandler.enableAutomation && core.convertedFuel > fullChaosAmount);
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int slotIn) {
|
||||
TileReactorCore core = getMaster();
|
||||
if (core != null) {
|
||||
return core.getStackInSlot(slotIn);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int count) {
|
||||
TileReactorCore core = getMaster();
|
||||
return core.decrStackSize(i, count);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack stack) {
|
||||
TileReactorCore core = getMaster();
|
||||
core.setInventorySlotContents(i, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
TileReactorCore core = getMaster();
|
||||
return core.getInventoryStackLimit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
return validInputItems(stack);
|
||||
}
|
||||
|
||||
public boolean validInputItems(ItemStack item) {
|
||||
Set<String> oreNames = OreDictionaryHelper.getOreNames(item);
|
||||
return (oreNames.contains("nuggetDraconiumAwakened") || oreNames.contains("ingotDraconiumAwakened")
|
||||
|| oreNames.contains("blockDraconiumAwakened"));
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,10 @@ public interface IConfigurableItem {
|
||||
getProfileCompound(stack).setBoolean(tag, b);
|
||||
}
|
||||
|
||||
public static void setShort(ItemStack stack, String tag, short s) {
|
||||
getProfileCompound(stack).setShort(tag, s);
|
||||
}
|
||||
|
||||
public static void setInteger(ItemStack stack, String tag, int i) {
|
||||
getProfileCompound(stack).setInteger(tag, i);
|
||||
}
|
||||
@@ -56,6 +60,10 @@ public interface IConfigurableItem {
|
||||
return getProfileCompound(stack).hasKey(tag) ? getProfileCompound(stack).getBoolean(tag) : defaultExpected;
|
||||
}
|
||||
|
||||
public static short getShort(ItemStack stack, String tag, short defaultExpected) {
|
||||
return getProfileCompound(stack).hasKey(tag) ? getProfileCompound(stack).getShort(tag) : defaultExpected;
|
||||
}
|
||||
|
||||
public static int getInteger(ItemStack stack, String tag, int defaultExpected) {
|
||||
return getProfileCompound(stack).hasKey(tag) ? getProfileCompound(stack).getInteger(tag) : defaultExpected;
|
||||
}
|
||||
|
||||
+24
-5
@@ -50,7 +50,17 @@ public class DraconicWorldGenerator implements IWorldGenerator {
|
||||
return;
|
||||
}
|
||||
}
|
||||
addOreSpawn(ModBlocks.draconiumOre, world, random, chunkX * 16, chunkZ * 16, 3, 4, 2, 2, 8);
|
||||
addOreSpawn(
|
||||
ModBlocks.draconiumOre,
|
||||
world,
|
||||
random,
|
||||
chunkX * 16,
|
||||
chunkZ * 16,
|
||||
3,
|
||||
4,
|
||||
ConfigHandler.oreWeightDefault,
|
||||
2,
|
||||
8);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -58,7 +68,7 @@ public class DraconicWorldGenerator implements IWorldGenerator {
|
||||
public void generateSurface(Random random, int x, int z, World world) { // minVainSise,
|
||||
// maxVainSize, spawnChance(Def2), minY, maxY
|
||||
if (!ConfigHandler.disableOreSpawnOverworld)
|
||||
addOreSpawn(ModBlocks.draconiumOre, world, random, x, z, 3, 4, 2, 2, 8);
|
||||
addOreSpawn(ModBlocks.draconiumOre, world, random, x, z, 3, 4, ConfigHandler.oreWeightOverworld, 2, 8);
|
||||
}
|
||||
|
||||
public void generateEnd(Random random, int x, int z, World world) {
|
||||
@@ -72,12 +82,21 @@ public class DraconicWorldGenerator implements IWorldGenerator {
|
||||
if (chaosIslandsEnabled && ConfigHandler.generateChaosIslands)
|
||||
ChaosWorldGenHandler.generateChunk(world, x / 16, z / 16, null, random);
|
||||
if (oreEnabledInEnd && !ConfigHandler.disableOreSpawnEnd)
|
||||
addOreSpawn(ModBlocks.draconiumOre, world, random, x, z, 4, 5, 10, 1, 70);
|
||||
addOreSpawn(ModBlocks.draconiumOre, world, random, x, z, 4, 5, ConfigHandler.oreWeightEnd, 1, 70);
|
||||
}
|
||||
|
||||
public void generateNether(Random random, int chunkX, int chunkZ, World world) {
|
||||
if (!ConfigHandler.disableOreSpawnNether)
|
||||
addOreSpawn(ModBlocks.draconiumOre, world, random, chunkX, chunkZ, 3, 4, 5, 1, 125);
|
||||
if (!ConfigHandler.disableOreSpawnNether) addOreSpawn(
|
||||
ModBlocks.draconiumOre,
|
||||
world,
|
||||
random,
|
||||
chunkX,
|
||||
chunkZ,
|
||||
3,
|
||||
4,
|
||||
ConfigHandler.oreWeightNether,
|
||||
1,
|
||||
125);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
package com.brandon3055.draconicevolution.integration;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.items.armor.CustomArmorHandler.ArmorSummery;
|
||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.items.MetaGeneratedTool;
|
||||
|
||||
/**
|
||||
* Created by brandon3055 on 29/9/2015.
|
||||
@@ -18,34 +22,31 @@ public class ModHelper {
|
||||
|
||||
private static final boolean isTConInstalled;
|
||||
private static final boolean isAvaritiaInstalled;
|
||||
// private static boolean isRotaryCraftInstalled;
|
||||
private static final boolean isGregTechInstalled;
|
||||
private static final boolean isBartworkdsInstalled;
|
||||
private static final boolean isAE2Installed;
|
||||
|
||||
public static boolean isGTNHLibLoaded;
|
||||
public static boolean isHodgepodgeLoaded;
|
||||
|
||||
private static Item cleaver;
|
||||
private static Item avaritiaSword;
|
||||
// private static Item bedrockSword;
|
||||
|
||||
private static Class<?> bwores;
|
||||
private static Class<?> GTores;
|
||||
private static Class<?> AE2FItem;
|
||||
|
||||
static {
|
||||
isTConInstalled = Loader.isModLoaded("TConstruct");
|
||||
isAvaritiaInstalled = Loader.isModLoaded("Avaritia");
|
||||
// isRotaryCraftInstalled = Loader.isModLoaded("RotaryCraft");
|
||||
isGregTechInstalled = Loader.isModLoaded("gregtech");
|
||||
isBartworkdsInstalled = Loader.isModLoaded("bartworks");
|
||||
final String GT_ORE_CLASS = "gregtech.common.blocks.TileEntityOres";
|
||||
final String BW_ORE_CLASS = "bartworks.system.material.BWMetaGeneratedOres";
|
||||
if (isGregTechInstalled) try {
|
||||
GTores = Class.forName(GT_ORE_CLASS);
|
||||
isGregTechInstalled = Loader.isModLoaded("gregtech_nh");
|
||||
isAE2Installed = Loader.isModLoaded("appliedenergistics2");
|
||||
isGTNHLibLoaded = Loader.isModLoaded("gtnhlib");
|
||||
isHodgepodgeLoaded = Loader.isModLoaded("hodgepodge");
|
||||
|
||||
final String AE2_FITEM_CLASS = "appeng.entity.EntityFloatingItem";
|
||||
|
||||
if (isAE2Installed) try {
|
||||
AE2FItem = Class.forName(AE2_FITEM_CLASS);
|
||||
} catch (ClassNotFoundException e) {
|
||||
LogHelper.error("Couldn't reflect class " + GT_ORE_CLASS);
|
||||
}
|
||||
if (isBartworkdsInstalled) try {
|
||||
bwores = Class.forName(BW_ORE_CLASS);
|
||||
} catch (ClassNotFoundException e) {
|
||||
LogHelper.error("Couldn't reflect class " + BW_ORE_CLASS);
|
||||
LogHelper.error("Couldn't reflect class " + AE2_FITEM_CLASS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,15 +65,6 @@ public class ModHelper {
|
||||
&& player.getHeldItem().getItem().equals(avaritiaSword);
|
||||
}
|
||||
|
||||
// public static boolean isHoldingBedrockSword(EntityPlayer player) {
|
||||
// if (!isRotaryCraftInstalled) return false;
|
||||
// else if (bedrockSword == null) bedrockSword = GameRegistry.findItem("RotaryCraft",
|
||||
// "rotarycraft_item_bedsword");
|
||||
//
|
||||
// return bedrockSword != null && player.getHeldItem() != null &&
|
||||
// player.getHeldItem().getItem().equals(bedrockSword);
|
||||
// }
|
||||
|
||||
public static float applyModDamageAdjustments(ArmorSummery summery, LivingAttackEvent event) {
|
||||
if (summery == null) return event.ammount;
|
||||
EntityPlayer attacker = event.source.getEntity() instanceof EntityPlayer
|
||||
@@ -86,17 +78,7 @@ public class ModHelper {
|
||||
if (isHoldingAvaritiaSword(attacker)) {
|
||||
event.entityLiving.hurtResistantTime = 0;
|
||||
return 300F;
|
||||
}
|
||||
// else if (isHoldingBedrockSword(attacker)) {
|
||||
// summery.entropy += 10;
|
||||
//
|
||||
// if (summery.entropy > 100) {
|
||||
// summery.entropy = 100;
|
||||
// }
|
||||
//
|
||||
// return Math.max(event.ammount, Math.min(50F, summery.protectionPoints));
|
||||
// }
|
||||
else if (event.source.isUnblockable() || event.source.canHarmInCreative()) {
|
||||
} else if (event.source.isUnblockable() || event.source.canHarmInCreative()) {
|
||||
summery.entropy += 3;
|
||||
|
||||
if (summery.entropy > 100) {
|
||||
@@ -109,7 +91,27 @@ public class ModHelper {
|
||||
return event.ammount;
|
||||
}
|
||||
|
||||
public static boolean isGregTechTileEntityOre(TileEntity te) {
|
||||
return isGregTechInstalled && GTores.isInstance(te) || isBartworkdsInstalled && bwores.isInstance(te);
|
||||
public static boolean isGregTechEnchantmentItem(ItemStack stack) {
|
||||
if (stack == null) return false;
|
||||
if (stack.getItem() == null) return false;
|
||||
if (!isGregTechInstalled) return false;
|
||||
|
||||
return stack.getItem() instanceof MetaGeneratedTool;
|
||||
}
|
||||
|
||||
public static boolean isAE2EntityFloatingItem(EntityItem item) {
|
||||
return isAE2Installed && AE2FItem.isInstance(item);
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "gregtech_nh")
|
||||
public static String getHazmatArmorConfigKey(Hazard hazard) {
|
||||
return switch (hazard) {
|
||||
case ELECTRICAL -> "HazmatElectrical";
|
||||
case BIOLOGICAL -> "HazmatBiological";
|
||||
case FROST -> "HazmatFrost";
|
||||
case GAS -> "HazmatGas";
|
||||
case HEAT -> "HazmatHeat";
|
||||
case RADIOLOGICAL -> "HazmatRadiological";
|
||||
};
|
||||
}
|
||||
}
|
||||
+3
@@ -2,10 +2,12 @@ package com.brandon3055.draconicevolution.integration.computers.oc;
|
||||
|
||||
import com.brandon3055.draconicevolution.integration.computers.IDEPeripheral;
|
||||
|
||||
import li.cil.oc.api.Network;
|
||||
import li.cil.oc.api.driver.NamedBlock;
|
||||
import li.cil.oc.api.machine.Arguments;
|
||||
import li.cil.oc.api.machine.Context;
|
||||
import li.cil.oc.api.network.ManagedPeripheral;
|
||||
import li.cil.oc.api.network.Visibility;
|
||||
import li.cil.oc.api.prefab.ManagedEnvironment;
|
||||
|
||||
/**
|
||||
@@ -17,6 +19,7 @@ public class DEManagedPeripheral extends ManagedEnvironment implements ManagedPe
|
||||
|
||||
public DEManagedPeripheral(IDEPeripheral peripheral) {
|
||||
this.peripheral = peripheral;
|
||||
super.setNode(Network.newNode(this, Visibility.Network).withComponent(peripheral.getName()).create());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.brandon3055.draconicevolution.integration.nei;
|
||||
|
||||
import static com.brandon3055.draconicevolution.common.lib.References.MODID;
|
||||
import static com.brandon3055.draconicevolution.common.lib.References.MODNAME;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class IMCForNEI {
|
||||
|
||||
public static void IMCSender() {
|
||||
sendHandler(
|
||||
"com.brandon3055.draconicevolution.integration.nei.ReactorNEIHandler",
|
||||
"DraconicEvolution:reactorCore");
|
||||
sendCatalyst("draconicevolution.reactor", "DraconicEvolution:reactorCore");
|
||||
}
|
||||
|
||||
private static void sendHandler(String name, String itemStack) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setString("handler", name);
|
||||
nbt.setString("modName", MODNAME);
|
||||
nbt.setString("modId", MODID);
|
||||
nbt.setBoolean("modRequired", true);
|
||||
nbt.setString("itemName", itemStack);
|
||||
nbt.setInteger("handlerHeight", 105);
|
||||
nbt.setInteger("maxRecipesPerPage", 1);
|
||||
FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", nbt);
|
||||
}
|
||||
|
||||
private static void sendCatalyst(String name, String itemStack, int priority) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setString("handlerID", name);
|
||||
nbt.setString("itemName", itemStack);
|
||||
nbt.setInteger("priority", priority);
|
||||
FMLInterModComms.sendMessage("NotEnoughItems", "registerCatalystInfo", nbt);
|
||||
}
|
||||
|
||||
private static void sendCatalyst(String name, String itemStack) {
|
||||
sendCatalyst(name, itemStack, 0);
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -21,6 +21,8 @@ public class NEIDraconicevolutionConfig implements IConfigureNEI {
|
||||
|
||||
API.registerGuiOverlay(GUIDraconiumChest.class, "crafting", new CraftingChestStackPositioner());
|
||||
API.registerGuiOverlayHandler(GUIDraconiumChest.class, new CraftingChestOverlayHandler(), "crafting");
|
||||
API.registerRecipeHandler(new ReactorNEIHandler());
|
||||
API.registerUsageHandler(new ReactorNEIHandler());
|
||||
API.hideItem(new ItemStack(ModBlocks.placedItem));
|
||||
API.hideItem(new ItemStack(ModBlocks.invisibleMultiblock));
|
||||
API.hideItem(new ItemStack(ModBlocks.safetyFlame));
|
||||
@@ -33,8 +35,8 @@ public class NEIDraconicevolutionConfig implements IConfigureNEI {
|
||||
API.hideItem(new ItemStack(ModBlocks.chaosShardAtmos));
|
||||
API.hideItem(new ItemStack(ModBlocks.chaosCrystal));
|
||||
API.registerNEIGuiHandler(new DENEIGuiHandler());
|
||||
|
||||
LogHelper.info("Added NEI integration");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
package com.brandon3055.draconicevolution.integration.nei;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||
import com.brandon3055.draconicevolution.common.ModItems;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore;
|
||||
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
|
||||
public class ReactorNEIHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return new ResourceLocation("draconicevolution", "textures/gui/nei/reactor.png").toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return StatCollector.translateToLocal("nei.recipe.reactor.category");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier() {
|
||||
return "draconicevolution.reactor";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals("draconicevolution.reactor") && getClass() == ReactorNEIHandler.class) {
|
||||
final CachedReactorRecipe cachedRecipe = new CachedReactorRecipe();
|
||||
this.arecipes.add(cachedRecipe);
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(final ItemStack result) {
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(new ItemStack(ModItems.chaosShard), result)) {
|
||||
final CachedReactorRecipe cachedRecipe = new CachedReactorRecipe();
|
||||
this.arecipes.add(cachedRecipe);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(final ItemStack ingredient) {
|
||||
final CachedReactorRecipe cachedRecipe = new CachedReactorRecipe();
|
||||
if ((cachedRecipe.contains(cachedRecipe.ingredients, ingredient.getItem()))) {
|
||||
if (cachedRecipe.contains(cachedRecipe.ingredients, ingredient)) {
|
||||
cachedRecipe.setIngredientPermutation(cachedRecipe.ingredients, ingredient);
|
||||
this.arecipes.add(cachedRecipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(int recipe) {
|
||||
this.drawProgressBar(16, 18, 176, 10, 24, 28, 1200, 1);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GL11.glTranslated(85, 32, 100);
|
||||
int scale = 260;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileReactorCore(), -0.5D, -0.5D, -0.5D, 0.0F);
|
||||
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(16, 18, 24, 28), "draconicevolution.reactor"));
|
||||
}
|
||||
|
||||
private class CachedReactorRecipe extends CachedRecipe {
|
||||
|
||||
private final List<PositionedStack> ingredients;
|
||||
private final PositionedStack result;
|
||||
|
||||
public CachedReactorRecipe() {
|
||||
this.result = new PositionedStack(new ItemStack(ModItems.chaosShard), 17, 47);
|
||||
this.ingredients = new ArrayList<>();
|
||||
ItemStack[] inputList = { new ItemStack(ModBlocks.draconicBlock), new ItemStack(ModItems.draconicIngot),
|
||||
new ItemStack(ModItems.nugget, 1, 1) };
|
||||
this.ingredients.add(new PositionedStack(inputList, 17, 4));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getResult() {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
return getCycledIngredients(ReactorNEIHandler.this.cycleticks / 20, this.ingredients);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,8 @@ tile.draconicevolution:grinder.name=Fleischwolf
|
||||
tile.draconicevolution:potentiometer.name=Potentiometer
|
||||
tile.draconicevolution:rainSensor.name=Regensensor
|
||||
tile.draconicevolution:particleGenerator.name=Teilchengenerator
|
||||
tile.draconicevolution:playerDetector.name=Spieler Detektor
|
||||
tile.draconicevolution:playerDetectorAdvanced.name=Verbesserter Spieler Detektor
|
||||
tile.draconicevolution:playerDetector.name=Spielerdetektor
|
||||
tile.draconicevolution:playerDetectorAdvanced.name=Verbesserter Spielerdetektor
|
||||
tile.draconicevolution:energyInfuser.name=Energetischer Infundierer
|
||||
tile.draconicevolution:customSpawner.name=Stabilisierter Kreaturenspawner
|
||||
tile.draconicevolution:longRangeDislocator1.name=Administrativer Versetzer
|
||||
@@ -20,27 +20,27 @@ tile.draconicevolution:energyPylon.name=Hochspannungsmast
|
||||
tile.draconicevolution:draconium0.name=Drakonischer Block
|
||||
tile.draconicevolution:draconium1.name=Stein der Auferstehung
|
||||
tile.draconicevolution:draconium2.name=Geladener Drakonischer Block
|
||||
tile.draconicevolution:cKeyStone.name=Kreativmodus Schlüsselstein
|
||||
tile.draconicevolution:cKeyStone.name=Kreativmodus-Schlüsselstein
|
||||
tile.draconicevolution:dissEnchanter.name=Entzauberer
|
||||
tile.draconicevolution:teleporterStand.name=Versetzersockel
|
||||
tile.draconicevolution:draconiumChest.name=Drakonische Kiste
|
||||
tile.draconicevolution:draconicBlock.name=Erwachter Drakonischer Block
|
||||
tile.draconicevolution:infusedObsidian.name=Drakonium Durchzogenes Obsidian
|
||||
tile.draconicevolution:dislocatorReceptacle.name=Versetzer Empfänger
|
||||
tile.draconicevolution:infusedObsidian.name=Drakoniumdurchzogenes Obsidian
|
||||
tile.draconicevolution:dislocatorReceptacle.name=Versetzer-Empfänger
|
||||
tile.draconicevolution:portal.name=Portal
|
||||
tile.draconicevolution:flowGateFlux.name=Fluxdurchlass
|
||||
tile.draconicevolution:flowGateFluid.name=Durchlass
|
||||
tile.draconicevolution:flowGateFlux.name=Fluxventil
|
||||
tile.draconicevolution:flowGateFluid.name=Ventil
|
||||
tile.draconicevolution:reactorCore.name=Drakonischer Reaktorkern
|
||||
tile.draconicevolution:reactorStabilizer.name=Reaktorstabilisierer
|
||||
tile.draconicevolution:reactorEnergyInjector.name=Reaktorenergie Injektor
|
||||
tile.draconicevolution:chaosCrystal.name=Chaos Kristall
|
||||
tile.draconicevolution:reactorStabilizer.name=Reaktorstabilisator
|
||||
tile.draconicevolution:reactorEnergyInjector.name=Reaktor-Energieinjektor
|
||||
tile.draconicevolution:chaosCrystal.name=Chaoskristall
|
||||
|
||||
tile.draconicevolution:energyCrystal0.name=Energie Relais
|
||||
tile.draconicevolution:energyCrystal1.name=Verbessertes Energie Relais
|
||||
tile.draconicevolution:energyCrystal0.name=Energierelais
|
||||
tile.draconicevolution:energyCrystal1.name=Verbessertes Energierelais
|
||||
tile.draconicevolution:energyCrystal2.name=Energie-Sender-Empfänger
|
||||
tile.draconicevolution:energyCrystal3.name=Verbesserter Energie-Sender-Empfänger
|
||||
tile.draconicevolution:energyCrystal4.name=Kabelloser Energie-Sender-Empfänger
|
||||
tile.draconicevolution:energyCrystal5.name=Verbessertes Kabelloser Endergie-Sender-Empfänger
|
||||
tile.draconicevolution:energyCrystal5.name=Verbesserter Kabelloser Endergie-Sender-Empfänger
|
||||
|
||||
|
||||
//Item Information ----------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -90,19 +90,19 @@ item.draconicevolution:draconiumFluxCapacitor1.name=Drakonischer Fluxkompensator
|
||||
item.draconicevolution:draconicIngot.name=Erwachter Drakonischer Barren
|
||||
item.draconicevolution:creativeStructureSpawnerComet.name=Erschaffe Kometen
|
||||
item.draconicevolution:creativeStructureSpawnerEnderIsland.name=Erschaffe Enderinsel
|
||||
item.draconicevolution:infoTablet.name=Draconic Evolution Informationstafel
|
||||
item.draconicevolution:wrench.name=Kristall Verbinder
|
||||
item.draconicevolution:infoTablet.name=Draconic Evolution-Informationstafel
|
||||
item.draconicevolution:wrench.name=Kristallschlüssel
|
||||
item.draconicevolution:dezilsMarshmallow.name=Dezil's Marshmallow
|
||||
item.draconicevolution:reactorCraftingPart.frame.name=Reaktor Stabilisatorrahmen
|
||||
item.draconicevolution:reactorCraftingPart.rotorInner.name=Reaktor Innerer Stabilisatorenrotor
|
||||
item.draconicevolution:reactorCraftingPart.rotorOuter.name=Reaktor Äußerer Stabilisatorenrotor
|
||||
item.draconicevolution:reactorCraftingPart.rotorAssembly.name=Reaktor Stabilisatorenrotoraufbau
|
||||
item.draconicevolution:reactorCraftingPart.stabilizerRing.name=Reaktor Stabilisatorenfokusring
|
||||
item.draconicevolution:reactorCraftingPart.frame.name=Reaktor-Stabilisatorrahmen
|
||||
item.draconicevolution:reactorCraftingPart.rotorInner.name=Innerer Reaktor-Stabilisatorenrotor
|
||||
item.draconicevolution:reactorCraftingPart.rotorOuter.name=Äußerer Reaktor-Stabilisatorenrotor
|
||||
item.draconicevolution:reactorCraftingPart.rotorAssembly.name=Reaktorstabilisatoren-Rotoraufbau
|
||||
item.draconicevolution:reactorCraftingPart.stabilizerRing.name=Reaktorstabilisatoren-Fokusring
|
||||
item.draconicevolution:chaoticCore.name=Chaotischer Kern
|
||||
item.draconicevolution:chaosShard.name=Chaosscherbe
|
||||
item.draconicevolution:chaosFragment0.name=Winziges Chaos Fragment
|
||||
item.draconicevolution:chaosFragment1.name=Kleines Chaos Fragment
|
||||
item.draconicevolution:chaosFragment2.name=Großes Chaos Fragment
|
||||
item.draconicevolution:chaosFragment0.name=Winziges Chaosfragment
|
||||
item.draconicevolution:chaosFragment1.name=Kleines Chaosfragment
|
||||
item.draconicevolution:chaosFragment2.name=Großes Chaosfragment
|
||||
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ msg.bowmodesharpshooter.txt=§3Schussmodus: §6Scharfschütze
|
||||
msg.bowmodeexplosive.txt=§3Schussmoduse: §6Explosiv
|
||||
msg.bowmodedevistation.txt=§3Schussmodus: §6Verwüstung!!! (Nur Kreativ)
|
||||
msg.bowoutofgunpowder.txt=§4Du benötigst 4 Schwarzpulver um den Explosiven Modus zu verwenden
|
||||
msg.teleporterUnSet.txt=§cDu musst zuerst den Bestimmungsort festlegen bevor du teleportiert werden kannst (Shift + Rechtsklick)
|
||||
msg.teleporterUnSet.txt=§cDu musst zuerst den Zielort festlegen bevor du teleportiert werden kannst (Shift + Rechtsklick)
|
||||
msg.teleporterBound.txt=§aTeleporter verbunden mit:
|
||||
msg.teleporterLowHealth.txt= §cDu bist gesundheitlich zu stark angeschlagen!
|
||||
msg.teleporterSentMob.txt=Das Objekt wurde gesendet nach
|
||||
@@ -142,7 +142,7 @@ msg.spawnerInfo6.txt=Benötigt Spieler: §3Netherstern
|
||||
msg.spawnerInfo7.txt=Ignoriere Spawnbedingungen: §3Notchapfel
|
||||
msg.spawnerInfo8.txt=Level 2: §3Wyvernkern
|
||||
msg.spawnerInfo9.txt=Level 3: §3Erwachter Kern
|
||||
msg.dislocatorUnsafe.txt=Unsicherer Bestimmungsort! Bitte versuche es noch einmal
|
||||
msg.dislocatorUnsafe.txt=Unsicherer Zielort! Bitte versuche es noch einmal
|
||||
msg.dislocatorNoGround.txt=Fehler! Welt nicht gefunden
|
||||
msg.range.txt=Weite:
|
||||
msg.energyStorageCoreUTA.txt=Aktivieren nicht möglich (Ungültige Einstellung)
|
||||
@@ -206,7 +206,7 @@ info.draconicAxe2.txt=Wird einen kompletten Baum fällen
|
||||
info.draconicAxe3.txt=oder ein 5x5x5 Stück aus allen Holzarten.
|
||||
info.draconicAxe4.txt=Halte Shift um einen einzigen Block abzubauen.
|
||||
|
||||
info.draconicCore.txt=Der Hauptbestandteil für Fertigungen in Draconic Evolution
|
||||
info.draconicCore.txt=Das wichtigste Bauteil in Draconic Evolution
|
||||
info.draconicCore1.txt=Kann verwendet werden um Monsterspawner zu stabilisieren
|
||||
|
||||
info.mobSoul1.txt=Kann auf einen Stabilisierten Spawner angewendet werden um den Typ festzulegen
|
||||
@@ -224,7 +224,7 @@ info.de.changeMiningMode.txt=Shift-Rechtsklick um Abbaumodus zu ändern
|
||||
info.de.toggleOblit.txt=Rechtsklick um ändern des Vernichtungsmodus
|
||||
info.de.oblitInfo.txt=Vernichtungsmodus zerstört wertlose Blöcke
|
||||
info.de.attackDamage.txt=Angriffsschaden
|
||||
info.de.bonusHealthDamage.txt=Mob Gesundheit
|
||||
info.de.bonusHealthDamage.txt=Mob-Gesundheit
|
||||
info.de.press.txt=Drücke
|
||||
info.de.toOpenConfigGUI.txt=Um die GUI zu öffnen
|
||||
info.de.shiftToPause.txt=Shift drücken, um den Wechsel anzuhalten
|
||||
@@ -277,14 +277,14 @@ info.de.connections.txt=Verbindungen
|
||||
info.de.wirelessConnections.txt=Funkverbindungen
|
||||
|
||||
|
||||
info.infusedObsidian.txt=Dieser Block ist Wither-Ressistent
|
||||
info.infusedObsidian.txt=Dieser Block ist Witherresistent
|
||||
|
||||
enchantment.draconicevolution.reaperEnchant=Mörder
|
||||
|
||||
//Achievements ----------------------------------------------------------------------------------------------------------------------------------------
|
||||
draconicevolution.achievementPage.name=Draconic Evolution
|
||||
|
||||
achievement.draconicevolution.dust=Der Anfang von etwas GROßEM!
|
||||
achievement.draconicevolution.dust=Der Anfang von etwas GROẞEM!
|
||||
achievement.draconicevolution.dust.desc=Sammle Drakonischen Staub
|
||||
achievement.draconicevolution.ingot=Besser als Diamant!
|
||||
achievement.draconicevolution.ingot.desc=Veredle 4 Drakonische Stäube zu 2 Drakonischen Barren
|
||||
@@ -332,7 +332,7 @@ achievement.draconicevolution.heart=Herz des Drachens!
|
||||
achievement.draconicevolution.heart.desc=Töte einen Drachen und nimm sein Herz in Anspruch.
|
||||
achievement.draconicevolution.awakenedblock=Alles hängt vom Ritual ab!
|
||||
achievement.draconicevolution.awakenedblock.desc=Erschaffe Erwachtes Drakonium
|
||||
achievement.draconicevolution.core3=Kostenaufwand oder Stärke
|
||||
achievement.draconicevolution.core3=Macht hat seinen Preis
|
||||
achievement.draconicevolution.core3.desc=Verbesser Wyvernkern zu einem Erwachten
|
||||
|
||||
achievement.draconicevolution.dhelm=Durch Wasser gleiten!
|
||||
@@ -350,7 +350,7 @@ achievement.draconicevolution.dshovel=Berge versetzen
|
||||
achievement.draconicevolution.dshovel.desc=Verbessere deine Wyvernschaufel
|
||||
achievement.draconicevolution.daxe=Ein Riesenschlag für nur einen Baum!
|
||||
achievement.draconicevolution.daxe.desc=Stelle eine Drakonische Axt her
|
||||
achievement.draconicevolution.dsword=Steche wie eine Biene!
|
||||
achievement.draconicevolution.dsword=Stich wie eine Biene!
|
||||
achievement.draconicevolution.dsword.desc=Verbessere das Drakonische Schwert
|
||||
achievement.draconicevolution.dbow=Jetzt wird mit Stärke gespielt!
|
||||
achievement.draconicevolution.dbow.desc=Baue den Drakonischen Bogen.
|
||||
@@ -395,7 +395,7 @@ item.draconicevolution:draconicBow.lore=2Die Perfektion im Fernkampf!\nSchneller
|
||||
|
||||
item.draconicevolution:draconicHelm.lore=2Keine Sekunde länger musst du die Nacht fürchten,\njetzt kannst du jederzeit sehen,\nwas dort draußen los ist.
|
||||
item.draconicevolution:draconicChest.lore=2Durch das Verwenden eines Drachenherzens\nwirst du stärker und besitzt die Gabe des Fliegens.
|
||||
item.draconicevolution:draconicLeggs.lore=2Die Seele eines Drachen beschützt dich und hilft dir,\ndich noch schnell fortzubewegen.
|
||||
item.draconicevolution:draconicLeggs.lore=2Die Seele eines Drachen beschützt dich und hilft dir,\ndich noch schneller fortzubewegen.
|
||||
item.draconicevolution:draconicBoots.lore=2Stärker, schneller, höher: besser als jemals zuvor!\ndas Drachenherz ermöglich Dir\nviel höher zu springen
|
||||
|
||||
item.draconicevolution:draconicDistructionStaff.lore=2Ein langer und beschwerlicher Weg, aber nun: Wahre Macht!\nEin Werkzeug sie zu knechten, sie alle zu finden, ins Dunkel zu treiben und ewig zu binden!
|
||||
@@ -440,12 +440,12 @@ button.de.DOWN.txt=RUNTER
|
||||
button.de.ArmorNVActive.name=Nachtsicht
|
||||
button.de.ArmorNVLock.name=Sperre Nachtsicht
|
||||
button.de.ArmorFlightLock.name=Sperre Fliegen
|
||||
button.de.ArmorSpeedMult.name=Geschwindigkeit Multiplikator
|
||||
button.de.ArmorJumpMult.name=Sprung Multiplikator
|
||||
button.de.ArmorSpeedMult.name=Geschwindigkeitsmultiplikator
|
||||
button.de.ArmorJumpMult.name=Sprungmultiplikator
|
||||
button.de.ArmorHillStep.name=Berglauf
|
||||
button.de.ArmorSprintOnly.name=Beschleunigung beim Sprinten
|
||||
button.de.ToolDigMultiplier.name=Abbau Multiplikator
|
||||
button.de.ToolDigAOE.name=Größe
|
||||
button.de.ToolDigMultiplier.name=Abbaumultiplikator
|
||||
button.de.ToolDigAOE.name=Abbaubereich
|
||||
button.de.ToolDigDepth.name=Abbautiefe
|
||||
button.de.WeaponAttackAOE.name=Angriff A.O.E
|
||||
button.de.ToolVoidJunk.name=Hohlraum
|
||||
@@ -453,7 +453,13 @@ button.de.AxeTreeMode.name=Baummodus
|
||||
button.de.BaseSafeAOE.name=AOE Sicherer Modus
|
||||
button.de.VerticalAcceleration.name=Vertikalbeschleunigung
|
||||
button.de.EffectiveOnSprint.name=Wirksam beim Sprinten
|
||||
button.de.GogglesOfRevealing.name=Magische Sense
|
||||
button.de.GogglesOfRevealing.name=Magiesinn
|
||||
button.de.HazmatElectrical.name=Elektroschutz
|
||||
button.de.HazmatBiological.name=Biogefahren-Schutz
|
||||
button.de.HazmatFrost.name=Frostschutz
|
||||
button.de.HazmatGas.name=Gasschutz
|
||||
button.de.HazmatHeat.name=Hitzeschutz
|
||||
button.de.HazmatRadiological.name=Strahlenschutz
|
||||
button.de.reactorCharge.txt=Reaktorladung
|
||||
button.de.reactorStart.txt=Aktivieren
|
||||
button.de.reactorStop.txt=Herunterfahren gestartet
|
||||
@@ -476,16 +482,10 @@ gui.de.insert.txt=Einfügen
|
||||
gui.de.extract.txt=Herausgeben
|
||||
gui.de.fuel.txt=Treibstoff
|
||||
gui.de.coreMass.txt=Kernmasse
|
||||
gui.de.reactionTemp.txt=Kernthemperatur
|
||||
gui.de.fieldStrength.txt=Stärke des Eindämmungsfeldes
|
||||
gui.de.energySaturation.txt=Energie Sättigung
|
||||
gui.de.fuelConversion.txt=Kraftstoffumwandlungsgrad
|
||||
gui.de.fuel.txt=Treibstoff
|
||||
gui.de.coreMass.txt=Kernmasse
|
||||
gui.de.reactionTemp.txt=Kerntemperatur
|
||||
gui.de.fieldStrength.txt=Eindämmungsfeldstärke
|
||||
gui.de.energySaturation.txt=Energiesaturierung
|
||||
gui.de.fuelConversion.txt=Treibstoffumwandlungsstand
|
||||
gui.de.fieldStrength.txt=Stärke des Eindämmungsfeldes
|
||||
gui.de.energySaturation.txt=Energiesättigung
|
||||
gui.de.fuelConversion.txt=Kraftstoffumwandlungsgrad
|
||||
gui.de.status.txt=Status
|
||||
gui.de.status0.txt=OFFLINE
|
||||
gui.de.status1.txt=LADEN
|
||||
|
||||
@@ -12,12 +12,14 @@ tile.draconicevolution:playerDetectorAdvanced.name=Advanced Player Detector
|
||||
tile.draconicevolution:energyInfuser.name=Energy Infuser
|
||||
tile.draconicevolution:earth.name=Earth
|
||||
tile.draconicevolution:customSpawner.name=Stabilized Mob Spawner
|
||||
tile.draconicevolution:longRangeDislocator.name=Long Range Dislocator
|
||||
tile.draconicevolution:longRangeDislocator1.name=Admin Dislocator
|
||||
tile.draconicevolution:longRangeDislocator0.name=Long Range Dislocator
|
||||
tile.draconicevolution:generator.name=Generator
|
||||
tile.draconicevolution:energyStorageCore.name=Energy Core
|
||||
tile.draconicevolution:invisibleMultiblock.name=Energy Core
|
||||
tile.draconicevolution:energyPylon.name=Energy Pylon
|
||||
tile.draconicevolution:draconium.name=Draconium Block
|
||||
tile.draconicevolution:draconium0.name=Draconium Block
|
||||
tile.draconicevolution:draconium1.name=Resurrection Stone
|
||||
tile.draconicevolution:draconium2.name=Charged Draconium Block
|
||||
@@ -29,6 +31,7 @@ tile.draconicevolution:draconicBlock.name=Awakened Draconium Block
|
||||
tile.draconicevolution:infusedObsidian.name=Draconium Infused Obsidian
|
||||
tile.draconicevolution:dislocatorReceptacle.name=Dislocator Receptacle
|
||||
tile.draconicevolution:portal.name=Portal
|
||||
tile.draconicevolution:flowGate.name=Gate
|
||||
tile.draconicevolution:flowGateFlux.name=Flux Gate
|
||||
tile.draconicevolution:flowGateFluid.name=Fluid Gate
|
||||
tile.draconicevolution:reactorCore.name=Draconic Reactor Core
|
||||
@@ -36,13 +39,18 @@ tile.draconicevolution:reactorStabilizer.name=Reactor Stabilizer
|
||||
tile.draconicevolution:reactorEnergyInjector.name=Reactor Energy Injector
|
||||
tile.draconicevolution:chaosCrystal.name=Chaos Crystal
|
||||
tile.draconicevolution:upgradeModifier.name=Upgrade Modifier
|
||||
tile.draconicevolution:chaosShardAtmos.name=Chaos Shard
|
||||
tile.draconicevolution:placedItem.name=Placed Item
|
||||
tile.draconicevolution:safetyFlame.name=Safety Flame
|
||||
|
||||
tile.draconicevolution:energyCrystal.name=Energy Relay/Transceiver
|
||||
tile.draconicevolution:energyCrystal0.name=Energy Relay
|
||||
tile.draconicevolution:energyCrystal1.name=Advanced Energy Relay
|
||||
tile.draconicevolution:energyCrystal2.name=Energy Transceiver
|
||||
tile.draconicevolution:energyCrystal3.name=Advanced Energy Transceiver
|
||||
tile.draconicevolution:energyCrystal4.name=Wireless Energy Transceiver
|
||||
tile.draconicevolution:energyCrystal5.name=Advanced Wireless Transceiver
|
||||
tile.draconicevolution:dislocatorInhibitor.name=Dislocator Inhibitor
|
||||
|
||||
|
||||
//Item Information ----------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -85,16 +93,20 @@ item.draconicevolution:enderArrow.name=Ender Arrow
|
||||
item.draconicevolution:safetyMatch.name=Safety Match
|
||||
item.draconicevolution:safetyMatchBox.name=Box of Safety Matches
|
||||
item.draconicevolution:key.name=Key
|
||||
item.draconicevolution:draconiumEnergyCore.name=Energy Core
|
||||
item.draconicevolution:draconiumEnergyCore0.name=Wyvern Energy Core
|
||||
item.draconicevolution:draconiumEnergyCore1.name=Draconic Energy Core
|
||||
item.draconicevolution:draconiumFluxCapacitor.name=Flux Capacitor
|
||||
item.draconicevolution:draconiumFluxCapacitor0.name=Wyvern Flux Capacitor
|
||||
item.draconicevolution:draconiumFluxCapacitor1.name=Draconic Flux Capacitor
|
||||
item.draconicevolution:draconicIngot.name=Awakened Draconium Ingot
|
||||
item.draconicevolution:creativeStructureSpawner.name=Structure Spawner
|
||||
item.draconicevolution:creativeStructureSpawnerComet.name=Spawn Comet
|
||||
item.draconicevolution:creativeStructureSpawnerEnderIsland.name=Spawn Ender Island
|
||||
item.draconicevolution:infoTablet.name=Draconic Evolution Information Tablet
|
||||
item.draconicevolution:wrench.name=Crystal Binder
|
||||
item.draconicevolution:dezilsMarshmallow.name=Dezil's Marshmallow
|
||||
item.draconicevolution:reactorCraftingPart.name=Reactor Stabilizer
|
||||
item.draconicevolution:reactorCraftingPart.frame.name=Reactor Stabilizer Frame
|
||||
item.draconicevolution:reactorCraftingPart.rotorInner.name=Reactor Stabilizer Inner Rotor
|
||||
item.draconicevolution:reactorCraftingPart.rotorOuter.name=Reactor Stabilizer Outer Rotor
|
||||
@@ -102,13 +114,17 @@ item.draconicevolution:reactorCraftingPart.rotorAssembly.name=Reactor Stabilizer
|
||||
item.draconicevolution:reactorCraftingPart.stabilizerRing.name=Reactor Stabilizer Focus Ring
|
||||
item.draconicevolution:chaoticCore.name=Chaotic Core
|
||||
item.draconicevolution:chaosShard.name=Chaos Shard
|
||||
item.draconicevolution:chaosFragment.name=Chaos Fragment
|
||||
item.draconicevolution:chaosFragment0.name=Tiny Chaos Fragment
|
||||
item.draconicevolution:chaosFragment1.name=Small Chaos Fragment
|
||||
item.draconicevolution:chaosFragment2.name=Large Chaos Fragment
|
||||
item.draconicevolution:nugget.name=Draconium Nugget
|
||||
item.draconicevolution:nugget.draconium.name=Draconium Nugget
|
||||
item.draconicevolution:nugget.awakened.name=Awakened Draconium Nugget
|
||||
item.draconicevolution:magnet.name=Item Dislocator
|
||||
item.draconicevolution:magnet.wyvern.name=Item Dislocator
|
||||
item.draconicevolution:magnet.draconic.name=Awakened Item Dislocator
|
||||
item.draconicevolution:adminSpawnEgg.name=Spawn Egg
|
||||
|
||||
//Item Groups ----------------------------------------------------------------------------------------------------------------------------------------
|
||||
itemGroup.toolsAndWeapons=Draconic Evolution Tools & Weapons
|
||||
@@ -276,11 +292,20 @@ info.de.manual.contributorsButton.txt=Contributors
|
||||
info.de.manual.contributorsButtonInfo.txt=A list of people who have contributed to Draconic Evolution
|
||||
info.de.shiftRightClickToActivate.txt=Shift-Right click to activate.
|
||||
info.de.blockRange.txt=Block Range.
|
||||
info.de.status.txt=Status
|
||||
info.de.statusActive.txt=Active
|
||||
info.de.statusInactive.txt=Inactive
|
||||
info.de.selfPickup.txt=Pick Up Own Drops
|
||||
info.de.selfPickupAlways.txt=Always
|
||||
info.de.selfPickupDelay.txt=Delayed
|
||||
info.de.selfPickupNever.txt=Never
|
||||
|
||||
info.de.manual.nav1.txt=Navigation Tips
|
||||
info.de.manual.nav2.txt=Press Backspace to go to the previous page.
|
||||
info.de.manual.nav3.txt=Hold shift to scroll faster.
|
||||
|
||||
info.de.dislocatorInhibitor.txt=Magnet blocker
|
||||
|
||||
//Energy Net
|
||||
info.de.modeIn.txt=Mode: Input
|
||||
info.de.modeOut.txt=Mode: Output
|
||||
@@ -293,6 +318,8 @@ info.infusedObsidian.txt=This block is wither resistant
|
||||
|
||||
enchantment.draconicevolution.reaperEnchant=Reaper
|
||||
|
||||
nei.recipe.reactor.category=Reactor
|
||||
|
||||
//Achievements ----------------------------------------------------------------------------------------------------------------------------------------
|
||||
draconicevolution.achievementPage.name=Draconic Evolution
|
||||
|
||||
@@ -427,6 +454,7 @@ key.toolConfig=Tool & Armor Config GUI
|
||||
key.toolProfileChange=Change Tool Config Profile
|
||||
key.toggleFlight=Toggle Creative Flight
|
||||
key.toggleMagnet=Toggle Magnet
|
||||
key.toggleMagnetSelfPickup=Toggle Magnet Self Pick Up
|
||||
|
||||
//Damage ----------------------------------------------------------------------------------------------------------------------------------------
|
||||
death.attack.chaos=%1$s was torn apart by a Chaos Guardian
|
||||
@@ -486,6 +514,12 @@ button.de.EffectiveOnSprint.name=Effective while sprinting
|
||||
button.de.GogglesOfRevealing.name=Magical Sense
|
||||
button.de.ApiaristArmor.name=Apiarist's Protection
|
||||
button.de.NaturalistArmor.name=Naturalist's Vision
|
||||
button.de.HazmatElectrical.name=Electrical Hazard Protection
|
||||
button.de.HazmatBiological.name=Biological Hazard Protection
|
||||
button.de.HazmatFrost.name=Frost Hazard Protection
|
||||
button.de.HazmatGas.name=Gas Hazard Protection
|
||||
button.de.HazmatHeat.name=Heat Hazard Protection
|
||||
button.de.HazmatRadiological.name=Radiological Hazard Protection
|
||||
button.de.BowArrowSpeedModifier.name=Arrow Velocity Modifier
|
||||
button.de.BowAutoFire.name=Auto Fire
|
||||
button.de.BowArrowDamage.name=Base Damage
|
||||
@@ -493,6 +527,8 @@ button.de.BowExplosionPower.name=Explosive Power
|
||||
button.de.BowShockWavePower.name=Shock Wave Power
|
||||
button.de.BowEnergyBolt.name=Arrow of Draconic Fire
|
||||
button.de.BowZoomModifier.name=Magnification
|
||||
button.de.Enabled.name=Enabled
|
||||
button.de.MagnetSneak.name=Disabled while sneaking
|
||||
|
||||
button.de.reactorCharge.txt=Charge Reactor
|
||||
button.de.reactorStart.txt=Activate
|
||||
@@ -635,6 +671,16 @@ gui.de.ShieldRecovery.txt=Shield Recovery
|
||||
gui.de.MoveSpeed.txt=Move Speed
|
||||
gui.de.JumpBoost.txt=Jump Boost
|
||||
|
||||
gui.de.dislocatorInhibitor.range.txt=Range:
|
||||
gui.de.dislocatorInhibitor.tooltip.range.increase.txt=Increase Range
|
||||
gui.de.dislocatorInhibitor.tooltip.range.decrease.txt=Decrease Range
|
||||
gui.de.dislocatorInhibitor.tooltip.activity.always.txt=Always Active
|
||||
gui.de.dislocatorInhibitor.tooltip.activity.with.txt=Active with redstone power
|
||||
gui.de.dislocatorInhibitor.tooltip.activity.without.txt=Active without redstone power
|
||||
gui.de.dislocatorInhibitor.tooltip.activity.never.txt=Always inactive
|
||||
gui.de.dislocatorInhibitor.tooltip.activity.cycle.txt=Click to cycle through activity control
|
||||
gui.de.dislocatorInhibitor.tooltip.whitelist.txt=Items in filter will not be picked up by magnets
|
||||
gui.de.dislocatorInhibitor.tooltip.blacklist.txt=Only items in filter will be picked up by magnets
|
||||
|
||||
//Potions ----------------------------------------------------------------------------------------------------------------------------------------
|
||||
potion.de.effect.txt=Effect
|
||||
@@ -642,4 +688,4 @@ potion.de.flight.txt=Flight
|
||||
potion.de.highStep.txt=High Step
|
||||
potion.de.swiftness.txt=Swiftness
|
||||
potion.de.fireImmune.txt=Fire Immunity
|
||||
potion.de.jumpBoost.txt=Jump Boost
|
||||
potion.de.jumpBoost.txt=Jump Boost
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 877 B |
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.5 KiB |
Reference in new issue
Block a user