Compare commits

...
7 Commits
Author SHA1 Message Date
Martin Robertz 6f8b6e2a9c update 2025-10-04 14:26:40 +02:00
TheYoingLadandMartin Robertz 479c8328b4 Added the ability for the farming station to plant Pam's nether seeds (#208)
Co-authored-by: Martin Robertz <[email protected]>
2025-10-04 12:24:54 +00:00
Wilhelm Schuster 0c23f4937d Handle mouse button keybinds (#204) 2025-09-25 19:55:57 +02:00
Wilhelm Schusterandgithub-actions[bot] cde2e4fa60 Fix crash when breaking Painted Glowstone placed by Better Builders Wand (#206)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-25 19:35:30 +02:00
Ranzu abbb6dc151 Update bauble slot background in capacitor ui (#203) 2025-09-25 15:20:59 +02:00
Martin Robertz b3def82cde update 2025-09-24 16:49:42 +02:00
EmperorSuper 8b4e7f7ec3 Cap the length of the baubles inventory (#202) 2025-09-24 11:10:22 +02:00
10 changed files with 71 additions and 29 deletions

No files matched your search

+16 -15
View File
@@ -1,24 +1,24 @@
// Add your dependencies here
dependencies {
api('com.github.GTNewHorizons:EnderCore:0.4.8:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.14:dev')
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.7.66-GTNH:dev')
api("com.github.GTNewHorizons:GTNHLib:0.6.38:dev")
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.44:dev')
api('com.github.GTNewHorizons:EnderCore:0.5.0:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.17:dev')
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.8.6-GTNH:dev')
api("com.github.GTNewHorizons:GTNHLib:0.7.0:dev")
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.45:dev')
api('curse.maven:cofh-lib-220333:2388748') // https://www.curseforge.com/minecraft/mc-mods/cofh-lib/files/2388748
shadowImplementation('cglib:cglib-nodep:3.3.0')
api("com.github.GTNewHorizons:TinkersConstruct:1.13.42-GTNH:dev")
api("com.github.GTNewHorizons:TinkersConstruct:1.14.2-GTNH:dev")
compileOnly('com.github.GTNewHorizons:waila:1.8.12:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-660-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:waila:1.9.0:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-702-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.395:dev') {transitive = false}
compileOnly("com.github.GTNewHorizons:ModularUI2:2.2.16-1.7.10:dev") {transitive = false}
compileOnly('com.github.GTNewHorizons:Railcraft:9.16.32:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:StorageDrawers:2.1.5-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Chisel:2.16.8-GTNH:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.16-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.10:dev') {transitive = false}
compileOnly("com.github.GTNewHorizons:ModularUI2:2.2.20-1.7.10:dev") {transitive = false}
compileOnly('com.github.GTNewHorizons:Railcraft:9.17.0:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:StorageDrawers:2.2.0-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Chisel:2.17.0-GTNH:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.0-GTNH:api') {transitive = false}
compileOnly('curse.maven:minefactory-reloaded-66672:2366150') // https://www.curseforge.com/minecraft/mc-mods/minefactory-reloaded/files/2366150
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compileOnly('curse.maven:ee3-65509:2305023') // https://www.curseforge.com/minecraft/mc-mods/ee3/files/2305023
@@ -26,5 +26,6 @@ dependencies {
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
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta51:api') {transitive = false}
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta57:api') {transitive = false}
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.7.2:dev")
}
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.41'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.43'
}
@@ -213,6 +213,7 @@ public class EnderIO {
public static final boolean hasLwjgl3 = Loader.isModLoaded("lwjgl3ify");
public static final boolean hasGT5 = Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi");
public static final boolean hasHP = Loader.isModLoaded("hodgepodge");
// Materials
public static ItemCapacitor itemBasicCapacitor;
@@ -11,12 +11,14 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.ChatComponentTranslation;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import com.enderio.core.common.util.ChatUtil;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent;
import cpw.mods.fml.common.gameevent.InputEvent.MouseInputEvent;
import crazypants.enderio.EnderIO;
import crazypants.enderio.api.teleport.IItemOfTravel;
import crazypants.enderio.api.tool.IConduitControl;
@@ -134,6 +136,18 @@ public class KeyTracker {
@SubscribeEvent
public void onKeyInput(KeyInputEvent event) {
handleInput();
}
// mouse button presses arrive on a separate event
@SubscribeEvent
public void onMouseInput(MouseInputEvent event) {
if (Mouse.getEventButton() >= 0) {
handleInput();
}
}
private void handleInput() {
handleGlide();
handleSoundDetector();
handleNightVision();
@@ -89,7 +89,9 @@ public class ContainerCapBank extends ContainerEnderTileEntity<TileCapBank> {
}
if (hasBaublesSlots()) {
for (int i = 0; i < baubles.getSizeInventory(); i++) {
// for (int i = 0; i < baubles.getSizeInventory(); i++) {
// Capped since the sprite only has 4 slots
for (int i = 0; i < Math.min(baubles.getSizeInventory(), 4); i++) {
addSlotToContainer(new Slot(baubles, i, -15 + armorOffset, 84 + i * 18) {
@Override
@@ -122,7 +124,9 @@ public class ContainerCapBank extends ContainerEnderTileEntity<TileCapBank> {
int startHotBarSlot = endPlayerSlot + 1;
int endHotBarSlot = startHotBarSlot + 9;
int startBaublesSlot = endHotBarSlot + 1;
int endBaublesSlot = baubles == null ? 0 : startBaublesSlot + baubles.getSizeInventory();
// int endBaublesSlot = baubles == null ? 0 : startBaublesSlot + baubles.getSizeInventory();
// Capped since the sprite only has 4 slots
int endBaublesSlot = baubles == null ? 0 : startBaublesSlot + Math.min(baubles.getSizeInventory(), 4);
ItemStack copystack = null;
Slot slot = (Slot) inventorySlots.get(slotIndex);
@@ -17,7 +17,9 @@ import net.minecraftforge.common.IPlantable;
import net.minecraftforge.common.util.ForgeDirection;
import com.enderio.core.common.util.BlockCoord;
import com.mitchej123.hodgepodge.mixins.interfaces.INetherSeed;
import crazypants.enderio.EnderIO;
import crazypants.enderio.machine.farm.TileFarmStation;
public class PlantableFarmer implements IFarmerJoe {
@@ -109,7 +111,13 @@ public class PlantableFarmer implements IFarmerJoe {
protected boolean plant(TileFarmStation farm, World worldObj, BlockCoord bc, IPlantable plantable) {
worldObj.setBlock(bc.x, bc.y, bc.z, Blocks.air, 0, 1 | 2);
Block target = plantable.getPlant(null, 0, 0, 0);
Block target;
// needed for Pam's nether seeds
if (EnderIO.hasHP && plantable instanceof INetherSeed netherSeed) {
target = netherSeed.hodgepodge$getPlant(null, 0, 0, 0);
} else {
target = plantable.getPlant(null, 0, 0, 0);
}
int meta = plantable.getPlantMetadata(null, 0, 0, 0);
worldObj.setBlock(bc.x, bc.y, bc.z, target, meta, 1 | 2);
farm.actionPerformed(false);
@@ -117,7 +125,13 @@ public class PlantableFarmer implements IFarmerJoe {
}
protected boolean canPlant(World worldObj, BlockCoord bc, IPlantable plantable) {
Block target = plantable.getPlant(null, 0, 0, 0);
Block target;
// needed for Pam's nether seeds
if (EnderIO.hasHP && plantable instanceof INetherSeed netherSeed) {
target = netherSeed.hodgepodge$getPlant(null, 0, 0, 0);
} else {
target = plantable.getPlant(null, 0, 0, 0);
}
Block ground = worldObj.getBlock(bc.x, bc.y - 1, bc.z);
if (target != null && target.canPlaceBlockAt(worldObj, bc.x, bc.y, bc.z)
&& target.canBlockStay(worldObj, bc.x, bc.y, bc.z)
@@ -182,10 +196,14 @@ public class PlantableFarmer implements IFarmerJoe {
}
private boolean isPlantableForBlock(ItemStack stack, Block block) {
if (!(stack.getItem() instanceof IPlantable)) {
return false;
if (stack.getItem() instanceof IPlantable plantable) {
// needed for Pam's nether seeds
if (EnderIO.hasHP && plantable instanceof INetherSeed netherSeed) {
return netherSeed.hodgepodge$getPlant(null, 0, 0, 0) == block;
} else {
return plantable.getPlant(null, 0, 0, 0) == block;
}
}
IPlantable plantable = (IPlantable) stack.getItem();
return plantable.getPlant(null, 0, 0, 0) == block;
return false;
}
}
@@ -199,7 +199,7 @@ public class BlockPaintedGlowstone extends BlockEio
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister IIconRegister) {
blockIcon = IIconRegister.registerIcon("enderio:conduitConnector");
blockIcon = IIconRegister.registerIcon("glowstone");
}
@Override
@@ -231,10 +231,12 @@ public class BlockPaintedGlowstone extends BlockEio
@Override
protected void processDrop(World world, int x, int y, int z, TileEntityEnder te, ItemStack drop) {
TileEntityPaintedBlock tef = (TileEntityPaintedBlock) te;
if (tef != null) {
if (te instanceof TileEntityPaintedBlock tef) {
ItemStack itemStack = createItemStackForSourceBlock(tef.getSourceBlock(), tef.getSourceBlockMetadata());
drop.stackTagCompound = (NBTTagCompound) itemStack.stackTagCompound.copy();
NBTTagCompound tag = itemStack.stackTagCompound;
if (tag != null) {
drop.stackTagCompound = (NBTTagCompound) tag.copy();
}
}
}
@@ -63,7 +63,8 @@ public final class PainterUtil {
sourceName = is.getDisplayName();
}
}
return EnderIO.lang.localize("blockPainter.paintedWith") + " " + sourceName;
return EnderIO.lang.localize("blockPainter.paintedWith") + " "
+ (sourceName.isEmpty() ? EnderIO.lang.localize("blockPainter.paintedWith.none") : sourceName);
}
public static void setSourceBlock(ItemStack item, Block source, int meta) {
@@ -777,6 +777,7 @@ enderio.itemCoordSelector.chat.setDimension=Set Dimension: %s%s
#Painter
tile.blockPainter.name=Painting Machine
enderio.blockPainter.paintedWith=Painted with:
enderio.blockPainter.paintedWith.none=§onothing§r
tile.blockPaintedFence.name=Painted Fence
tile.blockPaintedFenceGate.name=Painted Gate
tile.blockPaintedWall.name=Painted Wall
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB