Compare commits

..
13 Commits
Author SHA1 Message Date
koolkrafter5 e1d8a847a9 Fix rounding in negative axes (#58) 2025-07-14 18:23:49 +02:00
Maya 38fb7fc71f update 2025-07-02 17:01:56 -06:00
mamePiandMartin Robertz 6479b0b635 Added functions into kami boots (#57)
Co-authored-by: Martin Robertz <[email protected]>
2025-07-02 17:01:21 -06:00
Martin Robertz 5b388b5cba update 2025-06-08 10:43:59 +02:00
Nikolay S. 3cc1026704 Fix lang file problem with lang key (#56) 2025-06-08 07:33:16 +00:00
Martin Robertz 2a548be7d8 update 2025-05-04 12:56:02 +02:00
ABKQPO dce00bbc74 Fixed Wand Focus: Dislocation issue (#55) 2025-05-02 21:38:53 +02:00
Martin Robertz 63bf13c964 update 2025-04-28 20:44:21 +02:00
Glease 2151886e83 delete gaia missile instead of repath it (#54) 2025-04-27 00:45:02 +02:00
Maya aeb6392d52 update 2025-04-23 14:51:43 -05:00
__felix__and__felix__ c221b7b03b Change optional decorators modid gregtech to gregtech_nh for compat (#53)
Co-authored-by: __felix__ <134875831+48a3efa65c881ef567345b17f3910e06@users.noreply.github.com>
2025-04-23 14:51:32 -05:00
Maya bf664d00c8 update 2025-04-19 09:59:48 -05:00
RubilaxXxx 7f7c4083cc fix ichor pouch (#52) 2025-04-19 09:58:39 -05:00
10 changed files with 137 additions and 44 deletions

No files matched your search

+21 -14
View File
@@ -1,22 +1,29 @@
// Add your dependencies here
dependencies {
api('com.github.GTNewHorizons:Baubles-Expanded:2.1.6-GTNH:dev')
api('com.github.GTNewHorizons:Baubles-Expanded:2.1.9-GTNH:dev')
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-576-GTNH:api')
compileOnly('com.github.GTNewHorizons:Botania:1.12.6-GTNH:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:EnderCore:0.4.6:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:EnderIO:2.9.6:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:EnderStorage:1.7.2:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:waila:1.8.4:api') {transitive=false}
compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.13.16-GTNH:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.6.2:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:CodeChickenCore:1.4.1:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.12-GTNH:api') {transitive=false}
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.227:dev") {transitive=false}
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-652-GTNH:api')
api('com.github.GTNewHorizons:ThaumicBoots:1.4.7:dev') {
exclude group: 'com.github.GTNewHorizons', module: 'Electro-Magic-Tools'
exclude module: 'Baubles'
}
compileOnly('com.github.GTNewHorizons:Botania:1.12.12-GTNH:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:EnderCore:0.4.8:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:EnderIO:2.9.18:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:EnderStorage:1.7.3:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:waila:1.8.10:api') {transitive=false}
compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.13.40-GTNH:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.6.7:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:CodeChickenCore:1.4.3:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.16-GTNH:api') {transitive=false}
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:api') {transitive=false}
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.368:dev") {transitive=false}
compileOnly('curse.maven:computercraft-67504:2269339')
compileOnly('curse.maven:cofh-core-69162:2388751')
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:api') {transitive=false}
runtimeOnly('com.github.GTNewHorizons:TCNEIAdditions:1.5.0:dev') {
exclude module: 'Baubles'
}
}
@@ -56,6 +56,9 @@ public class ThaumicTinkerer {
@SidedProxy(clientSide = LibMisc.CLIENT_PROXY, serverSide = LibMisc.COMMON_PROXY)
public static TTCommonProxy proxy;
public static boolean isBootsActive = false;
public static final String BOOTS = "thaumicboots";
public static CommonProxy tcProxy;
public static SimpleNetworkWrapper netHandler = NetworkRegistry.INSTANCE.newSimpleChannel(LibMisc.MOD_ID + "|B");
@@ -74,6 +77,9 @@ public class ThaumicTinkerer {
"register",
"thaumic.tinkerer.common.compat.TTinkererProvider.callbackRegister");
}
if (Loader.isModLoaded(BOOTS)) {
isBootsActive = true;
}
}
@EventHandler
@@ -29,13 +29,11 @@ public class ContainerIchorPouch extends ContainerPlayerInv {
ItemStack pouch;
int blockSlot;
public ContainerIchorPouch(EntityPlayer player) {
public ContainerIchorPouch(EntityPlayer player, ItemStack bag) {
super(player.inventory);
pouch = bag;
this.player = player;
pouch = player.getCurrentEquippedItem();
blockSlot = player.inventory.currentItem + 27 + 13 * 9;
for (int y = 0; y < 9; y++) for (int x = 0; x < 13; x++)
addSlotToContainer(new SlotNoPouches(inv, y * 13 + x, 12 + x * 18, 8 + y * 18));
initPlayerInv();
@@ -45,17 +43,6 @@ public class ContainerIchorPouch extends ContainerPlayerInv {
} catch (Exception ignored) {}
}
@Override
public void detectAndSendChanges() {
if (!player.worldObj.isRemote) {
if (player.getCurrentEquippedItem() != pouch) {
player.closeScreen();
return;
}
}
super.detectAndSendChanges();
}
@Override
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int slot) {
if (slot == blockSlot) return null;
@@ -96,7 +96,7 @@ public class ItemFocusDeflect extends ItemModFocus {
private static void checkBotaniaMagicMissile(Entity e) {
if (!Loader.isModLoaded("Botania")) return;
if (e instanceof EntityMagicMissile) {
((EntityMagicMissile) e).setTarget(null);
e.setDead();
}
}
@@ -117,7 +117,7 @@ public class ItemFocusDislocation extends ItemModFocus {
stack.getItemDamage(),
1 | 2);
((ItemBlock) stack.getItem()).field_150939_a
.onBlockPlacedBy(world, mop.blockX, mop.blockY, mop.blockZ, player, itemstack);
.onBlockPlacedBy(world, mop.blockX, mop.blockY, mop.blockZ, player, stack);
NBTTagCompound tileCmp = getStackTileEntity(itemstack);
if (tileCmp != null && !tileCmp.hasNoTags()) {
TileEntity tile1 = TileEntity.createAndLoadEntity(tileCmp);
@@ -75,7 +75,8 @@ public class ItemIchorPouch extends ItemFocusPouch implements IBauble, ITTinkere
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
par3EntityPlayer.openGui(ThaumicTinkerer.instance, LibGuiIDs.GUI_ID_ICHOR_POUCH, par2World, 0, 0, 0);
if (!par2World.isRemote)
par3EntityPlayer.openGui(ThaumicTinkerer.instance, LibGuiIDs.GUI_ID_ICHOR_POUCH, par2World, 0, 0, 0);
return par1ItemStack;
}
@@ -20,15 +20,20 @@ import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
import net.minecraftforge.event.entity.living.LivingFallEvent;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.Optional.Interface;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.research.ResearchPage;
import thaumcraft.common.Thaumcraft;
import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.config.ConfigItems;
import thaumic.tinkerer.common.ThaumicTinkerer;
@@ -41,8 +46,12 @@ import thaumic.tinkerer.common.registry.ThaumicTinkererRecipe;
import thaumic.tinkerer.common.research.IRegisterableResearch;
import thaumic.tinkerer.common.research.KamiResearchItem;
import thaumic.tinkerer.common.research.ResearchHelper;
import thaumicboots.api.IBoots;
public class ItemGemBoots extends ItemIchorclothArmorAdv {
@Interface(iface = "thaumicboots.api.IBoots", modid = "thaumicboots")
public class ItemGemBoots extends ItemIchorclothArmorAdv implements IBoots {
public float speedBonus = 0.075F;
public static List<String> playersWith1Step = new ArrayList<>();
@@ -63,14 +72,14 @@ public class ItemGemBoots extends ItemIchorclothArmorAdv {
if (player.worldObj.isRemote) player.stepHeight = player.isSneaking() ? 0.5F : 1F;
if ((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F)
player.moveFlying(0F, 1F, player.capabilities.isFlying ? 0.075F : 0.15F);
player.moveFlying(0F, speedBonus, player.capabilities.isFlying ? 0.075F : 0.15F);
player.jumpMovementFactor = player.isSprinting() ? 0.05F : 0.04F;
player.fallDistance = 0F;
if (ConfigHandler.shouldKamiBootsDoGrass) {
int x = (int) player.posX;
int y = (int) player.posY - 1;
int z = (int) player.posZ;
int x = MathHelper.floor_double(player.posX);
int y = MathHelper.floor_double(player.posY) - 1;
int z = MathHelper.floor_double(player.posZ);
if (player.worldObj.getBlock(x, y, z) == Blocks.dirt && player.worldObj.getBlockMetadata(x, y, z) == 0)
player.worldObj.setBlock(x, y, z, Blocks.grass, 0, 2);
}
@@ -120,14 +129,58 @@ public class ItemGemBoots extends ItemIchorclothArmorAdv {
new ItemStack(Items.lead));
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
if (getIntertialState(itemStack) && player.moveForward == 0
&& player.moveStrafing == 0
&& player.capabilities.isFlying) {
player.motionX *= 0.5;
player.motionZ *= 0.5;
}
boolean omniMode = false;
if (ThaumicTinkerer.isBootsActive) {
omniMode = isOmniEnabled(itemStack);
if ((player.moveForward == 0F && player.moveStrafing == 0F && omniMode)
|| (player.moveForward <= 0F && !omniMode)) {
return;
}
}
if (player.moveForward != 0.0F || player.moveStrafing != 0.0F) {
if (player.worldObj.isRemote && !player.isSneaking()) {
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
}
player.stepHeight = 1.0F;
}
float speedMod = (float) getSpeedModifier(itemStack);
if (player.onGround || player.isOnLadder() || player.capabilities.isFlying) {
float bonus = speedBonus;
if (player.isInWater()) {
bonus /= 4.0F;
}
if (player.isSneaking()) {
bonus /= 2.0F;
}
bonus *= speedMod;
if (ThaumicTinkerer.isBootsActive) {
applyOmniState(player, bonus, itemStack);
} else if (player.moveForward > 0.0) {
player.moveFlying(0.0F, player.moveForward, bonus);
}
}
}
}
@SubscribeEvent
public void onPlayerJump(LivingJumpEvent event) {
if (event.entityLiving instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.entityLiving;
ItemStack boots = player.getCurrentArmor(0);
boolean hasArmor = player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == this;
if (hasArmor && ThaumicTinkerer.proxy.armorStatus(player) && player.getCurrentArmor(0).getItemDamage() == 0)
player.motionY += 0.3;
player.motionY += 0.3 * (float) getJumpModifier(boots);;
}
}
@@ -164,4 +217,43 @@ public class ItemGemBoots extends ItemIchorclothArmorAdv {
}
}
}
@Optional.Method(modid = "thaumicboots")
public void applyOmniState(EntityPlayer player, float bonus, ItemStack itemStack) {
if (player.moveForward != 0.0) {
player.moveFlying(0.0F, player.moveForward, bonus);
}
if (player.moveStrafing != 0.0 && getOmniState(itemStack)) {
player.moveFlying(player.moveStrafing, 0.0F, bonus);
}
}
// Avoid NSM Exception when ThaumicBoots is not present.
public double getSpeedModifier(ItemStack stack) {
if (stack.stackTagCompound != null) {
return stack.stackTagCompound.getDouble("speed");
}
return 1.0;
}
public double getJumpModifier(ItemStack stack) {
if (stack.stackTagCompound != null) {
return stack.stackTagCompound.getDouble("jump");
}
return 1.0;
}
public boolean getOmniState(ItemStack stack) {
if (stack.stackTagCompound != null) {
return stack.stackTagCompound.getBoolean("omni");
}
return false;
}
public boolean getIntertialState(ItemStack stack) {
if (stack.stackTagCompound != null) {
return stack.stackTagCompound.getBoolean("inertiacanceling");
}
return false;
}
}
@@ -32,7 +32,7 @@ import thaumic.tinkerer.client.lib.LibResources;
import thaumic.tinkerer.common.registry.ThaumicTinkererRecipe;
import thaumic.tinkerer.common.research.IRegisterableResearch;
@Optional.InterfaceList({ @Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech") })
@Optional.InterfaceList({ @Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh") })
public abstract class ItemIchorclothArmorAdv extends ItemIchorclothArmor implements IHazardProtector {
public ItemIchorclothArmorAdv(int par2) {
@@ -114,7 +114,7 @@ public abstract class ItemIchorclothArmorAdv extends ItemIchorclothArmor impleme
}
/// GT5 Hazmat protection
@Optional.Method(modid = "gregtech")
@Optional.Method(modid = "gregtech_nh")
@Override
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
return true;
@@ -60,7 +60,7 @@ public class GuiHandler implements IGuiHandler {
case LibGuiIDs.GUI_ID_ICHOR_POUCH:
if (!isDimensionAllowed(player)) return null;
return new ContainerIchorPouch(player);
return new ContainerIchorPouch(player, player.getCurrentEquippedItem());
case LibGuiIDs.GUI_ID_WARP_GATE:
return new ContainerWarpGate((TileWarpGate) tile, player.inventory);
@@ -87,8 +87,8 @@ public class GuiHandler implements IGuiHandler {
return new GuiAspectAnalyzer((TileAspectAnalyzer) tile, player.inventory);
case LibGuiIDs.GUI_ID_ICHOR_POUCH:
if (!isDimensionAllowed(player)) return null;
return new GuiIchorPouch(new ContainerIchorPouch(player));
if ((!isDimensionAllowed(player))) return null;
return new GuiIchorPouch(new ContainerIchorPouch(player, player.getCurrentEquippedItem()));
case LibGuiIDs.GUI_ID_WARP_GATE:
return new GuiWarpGate((TileWarpGate) tile, player.inventory);
@@ -411,7 +411,7 @@ ttresearch.lore.FOCUS_HEAL=Pansements etc.
ttresearch.page.FOCUS_HEAL.0=You know Pech carry powerful foci that can induce diseases, with that, you devised a way to use them to your benefits.<BR><BR>This focus will slowly mend the caster's wounds as they're using it, using vis from the wand in the process.
# -- WAND FOCUS: ENDER RIFT
ttresearch.name.FOCUS_ENDER_Foci de baguette: Crevasse du Néant
ttresearch.name.FOCUS_ENDER_CHEST=Foci de baguette: Crevasse du Néant
ttresearch.lore.FOCUS_ENDER_CHEST=Une poche de la quatrième dimension
ttresearch.page.FOCUS_ENDER_CHEST.0=By combining a Hand Mirror with a portable hole, you managed to construct a focus that tears a rift in the ender, allowing you to access the contents of your Ender Chest remotely.
ttresearch.page.FOCUS_ENDER_CHEST.ES=By combining a Hand Mirror with a portable hole, you managed to construct a focus that tears a rift in the ender, allowing you to access the contents of your Ender Chests remotely. <BR> Shift right click on an ender chest to set the focus to that colour, or shift right click on a block of obsidian to set the focus to the vanilla ender storage.