Skip to content

code review #1

Open
Open

Description

@felzix

Since it's already committed I don't seem to be able to do a proper code review. So I am doing it here. I didn't find anything actually wrong so take all of this with a grain of salt.

Smelter doesn't appear to be fully implemented.

https://github.com/MrTwiggy/MachineFactory/blob/master/src/com/github/MrTwiggy/MachineFactory/MachineFactoryPlugin.java

TICKS_PER_SECOND is unused and doesn't really make sense if you aren't running a repeated thread like mustercull does with DamageLaborer.

https://github.com/MrTwiggy/MachineFactory/blob/master/src/com/github/MrTwiggy/MachineFactory/Managers/OreGinManager.java#L100

(line 100) I believe you can do String line = [...].

https://github.com/MrTwiggy/MachineFactory/blob/master/src/com/github/MrTwiggy/MachineFactory/Managers/OreGinManager.java#L100

Purely for style I would && those if statements together to reduce the amount of nesting.

https://github.com/MrTwiggy/MachineFactory/blob/master/src/com/github/MrTwiggy/MachineFactory/Managers/OreGinManager.java#L100

I think it would be OK if you destroyed a reinforced machine if one block gets destroyed. I don't know if it's possible but it would actually make sense if reinforcing one block in a machine would reinforce the whole machine. Like a chest.

The way you're doing it is fine though.

https://github.com/MrTwiggy/MachineFactory/blob/master/src/com/github/MrTwiggy/MachineFactory/Listeners/OreGinListener.java#L286

Why can't entities blow up ore gins?

Activity

  1. ttk2 commented on Jan 18, 2013

    @ttk2

    Nice to see the code reviewed, could anyone get me a .jar?

  2. erocs commented on Jan 19, 2013

    @erocs

    I sent MrTiggy a couple comments. I'll send you a jar later tonight after he replies.

  3. pruby commented on Jan 21, 2013

    @pruby

    Could these check the block type before doing the machineExistsAt check like the BlockBreakEvent handler does?

    https://github.com/MrTwiggy/MachineFactory/blob/master/src/com/github/MrTwiggy/MachineFactory/Listeners/OreGinListener.java#L235

    https://github.com/MrTwiggy/MachineFactory/blob/master/src/com/github/MrTwiggy/MachineFactory/Listeners/OreGinListener.java#L284

    Would cut down the number of lookups required, delay having to make machineExistsAt faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions