Made some errors more user-friendly

Properly take into account portal-closed material
This commit is contained in:
Drakia 2011-04-26 10:35:02 -07:00
parent a27e1bd017
commit 54af5f449e
4 changed files with 7 additions and 4 deletions

3
README
View File

@ -126,6 +126,9 @@ toowner - Whether the money from gate-use goes to the owner or nobody
============= =============
Changes Changes
============= =============
[Version 0.4.3]
- Made some errors more user-friendly
- Properly take into account portal-closed material
[Version 0.4.2] [Version 0.4.2]
- Gates can't be created on existing gate blocks - Gates can't be created on existing gate blocks
[Version 0.4.1] [Version 0.4.1]

View File

@ -235,7 +235,7 @@ public class Gate {
int id = layout[y][x]; int id = layout[y][x];
if (id == ENTRANCE || id == EXIT) { if (id == ENTRANCE || id == EXIT) {
if (topleft.modRelative(x, y, 0, modX, 1, modZ).getType() != 0) { if (topleft.modRelative(x, y, 0, modX, 1, modZ).getType() != portalBlockClosed) {
return false; return false;
} }
} else if (id == CONTROL) { } else if (id == CONTROL) {

View File

@ -803,7 +803,7 @@ public class Portal {
String name = split[0]; String name = split[0];
Blox s = new Blox(world, split[1]); Blox s = new Blox(world, split[1]);
if (!(s.getBlock().getState() instanceof Sign)) { if (!(s.getBlock().getState() instanceof Sign)) {
Stargate.log.info("[Stargate] Invalid sign on line " + l + " [" + s.getBlock() + "]"); Stargate.log.info("[Stargate] Sign on line " + l + " doesn't exist. BlockType = " + s.getBlock().getType());
continue; continue;
} }
SignPost sign = new SignPost(s); SignPost sign = new SignPost(s);
@ -814,7 +814,7 @@ public class Portal {
Blox topLeft = new Blox(world, split[6]); Blox topLeft = new Blox(world, split[6]);
Gate gate = (split[7].contains(";")) ? Gate.getGateByName("nethergate.gate") : Gate.getGateByName(split[7]); Gate gate = (split[7].contains(";")) ? Gate.getGateByName("nethergate.gate") : Gate.getGateByName(split[7]);
if (gate == null) { if (gate == null) {
Stargate.log.info("[Stargate] Invalid gate layout on line " + l + " [" + split[7] + "]"); Stargate.log.info("[Stargate] Gate layout on line " + l + " does not exist [" + split[7] + "]");
continue; continue;
} }

View File

@ -1,6 +1,6 @@
name: Stargate name: Stargate
main: net.TheDgtl.Stargate.Stargate main: net.TheDgtl.Stargate.Stargate
version: 0.4.2 version: 0.4.3
description: Stargate mod for Bukkit description: Stargate mod for Bukkit
author: Drakia author: Drakia
website: http://www.thedgtl.net website: http://www.thedgtl.net