Skip to content

Commit c88ac14

Browse files
committed
ビルド時のjar名を変更
1 parent d475990 commit c88ac14

File tree

3 files changed

+44
-11
lines changed

3 files changed

+44
-11
lines changed

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ apply plugin: 'eclipse'
1414
apply plugin: 'maven-publish'
1515

1616
version = '1.0'
17-
group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
18-
archivesBaseName = 'modid'
17+
group = 'jp.scriptarts' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
18+
archivesBaseName = 'StructureBlockExtends'
1919

2020
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
2121

@@ -116,12 +116,12 @@ dependencies {
116116
jar {
117117
manifest {
118118
attributes([
119-
"Specification-Title": "examplemod",
120-
"Specification-Vendor": "examplemodsareus",
119+
"Specification-Title": "StructureBlock Extends",
120+
"Specification-Vendor": "Script Arts",
121121
"Specification-Version": "1", // We are version 1 of ourselves
122122
"Implementation-Title": project.name,
123123
"Implementation-Version": "${version}",
124-
"Implementation-Vendor" :"examplemodsareus",
124+
"Implementation-Vendor" :"Script Arts",
125125
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
126126
])
127127
}

src/main/java/jp/scriptarts/structureblockextends/StructureBlockEx.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import net.minecraft.world.IBlockReader;
2222
import net.minecraft.world.World;
2323

24-
public class StructureBlockEx extends StructureBlock {
24+
public class StructureBlockEx extends ContainerBlock {
2525
public static final EnumProperty<StructureMode> MODE = BlockStateProperties.STRUCTURE_BLOCK_MODE;
2626

2727
public StructureBlockEx(AbstractBlock.Properties properties) {
@@ -72,14 +72,14 @@ public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block
7272
if (!worldIn.isRemote) {
7373
TileEntity tileentity = worldIn.getTileEntity(pos);
7474
if (tileentity instanceof StructureBlockExTileEntity) {
75-
StructureBlockExTileEntity structureblocktileentity = (StructureBlockExTileEntity)tileentity;
75+
StructureBlockExTileEntity structureBlockExTileEntity = (StructureBlockExTileEntity)tileentity;
7676
boolean flag = worldIn.isBlockPowered(pos);
77-
boolean flag1 = structureblocktileentity.isPowered();
77+
boolean flag1 = structureBlockExTileEntity.isPowered();
7878
if (flag && !flag1) {
79-
structureblocktileentity.setPowered(true);
80-
this.trigger(structureblocktileentity);
79+
structureBlockExTileEntity.setPowered(true);
80+
this.trigger(structureBlockExTileEntity);
8181
} else if (!flag && flag1) {
82-
structureblocktileentity.setPowered(false);
82+
structureBlockExTileEntity.setPowered(false);
8383
}
8484

8585
}

src/main/java/jp/scriptarts/structureblockextends/StructureBlockExTileEntity.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import net.minecraft.state.properties.StructureMode;
1818
import net.minecraft.tileentity.StructureBlockTileEntity;
1919
import net.minecraft.tileentity.TileEntity;
20+
import net.minecraft.tileentity.TileEntityType;
2021
import net.minecraft.util.Mirror;
2122
import net.minecraft.util.ResourceLocation;
2223
import net.minecraft.util.ResourceLocationException;
@@ -54,6 +55,38 @@ public class StructureBlockExTileEntity extends StructureBlockTileEntity {
5455
private static int SIZE_MAX = 1000;
5556
private static int SIZE_MIN = -1000;
5657

58+
public StructureBlockExTileEntity() {
59+
super();
60+
}
61+
62+
@OnlyIn(Dist.CLIENT)
63+
public double getMaxRenderDistanceSquared() {
64+
return 96.0D;
65+
}
66+
67+
public CompoundNBT write(CompoundNBT compound) {
68+
super.write(compound);
69+
compound.putString("name", this.getName());
70+
compound.putString("author", this.author);
71+
compound.putString("metadata", this.metadata);
72+
compound.putInt("posX", this.position.getX());
73+
compound.putInt("posY", this.position.getY());
74+
compound.putInt("posZ", this.position.getZ());
75+
compound.putInt("sizeX", this.size.getX());
76+
compound.putInt("sizeY", this.size.getY());
77+
compound.putInt("sizeZ", this.size.getZ());
78+
compound.putString("rotation", this.rotation.toString());
79+
compound.putString("mirror", this.mirror.toString());
80+
compound.putString("mode", this.mode.toString());
81+
compound.putBoolean("ignoreEntities", this.ignoreEntities);
82+
compound.putBoolean("powered", this.powered);
83+
compound.putBoolean("showair", this.showAir);
84+
compound.putBoolean("showboundingbox", this.showBoundingBox);
85+
compound.putFloat("integrity", this.integrity);
86+
compound.putLong("seed", this.seed);
87+
return compound;
88+
}
89+
5790
public void func_230337_a_(BlockState p_230337_1_, CompoundNBT p_230337_2_) {
5891
super.func_230337_a_(p_230337_1_, p_230337_2_);
5992
this.setName(p_230337_2_.getString("name"));

0 commit comments

Comments
 (0)