-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recommit, Almost nuked everything last time 🐝
- Loading branch information
1 parent
d58a442
commit fc7c521
Showing
11 changed files
with
186 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Try and contact original owner about my changes | ||
Contact current owner of BuildCraft (Adrian) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
maven { | ||
name = "forge" | ||
url = "http://files.minecraftforge.net/maven" | ||
} | ||
maven { | ||
name = "sonatype" | ||
url = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
} | ||
} | ||
dependencies { | ||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' | ||
} | ||
} | ||
|
||
apply plugin: 'forge' | ||
|
||
version = "1.7.10-0.1a" | ||
group= "mods.alice.gp" // http://maven.apache.org/guides/mini/guide-naming-conventions.html | ||
archivesBaseName = "glasspipes" | ||
|
||
minecraft { | ||
version = "1.7.10-10.13.2.1236" | ||
assetDir = "eclipse/assets" | ||
} | ||
|
||
dependencies { | ||
runtime files('libs/buildcraft-6.4.15-dev.jar') | ||
} | ||
|
||
processResources | ||
{ | ||
// this will ensure that this task is redone when the versions change. | ||
inputs.property "version", project.version | ||
inputs.property "mcversion", project.minecraft.version | ||
|
||
// replace stuff in mcmod.info, nothing else | ||
from(sourceSets.main.resources.srcDirs) { | ||
include 'mcmod.info' | ||
|
||
// replace version and mcversion | ||
expand 'version':project.version, 'mcversion':project.minecraft.version | ||
} | ||
|
||
// copy everything else, thats not the mcmod.info | ||
from(sourceSets.main.resources.srcDirs) { | ||
exclude 'mcmod.info' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package mods.alice.gp; | ||
|
||
import buildcraft.transport.TransportProxyClient; | ||
import cpw.mods.fml.common.event.FMLInitializationEvent; | ||
import net.minecraftforge.client.MinecraftForgeClient; | ||
|
||
public final class ClientProxy extends ServerProxy { | ||
public void forgeInitialization(FMLInitializationEvent event) { | ||
MinecraftForgeClient.registerItemRenderer(GlassPipe.INSTANCE.pipeItemGlass, TransportProxyClient.pipeItemRenderer); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package mods.alice.gp; | ||
// This is in no way the work of Mandrake and Dr.Zed and the original author is free to use what I contributed. | ||
import buildcraft.core.CreativeTabBuildCraft; | ||
import buildcraft.transport.BlockGenericPipe; | ||
import cpw.mods.fml.common.Mod; | ||
import cpw.mods.fml.common.ModMetadata; | ||
import cpw.mods.fml.common.SidedProxy; | ||
import cpw.mods.fml.common.event.FMLInitializationEvent; | ||
import cpw.mods.fml.common.event.FMLPreInitializationEvent; | ||
import mods.alice.gp.transport.pipe.PipeItemsGlass; | ||
import net.minecraft.item.Item; | ||
|
||
@Mod(modid="bc_glasspipe", name="Glass Pipes Mod", version="0.1a", dependencies="required-after:Forge@[10.13.2.1230,);required-after:BuildCraft|Transport") | ||
public final class GlassPipe { | ||
|
||
@Mod.Instance("bc_glasspipe") | ||
public static GlassPipe INSTANCE; | ||
|
||
// Not certain what this does (if anyone knows please do say) | ||
@Mod.Metadata("bc_glasspipe") | ||
private ModMetadata meta; | ||
// | ||
@SidedProxy(clientSide="mods.alice.gp.ClientProxy", serverSide="mods.alice.gp.ServerProxy") | ||
public static ServerProxy PROXY; | ||
public Item pipeItemGlass; | ||
|
||
@Mod.EventHandler | ||
public void forgePreInitialization(FMLPreInitializationEvent event) { | ||
meta.description = "Adds frictionless item transport pipes for BuildCraft."; | ||
meta.url = "http://a1lic.net/"; | ||
meta.authorList.add("alice"); | ||
meta.credits = "alice"; | ||
meta.autogenerated = false; | ||
pipeItemGlass = BlockGenericPipe.registerPipe(PipeItemsGlass.class, CreativeTabBuildCraft.PIPES); | ||
pipeItemGlass.setUnlocalizedName("PipeItemsGlass"); | ||
PROXY.forgePreInitialization(event); | ||
} | ||
|
||
@Mod.EventHandler | ||
public void forgeInitialization(FMLInitializationEvent event) { | ||
PROXY.forgeInitialization(event); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package mods.alice.gp; | ||
|
||
import cpw.mods.fml.common.event.FMLInitializationEvent; | ||
import cpw.mods.fml.common.event.FMLPreInitializationEvent; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.item.crafting.CraftingManager; | ||
import net.minecraft.item.crafting.IRecipe; | ||
import net.minecraftforge.oredict.ShapedOreRecipe; | ||
|
||
import java.util.List; | ||
|
||
@SuppressWarnings("unchecked") | ||
public class ServerProxy { | ||
public void forgePreInitialization(FMLPreInitializationEvent event) { | ||
CraftingManager craft = CraftingManager.getInstance(); | ||
|
||
List<IRecipe> recipeList = craft.getRecipeList(); | ||
|
||
recipeList.add(new ShapedOreRecipe(new ItemStack(GlassPipe.INSTANCE.pipeItemGlass, 24), "GDG", 'G', "blockGlass", 'D', "gemDiamond")); | ||
} | ||
|
||
public void forgeInitialization(FMLInitializationEvent event) {} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/mods/alice/gp/transport/pipe/PipeGPIconProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package mods.alice.gp.transport.pipe; | ||
|
||
import buildcraft.api.core.IIconProvider; | ||
import net.minecraft.client.renderer.texture.IIconRegister; | ||
import net.minecraft.util.IIcon; | ||
|
||
public final class PipeGPIconProvider implements IIconProvider { | ||
public static final PipeGPIconProvider INSTANCE = new PipeGPIconProvider(); | ||
|
||
private IIcon glassPipe; | ||
|
||
|
||
public IIcon getIcon(int iconIndex) { | ||
return this.glassPipe; | ||
} | ||
|
||
|
||
public void registerIcons(IIconRegister iconRegister) { | ||
this.glassPipe = iconRegister.registerIcon("bc_glasspipe:pipeItemsGlass"); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/mods/alice/gp/transport/pipe/PipeItemsGlass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package mods.alice.gp.transport.pipe; | ||
|
||
import buildcraft.api.core.IIconProvider; | ||
import buildcraft.transport.Pipe; | ||
import buildcraft.transport.PipeTransportItems; | ||
import buildcraft.transport.pipes.events.PipeEventItem; | ||
import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | ||
import net.minecraft.item.Item; | ||
import net.minecraftforge.common.util.ForgeDirection; | ||
|
||
public final class PipeItemsGlass extends Pipe<PipeTransportItems>{ | ||
public PipeItemsGlass(Item item) { | ||
super(new PipeTransportItems(), item); | ||
} | ||
|
||
|
||
@SideOnly(Side.CLIENT) | ||
public IIconProvider getIconProvider() { | ||
return PipeGPIconProvider.INSTANCE; | ||
} | ||
|
||
|
||
public int getIconIndex(ForgeDirection direction) { | ||
return 0; | ||
} | ||
|
||
public void eventHandler(PipeEventItem.AdjustSpeed event) { | ||
event.handled = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
item.PipeItemsGlass.name=Glass Transport Pipe | ||
tip.PipeItemsGlass=Frictionless item transport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
item.PipeItemsGlass.name=アイテムパイプ(ガラス) | ||
tip.PipeItemsGlass=移動速度が減衰しない |
Binary file added
BIN
+571 Bytes
src/main/resources/assets/bc_glasspipe/textures/blocks/pipeItemsGlass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.