mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-27 15:33:06 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79e5330630 | ||
|
|
66f4b7f41b |
No files matched your search
+3
-3
@@ -10,9 +10,9 @@ dependencies {
|
|||||||
shadowImplementation('cglib:cglib-nodep:3.3.0')
|
shadowImplementation('cglib:cglib-nodep:3.3.0')
|
||||||
|
|
||||||
compileOnly('com.github.GTNewHorizons:waila:1.7.3:api') {transitive = false}
|
compileOnly('com.github.GTNewHorizons:waila:1.7.3:api') {transitive = false}
|
||||||
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-350-GTNH:api') {transitive = false}
|
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-357-GTNH:api') {transitive = false}
|
||||||
compileOnly('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive = false}
|
compileOnly('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive = false}
|
||||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.159:dev') {transitive = false}
|
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.166:dev') {transitive = false}
|
||||||
compileOnly('com.github.GTNewHorizons:Railcraft:9.15.8:api') {transitive = false}
|
compileOnly('com.github.GTNewHorizons:Railcraft:9.15.8:api') {transitive = false}
|
||||||
compileOnly('com.github.GTNewHorizons:StorageDrawers:1.13.5-GTNH:api') {transitive = false}
|
compileOnly('com.github.GTNewHorizons:StorageDrawers:1.13.5-GTNH:api') {transitive = false}
|
||||||
compileOnly('com.github.GTNewHorizons:Chisel:2.14.1-GTNH:dev') {transitive = false}
|
compileOnly('com.github.GTNewHorizons:Chisel:2.14.1-GTNH:dev') {transitive = false}
|
||||||
@@ -24,5 +24,5 @@ dependencies {
|
|||||||
compileOnly(rfg.deobf('curse.maven:mekanism-268560:2475797')) // https://www.curseforge.com/minecraft/mc-mods/mekanism/files/2475797
|
compileOnly(rfg.deobf('curse.maven:mekanism-268560:2475797')) // https://www.curseforge.com/minecraft/mc-mods/mekanism/files/2475797
|
||||||
compileOnly(rfg.deobf('maven.modrinth:immibis-microblocks:59.1.2')) // https://modrinth.com/mod/immibis-microblocks/version/59.1.2
|
compileOnly(rfg.deobf('maven.modrinth:immibis-microblocks:59.1.2')) // https://modrinth.com/mod/immibis-microblocks/version/59.1.2
|
||||||
|
|
||||||
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-alpha38:api') {transitive = false}
|
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-alpha50:api') {transitive = false}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.21'
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.22'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -361,6 +361,8 @@ public final class Config {
|
|||||||
"TwilightForest:item.steeleafHoe", "TwilightForest:item.ironwoodHoe", "IC2:itemToolBronzeHoe" };
|
"TwilightForest:item.steeleafHoe", "TwilightForest:item.ironwoodHoe", "IC2:itemToolBronzeHoe" };
|
||||||
public static List<ItemStack> farmHoes = new ArrayList<ItemStack>();
|
public static List<ItemStack> farmHoes = new ArrayList<ItemStack>();
|
||||||
public static int farmSaplingReserveAmount = 8;
|
public static int farmSaplingReserveAmount = 8;
|
||||||
|
public static double farmParticlesMaxRange = 64;
|
||||||
|
public static int farmParticlesCount = 15;
|
||||||
|
|
||||||
public static int magnetPowerUsePerSecondRF = 1;
|
public static int magnetPowerUsePerSecondRF = 1;
|
||||||
public static int magnetPowerCapacityRF = 100000;
|
public static int magnetPowerCapacityRF = 100000;
|
||||||
@@ -2060,6 +2062,18 @@ public final class Config {
|
|||||||
+ "always shear all leaves.")
|
+ "always shear all leaves.")
|
||||||
.getInt(farmSaplingReserveAmount);
|
.getInt(farmSaplingReserveAmount);
|
||||||
|
|
||||||
|
farmParticlesMaxRange = config.get(
|
||||||
|
sectionFarm.name,
|
||||||
|
"farmParticlesMaxRange",
|
||||||
|
farmParticlesMaxRange,
|
||||||
|
"The max range of the farm action particles.").getDouble(farmParticlesMaxRange);
|
||||||
|
|
||||||
|
farmParticlesCount = config.get(
|
||||||
|
sectionFarm.name,
|
||||||
|
"farmParticlesCount",
|
||||||
|
farmParticlesCount,
|
||||||
|
"The number of particles produces by farm action.").getInt(farmParticlesCount);
|
||||||
|
|
||||||
combustionGeneratorUseOpaqueModel = config
|
combustionGeneratorUseOpaqueModel = config
|
||||||
.get(
|
.get(
|
||||||
sectionAesthetic.name,
|
sectionAesthetic.name,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.enderio.core.common.util.BlockCoord;
|
|||||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||||
|
import crazypants.enderio.config.Config;
|
||||||
import crazypants.util.ClientUtil;
|
import crazypants.util.ClientUtil;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
@@ -51,11 +52,7 @@ public class PacketFarmAction implements IMessage, IMessageHandler<PacketFarmAct
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IMessage onMessage(PacketFarmAction message, MessageContext ctx) {
|
public IMessage onMessage(PacketFarmAction message, MessageContext ctx) {
|
||||||
for (BlockCoord bc : message.coords) {
|
ClientUtil.spawnFarmParticles(rand, message.coords, Config.farmParticlesCount);
|
||||||
for (int i = 0; i < 15; i++) {
|
|
||||||
ClientUtil.spawnFarmParcticles(rand, bc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -458,8 +458,9 @@ public class TileFarmStation extends AbstractPoweredTaskEntity {
|
|||||||
IHarvestResult harvest = FarmersCommune.instance.harvestBlock(this, bc, block, meta);
|
IHarvestResult harvest = FarmersCommune.instance.harvestBlock(this, bc, block, meta);
|
||||||
if (harvest != null && harvest.getDrops() != null) {
|
if (harvest != null && harvest.getDrops() != null) {
|
||||||
PacketFarmAction pkt = new PacketFarmAction(harvest.getHarvestedBlocks());
|
PacketFarmAction pkt = new PacketFarmAction(harvest.getHarvestedBlocks());
|
||||||
PacketHandler.INSTANCE
|
PacketHandler.INSTANCE.sendToAllAround(
|
||||||
.sendToAllAround(pkt, new TargetPoint(worldObj.provider.dimensionId, bc.x, bc.y, bc.z, 64));
|
pkt,
|
||||||
|
new TargetPoint(worldObj.provider.dimensionId, bc.x, bc.y, bc.z, Config.farmParticlesMaxRange));
|
||||||
for (EntityItem ei : harvest.getDrops()) {
|
for (EntityItem ei : harvest.getDrops()) {
|
||||||
if (ei != null) {
|
if (ei != null) {
|
||||||
insertHarvestDrop(ei, bc);
|
insertHarvestDrop(ei, bc);
|
||||||
@@ -487,7 +488,12 @@ public class TileFarmStation extends AbstractPoweredTaskEntity {
|
|||||||
inventory[minFirtSlot] = farmerJoe.inventory.mainInventory[0];
|
inventory[minFirtSlot] = farmerJoe.inventory.mainInventory[0];
|
||||||
PacketHandler.INSTANCE.sendToAllAround(
|
PacketHandler.INSTANCE.sendToAllAround(
|
||||||
new PacketFarmAction(bc),
|
new PacketFarmAction(bc),
|
||||||
new TargetPoint(worldObj.provider.dimensionId, bc.x, bc.y, bc.z, 64));
|
new TargetPoint(
|
||||||
|
worldObj.provider.dimensionId,
|
||||||
|
bc.x,
|
||||||
|
bc.y,
|
||||||
|
bc.z,
|
||||||
|
Config.farmParticlesMaxRange));
|
||||||
if (inventory[minFirtSlot] != null && inventory[minFirtSlot].stackSize == 0) {
|
if (inventory[minFirtSlot] != null && inventory[minFirtSlot].stackSize == 0) {
|
||||||
inventory[minFirtSlot] = null;
|
inventory[minFirtSlot] = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
package crazypants.util;
|
package crazypants.util;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.particle.EffectRenderer;
|
||||||
|
import net.minecraft.client.particle.EntityPortalFX;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.enderio.core.common.util.BlockCoord;
|
import com.enderio.core.common.util.BlockCoord;
|
||||||
|
|
||||||
@@ -47,18 +51,35 @@ public class ClientUtil {
|
|||||||
con.readFromNBT(pkt.tc, TileConduitBundle.NBT_VERSION);
|
con.readFromNBT(pkt.tc, TileConduitBundle.NBT_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void spawnFarmParcticles(Random rand, BlockCoord bc) {
|
public static void spawnFarmParticles(Random rand, List<BlockCoord> coords, int particlesCount) {
|
||||||
double xOff = 0.5 + (rand.nextDouble() - 0.5) * 1.1;
|
// 0 = All, 1 = Decreased, 2 = Minimal
|
||||||
double yOff = 0.5 + (rand.nextDouble() - 0.5) * 0.2;
|
int particleSetting = Minecraft.getMinecraft().gameSettings.particleSetting;
|
||||||
double zOff = 0.5 + (rand.nextDouble() - 0.5) * 1.1;
|
if (particleSetting >= 2 /* Minimal */) {
|
||||||
Minecraft.getMinecraft().theWorld.spawnParticle(
|
return;
|
||||||
"portal",
|
}
|
||||||
bc.x + xOff,
|
|
||||||
bc.y + yOff,
|
int particles = particleSetting == 0 ? particlesCount /* All */
|
||||||
bc.z + zOff,
|
: (particlesCount / 2) /* Decreased */;
|
||||||
(rand.nextDouble() - 0.5) * 1.5,
|
|
||||||
-rand.nextDouble(),
|
World world = Minecraft.getMinecraft().theWorld;
|
||||||
(rand.nextDouble() - 0.5) * 1.5);
|
EffectRenderer effectRenderer = Minecraft.getMinecraft().effectRenderer;
|
||||||
|
|
||||||
|
for (BlockCoord bc : coords) {
|
||||||
|
for (int i = 0; i < particles; i++) {
|
||||||
|
double xOff = 0.5 + (rand.nextDouble() - 0.5) * 1.1;
|
||||||
|
double yOff = 0.5 + (rand.nextDouble() - 0.5) * 0.2;
|
||||||
|
double zOff = 0.5 + (rand.nextDouble() - 0.5) * 1.1;
|
||||||
|
effectRenderer.addEffect(
|
||||||
|
new EntityPortalFX(
|
||||||
|
world,
|
||||||
|
bc.x + xOff,
|
||||||
|
bc.y + yOff,
|
||||||
|
bc.z + zOff,
|
||||||
|
(rand.nextDouble() - 0.5) * 1.5,
|
||||||
|
-rand.nextDouble(),
|
||||||
|
(rand.nextDouble() - 0.5) * 1.5));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setTankNBT(PacketCombustionTank message, int x, int y, int z) {
|
public static void setTankNBT(PacketCombustionTank message, int x, int y, int z) {
|
||||||
|
|||||||
Reference in new issue
Block a user