Skip to content

Commit 4c7ea74

Browse files
committed
Fixed lens bounds and cleaned up assets
1 parent c6da985 commit 4c7ea74

File tree

9 files changed

+34
-23
lines changed

9 files changed

+34
-23
lines changed

assets/AE Encoder.png

-140 Bytes
Binary file not shown.

assets/Model.png

-1.64 KB
Binary file not shown.

assets/laser.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"__createdwith": "opl's Model Creator",
3-
"ambientocclusion": false,
2+
"ambientocclusion": true,
43
"elements": [
54
{
65
"from": [0,0,0],

assets/lens.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"ambientocclusion": false,
2+
"ambientocclusion": true,
33
"elements": [
44
{
55
"from": [2,2,7],

assets/lensBlock.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
2-
"__createdwith": "opl's Model Creator",
3-
"ambientocclusion": false,
2+
"ambientocclusion": true,
43
"textures": {
54
"lensBlock": "openradio:blocks/lensblock"
65
},
76
"elements": [
87
{
9-
"from": [0,0,5],
10-
"to": [2,16,11],
8+
"from": [0,0,6],
9+
"to": [2,16,10],
1110
"faces": {
1211
"up": {
1312
"uv": [7,8,8,10],
@@ -36,8 +35,8 @@
3635
}
3736
},
3837
{
39-
"from": [14,0,5],
40-
"to": [16,16,11],
38+
"from": [14,0,6],
39+
"to": [16,16,10],
4140
"faces": {
4241
"up": {
4342
"uv": [0,8,1,10],
@@ -66,8 +65,8 @@
6665
}
6766
},
6867
{
69-
"from": [2,14,5],
70-
"to": [14,16,11],
68+
"from": [2,14,6],
69+
"to": [14,16,10],
7170
"faces": {
7271
"up": {
7372
"uv": [1,8,7,10],
@@ -88,8 +87,8 @@
8887
}
8988
},
9089
{
91-
"from": [2,0,5],
92-
"to": [14,2,11],
90+
"from": [2,0,6],
91+
"to": [14,2,10],
9392
"faces": {
9493
"up": {
9594
"uv": [1,8,7,10],

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ plugins {
1818
apply plugin: 'idea'
1919
apply plugin: 'net.minecraftforge.gradle.forge'
2020

21-
version = "0.6.1-alpha-MC1.8.9"
21+
version = "0.7.0-beta-MC1.8.9"
2222
group = "at.chaosfield.openradio"
2323
archivesBaseName = "OpenRadio"
2424

src/main/java/at/chaosfield/openradio/OpenRadio.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* Created by Jakob Riepler (XDjackieXD)
2020
*/
2121

22-
@Mod(name = "Open Radio", modid = OpenRadio.MODID, version = "0.6.1", modLanguage = "java", dependencies = "required-after:OpenComputers@[1.5.0,)")
22+
@Mod(name = "Open Radio", modid = OpenRadio.MODID, version = "0.7.0", modLanguage = "java", dependencies = "required-after:OpenComputers@[1.5.0,)")
2323
public class OpenRadio{
2424

2525
public static final String MODID = "openradio";

src/main/java/at/chaosfield/openradio/block/LensBlock.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import net.minecraft.util.BlockPos;
1616
import net.minecraft.util.EnumFacing;
1717
import net.minecraft.util.EnumWorldBlockLayer;
18+
import net.minecraft.world.IBlockAccess;
1819
import net.minecraft.world.World;
1920
import net.minecraftforge.fml.relauncher.Side;
2021
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -90,6 +91,18 @@ public EnumWorldBlockLayer getBlockLayer()
9091
return EnumWorldBlockLayer.CUTOUT_MIPPED;
9192
}
9293

94+
public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos pos)
95+
{
96+
EnumFacing.Axis axis = world.getBlockState(pos).getValue(FACING).getAxis();
97+
98+
if (axis == EnumFacing.Axis.X)
99+
this.setBlockBounds(0.375F, 0, 0, 0.625F, 1, 1);
100+
else if (axis == EnumFacing.Axis.Z)
101+
this.setBlockBounds(0, 0, 0.375F, 1, 1, 0.625F);
102+
else if (axis == EnumFacing.Axis.Y)
103+
this.setBlockBounds(0, 0.375F, 0, 1, 0.625F, 1);
104+
}
105+
93106
@Override
94107
public void hitByLaser(LaserEntity laserEntity, BlockPos pos, World world, EnumFacing direction){
95108
if(!world.isRemote){

src/main/resources/assets/openradio/models/block/lens.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@
113113

114114

115115
{
116-
"from": [0,0,5],
117-
"to": [2,16,11],
116+
"from": [0,0,6],
117+
"to": [2,16,10],
118118
"faces": {
119119
"up": {
120120
"uv": [7,8,8,10],
@@ -143,8 +143,8 @@
143143
}
144144
},
145145
{
146-
"from": [14,0,5],
147-
"to": [16,16,11],
146+
"from": [14,0,6],
147+
"to": [16,16,10],
148148
"faces": {
149149
"up": {
150150
"uv": [0,8,1,10],
@@ -173,8 +173,8 @@
173173
}
174174
},
175175
{
176-
"from": [2,14,5],
177-
"to": [14,16,11],
176+
"from": [2,14,6],
177+
"to": [14,16,10],
178178
"faces": {
179179
"up": {
180180
"uv": [1,8,7,10],
@@ -195,8 +195,8 @@
195195
}
196196
},
197197
{
198-
"from": [2,0,5],
199-
"to": [14,2,11],
198+
"from": [2,0,6],
199+
"to": [14,2,10],
200200
"faces": {
201201
"up": {
202202
"uv": [1,8,7,10],

0 commit comments

Comments
 (0)