Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Buildscript #8

Merged
merged 5 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
* text eol=lf

*.[jJ][aA][rR] binary

*.[pP][nN][gG] binary
*.[jJ][pP][gG] binary
*.[jJ][pP][eE][gG] binary
*.[gG][iI][fF] binary
*.[tT][iI][fF] binary
*.[tT][iI][fF][fF] binary
*.[iI][cC][oO] binary
*.[sS][vV][gG] text
*.[eE][pP][sS] binary
*.[xX][cC][fF] binary

*.[kK][aA][rR] binary
*.[mM]4[aA] binary
*.[mM][iI][dD] binary
*.[mM][iI][dD][iI] binary
*.[mM][pP]3 binary
*.[oO][gG][gG] binary
*.[rR][aA] binary

*.7[zZ] binary
*.[gG][zZ] binary
*.[tT][aA][rR] binary
*.[tT][gG][zZ] binary
*.[zZ][iI][pP] binary

*.[tT][cC][nN] binary
*.[sS][oO] binary
*.[dD][lL][lL] binary
*.[dD][yY][lL][iI][bB] binary
*.[pP][sS][dD] binary
*.[tT][tT][fF] binary
*.[oO][tT][fF] binary

*.[pP][aA][tT][cC][hH] -text

*.[bB][aA][tT] text eol=crlf
*.[cC][mM][dD] text eol=crlf
*.[pP][sS]1 text eol=crlf

*[aA][uU][tT][oO][gG][eE][nN][eE][rR][aA][tT][eE][dD]* binary
676 changes: 525 additions & 151 deletions build.gradle

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
plugins {
id 'com.diffplug.blowdryerSetup' version '1.6.0'
}

apply plugin: 'com.diffplug.blowdryerSetup'

blowdryerSetup {
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.1.5')
//devLocal '.' // Use this when testing config updates locally
}
2 changes: 1 addition & 1 deletion src/main/java/remoteio/api/IIOTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
* @author dmillerw
*/
public interface IIOTool {
//TODO Do something nifty with this?
// TODO Do something nifty with this?
}
26 changes: 20 additions & 6 deletions src/main/java/remoteio/client/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import remoteio.client.render.RenderTileRemoteInterface;
import remoteio.client.render.RenderTileRemoteInventory;
import remoteio.client.render.RenderTileTransceiver;
import remoteio.common.CommonProxy;
import remoteio.common.RemoteIO;
import remoteio.common.core.helper.EventHelper;
import remoteio.common.CommonProxy;
import remoteio.common.network.ClientProxyPlayer;
import remoteio.common.tile.TileIntelligentWorkbench;
import remoteio.common.tile.TileMachineHeater;
Expand All @@ -36,7 +36,7 @@
/**
* @author dmillerw
*/
public class ClientProxy extends CommonProxy{
public class ClientProxy extends CommonProxy {

@Override
public void preInit(FMLPreInitializationEvent event) {
Expand All @@ -46,7 +46,8 @@ public void preInit(FMLPreInitializationEvent event) {
ClientRegistry.bindTileEntitySpecialRenderer(TileRemoteInventory.class, new RenderTileRemoteInventory());
ClientRegistry.bindTileEntitySpecialRenderer(TileMachineReservoir.class, new RenderTileMachine());
ClientRegistry.bindTileEntitySpecialRenderer(TileMachineHeater.class, new RenderTileMachine());
ClientRegistry.bindTileEntitySpecialRenderer(TileIntelligentWorkbench.class, new RenderTileIntelligentWorkbench());
ClientRegistry.bindTileEntitySpecialRenderer(
TileIntelligentWorkbench.class, new RenderTileIntelligentWorkbench());
ClientRegistry.bindTileEntitySpecialRenderer(TileTransceiver.class, new RenderTileTransceiver());

MinecraftForge.EVENT_BUS.register(SoundHandler.INSTANCE);
Expand Down Expand Up @@ -77,7 +78,8 @@ public World getWorld(int dimension) {
}

@Override
public void activateBlock(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float fx, float fy, float fz) {
public void activateBlock(
World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float fx, float fy, float fz) {
if (entityPlayer instanceof EntityPlayerMP) {
super.activateBlock(world, x, y, z, entityPlayer, side, fx, fy, fz);
} else {
Expand All @@ -93,8 +95,20 @@ public void activateBlock(World world, int x, int y, int z, EntityPlayer entityP
SoundHandler.INSTANCE.translateNextSound(x, y, z);

if (proxyPlayer.getHeldItem() != null) {
if (proxyPlayer.getHeldItem().getItem().onItemUseFirst(proxyPlayer.getHeldItem(), proxyPlayer, proxyPlayer.worldObj, x, y, z, side, fx, fy, fz))
return;
if (proxyPlayer
.getHeldItem()
.getItem()
.onItemUseFirst(
proxyPlayer.getHeldItem(),
proxyPlayer,
proxyPlayer.worldObj,
x,
y,
z,
side,
fx,
fy,
fz)) return;
}
block.onBlockActivated(entityClientPlayerMP.worldObj, x, y, z, proxyPlayer, side, fx, fy, fz);
}
Expand Down
43 changes: 28 additions & 15 deletions src/main/java/remoteio/client/documentation/Documentation.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package remoteio.client.documentation;

import com.google.common.collect.Lists;

import java.util.EnumMap;
import java.util.List;

/**
* @author dmillerw
*/
public class Documentation {
private static EnumMap<Category, List<DocumentationEntry>> documentationMap = new EnumMap<Category, List<DocumentationEntry>>(Category.class);
private static EnumMap<Category, List<DocumentationEntry>> documentationMap =
new EnumMap<Category, List<DocumentationEntry>>(Category.class);

public static void register(Category category, List<DocumentationEntry> documentation) {
documentationMap.put(category, documentation);
Expand All @@ -21,22 +21,35 @@ public static List<DocumentationEntry> get(Category category) {

public static void initialize() {
List<DocumentationEntry> list = Lists.newArrayList();
list.add(new DocumentationEntry("documentation.block.remoteInterface").addPage(new DocumentationPageText("documentation.block.remoteInterface.page.1")));
list.add(new DocumentationEntry("documentation.block.remoteInventory").addPage(new DocumentationPageText("documentation.block.remoteInventory.page.1")));
list.add(new DocumentationEntry("documentation.block.skylight").addPage(new DocumentationPageText("documentation.block.skylight.page.1")));
list.add(new DocumentationEntry("documentation.block.heater").addPage(new DocumentationPageText("documentation.block.heater.page.1")));
list.add(new DocumentationEntry("documentation.block.reservoir").addPage(new DocumentationPageText("documentation.block.reservoir.page.1")));
list.add(new DocumentationEntry("documentation.block.intelligentWorkbench").addPage(new DocumentationPageText("documentation.block.intelligentWorkbench.page.1")));
list.add(new DocumentationEntry("documentation.block.remoteInterface")
.addPage(new DocumentationPageText("documentation.block.remoteInterface.page.1")));
list.add(new DocumentationEntry("documentation.block.remoteInventory")
.addPage(new DocumentationPageText("documentation.block.remoteInventory.page.1")));
list.add(new DocumentationEntry("documentation.block.skylight")
.addPage(new DocumentationPageText("documentation.block.skylight.page.1")));
list.add(new DocumentationEntry("documentation.block.heater")
.addPage(new DocumentationPageText("documentation.block.heater.page.1")));
list.add(new DocumentationEntry("documentation.block.reservoir")
.addPage(new DocumentationPageText("documentation.block.reservoir.page.1")));
list.add(new DocumentationEntry("documentation.block.intelligentWorkbench")
.addPage(new DocumentationPageText("documentation.block.intelligentWorkbench.page.1")));
register(Category.BLOCK, list);

list = Lists.newArrayList();
list.add(new DocumentationEntry("documentation.item.ioTool").addPage(new DocumentationPageText("documentation.item.ioTool.page.1")));
list.add(new DocumentationEntry("documentation.item.pda").addPage(new DocumentationPageText("documentation.item.pda.page.1")));
list.add(new DocumentationEntry("documentation.item.wirelessTransmitter").addPage(new DocumentationPageText("documentation.item.wirelessTransmitter.page.1")));
list.add(new DocumentationEntry("documentation.item.wirelessLocationChip").addPage(new DocumentationPageText("documentation.item.wirelessLocationChip.page.1")));
list.add(new DocumentationEntry("documentation.item.upgrades").addPage(new DocumentationPageText("documentation.item.upgrades.page.1")));
list.add(new DocumentationEntry("documentation.item.linker").addPage(new DocumentationPageText("documentation.item.linker.page.1")));
list.add(new DocumentationEntry("documentation.item.remoteAccessor").addPage(new DocumentationPageText("documentation.item.remoteAccessor.page.1")));
list.add(new DocumentationEntry("documentation.item.ioTool")
.addPage(new DocumentationPageText("documentation.item.ioTool.page.1")));
list.add(new DocumentationEntry("documentation.item.pda")
.addPage(new DocumentationPageText("documentation.item.pda.page.1")));
list.add(new DocumentationEntry("documentation.item.wirelessTransmitter")
.addPage(new DocumentationPageText("documentation.item.wirelessTransmitter.page.1")));
list.add(new DocumentationEntry("documentation.item.wirelessLocationChip")
.addPage(new DocumentationPageText("documentation.item.wirelessLocationChip.page.1")));
list.add(new DocumentationEntry("documentation.item.upgrades")
.addPage(new DocumentationPageText("documentation.item.upgrades.page.1")));
list.add(new DocumentationEntry("documentation.item.linker")
.addPage(new DocumentationPageText("documentation.item.linker.page.1")));
list.add(new DocumentationEntry("documentation.item.remoteAccessor")
.addPage(new DocumentationPageText("documentation.item.remoteAccessor.page.1")));
register(Category.ITEM, list);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package remoteio.client.documentation;

import com.google.common.collect.Lists;

import java.util.LinkedList;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
/**
* @author dmillerw
*/
public class DocumentationPageText
implements IDocumentationPage {
public class DocumentationPageText implements IDocumentationPage {
private String unlocalizedPrefix;

public DocumentationPageText(String unlocalizedPrefix) {
Expand All @@ -25,10 +24,11 @@ public void renderScreen(GuiScreen guiScreen, int mouseX, int mouseY) {
String[] lines = Strings.wrap(localized, 20).split("\n");
int x = 15;
int y = 0;
for(String str : lines){
for (String str : lines) {
fRenderer.drawString(str, x, y += fRenderer.FONT_HEIGHT + 2, GuiDocumentation.TEXT_COLOR);
}
}

@Override public void updateScreen(GuiScreen guiScreen) {}
@Override
public void updateScreen(GuiScreen guiScreen) {}
}
Loading