Use minecraft logic for minecarts

This commit is contained in:
fullwall 2017-07-10 01:00:35 +08:00
parent 093533b0ea
commit aa3654c3fa
21 changed files with 117 additions and 136 deletions

View File

@ -100,11 +100,10 @@ public class MinecartChestController extends MobEntityController {
@Override
public void m() {
super.m();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.m();
}
}
}

View File

@ -100,11 +100,10 @@ public class MinecartCommandController extends MobEntityController {
@Override
public void m() {
super.m();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.m();
}
}
}

View File

@ -100,11 +100,10 @@ public class MinecartFurnaceController extends MobEntityController {
@Override
public void m() {
super.m();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.m();
}
}
}

View File

@ -88,11 +88,10 @@ public class MinecartHopperController extends MobEntityController {
@Override
public void m() {
super.m();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.m();
}
}
}

View File

@ -100,11 +100,10 @@ public class MinecartRideableController extends MobEntityController {
@Override
public void m() {
super.m();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.m();
}
}
}

View File

@ -88,11 +88,10 @@ public class MinecartSpawnerController extends MobEntityController {
@Override
public void m() {
super.m();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.m();
}
}
}

View File

@ -88,11 +88,10 @@ public class MinecartTNTController extends MobEntityController {
@Override
public void m() {
super.m();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.m();
}
}
}

View File

@ -41,6 +41,15 @@ public class MinecartChestController extends MobEntityController {
this.npc = (CitizensNPC) npc;
}
@Override
public void A_() {
super.A_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
}
}
@Override
public void collide(net.minecraft.server.v1_11_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
@ -97,16 +106,6 @@ public class MinecartChestController extends MobEntityController {
public NPC getNPC() {
return npc;
}
@Override
public void A_() {
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.A_();
}
}
}
public static class MinecartChestNPC extends CraftMinecartChest implements NPCHolder {

View File

@ -41,6 +41,15 @@ public class MinecartCommandController extends MobEntityController {
this.npc = (CitizensNPC) npc;
}
@Override
public void A_() {
super.A_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
}
}
@Override
public void collide(net.minecraft.server.v1_11_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
@ -97,16 +106,6 @@ public class MinecartCommandController extends MobEntityController {
public NPC getNPC() {
return npc;
}
@Override
public void A_() {
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.A_();
}
}
}
public static class MinecartCommandNPC extends CraftMinecartCommand implements NPCHolder {

View File

@ -41,6 +41,15 @@ public class MinecartFurnaceController extends MobEntityController {
this.npc = (CitizensNPC) npc;
}
@Override
public void A_() {
super.A_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
}
}
@Override
public void collide(net.minecraft.server.v1_11_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
@ -97,16 +106,6 @@ public class MinecartFurnaceController extends MobEntityController {
public NPC getNPC() {
return npc;
}
@Override
public void A_() {
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.A_();
}
}
}
public static class MinecartFurnaceNPC extends CraftMinecartFurnace implements NPCHolder {

View File

@ -37,6 +37,15 @@ public class MinecartHopperController extends MobEntityController {
this.npc = (CitizensNPC) npc;
}
@Override
public void A_() {
super.A_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
}
}
@Override
public void collide(net.minecraft.server.v1_11_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
@ -85,15 +94,5 @@ public class MinecartHopperController extends MobEntityController {
public NPC getNPC() {
return npc;
}
@Override
public void A_() {
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.A_();
}
}
}
}

View File

@ -43,11 +43,10 @@ public class MinecartRideableController extends MobEntityController {
@Override
public void A_() {
super.A_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.A_();
}
}

View File

@ -37,6 +37,15 @@ public class MinecartSpawnerController extends MobEntityController {
this.npc = (CitizensNPC) npc;
}
@Override
public void A_() {
super.A_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
}
}
@Override
public void collide(net.minecraft.server.v1_11_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
@ -85,15 +94,5 @@ public class MinecartSpawnerController extends MobEntityController {
public NPC getNPC() {
return npc;
}
@Override
public void A_() {
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.A_();
}
}
}
}

View File

@ -37,6 +37,15 @@ public class MinecartTNTController extends MobEntityController {
this.npc = (CitizensNPC) npc;
}
@Override
public void A_() {
super.A_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
}
}
@Override
public void collide(net.minecraft.server.v1_11_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
@ -85,15 +94,5 @@ public class MinecartTNTController extends MobEntityController {
public NPC getNPC() {
return npc;
}
@Override
public void A_() {
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.A_();
}
}
}
}

View File

@ -41,6 +41,15 @@ public class MinecartChestController extends MobEntityController {
this.npc = (CitizensNPC) npc;
}
@Override
public void B_() {
super.B_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
}
}
@Override
public void collide(net.minecraft.server.v1_12_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
@ -98,15 +107,6 @@ public class MinecartChestController extends MobEntityController {
return npc;
}
@Override
public void B_() {
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.B_();
}
}
}
public static class MinecartChestNPC extends CraftMinecartChest implements NPCHolder {

View File

@ -41,6 +41,15 @@ public class MinecartCommandController extends MobEntityController {
this.npc = (CitizensNPC) npc;
}
@Override
public void B_() {
super.B_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
}
}
@Override
public void collide(net.minecraft.server.v1_12_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
@ -97,16 +106,6 @@ public class MinecartCommandController extends MobEntityController {
public NPC getNPC() {
return npc;
}
@Override
public void B_() {
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.B_();
}
}
}
public static class MinecartCommandNPC extends CraftMinecartCommand implements NPCHolder {

View File

@ -41,6 +41,15 @@ public class MinecartFurnaceController extends MobEntityController {
this.npc = (CitizensNPC) npc;
}
@Override
public void B_() {
super.B_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
}
}
@Override
public void collide(net.minecraft.server.v1_12_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
@ -97,16 +106,6 @@ public class MinecartFurnaceController extends MobEntityController {
public NPC getNPC() {
return npc;
}
@Override
public void B_() {
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.B_();
}
}
}
public static class MinecartFurnaceNPC extends CraftMinecartFurnace implements NPCHolder {

View File

@ -37,6 +37,15 @@ public class MinecartHopperController extends MobEntityController {
this.npc = (CitizensNPC) npc;
}
@Override
public void B_() {
super.B_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
}
}
@Override
public void collide(net.minecraft.server.v1_12_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
@ -85,15 +94,5 @@ public class MinecartHopperController extends MobEntityController {
public NPC getNPC() {
return npc;
}
@Override
public void B_() {
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.B_();
}
}
}
}

View File

@ -43,11 +43,10 @@ public class MinecartRideableController extends MobEntityController {
@Override
public void B_() {
super.B_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.B_();
}
}

View File

@ -37,6 +37,15 @@ public class MinecartSpawnerController extends MobEntityController {
this.npc = (CitizensNPC) npc;
}
@Override
public void B_() {
super.B_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
}
}
@Override
public void collide(net.minecraft.server.v1_12_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
@ -86,14 +95,5 @@ public class MinecartSpawnerController extends MobEntityController {
return npc;
}
@Override
public void B_() {
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.B_();
}
}
}
}

View File

@ -37,6 +37,15 @@ public class MinecartTNTController extends MobEntityController {
this.npc = (CitizensNPC) npc;
}
@Override
public void B_() {
super.B_();
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
}
}
@Override
public void collide(net.minecraft.server.v1_12_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
@ -85,15 +94,5 @@ public class MinecartTNTController extends MobEntityController {
public NPC getNPC() {
return npc;
}
@Override
public void B_() {
if (npc != null) {
npc.update();
NMSImpl.minecartItemLogic(this);
} else {
super.B_();
}
}
}
}