Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 53f8dfb

Browse files
committed
Style
1 parent bf471f7 commit 53f8dfb

File tree

13 files changed

+227
-23
lines changed

13 files changed

+227
-23
lines changed

patchwork-api-base/src/main/java/net/minecraftforge/common/data/ExistingFileHelper.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Minecraft Forge, Patchwork Project
3+
* Copyright (c) 2016-2020, 2019-2020
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation version 2.1
8+
* of the License.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public
16+
* License along with this library; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
120
package net.minecraftforge.common.data;
221

322
import java.io.IOException;

patchwork-dispatcher/src/main/java/net/minecraftforge/fml/event/lifecycle/GatherDataEvent.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Minecraft Forge, Patchwork Project
3+
* Copyright (c) 2016-2020, 2019-2020
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation version 2.1
8+
* of the License.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public
16+
* License along with this library; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
120
package net.minecraftforge.fml.event.lifecycle;
221

322
import java.nio.file.Path;

patchwork-events-entity/src/main/java/net/minecraftforge/event/entity/EntityEvent.java

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,15 @@
3434
* {@link #entity} contains the entity that caused this event to occur.<br>
3535
* <br>
3636
* All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.<br>
37-
**/
37+
**/
3838
public class EntityEvent extends Event {
3939
private final Entity entity;
4040

41-
public EntityEvent(Entity entity)
42-
{
41+
public EntityEvent(Entity entity) {
4342
this.entity = entity;
4443
}
4544

46-
public Entity getEntity()
47-
{
45+
public Entity getEntity() {
4846
return entity;
4947
}
5048

@@ -57,10 +55,9 @@ public Entity getEntity()
5755
* This event does not have a result. {@link HasResult}<br>
5856
* <br>
5957
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.<br>
60-
**/
58+
**/
6159
public static class EntityConstructing extends EntityEvent {
62-
public EntityConstructing(Entity entity)
63-
{
60+
public EntityConstructing(Entity entity) {
6461
super(entity);
6562
}
6663
}
@@ -103,7 +100,7 @@ public void setCanUpdate(boolean canUpdate) {
103100
* This event does not have a result. {@link HasResult}
104101
* <br>
105102
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.<br>
106-
**/
103+
**/
107104
public static class EnteringChunk extends EntityEvent {
108105
private int newChunkX;
109106
private int newChunkZ;
@@ -161,16 +158,15 @@ public void setOldChunkZ(int oldChunkZ) {
161158
* This event does not have a result. {@link HasResult}
162159
* <br>
163160
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.<br>
164-
**/
161+
**/
165162
public static class Size extends EntityEvent {
166163
private final EntityPose pose;
167164
private final EntityDimensions oldSize;
168165
private EntityDimensions newSize;
169166
private final float oldEyeHeight;
170167
private float newEyeHeight;
171168

172-
public Size(Entity entity, EntityPose pose, EntityDimensions size, float defaultEyeHeight)
173-
{
169+
public Size(Entity entity, EntityPose pose, EntityDimensions size, float defaultEyeHeight) {
174170
super(entity);
175171
this.pose = pose;
176172
this.oldSize = size;
@@ -179,7 +175,6 @@ public Size(Entity entity, EntityPose pose, EntityDimensions size, float default
179175
this.newEyeHeight = defaultEyeHeight;
180176
}
181177

182-
183178
public EntityPose getPose() {
184179
return pose;
185180
}

patchwork-events-entity/src/main/java/net/minecraftforge/event/entity/living/LivingEvent.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* receive every child event of this class.<br>
3131
* <br>
3232
* All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.<br>
33-
**/
33+
**/
3434
public class LivingEvent extends EntityEvent {
3535
private final LivingEntity entityLiving;
3636

@@ -57,7 +57,9 @@ public LivingEntity getEntityLiving() {
5757
* <p>This event is fired on the {@link net.minecraftforge.common.MinecraftForge#EVENT_BUS}.</p>
5858
*/
5959
public static class LivingUpdateEvent extends LivingEvent {
60-
public LivingUpdateEvent(LivingEntity e) { super(e); }
60+
public LivingUpdateEvent(LivingEntity e) {
61+
super(e);
62+
}
6163

6264
@Override
6365
public boolean isCancelable() {

patchwork-events-entity/src/main/java/net/patchworkmc/impl/event/entity/EntityEvents.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Minecraft Forge, Patchwork Project
3+
* Copyright (c) 2016-2020, 2019-2020
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation version 2.1
8+
* of the License.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public
16+
* License along with this library; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
120
package net.patchworkmc.impl.event.entity;
221

322
import javax.annotation.Nonnull;

patchwork-events-entity/src/main/java/net/patchworkmc/mixin/event/entity/entity/MixinEntity.java

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
1+
/*
2+
* Minecraft Forge, Patchwork Project
3+
* Copyright (c) 2016-2020, 2019-2020
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation version 2.1
8+
* of the License.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public
16+
* License along with this library; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
120
package net.patchworkmc.mixin.event.entity.entity;
221

322
import net.minecraftforge.common.MinecraftForge;
423
import net.minecraftforge.event.entity.EntityEvent;
524
import org.spongepowered.asm.mixin.Mixin;
625
import org.spongepowered.asm.mixin.Overwrite;
726
import org.spongepowered.asm.mixin.Shadow;
8-
import org.spongepowered.asm.mixin.Unique;
927
import org.spongepowered.asm.mixin.injection.At;
1028
import org.spongepowered.asm.mixin.injection.Inject;
11-
import org.spongepowered.asm.mixin.injection.Redirect;
1229
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
1330

1431
import net.minecraft.entity.Entity;
@@ -87,18 +104,18 @@ public void calculateDimensions() {
87104
this.dimensions = entityDimensions;
88105
this.standingEyeHeight = sizeEvent.getNewEyeHeight();
89106
// forge end
107+
90108
if (entityDimensions2.width < entityDimensions.width) {
91-
double d = (double)entityDimensions2.width / 2.0D;
92-
this.setBoundingBox(new Box(this.getX() - d, this.getY(), this.getZ() - d, this.getX() + d, this.getY() + (double)entityDimensions2.height, this.getZ() + d));
109+
double d = (double) entityDimensions2.width / 2.0D;
110+
this.setBoundingBox(new Box(this.getX() - d, this.getY(), this.getZ() - d, this.getX() + d, this.getY() + (double) entityDimensions2.height, this.getZ() + d));
93111
} else {
94112
Box box = this.getBoundingBox();
95-
this.setBoundingBox(new Box(box.minX, box.minY, box.minZ, box.minX + (double)entityDimensions2.width, box.minY + (double)entityDimensions2.height, box.minZ + (double)entityDimensions2.width));
113+
this.setBoundingBox(new Box(box.minX, box.minY, box.minZ, box.minX + (double) entityDimensions2.width, box.minY + (double) entityDimensions2.height, box.minZ + (double) entityDimensions2.width));
114+
96115
if (entityDimensions2.width > entityDimensions.width && !this.firstUpdate && !this.world.isClient) {
97116
float f = entityDimensions.width - entityDimensions2.width;
98-
this.move(MovementType.SELF, new Vec3d((double)f, 0.0D, (double)f));
117+
this.move(MovementType.SELF, new Vec3d(f, 0.0D, f));
99118
}
100-
101119
}
102120
}
103-
104121
}

patchwork-events-entity/src/main/java/net/patchworkmc/mixin/event/entity/entity/MixinWorldChunk.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Minecraft Forge, Patchwork Project
3+
* Copyright (c) 2016-2020, 2019-2020
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation version 2.1
8+
* of the License.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public
16+
* License along with this library; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
120
package net.patchworkmc.mixin.event.entity.entity;
221

322
import org.objectweb.asm.Opcodes;

patchwork-events-entity/src/main/java/net/patchworkmc/mixin/event/entity/item/MixinItemEntity.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Minecraft Forge, Patchwork Project
3+
* Copyright (c) 2016-2020, 2019-2020
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation version 2.1
8+
* of the License.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public
16+
* License along with this library; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
120
package net.patchworkmc.mixin.event.entity.item;
221

322
import org.spongepowered.asm.mixin.Mixin;

patchwork-events-entity/src/main/java/net/patchworkmc/mixin/event/entity/item/MixinPlayerEntity.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Minecraft Forge, Patchwork Project
3+
* Copyright (c) 2016-2020, 2019-2020
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation version 2.1
8+
* of the License.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public
16+
* License along with this library; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
120
package net.patchworkmc.mixin.event.entity.item;
221

322
import org.spongepowered.asm.mixin.Mixin;

patchwork-events-entity/src/main/java/net/patchworkmc/mixin/event/entity/living/MixinLivingEntity.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Minecraft Forge, Patchwork Project
3+
* Copyright (c) 2016-2020, 2019-2020
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation version 2.1
8+
* of the License.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public
16+
* License along with this library; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
120
package net.patchworkmc.mixin.event.entity.living;
221

322
import org.spongepowered.asm.mixin.Mixin;

0 commit comments

Comments
 (0)