Skip to content

Commit 425eee3

Browse files
committed
Added Nukranium Gauntlet and fixed some world border issues in Apocalypse
1 parent 6c7c47e commit 425eee3

File tree

13 files changed

+219
-27
lines changed

13 files changed

+219
-27
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ minecraft {
4040
version = minecraft_version + "-" + forge_version
4141
runDir = "run"
4242

43-
replace "@ALLOWED_VERSIONS@", "[5.9.0, 5.10)"
43+
replace "@ALLOWED_VERSIONS@", "[5.10.0, 5.11)"
4444
replace "@VERSION@", project.version
4545
replaceIn "FlansMod.java"
4646
replaceIn "ModernWeaponsPackMod.java"
@@ -53,7 +53,7 @@ minecraft {
5353
replaceIn "YeOldePackMod.java"
5454
replaceIn "ZombiePackMod.java"
5555

56-
replace "@ALLOWED_VERSIONS_APOCALYPSE@", "[1.3, 1.4)"
56+
replace "@ALLOWED_VERSIONS_APOCALYPSE@", "[1.4, 1.5)"
5757
replace "@VERSION_APOCALYPSE@", project.apocalypseVersion
5858
replaceIn "FlansModApocalypse.java"
5959

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ minecraft_version = 1.12.2
77
jei_version = 4.15.0.293
88

99
version_major = 5
10-
version_minor = 9
10+
version_minor = 10
1111
version_patch = 0
1212
version_extra =
13-
apocalypseVersion = 1.3.3
13+
apocalypseVersion = 1.4.0

run/Flan/Apocalypse Pack/assets/flansmod/lang/en_us.lang

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ item.aiChip.name=AI Chip
44
item.complicatedCircuit.name=Complicated Circuit
55
item.nuclearPowerCore.name=Nuclear Power Core
66
tile.flanGunRack.name=Gun Rack
7-
item.buggy.name=Buggy
7+
item.buggy.name=Buggy
8+
item.nukranium_gauntlet.name=Nukranium Gauntlet
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"credit": "Made with Blockbench",
3+
"textures": {
4+
"0": "flansmod:items/nukranium_gauntlet",
5+
"particle": "flansmod:items/nukranium_gauntlet"
6+
},
7+
"elements": [
8+
{
9+
"from": [5, 5, 5],
10+
"to": [11, 11, 11],
11+
"faces": {
12+
"north": {"uv": [0, 0, 6, 6], "texture": "#0"},
13+
"east": {"uv": [0, 0, 6, 6], "texture": "#0"},
14+
"south": {"uv": [0, 0, 6, 6], "texture": "#0"},
15+
"west": {"uv": [0, 0, 6, 6], "texture": "#0"},
16+
"up": {"uv": [0, 0, 6, 6], "texture": "#0"},
17+
"down": {"uv": [0, 0, 6, 6], "texture": "#0"}
18+
}
19+
},
20+
{
21+
"from": [6, 6, 4],
22+
"to": [10, 10, 5],
23+
"rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 4]},
24+
"faces": {
25+
"north": {"uv": [0, 8, 4, 12], "texture": "#0"},
26+
"east": {"uv": [4, 8, 5, 12], "texture": "#0"},
27+
"south": {"uv": [0, 12, 4, 16], "texture": "#0"},
28+
"west": {"uv": [4, 12, 5, 16], "texture": "#0"},
29+
"up": {"uv": [0, 6, 4, 7], "texture": "#0"},
30+
"down": {"uv": [0, 7, 4, 8], "texture": "#0"}
31+
}
32+
},
33+
{
34+
"from": [5.5, 5.5, 9],
35+
"to": [10.5, 10.5, 13],
36+
"faces": {
37+
"north": {"uv": [0, 0, 5, 5], "texture": "#0"},
38+
"east": {"uv": [0, 0, 4, 5], "texture": "#0"},
39+
"south": {"uv": [0, 0, 5, 5], "texture": "#0"},
40+
"west": {"uv": [0, 0, 4, 5], "texture": "#0"},
41+
"up": {"uv": [0, 0, 5, 4], "texture": "#0"},
42+
"down": {"uv": [0, 0, 5, 4], "texture": "#0"}
43+
}
44+
},
45+
{
46+
"name": "spike",
47+
"from": [9.25, 9.75, 6],
48+
"to": [10.25, 10.75, 10],
49+
"rotation": {"angle": -22.5, "axis": "x", "origin": [9, 10, 6]},
50+
"faces": {
51+
"north": {"uv": [10, 0, 11, 1], "texture": "#0"},
52+
"east": {"uv": [12, 1, 16, 2], "texture": "#0"},
53+
"south": {"uv": [11, 1, 12, 2], "texture": "#0"},
54+
"west": {"uv": [12, 0, 16, 1], "texture": "#0"},
55+
"up": {"uv": [10, 0, 11, 4], "texture": "#0"},
56+
"down": {"uv": [9, 0, 10, 4], "texture": "#0"}
57+
}
58+
},
59+
{
60+
"name": "spike",
61+
"from": [5.75, 9.5, 6],
62+
"to": [6.75, 10.5, 10],
63+
"rotation": {"angle": -22.5, "axis": "x", "origin": [6, 10, 6]},
64+
"faces": {
65+
"north": {"uv": [10, 0, 11, 1], "texture": "#0"},
66+
"east": {"uv": [12, 1, 16, 2], "texture": "#0"},
67+
"south": {"uv": [11, 1, 12, 2], "texture": "#0"},
68+
"west": {"uv": [12, 0, 16, 1], "texture": "#0"},
69+
"up": {"uv": [10, 0, 11, 4], "texture": "#0"},
70+
"down": {"uv": [9, 0, 10, 4], "texture": "#0"}
71+
}
72+
},
73+
{
74+
"name": "spike",
75+
"from": [7.5, 9.625, 6],
76+
"to": [8.5, 10.625, 10],
77+
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 10, 6]},
78+
"faces": {
79+
"north": {"uv": [10, 0, 11, 1], "texture": "#0"},
80+
"east": {"uv": [12, 1, 16, 2], "texture": "#0"},
81+
"south": {"uv": [11, 1, 12, 2], "texture": "#0"},
82+
"west": {"uv": [12, 0, 16, 1], "texture": "#0"},
83+
"up": {"uv": [10, 0, 11, 4], "texture": "#0"},
84+
"down": {"uv": [9, 0, 10, 4], "texture": "#0"}
85+
}
86+
}
87+
],
88+
"display": {
89+
"thirdperson_righthand": {
90+
"translation": [0, -2, 0],
91+
"scale": [1, 1, 1]
92+
},
93+
"thirdperson_lefthand": {
94+
"translation": [0, -2, 0]
95+
},
96+
"firstperson_righthand": {
97+
"scale": [1, 1, 1]
98+
},
99+
"gui": {
100+
"rotation": [45, 135, 0],
101+
"scale": [1.2, 1.2, 1.2]
102+
},
103+
"fixed": {
104+
"rotation": [-90, 0, 0]
105+
}
106+
}
107+
}
325 Bytes
Loading
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Name Nukranium Gauntlet
2+
ShortName nukranium_gauntlet
3+
Icon nukranium_gauntlet
4+
//Colour in Red, Green, Blue, each going up to 255.
5+
Colour 255 255 255
6+
Enchantability 50
7+
Durability 2048

src/main/java/com/flansmod/apocalypse/common/FlansModApocalypse.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
import com.flansmod.common.FlansMod;
6262
import com.flansmod.common.IFlansModContentProvider;
6363
import com.flansmod.common.ItemHolderType;
64+
import com.flansmod.common.enchantments.GloveType;
65+
import com.flansmod.common.enchantments.ItemGlove;
6466
import com.flansmod.common.parts.PartType;
6567

6668
@Mod(modid = FlansModApocalypse.MODID, name = "Flan's Mod: Apocalypse", version = FlansModApocalypse.VERSION, acceptableRemoteVersions = "@ALLOWED_VERSIONS_APOCALYPSE@", dependencies = "required-after:" + FlansMod.MODID)
@@ -91,6 +93,7 @@ public class FlansModApocalypse implements IFlansModContentProvider
9193
public static int AIRPORT_RARITY = 125;
9294
public static int DYE_FACTORY_RARITY = 400;
9395
public static int LAB_RARITY = 100;
96+
9497

9598
// TODO: Configify
9699
public static int ABANDONED_PORTAL_APOC_RARITY = 4000;
@@ -104,6 +107,7 @@ public class FlansModApocalypse implements IFlansModContentProvider
104107
* How far from their death point does the player respawn?
105108
*/
106109
public static int SPAWN_RADIUS = 100;
110+
public static boolean RESPAWN_IN_APOC = false;
107111
/**
108112
* Who gets teleported to the apocalypse when a player places a mecha?
109113
*/
@@ -130,6 +134,8 @@ public class FlansModApocalypse implements IFlansModContentProvider
130134
//References to apocalypse specific items and blocks:
131135
public static BlockItemHolder skeleton, slumpedSkeleton, gunRack;
132136

137+
public static ItemGlove nukraniumGauntlet;
138+
133139
static
134140
{
135141
FluidRegistry.enableUniversalBucket();
@@ -274,6 +280,11 @@ public void init(FMLInitializationEvent event)
274280
if(PartType.getPart("nuclearPowerCore") != null)
275281
PartType.getPart("nuclearPowerCore").item.setCreativeTab(tabApocalypse);
276282

283+
if(GloveType.getGlove("nukranium_gauntlet") != null)
284+
{
285+
nukraniumGauntlet = (ItemGlove)GloveType.getGlove("nukranium_gauntlet").item;
286+
}
287+
277288
lootGenerator = new FlansModLootGenerator();
278289
}
279290

@@ -343,6 +354,7 @@ public static void syncConfig()
343354

344355
ABANDONED_PORTAL_APOC_RARITY = configFile.getInt("Abandoned Portal Rarity (Apocalypse)", Configuration.CATEGORY_GENERAL, ABANDONED_PORTAL_APOC_RARITY, 1, Integer.MAX_VALUE, "Rarity of the abandoned portal structures in the apocalypse");
345356
ABANDONED_PORTAL_OVERWORLD_RARITY = configFile.getInt("Abandoned Portal Rarity (Other Dimensions)", Configuration.CATEGORY_GENERAL, ABANDONED_PORTAL_OVERWORLD_RARITY, 1, Integer.MAX_VALUE, "Rarity of the abandoned portal structures in other dimensions");
357+
RESPAWN_IN_APOC = configFile.getBoolean("Respawn in Apocalypse", Configuration.CATEGORY_GENERAL, RESPAWN_IN_APOC, "If false, players will return to their overworld spawn point");
346358

347359
if(configFile.hasChanged())
348360
configFile.save();

src/main/java/com/flansmod/apocalypse/common/entity/EntitySkullBoss.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.flansmod.common.guns.ItemGun;
88
import com.flansmod.common.network.PacketPlaySound;
99

10+
import net.minecraft.enchantment.EnchantmentHelper;
1011
import net.minecraft.entity.Entity;
1112
import net.minecraft.entity.EntityLiving;
1213
import net.minecraft.entity.MoverType;
@@ -390,6 +391,17 @@ public void setDead()
390391
dropItem(FlansMod.gunpowderBlockItem, rand.nextInt(4) + 1);
391392
dropItem(FlansMod.gunpowderBlockItem, rand.nextInt(4) + 1);
392393
dropItem(FlansMod.gunpowderBlockItem, rand.nextInt(4) + 1);
394+
395+
if(FlansModApocalypse.nukraniumGauntlet != null)
396+
{
397+
ItemStack gauntlet = new ItemStack(FlansModApocalypse.nukraniumGauntlet);
398+
// 50% enchanted, 50% clean
399+
if(rand.nextBoolean())
400+
{
401+
EnchantmentHelper.addRandomEnchantment(world.rand, gauntlet, 50, true);
402+
}
403+
entityDropItem(gauntlet, 0.0f);
404+
}
393405
}
394406
}
395407
}

src/main/java/com/flansmod/apocalypse/common/entity/EntityTeleporter.java

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,14 @@ private void findPortal(EntityPlayer player)
136136
{
137137
if(overworld.isAirBlock(pos) && overworld.isSideSolid(pos.down(), EnumFacing.UP))
138138
{
139-
//We have found a valid position
140-
if(createPortal(overworld, pos))
139+
if(overworld.getWorldBorder().contains(pos) && overworld.getWorldBorder().contains(pos.add(3, 0, 3)))
141140
{
142-
targetTeleporter = pos;
143-
return;
141+
//We have found a valid position
142+
if(createPortal(overworld, pos))
143+
{
144+
targetTeleporter = pos;
145+
return;
146+
}
144147
}
145148
}
146149
}
@@ -160,11 +163,14 @@ private void findPortal(EntityPlayer player)
160163
{
161164
if(apocWorld.isAirBlock(pos) && apocWorld.isSideSolid(pos.down(), EnumFacing.UP))
162165
{
163-
//We have found a valid position
164-
if(createPortal(apocWorld, pos))
166+
if(apocWorld.getWorldBorder().contains(pos) && apocWorld.getWorldBorder().contains(pos.add(3, 0, 3)))
165167
{
166-
targetTeleporter = pos;
167-
return;
168+
//We have found a valid position
169+
if(createPortal(apocWorld, pos))
170+
{
171+
targetTeleporter = pos;
172+
return;
173+
}
168174
}
169175
}
170176
}

src/main/java/com/flansmod/apocalypse/common/world/WorldProviderApocalypse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public IChunkGenerator createChunkGenerator()
3232
@Override
3333
public boolean canRespawnHere()
3434
{
35-
return true;
35+
return FlansModApocalypse.RESPAWN_IN_APOC;
3636
}
3737

3838
@Override

0 commit comments

Comments
 (0)