Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello Everyone,

I have successfully modeled the tutorial from http://www.minecraftforge.net/wiki/Containers_and_GUIs, but instead of making a tiny chest, I wanted to make a working furnace that only requires a redstone signal to run. I can't find any coding that has worked, and I haven't even managed to make a furnace without fuel. My current code can be found at http://pastebin.com/Y3vdBM5T. Any help would be appreciated.

Thanks,

Gmen712

If you really want help, give that modder a thank you.

 

Modders LOVE thank yous.

This is very much a shot in the dark since I'm not very familiar with Block/TileEntity modding yet, but would part of the answer be in net.minecraft.block.BlockRedstoneLight in order to do this? Redstone Lamps can only remain lit if they have power, which is similar to what you want, I think. I'm sure any other Redstone block will also be of help, but this seems to be the simplest case, since it otherwise acts like a simple lighting block.

 

After that, you'll probably have to thumb through net.minecraft.tileentity.TileEntityFurnace and net.minecraft.block.BlockFurnace to figure out how to implement the idea. By glancing at the code, BlockFurnace controls external interaction with the World and Players, while TileEntityFurnace controls the internal burning process.

You just have to replace the isBurning() method in your furnace tile entity by something that checks if there is an redstone signal.

 

i found this in the dispenser class dont know if its working but you can give it a try.

public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
    {
    	/*your tile entity name*/ te = (/*your tile entity name*/par1World.getBlockTileEntity(par2, par3, par4);
        if (!par1World.isRemote && (par1World.isBlockIndirectlyGettingPowered(par2, par3, par4) || par1World.isBlockIndirectlyGettingPowered(par2, par3 + 1, par4)))
        {
            te.isPowered(true);
            
        }else{
        	te.isPowered(false);
        }
    }

 

then you just need a variable to the tile entity and add a method for the block to acces.

 

so instead of

public boolean isBurning()
    {
        return this.furnaceBurnTime > 0;
    }

 

you put

private boolean powered;
public void isPowered(boolean b)
    {
        powered = true;
    }

 

and then you just need to replace the part where it checks if the furnace is burning to check if the furnaces is beiing powered.

so replace

if (this.isBurning() && this.canSmelt())

 

with

if (this.powered == true && this.canSmelt())

 

didnt test it but i think that should work.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.