Skip to content

Commit

Permalink
Reformat + Optimize Imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
darkevilmac committed Jun 25, 2016
1 parent 2998db9 commit ef4b450
Show file tree
Hide file tree
Showing 42 changed files with 235 additions and 180 deletions.
18 changes: 9 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ minecraft {
version = "1.10-12.18.0.1986-1.10.0"
runDir = "run"

def replacementVersion = 'MOD_VERSION = \"' + project.version + '\"'
def replacementVersion = 'MOD_VERSION = \"' + project.version + '\"'

replace ("MOD_VERSION = \"@MOVINGWORLDVER@\"",
replacementVersion)
replace("MOD_VERSION = \"@MOVINGWORLDVER@\"",
replacementVersion)

mappings = "snapshot_20160621"
}
Expand All @@ -48,7 +48,7 @@ repositories {
name 'spongepowered'
url 'https://repo.spongepowered.org/maven/'
}
maven {
maven {
url = 'http://unascribed.com/maven/releases'
}
}
Expand All @@ -58,20 +58,20 @@ dependencies {
exclude module: 'launchwrapper'
exclude module: 'guava'
}
compile 'com.unascribed:lambdanetwork:1.0.0'

compile 'com.unascribed:lambdanetwork:1.0.0'
shadow 'com.unascribed:lambdanetwork:1.0.0'
}

shadowJar {
exclude 'dummyThing'

relocate 'com.unascribed.lambdanetwork', "darkevilmac.movingworld.repackage.com.unascribed.lambdanetwork"
relocate 'com.unascribed.lambdanetwork', "darkevilmac.movingworld.repackage.com.unascribed.lambdanetwork"
dependencies {
include(dependency('org.spongepowered:mixin'))
include(dependency('com.unascribed:lambdanetwork'))
include(dependency('com.unascribed:lambdanetwork'))
}

classifier = 'full'
}

Expand Down
12 changes: 7 additions & 5 deletions src/main/java/darkevilmac/movingworld/MovingWorld.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
package darkevilmac.movingworld;

import darkevilmac.movingworld.client.ClientProxy;
import darkevilmac.movingworld.common.CommonProxy;
import darkevilmac.movingworld.common.config.MainConfig;
import darkevilmac.movingworld.common.mrot.MetaRotations;
import darkevilmac.movingworld.common.network.MovingWorldNetworking;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

import org.apache.logging.log4j.Logger;

import java.io.File;

import darkevilmac.movingworld.client.ClientProxy;
import darkevilmac.movingworld.common.CommonProxy;
import darkevilmac.movingworld.common.config.MainConfig;
import darkevilmac.movingworld.common.mrot.MetaRotations;
import darkevilmac.movingworld.common.network.MovingWorldNetworking;

@Mod(modid = MovingWorld.MOD_ID, name = MovingWorld.MOD_NAME, version = MovingWorld.MOD_VERSION, guiFactory = MovingWorld.MOD_GUIFACTORY)
public class MovingWorld {
public static final String MOD_ID = "MovingWorld";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package darkevilmac.movingworld.client.gui;

import darkevilmac.movingworld.MovingWorld;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.config.ConfigElement;
Expand All @@ -10,6 +9,8 @@
import java.util.ArrayList;
import java.util.List;

import darkevilmac.movingworld.MovingWorld;

public class MovingWorldConfigGUI extends GuiConfig {

public MovingWorldConfigGUI(GuiScreen parentScreen) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package darkevilmac.movingworld.client.render;

import darkevilmac.movingworld.MovingWorld;
import darkevilmac.movingworld.common.chunk.mobilechunk.MobileChunk;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.*;
import net.minecraft.client.renderer.BlockRendererDispatcher;
import net.minecraft.client.renderer.GLAllocation;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
Expand All @@ -17,8 +20,12 @@
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import org.lwjgl.opengl.GL11;

import darkevilmac.movingworld.MovingWorld;
import darkevilmac.movingworld.common.chunk.mobilechunk.MobileChunk;

@SideOnly(Side.CLIENT)
public class MobileChunkRenderer {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
package darkevilmac.movingworld.client.render;

import darkevilmac.movingworld.common.chunk.mobilechunk.MobileChunkClient;
import darkevilmac.movingworld.common.entity.EntityMovingWorld;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.culling.ICamera;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;

import org.lwjgl.opengl.GL11;

import darkevilmac.movingworld.common.chunk.mobilechunk.MobileChunkClient;
import darkevilmac.movingworld.common.entity.EntityMovingWorld;

public class RenderMovingWorld extends Render {
public RenderMovingWorld(RenderManager renderManager) {
super(renderManager);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package darkevilmac.movingworld.common.asm.coremod;

import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;

import org.spongepowered.asm.launch.MixinBootstrap;
import org.spongepowered.asm.mixin.MixinEnvironment;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.Lists;
import com.google.common.eventbus.EventBus;

import net.minecraftforge.fml.common.DummyModContainer;
import net.minecraftforge.fml.common.LoadController;
import net.minecraftforge.fml.common.ModMetadata;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package darkevilmac.movingworld.common.asm.mixin.core.block;

import darkevilmac.movingworld.common.chunk.LocatedBlock;
import darkevilmac.movingworld.common.util.RotationHelper;
import darkevilmac.movingworld.common.util.rotation.IRotationBlock;
import net.minecraft.block.BlockSkull;
import net.minecraft.tileentity.TileEntitySkull;

import org.spongepowered.asm.mixin.Mixin;

import darkevilmac.movingworld.common.chunk.LocatedBlock;
import darkevilmac.movingworld.common.util.RotationHelper;
import darkevilmac.movingworld.common.util.rotation.IRotationBlock;

@Mixin(BlockSkull.class)
public class MixinBlockSkull implements IRotationBlock {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package darkevilmac.movingworld.common.asm.mixin.core.block.property;

import darkevilmac.movingworld.common.util.rotation.IRotationProperty;
import net.minecraft.block.BlockLever;
import net.minecraft.block.BlockLog;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.EnumFacing;

import org.spongepowered.asm.mixin.Mixin;

import darkevilmac.movingworld.common.util.rotation.IRotationProperty;

@Mixin(PropertyEnum.class)
public class MixinPropertyEnum implements IRotationProperty {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package darkevilmac.movingworld.common.asm.mixin.core.block.property;

import darkevilmac.movingworld.common.util.RotationHelper;
import darkevilmac.movingworld.common.util.rotation.IRotationProperty;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.IBlockState;

import org.spongepowered.asm.mixin.Mixin;

import darkevilmac.movingworld.common.util.RotationHelper;
import darkevilmac.movingworld.common.util.rotation.IRotationProperty;

@Mixin(PropertyInteger.class)
public class MixinPropertyInteger implements IRotationProperty {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package darkevilmac.movingworld.common.asm.mixin.core.entity;

import darkevilmac.movingworld.common.entity.IMixinEntity;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.BlockPos;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;

import darkevilmac.movingworld.common.entity.IMixinEntity;

@Mixin(Entity.class)
public abstract class MixinEntity implements IMixinEntity {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package darkevilmac.movingworld.common.asm.mixin.core.world;

import net.minecraft.world.World;

import org.spongepowered.asm.mixin.Mixin;

@Mixin(World.class)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package darkevilmac.movingworld.common.block;

import darkevilmac.movingworld.common.tile.TileMovingWorldMarkingBlock;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

import darkevilmac.movingworld.common.tile.TileMovingWorldMarkingBlock;

public abstract class BlockMovingWorldMarker extends BlockContainer {

public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package darkevilmac.movingworld.common.chunk;

import darkevilmac.movingworld.common.chunk.mobilechunk.MobileChunk;
import darkevilmac.movingworld.common.entity.IMixinEntity;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFence;
import net.minecraft.block.BlockFenceGate;
Expand All @@ -18,13 +16,14 @@
import java.util.Iterator;
import java.util.List;

import darkevilmac.movingworld.common.chunk.mobilechunk.MobileChunk;
import darkevilmac.movingworld.common.entity.IMixinEntity;

public class ChunkCollisionHelper {

/**
* Unimplemented, for colliding with a MobileChunk
*
* @param entity
* @param mobileChunk
* @return cancel further method.
*/
public static boolean onEntityMove(Entity entity, MobileChunk mobileChunk, double x, double y, double z) {
Expand Down
19 changes: 12 additions & 7 deletions src/main/java/darkevilmac/movingworld/common/chunk/ChunkIO.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
package darkevilmac.movingworld.common.chunk;

import darkevilmac.movingworld.MovingWorld;
import darkevilmac.movingworld.common.chunk.mobilechunk.MobileChunk;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufInputStream;
import io.netty.buffer.ByteBufOutputStream;
import io.netty.buffer.Unpooled;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.util.math.BlockPos;

import java.io.*;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.DataOutput;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Collection;
import java.util.Locale;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;

import darkevilmac.movingworld.MovingWorld;
import darkevilmac.movingworld.common.chunk.mobilechunk.MobileChunk;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufInputStream;
import io.netty.buffer.ByteBufOutputStream;
import io.netty.buffer.Unpooled;

public abstract class ChunkIO {
public static void write(DataOutput out, MobileChunk chunk, Collection<BlockPos> blocks) throws IOException {
out.writeShort(blocks.size());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package darkevilmac.movingworld.common.chunk;

import darkevilmac.movingworld.MovingWorld;
import darkevilmac.movingworld.common.block.BlockMovingWorldMarker;
import darkevilmac.movingworld.common.chunk.assembly.AssembleResult;
import darkevilmac.movingworld.common.chunk.assembly.CanAssemble;
import darkevilmac.movingworld.common.tile.TileMovingWorldMarkingBlock;
import io.netty.buffer.ByteBuf;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
Expand All @@ -15,10 +9,16 @@
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

import darkevilmac.movingworld.MovingWorld;
import darkevilmac.movingworld.common.block.BlockMovingWorldMarker;
import darkevilmac.movingworld.common.chunk.assembly.AssembleResult;
import darkevilmac.movingworld.common.chunk.assembly.CanAssemble;
import darkevilmac.movingworld.common.tile.TileMovingWorldMarkingBlock;
import io.netty.buffer.ByteBuf;

/**
* Used for storing information given by and taken by the (Dis)Assembler
* <p/>
* Mostly for use in GUIs, the ship pretty much immediately forgets this thing.
* Used for storing information given by and taken by the (Dis)Assembler <p/> Mostly for use in
* GUIs, the ship pretty much immediately forgets this thing.
*/
public class MovingWorldAssemblyInteractor {

Expand Down Expand Up @@ -105,17 +105,13 @@ public EnumFacing getFrontDirection(LocatedBlock marker) {

/**
* Recommended to call writeNBTMetadata first, then write the rest of your data.
*
* @param compound
*/
public void writeNBTFully(NBTTagCompound compound) {
}


/**
* Write metadata to NBT.
*
* @param compound
*/
public void writeNBTMetadata(NBTTagCompound compound) {
}
Expand Down
Loading

0 comments on commit ef4b450

Please sign in to comment.