Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Commit 7f5c324

Browse files
committedSep 12, 2016
1.10.2
1 parent f234334 commit 7f5c324

File tree

9 files changed

+29
-24
lines changed

9 files changed

+29
-24
lines changed
 

‎build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212
}
1313
}
1414
dependencies {
15-
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
15+
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
1616
classpath 'com.matthewprenger:CurseGradle:1.0-SNAPSHOT'
1717
}
1818
}

‎gradle.properties

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version_major=2
22
version_minor=1
3-
version_micro=6.beta
4-
version_minecraft=1.9
5-
version_forge=12.16.1.1887
6-
version_minforge=12.16.1.1887
7-
version_mappings=snapshot_20160312
3+
version_micro=5
4+
version_minecraft=1.10.2
5+
version_forge=12.18.1.2011
6+
version_minforge=12.18.1.2011
7+
version_mappings=snapshot_20160518

‎src/main/java/com/kamesuta/mc/bnnwidget/component/MButton.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void mouseClicked(final WEvent ev, final Area pgp, final Point p, final i
4444
if (this.actionCommand != null)
4545
ev.eventDispatch(this.actionCommand, Integer.valueOf(button));
4646
mc.getSoundHandler()
47-
.playSound(PositionedSoundRecord.getMasterRecord(SoundEvents.ui_button_click, 1.0F));
47+
.playSound(PositionedSoundRecord.getMasterRecord(SoundEvents.UI_BUTTON_CLICK, 1.0F));
4848
}
4949
}
5050
}

‎src/main/java/com/kamesuta/mc/signpic/image/McImageTexture.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import net.minecraft.util.ResourceLocation;
1010

1111
public class McImageTexture implements IImageTexture {
12-
protected static final ResourceLocation Null = Client.mc.renderEngine.getDynamicTextureLocation("null", TextureUtil.missingTexture);
12+
protected static final ResourceLocation Null = Client.mc.renderEngine.getDynamicTextureLocation("null", TextureUtil.MISSING_TEXTURE);
1313
protected static final ImageSize DefaultSize = new ImageSize().defaultSize();
1414
protected ResourceLocation location;
1515

‎src/main/java/com/kamesuta/mc/signpic/information/CommandDownloadLatest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public boolean checkPermission(final MinecraftServer server, final ICommandSende
3535
@Override
3636
public void execute(final MinecraftServer server, final ICommandSender var1, final String[] var2) {
3737
if(!ENABLED) {
38-
var1.addChatMessage(new TextComponentTranslation("signpic.versioning.disabled").setChatStyle(new Style().setColor(TextFormatting.RED)));
38+
var1.addChatMessage(new TextComponentTranslation("signpic.versioning.disabled").setStyle(new Style().setColor(TextFormatting.RED)));
3939
} else {
4040
final InformationChecker.InfoState state = InformationChecker.state;
4141
if (state.doneChecking && state.onlineVersion!=null && !StringUtils.isEmpty(state.onlineVersion.remote))
4242
{
4343
if(state.downloadedFile)
44-
var1.addChatMessage(new TextComponentTranslation("signpic.versioning.downloadedAlready").setChatStyle(new Style().setColor(TextFormatting.RED)));
44+
var1.addChatMessage(new TextComponentTranslation("signpic.versioning.downloadedAlready").setStyle(new Style().setColor(TextFormatting.RED)));
4545
else if(state.startedDownload)
46-
var1.addChatMessage(new TextComponentTranslation("signpic.versioning.downloadingAlready").setChatStyle(new Style().setColor(TextFormatting.RED)));
46+
var1.addChatMessage(new TextComponentTranslation("signpic.versioning.downloadingAlready").setStyle(new Style().setColor(TextFormatting.RED)));
4747
else new ThreadDownloadMod();
4848
}
4949
}

‎src/main/java/com/kamesuta/mc/signpic/preview/SignEntity.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import net.minecraft.world.World;
1515

1616
public class SignEntity {
17-
private final PreviewTileEntitySign tileSign = new PreviewTileEntitySign(Blocks.standing_sign);
17+
private final PreviewTileEntitySign tileSign = new PreviewTileEntitySign(Blocks.STANDING_SIGN);
1818
private boolean renderable = false;
1919

2020
protected PreviewTileEntitySign onItemUse(final EntityPlayer playerIn, final World worldIn, BlockPos pos, final EnumFacing facing)
@@ -26,7 +26,7 @@ protected PreviewTileEntitySign onItemUse(final EntityPlayer playerIn, final Wor
2626
{
2727
pos = pos.offset(facing);
2828

29-
if (!Blocks.standing_sign.canPlaceBlockAt(worldIn, pos))
29+
if (!Blocks.STANDING_SIGN.canPlaceBlockAt(worldIn, pos))
3030
{
3131
return null;
3232
}
@@ -36,13 +36,13 @@ protected PreviewTileEntitySign onItemUse(final EntityPlayer playerIn, final Wor
3636

3737
if (facing == EnumFacing.UP)
3838
{
39-
this.tileSign.setBlockType(Blocks.standing_sign);
39+
this.tileSign.setBlockType(Blocks.STANDING_SIGN);
4040
final int i = MathHelper.floor_double((playerIn.rotationYaw + 180.0F) * 16.0F / 360.0F + 0.5D) & 15;
4141
this.tileSign.setBlockMetadata(i);
4242
}
4343
else
4444
{
45-
this.tileSign.setBlockType(Blocks.wall_sign);
45+
this.tileSign.setBlockType(Blocks.WALL_SIGN);
4646
this.tileSign.setBlockMetadata(facing.getIndex());
4747
}
4848

‎src/main/java/com/kamesuta/mc/signpic/render/CustomTileEntitySignRenderer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void renderTileEntityAt(final TileEntitySign te, final double x, final do
5151
final float f1 = 0.6666667F;
5252
float f3;
5353

54-
if (block == Blocks.standing_sign) {
54+
if (block == Blocks.STANDING_SIGN) {
5555
GlStateManager.translate((float)x + 0.5F, (float)y + 0.75F * f1, (float)z + 0.5F);
5656
final float f2 = te.getBlockMetadata() * 360 / 16.0F;
5757
GlStateManager.rotate(-f2, 0.0F, 1.0F, 0.0F);

‎src/main/java/com/kamesuta/mc/signpic/util/ChatBuilder.java

+11-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import net.minecraft.util.text.Style;
1010
import net.minecraft.util.text.TextComponentString;
1111
import net.minecraft.util.text.TextComponentTranslation;
12-
import net.minecraft.util.text.translation.I18n;
1312
import net.minecraftforge.fml.relauncher.Side;
1413
import net.minecraftforge.fml.relauncher.SideOnly;
1514

@@ -34,9 +33,9 @@ public ITextComponent build() {
3433
chat = new TextComponentTranslation(this.text, this.params);
3534
else {
3635
String s;
37-
if (this.useTranslation)
38-
s = String.format(I18n.translateToLocal(this.text), this.params);
39-
else
36+
if (this.useTranslation) {
37+
s = String.format(translateToLocal(this.text), this.params);
38+
} else
4039
s = this.text;
4140

4241
if (this.useJson)
@@ -52,10 +51,16 @@ public ITextComponent build() {
5251
chat = this.chat;
5352
}
5453
if (chat!=null && this.style!=null)
55-
chat.setChatStyle(this.style);
54+
chat.setStyle(this.style);
5655
return chat;
5756
}
5857

58+
@SideOnly(Side.CLIENT)
59+
@SuppressWarnings("deprecation")
60+
public static String translateToLocal(final String text) {
61+
return net.minecraft.util.text.translation.I18n.translateToLocal(text);
62+
}
63+
5964
public ChatBuilder setId(final int id) {
6065
this.useId = true;
6166
this.id = id;
@@ -129,4 +134,4 @@ public static void sendServerChat(final ChatBuilder chat) {
129134
// final ServerConfigurationManager sender = FMLCommonHandler.instance().getMinecraftServerInstance().();
130135
// sender.sendChatMsg(chat.build());
131136
}
132-
}
137+
}

‎src/main/java/com/kamesuta/mc/signpic/util/Sign.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ public Sign updatePreview() {
127127
public Sign sendSign(final TileEntitySign sourceentity) {
128128
writeToEntity(sourceentity);
129129
sourceentity.markDirty();
130-
final NetHandlerPlayClient nethandlerplayclient = Client.mc.getNetHandler();
130+
final NetHandlerPlayClient nethandlerplayclient = Client.mc.getConnection();
131131
if (nethandlerplayclient != null)
132-
nethandlerplayclient.addToSendQueue(new CPacketUpdateSign(sourceentity.getPos(), sourceentity.signText));
132+
nethandlerplayclient.sendPacket(new CPacketUpdateSign(sourceentity.getPos(), sourceentity.signText));
133133
sourceentity.setEditable(true);
134134
return this;
135135
}

0 commit comments

Comments
 (0)
This repository has been archived.